Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the gitops v1 API group +kubebuilder:object:generate=true +groupName=gitops.kanod.io
Index ¶
Constants ¶
const ( // WaitingForConfig indicates that the global config has not been found yet WaitingForConfig = "WaitingForConfig" // CreateSnapshotState is used while we create the snapshot CreateSnapshotState = "CreatingSnapshot" // RegisteringState is used when cluster def is created RegisteringState = "Registering" // RegisteredState is used when first application is created RegisteredState = "Registered" // FirstSyncState is used as soon first application is created FirstSyncState = "FirstSync" // ClusterFoundState is used when cluster-api cluster is found ClusterFoundState = "ClusterFound" // KubeConfigFoundState is used when target cluster kubeconfig is found KubeConfigFoundState = "KubeConfigFound" // CommunicatingState is used when communication with target is established CommunicatingState = "Communicating" // LaunchedState is used when the application for init is created LaunchedState = "InitLaunched" // DeployedState is used when everything is deployed DeployedState = "Deployed" )
const ( // Registered means that clusterdef instance was registered by the operator Registered = "Registered" // UpdaterDeployed reffers to a condition linked to updater deployment state UpdaterDeployed = "UpdaterDeployed" // ArgoCDAppsCreated reffers to a condition linked to argo CD apps state ArgoCDAppsCreated = "ArgoCDAppsCreated" // K8sClusterUp reffers to a condition linked to workload cluster state K8sClusterUp = "K8sClusterUp" // Deployed means that everything is deployed Deployed = "Deployed" // Failed means that the application failed to deploy Failed = "Failed" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "gitops.kanod.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 ¶
This section is empty.
Types ¶
type ClusterDef ¶
type ClusterDef struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterDefSpec `json:"spec,omitempty"` Status ClusterDefStatus `json:"status,omitempty"` }
ClusterDef is the Schema for the clusterdefs API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="State",type=string,JSONPath=`.status.state` +kubebuilder:printcolumn:name="Repository",type=string,JSONPath=`.spec.source.repository` +kubebuilder:printcolumn:name="Branch",type=string,JSONPath=`.spec.source.branch`,priority=10
func (*ClusterDef) DeepCopy ¶
func (in *ClusterDef) DeepCopy() *ClusterDef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDef.
func (*ClusterDef) DeepCopyInto ¶
func (in *ClusterDef) DeepCopyInto(out *ClusterDef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterDef) DeepCopyObject ¶
func (in *ClusterDef) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterDefCondition ¶
type ClusterDefCondition struct { // Type is the type of the condition. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions Type ClusterDefConditionType `json:"type"` // Status is the status of the condition. // Can be True, False, Unknown. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions Status metav1.ConditionStatus `json:"status"` // Last time we probed the condition. // +optional LastProbeTime metav1.Time `json:"lastProbeTime,omitempty"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // Unique, one-word, CamelCase reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty"` // Human-readable message indicating details about last transition. // +optional Message string `json:"message,omitempty"` }
ClusterDefCondition describes the data structure for one condition
func (*ClusterDefCondition) DeepCopy ¶
func (in *ClusterDefCondition) DeepCopy() *ClusterDefCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefCondition.
func (*ClusterDefCondition) DeepCopyInto ¶
func (in *ClusterDefCondition) DeepCopyInto(out *ClusterDefCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterDefConditionType ¶
type ClusterDefConditionType string
ClusterDefConditionType describes the possible condition type in status.Conditions +kubebuilder:validation:Enum=Registered;UpdaterDeployed;ArgoCDAppsCreated;K8sClusterUp;Deployed;Failed
type ClusterDefList ¶
type ClusterDefList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterDef `json:"items"` }
ClusterDefList contains a list of ClusterDef +kubebuilder:object:root=true
func (*ClusterDefList) DeepCopy ¶
func (in *ClusterDefList) DeepCopy() *ClusterDefList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefList.
func (*ClusterDefList) DeepCopyInto ¶
func (in *ClusterDefList) DeepCopyInto(out *ClusterDefList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterDefList) DeepCopyObject ¶
func (in *ClusterDefList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterDefSpec ¶
type ClusterDefSpec struct { // Source is the location of the cluster definition. Source GitLocation `json:"source"` // CredentialName is the user credentials for accessing git repository // It must be in a secret in the same namespace CredentialName string `json:"credentialName"` // ConfigurationName is the configuration supplied by the infrastructure // administrator to render the specification of the cluster definition // It is a configmap in the same namespace ConfigurationName string `json:"configurationName"` }
ClusterDefSpec defines the desired state of ClusterDef
func (*ClusterDefSpec) DeepCopy ¶
func (in *ClusterDefSpec) DeepCopy() *ClusterDefSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefSpec.
func (*ClusterDefSpec) DeepCopyInto ¶
func (in *ClusterDefSpec) DeepCopyInto(out *ClusterDefSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterDefState ¶
type ClusterDefState string
ClusterDefState describes the state of the deployment of the applications representing the Cluster +kubebuilder:validation:Enum=WaitingForConfig;CreatingSnapshot;Registering;Registered;FirstSync;ClusterFound;KubeConfigFound;Communicating;InitLaunched;Deployed
type ClusterDefStatus ¶
type ClusterDefStatus struct { // Status of deployment // +optional State ClusterDefState `json:"state"` // +optional Conditions []ClusterDefCondition `json:"conditions"` }
ClusterDefStatus defines the observed state of ClusterDef
func (*ClusterDefStatus) DeepCopy ¶
func (in *ClusterDefStatus) DeepCopy() *ClusterDefStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDefStatus.
func (*ClusterDefStatus) DeepCopyInto ¶
func (in *ClusterDefStatus) DeepCopyInto(out *ClusterDefStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GitLocation ¶
type GitLocation struct { // Repository is the URL of the project hosting the files Repository string `json:"repository"` // Branch is the git branch followed by ClusterDef Branch string `json:"branch,omitempty"` // Path is the subpath of the folder hosting the configuration file. Path string `json:"path,omitempty"` }
GitLocation defines a complete path to a version of a folder on a git repository
func (*GitLocation) DeepCopy ¶
func (in *GitLocation) DeepCopy() *GitLocation
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLocation.
func (*GitLocation) DeepCopyInto ¶
func (in *GitLocation) DeepCopyInto(out *GitLocation)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.