v1alpha1

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the config v1alpha1 API group +kubebuilder:object:generate=true +groupName=config.projectsveltos.io

Index

Constants

View Source
const (
	// ClusterProfileFinalizer allows ClusterProfileReconciler to clean up resources associated with
	// ClusterProfile before removing it from the apiserver.
	ClusterProfileFinalizer = "clusterprofilefinalizer.projectsveltos.io"

	ClusterProfileKind = "ClusterProfile"
)
View Source
const (
	// SyncModeOneTime indicates feature sync should happen only once
	SyncModeOneTime = SyncMode("OneTime")

	// SyncModeContinuous indicates feature sync should continuously happen
	SyncModeContinuous = SyncMode("Continuous")

	// SyncModeDryRun indicates feature sync should continuously happen
	// no feature will be updated in the CAPI Cluster though.
	SyncModeDryRun = SyncMode("DryRun")
)
View Source
const (
	// HelmChartActionInstall will cause Helm chart to be installed
	HelmChartActionInstall = HelmChartAction("Install")

	// HelmChartActionUninstall will cause Helm chart to be removed
	HelmChartActionUninstall = HelmChartAction("Uninstall")
)
View Source
const (
	// ClusterSummaryFinalizer allows ClusterSummaryReconciler to clean up resources associated with
	// ClusterSummary before removing it from the apiserver.
	ClusterSummaryFinalizer = "clustersummaryfinalizer.projectsveltos.io"

	ClusterSummaryKind = "ClusterSummary"
)
View Source
const (
	// FeatureResources is the identifier for generic Resources feature
	FeatureResources = FeatureID("Resources")

	// FeatureHelm is the identifier for Helm feature
	FeatureHelm = FeatureID("Helm")
)
View Source
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")
)
View Source
const (
	// HelChartStatusManaging indicates helm chart is successfully being managed
	HelChartStatusManaging = HelChartStatus("Managing")

	// HelChartStatusConflict indicates there is a conflict with another
	// ClusterSummary to manage the helm chart
	HelChartStatusConflict = HelChartStatus("Conflict")
)
View Source
const (
	ClusterConfigurationKind = "ClusterConfiguration"
)
View Source
const (
	ClusterSubstitutionKind = "ClusterSubstitution"
)

Variables

View Source
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 CAPI Cluster.
	// +kubebuilder:validation:MinLength=1
	RepoURL string `json:"repoURL"`

	// ReleaseName name of the release deployed in the CAPI Cluster.
	// +kubebuilder:validation:MinLength=1
	ReleaseName string `json:"releaseName"`

	// Namespace where chart is deployed in the CAPI Cluster.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// ChartVersion is the version of the helm chart deployed in the CAPI Cluster.
	ChartVersion string `json:"chartVersion"`

	// AppVersion is the version of the app deployed in the CAPI 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

func (in *Chart) DeepCopy() *Chart

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Chart.

func (*Chart) DeepCopyInto

func (in *Chart) DeepCopyInto(out *Chart)

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

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

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 CAPI Cluster due
	// to ClusterProfiles
	// +optional
	ClusterProfileResources []ClusterProfileResource `json:"clusterProfileResources,omitempty"`
}

ClusterConfigurationStatus defines the observed state of ClusterConfiguration

func (*ClusterConfigurationStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfigurationStatus.

func (*ClusterConfigurationStatus) DeepCopyInto

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 CAPI Cluster.
	ClusterProfileName string `json:"clusterProfileName"`

	// Features contains the list of policies deployed in the CAPI Cluster because
	// of a given feature
	// +optional
	Features []Feature `json:"Features,omitempty"`
}

ClusterProfileResource keeps info on all of the resources deployed in this CAPI Cluster due to a given ClusterProfile

func (*ClusterProfileResource) DeepCopy

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 ClusterAPI clusters to associate to.
	ClusterSelector Selector `json:"clusterSelector"`

	// 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.
	// +kubebuilder:default:=Continuous
	// +optional
	SyncMode SyncMode `json:"syncMode,omitempty"`

	// PolicyRefs references all the ConfigMaps containing kubernetes resources
	// that need to be deployed in the matching CAPI clusters.
	// +optional
	PolicyRefs []PolicyRef `json:"policyRefs,omitempty"`

	// Helm charts
	HelmCharts []HelmChart `json:"helmCharts,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:"matchinClusters,omitempty"`
}

ClusterProfileStatus defines the observed state of ClusterProfile

func (*ClusterProfileStatus) DeepCopy

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
	// +optional
	ResourceReports []ResourceReport `json:"resourceReports,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 GetClusterSummary(ctx context.Context, c client.Client, namespace, name string,
) (*ClusterSummary, error)

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"`

	// 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

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 DryRunReconciliationError added in v0.1.1

type DryRunReconciliationError struct{}

func (*DryRunReconciliationError) DeepCopy added in v0.1.1

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DryRunReconciliationError.

func (*DryRunReconciliationError) DeepCopyInto added in v0.1.1

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*DryRunReconciliationError) Error added in v0.1.1

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 CAPI Cluster.
	// +optional
	Resources []Resource `json:"resources,omitempty"`

	// Charts is a list of helm charts deployed in the CAPI Cluster.
	// +optional
	Charts []Chart `json:"charts,omitempty"`
}

