Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveLabelValue ¶
func ResolveLabelValue(m v1.EnvironmentSourceSelectorLabelMatcher, cp runtime.Object) (string, error)
ResolveLabelValue from a EnvironmentSourceSelectorLabelMatcher and an Object.
Types ¶
type APIEnvironmentFetcher ¶
type APIEnvironmentFetcher struct {
// contains filtered or unexported fields
}
APIEnvironmentFetcher fetches the Environments referenced by a composite resoruce using a kube client.
func NewAPIEnvironmentFetcher ¶
func NewAPIEnvironmentFetcher(kube client.Client) *APIEnvironmentFetcher
NewAPIEnvironmentFetcher creates a new APIEnvironmentFetcher
func (*APIEnvironmentFetcher) Fetch ¶
func (f *APIEnvironmentFetcher) Fetch(ctx context.Context, cr resource.Composite) (*Environment, error)
Fetch all EnvironmentConfigs referenced by cr and merge their `.Data` into a single Environment.
Note: The `.Data` path is trimmed from the result so its necessary to include it in patches.
type APIEnvironmentSelector ¶
type APIEnvironmentSelector struct {
// contains filtered or unexported fields
}
APIEnvironmentSelector selects an environment using a kube client.
func NewAPIEnvironmentSelector ¶
func NewAPIEnvironmentSelector(kube client.Client) *APIEnvironmentSelector
NewAPIEnvironmentSelector creates a new APIEnvironmentSelector
func (*APIEnvironmentSelector) SelectEnvironment ¶
func (s *APIEnvironmentSelector) SelectEnvironment(ctx context.Context, cr resource.Composite, rev *v1.CompositionRevision) error
SelectEnvironment for cr using the configuration defined in comp. The computed list of EnvironmentConfig references will be stored in cr.
type Environment ¶
type Environment struct {
unstructured.Unstructured
}
Environment defines unstructured data.
type NilEnvironmentFetcher ¶
type NilEnvironmentFetcher struct{}
A NilEnvironmentFetcher always returns nil on Fetch().
func NewNilEnvironmentFetcher ¶
func NewNilEnvironmentFetcher() *NilEnvironmentFetcher
NewNilEnvironmentFetcher creates a new NilEnvironmentFetcher.
func (*NilEnvironmentFetcher) Fetch ¶
func (f *NilEnvironmentFetcher) Fetch(_ context.Context, _ resource.Composite) (*Environment, error)
Fetch always returns nil.
type NoopEnvironmentSelector ¶
type NoopEnvironmentSelector struct{}
A NoopEnvironmentSelector always returns nil on Fetch().
func NewNoopEnvironmentSelector ¶
func NewNoopEnvironmentSelector() *NoopEnvironmentSelector
NewNoopEnvironmentSelector creates a new NoopEnvironmentSelector.
func (*NoopEnvironmentSelector) SelectEnvironment ¶
func (s *NoopEnvironmentSelector) SelectEnvironment(_ context.Context, _ resource.Composite, _ *v1.CompositionRevision) error
SelectEnvironment always returns nil.