Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the kustomize.toolkit.fluxcd.io v1 API group. +kubebuilder:object:generate=true +groupName=krm.kcl.dev.fluxcd
Package v1alpha1 contains API Schema definitions for the krm.kcl.dev.fluxcd v1alpha1 API group +kubebuilder:object:generate=true +groupName=krm.kcl.dev.fluxcd
Index ¶
- Constants
- Variables
- type ArgumentReference
- type CommonMetadata
- type ConfigSpec
- type CrossNamespaceSourceReference
- type KCLRun
- func (in *KCLRun) DeepCopy() *KCLRun
- func (in *KCLRun) DeepCopyInto(out *KCLRun)
- func (in *KCLRun) DeepCopyObject() runtime.Object
- func (in *KCLRun) GetConditions() []metav1.Condition
- func (in *KCLRun) GetDependsOn() []meta.NamespacedObjectReference
- func (in *KCLRun) GetReleaseNamespace() string
- func (in *KCLRun) GetRequeueAfter() time.Duration
- func (in *KCLRun) GetRetryInterval() time.Duration
- func (in *KCLRun) GetTimeout() time.Duration
- func (in *KCLRun) SetConditions(conditions []metav1.Condition)
- func (in *KCLRun) UsePersistentClient() bool
- type KCLRunList
- type KCLRunSpec
- type KCLRunStatus
- type ResourceInventory
- type ResourceRef
Constants ¶
const ( KCLRunKind = "KCLRun" KCLRunFinalizer = "finalizers.krm.kcl.dev.fluxcd" MaxConditionMessageLength = 20000 EnabledValue = "enabled" DisabledValue = "disabled" MergeValue = "Merge" IfNotPresentValue = "IfNotPresent" IgnoreValue = "Ignore" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "krm.kcl.dev.fluxcd", 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 ArgumentReference ¶ added in v0.5.0
type ArgumentReference struct { // Kind of the values referent, valid values are ('Secret', 'ConfigMap'). // +kubebuilder:validation:Enum=Secret;ConfigMap // +required Kind string `json:"kind" yaml:"kind"` // Name of the values referent. Should reside in the same namespace as the // referring resource. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 // +required Name string `json:"name" yaml:"name"` // Optional indicates whether the referenced resource must exist, or whether to // tolerate its absence. If true and the referenced resource is absent, proceed // as if the resource was present but empty, without any variables defined. // +kubebuilder:default:=false // +optional Optional bool `json:"optional,omitempty" yaml:"optional,omitempty"` }
ArgumentReference contains a reference to a resource containing the KCL compile config.
func (*ArgumentReference) DeepCopy ¶ added in v0.5.0
func (in *ArgumentReference) DeepCopy() *ArgumentReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArgumentReference.
func (*ArgumentReference) DeepCopyInto ¶ added in v0.5.0
func (in *ArgumentReference) DeepCopyInto(out *ArgumentReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CommonMetadata ¶ added in v0.4.0
type CommonMetadata struct { // Annotations to be added to the object's metadata. // +optional Annotations map[string]string `json:"annotations,omitempty"` // Labels to be added to the object's metadata. // +optional Labels map[string]string `json:"labels,omitempty"` }
CommonMetadata defines the common labels and annotations.
func (*CommonMetadata) DeepCopy ¶ added in v0.5.0
func (in *CommonMetadata) DeepCopy() *CommonMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonMetadata.
func (*CommonMetadata) DeepCopyInto ¶ added in v0.5.0
func (in *CommonMetadata) DeepCopyInto(out *CommonMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConfigSpec ¶ added in v0.4.0
type ConfigSpec struct { // Arguments is the list of top level dynamic arguments for the kcl option function, e.g., env="prod" // +optional Arguments []string `json:"arguments,omitempty" yaml:"arguments,omitempty"` // Settings is the list of kcl setting files including all of the CLI config. // +optional Settings []string `json:"settings,omitempty" yaml:"settings,omitempty"` // Overrides is the list of override paths and values, e.g., app.image="v2" // +optional Overrides []string `json:"overrides,omitempty" yaml:"overrides,omitempty"` // PathSelectors is the list of path selectors to select output result, e.g., a.b.c // +optional PathSelectors []string `json:"pathSelectors,omitempty" yaml:"pathSelectors,omitempty"` // Vendor denotes running kcl in the vendor mode. // +optional Vendor bool `json:"vendor,omitempty" yaml:"vendor,omitempty"` // SortKeys denotes sorting the output result keys, e.g., `{b = 1, a = 2} => {a = 2, b = 1}`. // +optional SortKeys bool `json:"sortKeys,omitempty" yaml:"sortKeys,omitempty"` // ShowHidden denotes output the hidden attribute in the result. // +optional ShowHidden bool `json:"showHidden,omitempty" yaml:"showHidden,omitempty"` // DisableNone denotes running kcl and disable dumping None values. // +optional DisableNone bool `json:"disableNone,omitempty" yaml:"disableNone,omitempty"` }
ConfigSpec defines the compile config.
func (*ConfigSpec) DeepCopy ¶ added in v0.5.0
func (in *ConfigSpec) DeepCopy() *ConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec.
func (*ConfigSpec) DeepCopyInto ¶ added in v0.5.0
func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CrossNamespaceSourceReference ¶ added in v0.5.0
type CrossNamespaceSourceReference struct { // API version of the referent. // +optional APIVersion string `json:"apiVersion,omitempty"` // Kind of the referent. // +kubebuilder:validation:Enum=OCIRepository;GitRepository;Bucket // +required Kind string `json:"kind"` // Name of the referent. // +required Name string `json:"name"` // Namespace of the referent, defaults to the namespace of the Kubernetes // resource object that contains the reference. // +optional Namespace string `json:"namespace,omitempty"` }
CrossNamespaceSourceReference contains enough information to let you locate the typed Kubernetes resource object at cluster level.
func (*CrossNamespaceSourceReference) DeepCopy ¶ added in v0.5.0
func (in *CrossNamespaceSourceReference) DeepCopy() *CrossNamespaceSourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceSourceReference.
func (*CrossNamespaceSourceReference) DeepCopyInto ¶ added in v0.5.0
func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CrossNamespaceSourceReference) String ¶ added in v0.5.0
func (s *CrossNamespaceSourceReference) String() string
type KCLRun ¶
type KCLRun struct { metav1.TypeMeta `json:",inline" yaml:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` Spec KCLRunSpec `json:"spec,omitempty" yaml:"spec,omitempty"` // +kubebuilder:default:={"observedGeneration":-1} Status KCLRunStatus `json:"status,omitempty" yaml:"status,omitempty"` }
KCLRun is the Schema for the kclruns API
func (*KCLRun) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KCLRun.
func (*KCLRun) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KCLRun) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*KCLRun) GetConditions ¶
GetConditions returns the status conditions of the object.
func (*KCLRun) GetDependsOn ¶ added in v0.4.0
func (in *KCLRun) GetDependsOn() []meta.NamespacedObjectReference
GetDependsOn returns the list of dependencies across-namespaces.
func (*KCLRun) GetReleaseNamespace ¶
GetReleaseNamespace returns the configured TargetNamespace, or the namespace of the KCLRun.
func (*KCLRun) GetRequeueAfter ¶ added in v0.4.0
GetRequeueAfter returns the duration after which the KCLRun must be reconciled again.
func (*KCLRun) GetRetryInterval ¶ added in v0.4.0
GetRetryInterval returns the retry interval
func (*KCLRun) GetTimeout ¶
GetTimeout returns the configured Timeout, or the default of 300s.
func (*KCLRun) SetConditions ¶
SetConditions sets the status conditions on the object.
func (*KCLRun) UsePersistentClient ¶
UsePersistentClient returns the configured PersistentClient, or the default of true.
type KCLRunList ¶
type KCLRunList struct { metav1.TypeMeta `json:",inline" yaml:",inline"` metav1.ListMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` Items []KCLRun `json:"items" yaml:"items"` }
KCLRunList contains a list of KCLRun
func (*KCLRunList) DeepCopy ¶
func (in *KCLRunList) DeepCopy() *KCLRunList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KCLRunList.
func (*KCLRunList) DeepCopyInto ¶
func (in *KCLRunList) DeepCopyInto(out *KCLRunList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KCLRunList) DeepCopyObject ¶
func (in *KCLRunList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KCLRunSpec ¶
type KCLRunSpec struct { // CommonMetadata specifies the common labels and annotations that are // applied to all resources. Any existing label or annotation will be // overridden if its key matches a common one. // +optional CommonMetadata *CommonMetadata `json:"commonMetadata,omitempty" yaml:"commonMetadata,omitempty"` // DependsOn may contain a meta.NamespacedObjectReference slice // with references to Kustomization resources that must be ready before this // Kustomization can be reconciled. // +optional DependsOn []meta.NamespacedObjectReference `json:"dependsOn,omitempty" yaml:"dependsOn,omitempty"` // Timeout is the time to wait for any individual Kubernetes operation (like Jobs // for hooks) during the performance. Defaults to '5m0s'. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +optional Timeout *metav1.Duration `json:"timeout,omitempty" yaml:"timeout,omitempty"` // PersistentClient tells the controller to use a persistent Kubernetes // client for this release. When enabled, the client will be reused for the // duration of the reconciliation, instead of being created and destroyed // for each (step of a). // // If not set, it defaults to true. // // +optional PersistentClient *bool `json:"persistentClient,omitempty" yaml:"persistentClient,omitempty"` // The KubeConfig for reconciling the controller on a remote cluster. // When used in combination with `KCLRunSpec.ServiceAccountName`, // forces the controller to act on behalf of that Service Account at the // target cluster. // If the --default-service-account flag is set, its value will be used as // a controller level fallback for when `KCLRunSpec.ServiceAccountName` // is empty. // +optional KubeConfig *meta.KubeConfigReference `json:"kubeConfig,omitempty" yaml:"kubeConfig,omitempty"` // The name of the Kubernetes service account to impersonate // when reconciling this KCL source. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 // +optional ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"` // TargetNamespace to target when performing operations for the KCL. // Defaults to the namespace of the KCL source. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Optional // +optional TargetNamespace string `json:"targetNamespace,omitempty" yaml:"targetNamespace,omitempty"` // Force instructs the controller to recreate resources // when patching fails due to an immutable field change. // +kubebuilder:default:=false // +optional Force bool `json:"force,omitempty" yaml:"force,omitempty"` // The interval at which to reconcile the KCL Module. // This interval is approximate and may be subject to jitter to ensure // efficient use of resources. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +required Interval metav1.Duration `json:"interval" yaml:"interval"` // The interval at which to retry a previously failed reconciliation. // When not specified, the controller uses the KCLRunSpec.Interval // value to retry failures. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +optional RetryInterval *metav1.Duration `json:"retryInterval,omitempty" yaml:"retryInterval,omitempty"` // Path to the directory containing the kcl.mod file. // Defaults to 'None', which translates to the root path of the SourceRef. // +optional Path string `json:"path,omitempty" yaml:"path,omitempty"` // Config is the KCL compile config. // +optional Config *ConfigSpec `json:"config,omitempty" yaml:"config,omitempty"` // ArgumentReferences holds references to ConfigMaps and Secrets containing // the KCL compile config. The ConfigMap and the Secret data keys represent the config names. // +optional ArgumentsReferences []ArgumentReference `json:"argumentsReferences,omitempty" yaml:"argumentsReferences,omitempty"` // Prune enables garbage collection. // +required Prune bool `json:"prune"` // A list of resources to be included in the health assessment. // +optional HealthChecks []meta.NamespacedObjectKindReference `json:"healthChecks,omitempty"` // Wait instructs the controller to check the health of all the reconciled // resources. When enabled, the HealthChecks are ignored. Defaults to false. // +optional Wait bool `json:"wait,omitempty"` // Reference of the source where the kcl file is. // +required SourceRef CrossNamespaceSourceReference `json:"sourceRef"` // This flag tells the controller to suspend subsequent kustomize executions, // it does not apply to already started executions. Defaults to false. // +optional Suspend bool `json:"suspend,omitempty"` }
KCLRunSpec defines the desired state of KCLRun
func (*KCLRunSpec) DeepCopy ¶
func (in *KCLRunSpec) DeepCopy() *KCLRunSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KCLRunSpec.
func (*KCLRunSpec) DeepCopyInto ¶
func (in *KCLRunSpec) DeepCopyInto(out *KCLRunSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KCLRunStatus ¶
type KCLRunStatus struct { meta.ReconcileRequestStatus `json:",inline" yaml:",inline"` // ObservedGeneration is the last reconciled generation. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty" yaml:"observedGeneration,omitempty"` // +optional Conditions []metav1.Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"` // The last successfully applied revision. // Equals the Revision of the applied Artifact from the referenced Source. // +optional LastAppliedRevision string `json:"lastAppliedRevision,omitempty" yaml:"lastAppliedRevision,omitempty"` // LastAttemptedRevision is the revision of the last reconciliation attempt. // +optional LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty" yaml:"lastAttemptedRevision,omitempty"` // LastAttemptedRevisionDigest is the digest of the last reconciliation attempt. // This is only set for OCIRepository sources. // +optional LastAttemptedRevisionDigest string `json:"lastAttemptedRevisionDigest,omitempty" yaml:"lastAttemptedRevisionDigest,omitempty"` // Inventory contains the list of Kubernetes resource object references that // have been successfully applied. // +optional Inventory *ResourceInventory `json:"inventory,omitempty" yaml:"inventory,omitempty"` }
KCLRunStatus defines the observed state of KCLRun
func (*KCLRunStatus) DeepCopy ¶
func (in *KCLRunStatus) DeepCopy() *KCLRunStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KCLRunStatus.
func (*KCLRunStatus) DeepCopyInto ¶
func (in *KCLRunStatus) DeepCopyInto(out *KCLRunStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceInventory ¶ added in v0.4.0
type ResourceInventory struct { // Entries of Kubernetes resource object references. Entries []ResourceRef `json:"entries"` }
ResourceInventory contains a list of Kubernetes resource object references that have been applied by a Kustomization.
func (*ResourceInventory) DeepCopy ¶ added in v0.4.0
func (in *ResourceInventory) DeepCopy() *ResourceInventory
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInventory.
func (*ResourceInventory) DeepCopyInto ¶ added in v0.4.0
func (in *ResourceInventory) DeepCopyInto(out *ResourceInventory)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRef ¶ added in v0.4.0
type ResourceRef struct { // ID is the string representation of the Kubernetes resource object's metadata, // in the format '<namespace>_<name>_<group>_<kind>'. ID string `json:"id"` // Version is the API version of the Kubernetes resource object's kind. Version string `json:"v"` }
ResourceRef contains the information necessary to locate a resource within a cluster.
func (*ResourceRef) DeepCopy ¶ added in v0.4.0
func (in *ResourceRef) DeepCopy() *ResourceRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.
func (*ResourceRef) DeepCopyInto ¶ added in v0.4.0
func (in *ResourceRef) DeepCopyInto(out *ResourceRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.