func (*Feature) DeepCopy

func (in *Feature) DeepCopy() *Feature

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Feature.

func (*Feature) DeepCopyInto

func (in *Feature) DeepCopyInto(out *Feature)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FeatureID

type FeatureID string

+kubebuilder:validation:Enum:=Resources;Helm

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
	Status FeatureStatus `json:"status"`

	// 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 the workload
	// 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 HelChartStatus

type HelChartStatus string

HelChartStatus specifies whether ClusterSummary is successfully managing an helm chart or not +kubebuilder:validation:Enum:=Managing;Conflict

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.
	// +optional
	Values *apiextensionsv1.JSON `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

func (in *HelmChart) DeepCopy() *HelmChart

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChart.

func (*HelmChart) DeepCopyInto

func (in *HelmChart) DeepCopyInto(out *HelmChart)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HelmChart) GetValues

func (in *HelmChart) GetValues() (map[string]interface{}, error)

GetValues unmarshals the raw values to a map[string]interface{} and returns the result.

type HelmChartAction

type HelmChartAction string

HelmChartAction specifies action on an helm chart +kubebuilder:validation:Enum:=Install;Uninstall

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 HelChartStatus `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 PolicyRef

type PolicyRef struct {
	// Namespace of the referenced resource.
	// +kubebuilder:validation:MinLength=1
	Namespace string `json:"namespace"`

	// Name of the rreferenced 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"`
}

PolicyRef specifies a resource containing one or more policy to deploy in matching CAPI Clusters.

func (*PolicyRef) DeepCopy

func (in *PolicyRef) DeepCopy() *PolicyRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRef.

func (*PolicyRef) DeepCopyInto

func (in *PolicyRef) DeepCopyInto(out *PolicyRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (PolicyRef) String

func (r PolicyRef) String() string

type ReferencedResourceKind

type ReferencedResourceKind string

ReferencedResourceKind is a string representation of allowed kind of resources that can be referenced in a ClusterProfile

const (
	SecretReferencedResourceKind    ReferencedResourceKind = "Secret"
	ConfigMapReferencedResourceKind ReferencedResourceKind = "ConfigMap"
)

Define the ReferencedResourceKind constants.

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 CAPI Cluster.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`

	// Namespace of the resource deployed in the CAPI Cluster.
	// Empty for resources scoped at cluster level.
	// +optional
	Namespace string `json:"namespace,omitempty"`

	// Group of the resource deployed in the CAPI Cluster.
	Group string `json:"group"`

	// Kind of the resource deployed in the CAPI Cluster.
	// +kubebuilder:validation:MinLength=1
	Kind string `json:"kind"`

	// 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

func (in *Resource) DeepCopy() *Resource

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resource.

func (*Resource) DeepCopyInto

func (in *Resource) DeepCopyInto(out *Resource)

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 Selector

type Selector string

type SubstitutionRule

type SubstitutionRule struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   SubstitutionRuleSpec   `json:"spec,omitempty"`
	Status SubstitutionRuleStatus `json:"status,omitempty"`
}

SubstitutionRule is the Schema for the substitutionrules API

func (*SubstitutionRule) DeepCopy

func (in *SubstitutionRule) DeepCopy() *SubstitutionRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstitutionRule.

func (*SubstitutionRule) DeepCopyInto

func (in *SubstitutionRule) DeepCopyInto(out *SubstitutionRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SubstitutionRule) DeepCopyObject

func (in *SubstitutionRule) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubstitutionRuleList

type SubstitutionRuleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SubstitutionRule `json:"items"`
}

SubstitutionRuleList contains a list of SubstitutionRule

func (*SubstitutionRuleList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstitutionRuleList.

func (*SubstitutionRuleList) DeepCopyInto

func (in *SubstitutionRuleList) DeepCopyInto(out *SubstitutionRuleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SubstitutionRuleList) DeepCopyObject

func (in *SubstitutionRuleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubstitutionRuleSpec

type SubstitutionRuleSpec struct {
	// Kind of the resource
	Kind string `json:"kind,omitempty"`
	// Namespace of the resource
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// Name of the resource.
	Name string `json:"name"`
	// API version of the resource.
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
}

SubstitutionRuleSpec defines the desired state of SubstitutionRule

func (*SubstitutionRuleSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstitutionRuleSpec.

func (*SubstitutionRuleSpec) DeepCopyInto

func (in *SubstitutionRuleSpec) DeepCopyInto(out *SubstitutionRuleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubstitutionRuleStatus

type SubstitutionRuleStatus struct {
}

SubstitutionRuleStatus defines the observed state of SubstitutionRule

func (*SubstitutionRuleStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstitutionRuleStatus.

func (*SubstitutionRuleStatus) DeepCopyInto

func (in *SubstitutionRuleStatus) DeepCopyInto(out *SubstitutionRuleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SyncMode

type SyncMode string

SyncMode specifies how features are synced in a workload cluster. +kubebuilder:validation:Enum:=OneTime;Continuous;DryRun

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL