Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the config v1alpha1 API group +kubebuilder:object:generate=true +groupName=config.projectsveltos.io
Index ¶
- Constants
- Variables
- func GetClusterConfigurationSectionIndex(clusterConfiguration *ClusterConfiguration, clusterProfileName string) (int, error)
- func GetClusterProfileOwnerReference(clusterSummary *ClusterSummary) (*metav1.OwnerReference, error)
- type Chart
- type ClusterConfiguration
- type ClusterConfigurationList
- type ClusterConfigurationStatus
- type ClusterProfile
- type ClusterProfileList
- type ClusterProfileResource
- type ClusterProfileSpec
- type ClusterProfileStatus
- type ClusterReport
- type ClusterReportList
- type ClusterReportSpec
- type ClusterReportStatus
- type ClusterSummary
- type ClusterSummaryList
- type ClusterSummarySpec
- type ClusterSummaryStatus
- type DeploymentType
- type DryRunReconciliationError
- type Feature
- type FeatureID
- type FeatureStatus
- type FeatureSummary
- type HelmAction
- type HelmChart
- type HelmChartAction
- type HelmChartStatus
- type HelmChartSummary
- type KustomizationRef
- type PolicyRef
- type ReleaseReport
- type Resource
- type ResourceAction
- type ResourceReport
- type StopMatchingBehavior
- type SyncMode
- type TemplateResourceRef
Constants ¶
const ( // ClusterProfileFinalizer allows ClusterProfileReconciler to clean up resources associated with // ClusterProfile before removing it from the apiserver. ClusterProfileFinalizer = "clusterprofilefinalizer.projectsveltos.io" ClusterProfileKind = "ClusterProfile" )
const ( // ClusterNameLabel is the label set on: // - ClusterSummary instances created by a ClusterProfile instance for a given cluster; // - ClusterConfiguration instances created by a ClusterProfile instance for a given cluster; // - ClusterReport instances created by a ClusterProfile instance for a given cluster; ClusterNameLabel = "projectsveltos.io/cluster-name" // ClusterTypeLabel is the label set on: // - ClusterSummary instances created by a ClusterProfile instance for a given cluster; // - ClusterConfiguration instances created by a ClusterProfile instance for a given cluster; // - ClusterReport instances created by a ClusterProfile instance for a given cluster; ClusterTypeLabel = "projectsveltos.io/cluster-type" )
const ( // SyncModeOneTime indicates feature sync should happen only once SyncModeOneTime = SyncMode("OneTime") // SyncModeContinuous indicates feature sync should continuously happen SyncModeContinuous = SyncMode("Continuous") // SyncModeContinuousWithDriftDetection indicates feature sync should continuously happen // if configuration drift is detected in the managed cluster, it will be overrid SyncModeContinuousWithDriftDetection = SyncMode("ContinuousWithDriftDetection") // SyncModeDryRun indicates feature sync should continuously happen // no feature will be updated in the CAPI Cluster though. SyncModeDryRun = SyncMode("DryRun") )
const ( // DeploymentTypeLocal indicates resource deployment need to // be in the management cluster DeploymentTypeLocal = DeploymentType("Local") // DeploymentTypeRemote indicates resource deployment need to // be in the managed cluster DeploymentTypeRemote = DeploymentType("Remote") )
const ( // HelmChartActionInstall will cause Helm chart to be installed HelmChartActionInstall = HelmChartAction("Install") // HelmChartActionUninstall will cause Helm chart to be removed HelmChartActionUninstall = HelmChartAction("Uninstall") )
const ( // ClusterSummaryFinalizer allows ClusterSummaryReconciler to clean up resources associated with // ClusterSummary before removing it from the apiserver. ClusterSummaryFinalizer = "clustersummaryfinalizer.projectsveltos.io" ClusterSummaryKind = "ClusterSummary" )
const ( // FeatureResources is the identifier for generic Resources feature FeatureResources = FeatureID("Resources") // FeatureHelm is the identifier for Helm feature FeatureHelm = FeatureID("Helm") // FeatureKustomize is the identifier for Kustomize feature FeatureKustomize = FeatureID("Kustomize") )
const ( // FeatureStatusProvisioning indicates that feature is being // provisioned in the workload cluster FeatureStatusProvisioning = FeatureStatus("Provisioning") // FeatureStatusProvisioned indicates that feature has being // provisioned in the workload cluster FeatureStatusProvisioned = FeatureStatus("Provisioned") // FeatureStatusFailed indicates that configuring the feature // in the workload cluster failed FeatureStatusFailed = FeatureStatus("Failed") // FeatureStatusRemoving indicates that feature is being // removed FeatureStatusRemoving = FeatureStatus("Removing") // FeatureStatusRemoved indicates that feature is removed FeatureStatusRemoved = FeatureStatus("Removed") )
const ( // HelChartStatusManaging indicates helm chart is successfully being managed HelChartStatusManaging = HelmChartStatus("Managing") // HelChartStatusConflict indicates there is a conflict with another // ClusterSummary to manage the helm chart HelChartStatusConflict = HelmChartStatus("Conflict") )
const (
ClusterConfigurationKind = "ClusterConfiguration"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "config.projectsveltos.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func GetClusterConfigurationSectionIndex ¶
func GetClusterConfigurationSectionIndex(clusterConfiguration *ClusterConfiguration, clusterProfileName string) (int, error)
GetClusterConfigurationSectionIndex returns Status.ClusterProfileResources index for given ClusterProfile. If not found, returns an error
func GetClusterProfileOwnerReference ¶
func GetClusterProfileOwnerReference(clusterSummary *ClusterSummary) (*metav1.OwnerReference, error)
GetClusterProfileOwnerReference returns the ClusterProfile owning a given ClusterSummary
Types ¶
type Chart ¶
type Chart struct { // RepoURL URL of the repo containing the helm chart deployed // in the Cluster. // +kubebuilder:validation:MinLength=1 RepoURL string `json:"repoURL"` // ReleaseName name of the release deployed in the Cluster. // +kubebuilder:validation:MinLength=1 ReleaseName string `json:"releaseName"` // Namespace where chart is deployed in the Cluster. // +optional Namespace string `json:"namespace,omitempty"` // ChartVersion is the version of the helm chart deployed in the Cluster. ChartVersion string `json:"chartVersion"` // AppVersion is the version of the app deployed in the Cluster. // +optional AppVersion string `json:"appVersion,omitempty"` // LastAppliedTime identifies when this resource was last applied to the cluster. LastAppliedTime *metav1.Time `json:"lastAppliedTime"` }
func (*Chart) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Chart.
func (*Chart) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterConfiguration ¶
type ClusterConfiguration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Status ClusterConfigurationStatus `json:"status,omitempty"` }
ClusterConfiguration is the Schema for the clusterconfigurations API
func (*ClusterConfiguration) DeepCopy ¶
func (in *ClusterConfiguration) DeepCopy() *ClusterConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfiguration.
func (*ClusterConfiguration) DeepCopyInto ¶
func (in *ClusterConfiguration) DeepCopyInto(out *ClusterConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterConfiguration) DeepCopyObject ¶
func (in *ClusterConfiguration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterConfigurationList ¶
type ClusterConfigurationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterConfiguration `json:"items"` }
ClusterConfigurationList contains a list of ClusterConfiguration
func (*ClusterConfigurationList) DeepCopy ¶
func (in *ClusterConfigurationList) DeepCopy() *ClusterConfigurationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfigurationList.
func (*ClusterConfigurationList) DeepCopyInto ¶
func (in *ClusterConfigurationList) DeepCopyInto(out *ClusterConfigurationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterConfigurationList) DeepCopyObject ¶
func (in *ClusterConfigurationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterConfigurationStatus ¶
type ClusterConfigurationStatus struct { // ClusterProfileResources is the list of resources currently deployed in a Cluster due // to ClusterProfiles // +optional ClusterProfileResources []ClusterProfileResource `json:"clusterProfileResources,omitempty"` }
ClusterConfigurationStatus defines the observed state of ClusterConfiguration
func (*ClusterConfigurationStatus) DeepCopy ¶
func (in *ClusterConfigurationStatus) DeepCopy() *ClusterConfigurationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfigurationStatus.
func (*ClusterConfigurationStatus) DeepCopyInto ¶
func (in *ClusterConfigurationStatus) DeepCopyInto(out *ClusterConfigurationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterProfile ¶
type ClusterProfile struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterProfileSpec `json:"spec,omitempty"` Status ClusterProfileStatus `json:"status,omitempty"` }
ClusterProfile is the Schema for the clusterprofiles API
func GetClusterProfileOwner ¶
func GetClusterProfileOwner(ctx context.Context, c client.Client, clusterSummary *ClusterSummary, ) (*ClusterProfile, error)
GetClusterProfileOwner returns the ClusterProfile owning this clusterSummary. Returns nil if ClusterProfile does not exist anymore.
func (*ClusterProfile) DeepCopy ¶
func (in *ClusterProfile) DeepCopy() *ClusterProfile
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfile.
func (*ClusterProfile) DeepCopyInto ¶
func (in *ClusterProfile) DeepCopyInto(out *ClusterProfile)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterProfile) DeepCopyObject ¶
func (in *ClusterProfile) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterProfileList ¶
type ClusterProfileList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterProfile `json:"items"` }
ClusterProfileList contains a list of ClusterProfile
func (*ClusterProfileList) DeepCopy ¶
func (in *ClusterProfileList) DeepCopy() *ClusterProfileList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileList.
func (*ClusterProfileList) DeepCopyInto ¶
func (in *ClusterProfileList) DeepCopyInto(out *ClusterProfileList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterProfileList) DeepCopyObject ¶
func (in *ClusterProfileList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterProfileResource ¶
type ClusterProfileResource struct { // ClusterProfileName is the name of the ClusterProfile matching the Cluster. ClusterProfileName string `json:"clusterProfileName"` // Features contains the list of policies deployed in the Cluster because // of a given feature // +optional Features []Feature `json:"Features,omitempty"` }
ClusterProfileResource keeps info on all of the resources deployed in this Cluster due to a given ClusterProfile
func (*ClusterProfileResource) DeepCopy ¶
func (in *ClusterProfileResource) DeepCopy() *ClusterProfileResource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileResource.
func (*ClusterProfileResource) DeepCopyInto ¶
func (in *ClusterProfileResource) DeepCopyInto(out *ClusterProfileResource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterProfileSpec ¶
type ClusterProfileSpec struct { // ClusterSelector identifies clusters to associate to. // +optional ClusterSelector libsveltosv1alpha1.Selector `json:"clusterSelector,omitempty"` // ClusterRefs identifies clusters to associate to. // +optional ClusterRefs []corev1.ObjectReference `json:"clusterRefs,omitempty"` // SyncMode specifies how features are synced in a matching workload cluster. // - OneTime means, first time a workload cluster matches the ClusterProfile, // features will be deployed in such cluster. Any subsequent feature configuration // change won't be applied into the matching workload clusters; // - Continuous means first time a workload cluster matches the ClusterProfile, // features will be deployed in such a cluster. Any subsequent feature configuration // change will be applied into the matching workload clusters. // - DryRun means no change will be propagated to any matching cluster. A report // instead will be generated summarizing what would happen in any matching cluster // because of the changes made to ClusterProfile while in DryRun mode. // +kubebuilder:default:=Continuous // +optional SyncMode SyncMode `json:"syncMode,omitempty"` // StopMatchingBehavior indicates what behavior should be when a Cluster stop matching // the ClusterProfile. By default all deployed Helm charts and Kubernetes resources will // be withdrawn from Cluster. Setting StopMatchingBehavior to LeavePolicies will instead // leave ClusterProfile deployed policies in the Cluster. // +kubebuilder:default:=WithdrawPolicies // +optional StopMatchingBehavior StopMatchingBehavior `json:"stopMatchingBehavior,omitempty"` // TemplateResourceRefs is a list of resource to collect from the management cluster. // Those resources' values will be used to instantiate templates contained in referenced // PolicyRefs and Helm charts // +patchMergeKey=identifier // +patchStrategy=merge,retainKeys // +optional TemplateResourceRefs []TemplateResourceRef `json:"templateResourceRefs,omitempty"` // PolicyRefs references all the ConfigMaps/Secrets containing kubernetes resources // that need to be deployed in the matching CAPI clusters. // +optional PolicyRefs []PolicyRef `json:"policyRefs,omitempty"` // Helm charts is a list of helm charts that need to be deployed HelmCharts []HelmChart `json:"helmCharts,omitempty"` // Kustomization refs is a list of kustomization paths. Kustomization will // be run on those paths and the outcome will be deployed. KustomizationRefs []KustomizationRef `json:"kustomizationRefs,omitempty"` }
ClusterProfileSpec defines the desired state of ClusterProfile
func (*ClusterProfileSpec) DeepCopy ¶
func (in *ClusterProfileSpec) DeepCopy() *ClusterProfileSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileSpec.
func (*ClusterProfileSpec) DeepCopyInto ¶
func (in *ClusterProfileSpec) DeepCopyInto(out *ClusterProfileSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterProfileStatus ¶
type ClusterProfileStatus struct { // MatchingClusterRefs reference all the cluster-api Cluster currently matching // ClusterProfile ClusterSelector MatchingClusterRefs []corev1.ObjectReference `json:"matchingClusters,omitempty"` }
ClusterProfileStatus defines the observed state of ClusterProfile
func (*ClusterProfileStatus) DeepCopy ¶
func (in *ClusterProfileStatus) DeepCopy() *ClusterProfileStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterProfileStatus.
func (*ClusterProfileStatus) DeepCopyInto ¶
func (in *ClusterProfileStatus) DeepCopyInto(out *ClusterProfileStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterReport ¶
type ClusterReport struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterReportSpec `json:"spec,omitempty"` Status ClusterReportStatus `json:"status,omitempty"` }
ClusterReport is the Schema for the clusterreports API
func (*ClusterReport) DeepCopy ¶
func (in *ClusterReport) DeepCopy() *ClusterReport
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterReport.
func (*ClusterReport) DeepCopyInto ¶
func (in *ClusterReport) DeepCopyInto(out *ClusterReport)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterReport) DeepCopyObject ¶
func (in *ClusterReport) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterReportList ¶
type ClusterReportList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterReport `json:"items"` }
ClusterReportList contains a list of ClusterReport
func (*ClusterReportList) DeepCopy ¶
func (in *ClusterReportList) DeepCopy() *ClusterReportList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterReportList.
func (*ClusterReportList) DeepCopyInto ¶
func (in *ClusterReportList) DeepCopyInto(out *ClusterReportList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterReportList) DeepCopyObject ¶
func (in *ClusterReportList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterReportSpec ¶
type ClusterReportSpec struct { // ClusterNamespace is the namespace of the CAPI Cluster this // ClusterReport is for. ClusterNamespace string `json:"clusterNamespace"` // ClusterName is the name of the CAPI Cluster this ClusterReport // is for. ClusterName string `json:"clusterName"` }
ClusterReportSpec defines the desired state of ClusterReport
func (*ClusterReportSpec) DeepCopy ¶
func (in *ClusterReportSpec) DeepCopy() *ClusterReportSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterReportSpec.
func (*ClusterReportSpec) DeepCopyInto ¶
func (in *ClusterReportSpec) DeepCopyInto(out *ClusterReportSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterReportStatus ¶
type ClusterReportStatus struct { // ReleaseReports contains report on helm releases // +optional ReleaseReports []ReleaseReport `json:"releaseReports,omitempty"` // ResourceReports contains report on Kubernetes resources // deployed because of PolicyRefs // +optional ResourceReports []ResourceReport `json:"resourceReports,omitempty"` // KustomizeResourceReports contains report on Kubernetes resources // deployed because of KustomizationRefs // +optional KustomizeResourceReports []ResourceReport `json:"kustomizeResourceReports,omitempty"` }
ClusterReportStatus defines the observed state of ClusterReport
func (*ClusterReportStatus) DeepCopy ¶
func (in *ClusterReportStatus) DeepCopy() *ClusterReportStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterReportStatus.
func (*ClusterReportStatus) DeepCopyInto ¶
func (in *ClusterReportStatus) DeepCopyInto(out *ClusterReportStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterSummary ¶
type ClusterSummary struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSummarySpec `json:"spec,omitempty"` Status ClusterSummaryStatus `json:"status,omitempty"` }
ClusterSummary is the Schema for the clustersummaries API
func GetClusterSummary ¶
func (*ClusterSummary) DeepCopy ¶
func (in *ClusterSummary) DeepCopy() *ClusterSummary
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSummary.
func (*ClusterSummary) DeepCopyInto ¶
func (in *ClusterSummary) DeepCopyInto(out *ClusterSummary)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterSummary) DeepCopyObject ¶
func (in *ClusterSummary) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterSummaryList ¶
type ClusterSummaryList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterSummary `json:"items"` }
ClusterSummaryList contains a list of ClusterSummary
func (*ClusterSummaryList) DeepCopy ¶
func (in *ClusterSummaryList) DeepCopy() *ClusterSummaryList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSummaryList.
func (*ClusterSummaryList) DeepCopyInto ¶
func (in *ClusterSummaryList) DeepCopyInto(out *ClusterSummaryList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterSummaryList) DeepCopyObject ¶
func (in *ClusterSummaryList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterSummarySpec ¶
type ClusterSummarySpec struct { // ClusterNamespace is the namespace of the workload Cluster this // ClusterSummary is for. ClusterNamespace string `json:"clusterNamespace"` // ClusterName is the name of the workload Cluster this ClusterSummary is for. ClusterName string `json:"clusterName"` // ClusterType is the type of Cluster ClusterType libsveltosv1alpha1.ClusterType `json:"clusterType"` // ClusterProfileSpec represent the configuration that will be applied to // the workload cluster. ClusterProfileSpec ClusterProfileSpec `json:"clusterProfileSpec,omitempty"` }
ClusterSummarySpec defines the desired state of ClusterSummary
func (*ClusterSummarySpec) DeepCopy ¶
func (in *ClusterSummarySpec) DeepCopy() *ClusterSummarySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSummarySpec.
func (*ClusterSummarySpec) DeepCopyInto ¶
func (in *ClusterSummarySpec) DeepCopyInto(out *ClusterSummarySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterSummaryStatus ¶
type ClusterSummaryStatus struct { // FeatureSummaries reports the status of each workload cluster feature // directly managed by ClusterProfile. // +listType=atomic // +optional FeatureSummaries []FeatureSummary `json:"featureSummaries,omitempty"` // HelmReleaseSummaries reports the status of each helm chart // directly managed by ClusterProfile. // +listType=atomic // +optional HelmReleaseSummaries []HelmChartSummary `json:"helmReleaseSummaries,omitempty"` }
ClusterSummaryStatus defines the observed state of ClusterSummary
func (*ClusterSummaryStatus) DeepCopy ¶
func (in *ClusterSummaryStatus) DeepCopy() *ClusterSummaryStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSummaryStatus.
func (*ClusterSummaryStatus) DeepCopyInto ¶
func (in *ClusterSummaryStatus) DeepCopyInto(out *ClusterSummaryStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeploymentType ¶
type DeploymentType string
DeploymentType indicates whether resources need to be deployed into the management cluster (local) or the managed cluster (remote) +kubebuilder:validation:Enum:=Local;Remote
type DryRunReconciliationError ¶
type DryRunReconciliationError struct{}
func (*DryRunReconciliationError) DeepCopy ¶
func (in *DryRunReconciliationError) DeepCopy() *DryRunReconciliationError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DryRunReconciliationError.
func (*DryRunReconciliationError) DeepCopyInto ¶
func (in *DryRunReconciliationError) DeepCopyInto(out *DryRunReconciliationError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DryRunReconciliationError) Error ¶
func (m *DryRunReconciliationError) Error() string
type Feature ¶
type Feature struct { // FeatureID is an indentifier of the feature whose status is reported FeatureID FeatureID `json:"featureID"` // Resources is a list of resources deployed in the Cluster. // +optional Resources []Resource `json:"resources,omitempty"` // Charts is a list of helm charts deployed in the Cluster. // +optional Charts []Chart `json:"charts,omitempty"` }
func (*Feature) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature.
func (*Feature) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FeatureStatus ¶
type FeatureStatus string
+kubebuilder:validation:Enum:=Provisioning;Provisioned;Failed;Removing;Removed
type FeatureSummary ¶
type FeatureSummary struct { // FeatureID is an indentifier of the feature whose status is reported FeatureID FeatureID `json:"featureID"` // Hash represents of a unique value for a feature at a fixed point in // time // +optional Hash []byte `json:"hash,omitempty"` // Status represents the state of the feature in the workload cluster // +optional Status FeatureStatus `json:"status,omitempty"` // FailureReason indicates the type of error that occurred. // +optional FailureReason *string `json:"failureReason,omitempty"` // FailureMessage provides more information about the error. // +optional FailureMessage *string `json:"failureMessage,omitempty"` // DeployedGroupVersionKind contains all GroupVersionKinds deployed in either // the workload cluster or the management cluster because of this feature. // Each element has format kind.version.group // +optional DeployedGroupVersionKind []string `json:"deployedGroupVersionKind,omitempty"` // LastAppliedTime is the time feature was last reconciled // +optional LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"` }
FeatureSummary contains a summary of the state of a workload cluster feature.
func (*FeatureSummary) DeepCopy ¶
func (in *FeatureSummary) DeepCopy() *FeatureSummary
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureSummary.
func (*FeatureSummary) DeepCopyInto ¶
func (in *FeatureSummary) DeepCopyInto(out *FeatureSummary)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HelmAction ¶
type HelmAction string
HelmAction represents the type of action on a give resource or helm release
const ( NoHelmAction HelmAction = "No Action" InstallHelmAction HelmAction = "Install" UpgradeHelmAction HelmAction = "Upgrade" UninstallHelmAction HelmAction = "Delete" ConflictHelmAction HelmAction = "Conflict" )
Define the HelmAction constants.
type HelmChart ¶
type HelmChart struct { // RepositoryURL is the URL helm chart repository // +kubebuilder:validation:MinLength=1 RepositoryURL string `json:"repositoryURL"` // RepositoryName is the name helm chart repository // +kubebuilder:validation:MinLength=1 RepositoryName string `json:"repositoryName"` // ChartName is the chart name // +kubebuilder:validation:MinLength=1 ChartName string `json:"chartName"` // ChartVersion is the chart version // +kubebuilder:validation:MinLength=1 ChartVersion string `json:"chartVersion"` // ReleaseName is the chart release // +kubebuilder:validation:MinLength=1 ReleaseName string `json:"releaseName"` // ReleaseNamespace is the namespace release will be installed // +kubebuilder:validation:MinLength=1 ReleaseNamespace string `json:"releaseNamespace"` // Values holds the values for this Helm release. // Go templating with the values from the referenced CAPI Cluster. // Currently following can be referenced: // - Cluster => CAPI Cluster for instance // - KubeadmControlPlane => the CAPI Cluster controlPlaneRef // - InfrastructureProvider => the CAPI cluster infrastructure provider // - SecretRef => store any confindetial information in a Secret, set SecretRef then reference it // +optional Values string `json:"values,omitempty"` // HelmChartAction is the action that will be taken on the helm chart // +kubebuilder:default:=Install // +optional HelmChartAction HelmChartAction `json:"helmChartAction,omitempty"` }
func (*HelmChart) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChart.
func (*HelmChart) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HelmChartAction ¶
type HelmChartAction string
HelmChartAction specifies action on an helm chart +kubebuilder:validation:Enum:=Install;Uninstall
type HelmChartStatus ¶
type HelmChartStatus string
HelChartStatus specifies whether ClusterSummary is successfully managing an helm chart or not +kubebuilder:validation:Enum:=Managing;Conflict
type HelmChartSummary ¶
type HelmChartSummary struct { // ReleaseName is the chart release // +kubebuilder:validation:MinLength=1 ReleaseName string `json:"releaseName"` // ReleaseNamespace is the namespace release will be installed // +kubebuilder:validation:MinLength=1 ReleaseNamespace string `json:"releaseNamespace"` // Status indicates whether ClusterSummary can manage the helm // chart or there is a conflict Status HelmChartStatus `json:"status"` // Status indicates whether ClusterSummary can manage the helm // chart or there is a conflict // +optional ConflictMessage string `json:"conflictMessage,omitempty"` }
func (*HelmChartSummary) DeepCopy ¶
func (in *HelmChartSummary) DeepCopy() *HelmChartSummary
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartSummary.
func (*HelmChartSummary) DeepCopyInto ¶
func (in *HelmChartSummary) DeepCopyInto(out *HelmChartSummary)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KustomizationRef ¶ added in v0.10.0
type KustomizationRef struct { // Namespace of the referenced resource. // Namespace can be left empty. In such a case, namespace will // be implicit set to cluster's namespace. Namespace string `json:"namespace"` // Name of the referenced resource. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // Kind of the resource. Supported kinds are: // - flux GitRepository;OCIRepository;Bucket // - ConfigMap/Secret // +kubebuilder:validation:Enum=GitRepository;OCIRepository;Bucket;ConfigMap;Secret Kind string `json:"kind"` // Path to the directory containing the kustomization.yaml file, or the // set of plain YAMLs a kustomization.yaml should be generated for. // Defaults to 'None', which translates to the root path of the SourceRef. // +optional Path string `json:"path,omitempty"` // TargetNamespace sets or overrides the namespace in the // kustomization.yaml file. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Optional // +optional TargetNamespace string `json:"targetNamespace,omitempty"` // DeploymentType indicates whether resources need to be deployed // into the management cluster (local) or the managed cluster (remote) // +kubebuilder:default:=Remote // +optional DeploymentType DeploymentType `json:"deploymentType,omitempty"` }
func (*KustomizationRef) DeepCopy ¶ added in v0.10.0
func (in *KustomizationRef) DeepCopy() *KustomizationRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationRef.
func (*KustomizationRef) DeepCopyInto ¶ added in v0.10.0
func (in *KustomizationRef) DeepCopyInto(out *KustomizationRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PolicyRef ¶
type PolicyRef struct { // Namespace of the referenced resource. // Namespace can be left empty. In such a case, namespace will // be implicit set to cluster's namespace. Namespace string `json:"namespace"` // Name of the referenced resource. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // Kind of the resource. Supported kinds are: Secrets and ConfigMaps. // +kubebuilder:validation:Enum=Secret;ConfigMap Kind string `json:"kind"` // DeploymentType indicates whether resources need to be deployed // into the management cluster (local) or the managed cluster (remote) // +kubebuilder:default:=Remote // +optional DeploymentType DeploymentType `json:"deploymentType,omitempty"` }
func (*PolicyRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRef.
func (*PolicyRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReleaseReport ¶
type ReleaseReport struct { // ReleaseName of the release deployed in the CAPI Cluster. // +kubebuilder:validation:MinLength=1 ReleaseName string `json:"chartName"` // Namespace where release is deployed in the CAPI Cluster. // +kubebuilder:validation:MinLength=1 ReleaseNamespace string `json:"releaseNamespace"` // ChartVersion is the version of the helm chart deployed // in the CAPI Cluster. ChartVersion string `json:"chartVersion"` // Action represent the type of operation on the Helm Chart // +kubebuilder:validation:Enum=No Action;Install;Upgrade;Delete;Conflict // +optional Action string `json:"action,omitempty"` // Message is for any message that needs to added to better // explain the action. // +optional Message string `json:"message,omitempty"` }
func (*ReleaseReport) DeepCopy ¶
func (in *ReleaseReport) DeepCopy() *ReleaseReport
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReleaseReport.
func (*ReleaseReport) DeepCopyInto ¶
func (in *ReleaseReport) DeepCopyInto(out *ReleaseReport)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Resource ¶
type Resource struct { // Name of the resource deployed in the Cluster. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // Namespace of the resource deployed in the Cluster. // Empty for resources scoped at cluster level. // +optional Namespace string `json:"namespace,omitempty"` // Group of the resource deployed in the Cluster. Group string `json:"group"` // Kind of the resource deployed in the Cluster. // +kubebuilder:validation:MinLength=1 Kind string `json:"kind"` // Version of the resource deployed in the Cluster. // +kubebuilder:validation:MinLength=1 Version string `json:"version"` // LastAppliedTime identifies when this resource was last applied to the cluster. // +optional LastAppliedTime *metav1.Time `json:"lastAppliedTime,omitempty"` // Owner is the list of ConfigMap/Secret containing this resource. Owner corev1.ObjectReference `json:"owner"` }
func (*Resource) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.
func (*Resource) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceAction ¶
type ResourceAction string
const ( NoResourceAction ResourceAction = "No Action" CreateResourceAction ResourceAction = "Create" UpdateResourceAction ResourceAction = "Update" DeleteResourceAction ResourceAction = "Delete" ConflictResourceAction ResourceAction = "Conflict" )
Define the Action constants.
type ResourceReport ¶
type ResourceReport struct { // Resource contains information about Kubernetes Resource Resource Resource `json:"resource"` // Action represent the type of operation on the Kubernetes resource. // +kubebuilder:validation:Enum=No Action;Create;Update;Delete;Conflict Action string `json:"action,omitempty"` // Message is for any message that needs to added to better // explain the action. // +optional Message string `json:"message,omitempty"` }
func (*ResourceReport) DeepCopy ¶
func (in *ResourceReport) DeepCopy() *ResourceReport
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceReport.
func (*ResourceReport) DeepCopyInto ¶
func (in *ResourceReport) DeepCopyInto(out *ResourceReport)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StopMatchingBehavior ¶
type StopMatchingBehavior string
StopMatchingBehavior indicates what will happen when Cluster stops matching a ClusterProfile. By default, withdrawpolicies, deployed Helm charts and Kubernetes resources will be removed from Cluster. LeavePolicy instead leaves Helm charts and Kubernetes policies in the Cluster.
const ( WithdrawPolicies StopMatchingBehavior = "WithdrawPolicies" LeavePolicies StopMatchingBehavior = "LeavePolicies" )
Define the StopMatchingBehavior constants.
type SyncMode ¶
type SyncMode string
SyncMode specifies how features are synced in a workload cluster. +kubebuilder:validation:Enum:=OneTime;Continuous;ContinuousWithDriftDetection;DryRun
type TemplateResourceRef ¶
type TemplateResourceRef struct { // Resource references a Kubernetes instance in the management // cluster to fetch and use during template instantiation. Resource corev1.ObjectReference `json:"resource"` // Identifier is how the resource will be referred to in the // template Identifier string `json:"identifier"` }
func (*TemplateResourceRef) DeepCopy ¶
func (in *TemplateResourceRef) DeepCopy() *TemplateResourceRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateResourceRef.
func (*TemplateResourceRef) DeepCopyInto ¶
func (in *TemplateResourceRef) DeepCopyInto(out *TemplateResourceRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.