Documentation
¶
Index ¶
- Variables
- func ClusterDeployCredential(ctx context.Context, cl client.Client, cd *kcmv1.ClusterDeployment, ...) (*kcmv1.Credential, error)
- func ClusterDeployCrossNamespaceServicesRefs(ctx context.Context, cd *kcmv1.ClusterDeployment) (errs error)
- func ClusterTemplateK8sCompatibility(ctx context.Context, cl client.Client, clusterTemplate *kcmv1.ClusterTemplate, ...) error
- func GetInUseProvidersWithContracts(ctx context.Context, cl client.Client, pTpl *kcmv1.ProviderTemplate) (map[string][]string, error)
- func GetIncompatibleContracts(ctx context.Context, cl client.Client, release *kcmv1.Release, ...) (string, error)
- func ServicesHaveValidTemplates(ctx context.Context, cl client.Client, services []kcmv1.Service, ns string) error
Constants ¶
This section is empty.
Variables ¶
var ErrProviderIsNotReady = errors.New("provider is not yet ready")
ErrProviderIsNotReady signals if the corresponding github.com/K0rdent/kcm/api/v1alpha1.ProviderTemplate is not yet ready.
Functions ¶
func ClusterDeployCredential ¶
func ClusterDeployCredential(ctx context.Context, cl client.Client, cd *kcmv1.ClusterDeployment, clusterTemplate *kcmv1.ClusterTemplate) (*kcmv1.Credential, error)
ClusterDeployCredential validates a github.com/K0rdent/kcm/api/v1alpha1.Credential object referred in the given github.com/K0rdent/kcm/api/v1alpha1.ClusterDeployment is ready and supported by the given github.com/K0rdent/kcm/api/v1alpha1.ClusterTemplate.
func ClusterDeployCrossNamespaceServicesRefs ¶
func ClusterDeployCrossNamespaceServicesRefs(ctx context.Context, cd *kcmv1.ClusterDeployment) (errs error)
ClusterDeployCrossNamespaceServicesRefs validates that the service and templates references of the given github.com/K0rdent/kcm/api/v1alpha1.ClusterDeployment reference all objects only in the obj's namespace.
func ClusterTemplateK8sCompatibility ¶
func ClusterTemplateK8sCompatibility(ctx context.Context, cl client.Client, clusterTemplate *kcmv1.ClusterTemplate, cd *kcmv1.ClusterDeployment) error
ClusterTemplateK8sCompatibility validates the K8s version of the given github.com/K0rdent/kcm/api/v1alpha1.ClusterTemplate satisfies the K8s constraints (if any) of the github.com/K0rdent/kcm/api/v1alpha1.ServiceTemplate objects referenced by the given github.com/K0rdent/kcm/api/v1alpha1.ClusterDeployment.
func GetInUseProvidersWithContracts ¶
func GetInUseProvidersWithContracts(ctx context.Context, cl client.Client, pTpl *kcmv1.ProviderTemplate) (map[string][]string, error)
GetInUseProvidersWithContracts constructs a map based on the given github.com/K0rdent/kcm/api/v1alpha1.ProviderTemplate where keys are a provider name in the format (bootstrap|control-plane|infrastructure)-<name> and values are the corresponding CAPI contract versions, e.g. infrastructure-aws: []{v1alpha3, v1alpha4, v1beta1}
func GetIncompatibleContracts ¶
func GetIncompatibleContracts(ctx context.Context, cl client.Client, release *kcmv1.Release, mgmt *kcmv1.Management) (string, error)
GetIncompatibleContracts validates if all of the providers specified in the given github.com/K0rdent/kcm/api/v1alpha1.Management have compatible CAPI contract versions. Returns ErrProviderIsNotReady is the corresponding github.com/K0rdent/kcm/api/v1alpha1.ProviderTemplate is not yet ready and the validation cannot proceed further.
func ServicesHaveValidTemplates ¶
func ServicesHaveValidTemplates(ctx context.Context, cl client.Client, services []kcmv1.Service, ns string) error
ServicesHaveValidTemplates validates the given array of github.com/K0rdent/kcm/api/v1alpha1.Service checking if referenced github.com/K0rdent/kcm/api/v1alpha1.ServiceTemplate is valid and is ready to be consumed.
Types ¶
This section is empty.