Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions v1alpha1 API group +kubebuilder:object:generate=true +groupName=core.krateo.io +versionName=v1alpha1
Index ¶
- Constants
- Variables
- type ApiReference
- type ChartInfo
- type ChartInfoProps
- type CompositionDefinition
- func (in *CompositionDefinition) DeepCopy() *CompositionDefinition
- func (in *CompositionDefinition) DeepCopyInto(out *CompositionDefinition)
- func (in *CompositionDefinition) DeepCopyObject() runtime.Object
- func (mg *CompositionDefinition) GetCondition(ct rtv1.ConditionType) rtv1.Condition
- func (cd *CompositionDefinition) MigrationApproved(targetVersion string) bool
- func (mg *CompositionDefinition) SetConditions(c ...rtv1.Condition)
- type CompositionDefinitionList
- type CompositionDefinitionSpec
- type CompositionDefinitionStatus
- func (s CompositionDefinitionStatus) CurrentGVK() schema.GroupVersionKind
- func (s CompositionDefinitionStatus) CurrentGVR() schema.GroupVersionResource
- func (in *CompositionDefinitionStatus) DeepCopy() *CompositionDefinitionStatus
- func (in *CompositionDefinitionStatus) DeepCopyInto(out *CompositionDefinitionStatus)
- type ControllerConfig
- type Credentials
- type DeploymentMode
- type DeploymentTarget
- type KubernetesTarget
- type KubernetesTargetList
- type KubernetesTargetSpec
- type KubernetesTargetStatus
- type Managed
- type StatusFieldMapping
- type TargetReference
- type TargetStatus
- type UpgradePolicy
- type VersionDetail
Constants ¶
const ( Group = "core.krateo.io" Version = "v1alpha1" )
Package type metadata.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
var ( CompositionDefinitionKind = reflect.TypeOf(CompositionDefinition{}).Name() CompositionDefinitionGroupKind = schema.GroupKind{Group: Group, Kind: CompositionDefinitionKind}.String() CompositionDefinitionKindAPIVersion = CompositionDefinitionKind + "." + SchemeGroupVersion.String() CompositionDefinitionGroupVersionKind = SchemeGroupVersion.WithKind(CompositionDefinitionKind) )
Functions ¶
This section is empty.
Types ¶
type ApiReference ¶
type ApiReference struct {
// Name of the referenced RESTAction.
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
// Namespace of the referenced RESTAction.
// +kubebuilder:validation:MinLength=1
Namespace string `json:"namespace"`
// Extras are author-declared STATIC values merged into the RESTAction's jq root
// (snowplow spec.apiRef.extras). Input-only — they never surface in status. The
// controller additionally injects per-instance context (compositionId, namespace, …)
// which merges over these (request-wins).
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Extras *apiextensionsv1.JSON `json:"extras,omitempty"`
}
ApiReference references a RESTAction to resolve for status projection. It mirrors snowplow's spec.apiRef: a name/namespace plus an inline, free-form extras map.
func (*ApiReference) DeepCopy ¶
func (in *ApiReference) DeepCopy() *ApiReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApiReference.
func (*ApiReference) DeepCopyInto ¶
func (in *ApiReference) DeepCopyInto(out *ApiReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChartInfo ¶
type ChartInfo struct {
// Url: oci or tgz full url
Url string `json:"url"`
// Version: desired chart version, needed for oci charts and for helm repo urls
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxLength=20
Version string `json:"version,omitempty"`
// Repo: Helm repo name
// Should be set only for helm repo urls
// If specified with OCI registries, it will be used as the repository name, instead the URL should contain the full path to the chart.
// This is ignored for tgz archives
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxLength=256
Repo string `json:"repo,omitempty"`
// InsecureSkipVerifyTLS: skip tls verification
// +optional
InsecureSkipVerifyTLS bool `json:"insecureSkipVerifyTLS,omitempty"`
// Credentials: credentials for private repos
// +optional
Credentials *Credentials `json:"credentials,omitempty"`
}
+kubebuilder:validation:XValidation:rule="!has(oldSelf.version) || has(self.version)", message="Version is required once set" +kubebuilder:validation:XValidation:rule="!has(oldSelf.repo) || has(self.repo)", message="Repo is required once set"
func (*ChartInfo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfo.
func (*ChartInfo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ChartInfoProps ¶
type ChartInfoProps struct {
// Url: oci or tgz full url
Url string `json:"url"`
// Version: desired chart version, needed for oci charts and for helm repo urls
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxLength=20
Version string `json:"version,omitempty"`
// Repo: helm repo name (for helm repo urls only)
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxLength=256
Repo string `json:"repo,omitempty"`
// InsecureSkipVerifyTLS: skip tls verification
// +optional
InsecureSkipVerifyTLS bool `json:"insecureSkipVerifyTLS,omitempty"`
// Credentials: credentials for private repos
// +optional
Credentials *Credentials `json:"credentials,omitempty"`
}
func (*ChartInfoProps) DeepCopy ¶
func (in *ChartInfoProps) DeepCopy() *ChartInfoProps
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartInfoProps.
func (*ChartInfoProps) DeepCopyInto ¶
func (in *ChartInfoProps) DeepCopyInto(out *ChartInfoProps)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CompositionDefinition ¶
type CompositionDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec CompositionDefinitionSpec `json:"spec,omitempty"`
Status CompositionDefinitionStatus `json:"status,omitempty"`
}
CompositionDefinition is a definition type with a spec and a status.
func (*CompositionDefinition) DeepCopy ¶
func (in *CompositionDefinition) DeepCopy() *CompositionDefinition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositionDefinition.
func (*CompositionDefinition) DeepCopyInto ¶
func (in *CompositionDefinition) DeepCopyInto(out *CompositionDefinition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CompositionDefinition) DeepCopyObject ¶
func (in *CompositionDefinition) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CompositionDefinition) GetCondition ¶
func (mg *CompositionDefinition) GetCondition(ct rtv1.ConditionType) rtv1.Condition
GetCondition of this CompositionDefinition.
func (*CompositionDefinition) MigrationApproved ¶
func (cd *CompositionDefinition) MigrationApproved(targetVersion string) bool
MigrationApproved reports whether the controller should migrate existing instances onto targetVersion given the definition's UpgradePolicy (and, for Manual, the upgrade-to-version annotation). An empty policy is treated as Automatic for backward compatibility.
func (*CompositionDefinition) SetConditions ¶
func (mg *CompositionDefinition) SetConditions(c ...rtv1.Condition)
SetConditions of this CompositionDefinition.
type CompositionDefinitionList ¶
type CompositionDefinitionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []CompositionDefinition `json:"items"`
}
+kubebuilder:object:root=true
func (*CompositionDefinitionList) DeepCopy ¶
func (in *CompositionDefinitionList) DeepCopy() *CompositionDefinitionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositionDefinitionList.
func (*CompositionDefinitionList) DeepCopyInto ¶
func (in *CompositionDefinitionList) DeepCopyInto(out *CompositionDefinitionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CompositionDefinitionList) DeepCopyObject ¶
func (in *CompositionDefinitionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*CompositionDefinitionList) GetItems ¶
func (l *CompositionDefinitionList) GetItems() []resource.Managed
GetItems of this CompositionDefinitionList.
type CompositionDefinitionSpec ¶
type CompositionDefinitionSpec struct {
// rtv1.ManagedSpec `json:",inline"`
Chart *ChartInfo `json:"chart,omitempty"`
// Deploy: selects whether the composition-dynamic-controller (and the generated
// CRD and RBAC) are deployed locally in the management cluster (the default) or to
// a remote target cluster referenced by a KubernetesTarget. When omitted, deployment
// is local.
// +optional
Deploy *DeploymentTarget `json:"deploy,omitempty"`
// ApiRef references a RESTAction whose calls are resolved (via snowplow, under an
// authn-issued scoped service identity) each reconcile; results are keyed by call name
// under ".api" in the projection root. Shape copied from snowplow's spec.apiRef
// (name/namespace + inline extras).
// +optional
ApiRef *ApiReference `json:"apiRef,omitempty"`
// StatusDataTemplate declares extra fields projected onto the generated Composition
// CRD's status and populated by the controller each reconcile (snowplow
// widgetDataTemplate shape). Each entry's ${ jq } Expression is evaluated over the
// combined source root (built-in self/spec/status, helm, and api) and written under
// .status at ForPath.
// +optional
// +listType=map
// +listMapKey=forPath
StatusDataTemplate []StatusFieldMapping `json:"statusDataTemplate,omitempty"`
// UpgradePolicy governs whether existing composition instances are migrated onto a newly
// served chart version:
// - Automatic (default): eagerly self-heal every owned instance onto the current version
// (retire the old version's controller once nothing references it). Backward-compatible
// with the pre-policy behavior.
// - Manual: keep existing instances on their current version (the new version is still served,
// so coexistence holds); migrate only when the krateo.io/upgrade-to-version annotation names
// the current served version.
// - Paused: never migrate; freeze existing instances on their version.
// Under Manual/Paused the old version's controller is kept so coexisting instances are not
// orphaned; served-version pruning still keeps any version an instance's label references.
// +optional
// +kubebuilder:validation:Enum=Automatic;Manual;Paused
// +kubebuilder:default=Automatic
UpgradePolicy UpgradePolicy `json:"upgradePolicy,omitempty"`
// Controller tunes the composition-dynamic-controller (CDC) Deployment for THIS definition's
// Kind. It is the per-Kind escape hatch from the otherwise-uniform, cluster-wide CDC template:
// a Kind with many instances can raise reconcile concurrency and lengthen its resync without
// touching — or restarting — any other controller. Omitted fields fall back to the chart-global
// defaults, so existing definitions render byte-identically.
// +optional
Controller *ControllerConfig `json:"controller,omitempty"`
}
func (*CompositionDefinitionSpec) DeepCopy ¶
func (in *CompositionDefinitionSpec) DeepCopy() *CompositionDefinitionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositionDefinitionSpec.
func (*CompositionDefinitionSpec) DeepCopyInto ¶
func (in *CompositionDefinitionSpec) DeepCopyInto(out *CompositionDefinitionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CompositionDefinitionStatus ¶
type CompositionDefinitionStatus struct {
rtv1.ConditionedStatus `json:",inline"`
// Target: information about the cluster the controller is deployed to.
// +optional
Target *TargetStatus `json:"target,omitempty"`
// Kind: the kind of the custom resource - Last applied kind
Kind string `json:"kind,omitempty"`
// Resource: the resource of the custom resource - Last applied resource
Resource string `json:"resource,omitempty"`
// ApiVersion: the api version of the custom resource - Last applied apiVersion
ApiVersion string `json:"apiVersion,omitempty"`
// Managed: information about the managed resources
Managed Managed `json:"managed,omitempty"`
// PackageURL: .tgz or oci chart direct url
// +optional
PackageURL string `json:"packageUrl,omitempty"`
// Digest: the digest of the managed resources
// +optional
Digest string `json:"digest,omitempty"`
}
CompositionDefinitionStatus is the status of a CompositionDefinition.
func (CompositionDefinitionStatus) CurrentGVK ¶
func (s CompositionDefinitionStatus) CurrentGVK() schema.GroupVersionKind
CurrentGVK returns the GroupVersionKind the CompositionDefinition currently resolves to, derived from status.apiVersion + status.kind. It is the zero GVK until the definition has been reconciled.
func (CompositionDefinitionStatus) CurrentGVR ¶
func (s CompositionDefinitionStatus) CurrentGVR() schema.GroupVersionResource
CurrentGVR returns the GroupVersionResource for the current version, derived from CurrentGVK plus status.resource.
func (*CompositionDefinitionStatus) DeepCopy ¶
func (in *CompositionDefinitionStatus) DeepCopy() *CompositionDefinitionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositionDefinitionStatus.
func (*CompositionDefinitionStatus) DeepCopyInto ¶
func (in *CompositionDefinitionStatus) DeepCopyInto(out *CompositionDefinitionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerConfig ¶
type ControllerConfig struct {
// Workers is the number of concurrent reconcile workers inside the CDC process (the CDC's
// -workers flag; one shared work queue feeds them). It is the primary lever for reconcile
// throughput on a Kind with many instances. Defaults to the chart-global value (1) when unset.
// +optional
// +kubebuilder:validation:Minimum=1
// +kubebuilder:validation:Maximum=512
Workers *int32 `json:"workers,omitempty"`
// ResyncInterval is how often the CDC re-lists and re-observes every instance of the Kind to
// correct drift (the CDC's -resync-interval flag). On a Kind with many instances a short resync
// makes the controller re-enqueue the whole population continuously; lengthening it lets steady
// state ride watch events instead of full sweeps. Defaults to the chart-global value (3m) when
// unset. A Go duration string (e.g. "30m", "1h"); it is passed verbatim to the CDC's
// -resync-interval flag. Typed as string (not metav1.Duration) deliberately: core-provider runs
// no admission webhook, so the CRD schema is the only gate, and a plain string always decodes —
// a bad value can never fail the typed informer's atomic list-decode and stall every
// CompositionDefinition. The Pattern + CEL rules then reject unit-less/garbage values and
// non-positive durations ("0s"/negative would crash the CDC's ticker) at admission.
// +optional
// +kubebuilder:validation:Pattern=`^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$`
// +kubebuilder:validation:XValidation:rule="duration(self) > duration('0s')",message="resyncInterval must be a positive Go duration such as 30m or 1h"
ResyncInterval *string `json:"resyncInterval,omitempty"`
// Resources sets the CDC container's compute resource requests/limits for this Kind. The shared
// template ships resources:{} (no requests), which is bad practice and makes the CDC
// unschedulable-aware and impossible to autoscale; set requests here for a Kind whose CDC needs
// a memory/CPU floor (e.g. one caching many instances). When unset, the chart-global default
// (cdc.resources) applies, so existing definitions render byte-identically.
// +optional
Resources *corev1.ResourceRequirements `json:"resources,omitempty"`
}
ControllerConfig carries per-CompositionDefinition tuning for the composition-dynamic-controller. Every field is optional and, when unset, inherits the chart-global default baked into the CDC Deployment template. Note: replicas is deliberately NOT exposed here — running more than one CDC replica for a Kind is unsafe until sharding or leader election exists (two replicas both reconcile every instance and double-drive the same Helm release). Use Workers for in-process concurrency.
func (*ControllerConfig) DeepCopy ¶
func (in *ControllerConfig) DeepCopy() *ControllerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfig.
func (*ControllerConfig) DeepCopyInto ¶
func (in *ControllerConfig) DeepCopyInto(out *ControllerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Credentials ¶
type Credentials struct {
// Username: username for private repo
Username string `json:"username"`
// PasswordRef: reference to secret containing password for private repo
PasswordRef rtv1.SecretKeySelector `json:"passwordRef"`
}
func (*Credentials) DeepCopy ¶
func (in *Credentials) DeepCopy() *Credentials
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Credentials.
func (*Credentials) DeepCopyInto ¶
func (in *Credentials) DeepCopyInto(out *Credentials)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeploymentMode ¶
type DeploymentMode string
DeploymentMode is the (status-only) classification of where the composition-dynamic-controller is deployed.
const ( // DeploymentModeLocal: deployed into the management cluster (the default when no // target is referenced). DeploymentModeLocal DeploymentMode = "Local" // DeploymentModeRemote: deployed into a remote target cluster. DeploymentModeRemote DeploymentMode = "Remote" )
type DeploymentTarget ¶
type DeploymentTarget struct {
// TargetRef references a KubernetesTarget (resolved in this object's own namespace)
// describing the remote cluster to deploy to. When omitted, deployment is local.
// +optional
TargetRef *TargetReference `json:"targetRef,omitempty"`
}
DeploymentTarget selects where the composition-dynamic-controller, the generated CRD and its RBAC are deployed. With no targetRef, deployment is local (the management cluster).
func (*DeploymentTarget) DeepCopy ¶
func (in *DeploymentTarget) DeepCopy() *DeploymentTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTarget.
func (*DeploymentTarget) DeepCopyInto ¶
func (in *DeploymentTarget) DeepCopyInto(out *DeploymentTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesTarget ¶
type KubernetesTarget struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec KubernetesTargetSpec `json:"spec,omitempty"`
// +optional
Status KubernetesTargetStatus `json:"status,omitempty"`
}
KubernetesTarget is a namespaced reference to a remote cluster, used by a CompositionDefinition's spec.deploy.targetRef (resolved in the CompositionDefinition's own namespace) to deploy compositions remotely. It is namespaced so per-namespace writes through snowplow /call (which force-namespaces every write) can create it.
func (*KubernetesTarget) DeepCopy ¶
func (in *KubernetesTarget) DeepCopy() *KubernetesTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesTarget.
func (*KubernetesTarget) DeepCopyInto ¶
func (in *KubernetesTarget) DeepCopyInto(out *KubernetesTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KubernetesTarget) DeepCopyObject ¶
func (in *KubernetesTarget) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KubernetesTargetList ¶
type KubernetesTargetList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []KubernetesTarget `json:"items"`
}
KubernetesTargetList is a list of KubernetesTarget.
func (*KubernetesTargetList) DeepCopy ¶
func (in *KubernetesTargetList) DeepCopy() *KubernetesTargetList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesTargetList.
func (*KubernetesTargetList) DeepCopyInto ¶
func (in *KubernetesTargetList) DeepCopyInto(out *KubernetesTargetList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KubernetesTargetList) DeepCopyObject ¶
func (in *KubernetesTargetList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KubernetesTargetSpec ¶
type KubernetesTargetSpec struct {
// KubeconfigRef: reference to a Kubernetes Secret key holding the kubeconfig of the
// target cluster. The Secret is the credential rotation seam - populate and rotate
// it via External Secrets Operator.
KubeconfigRef rtv1.SecretKeySelector `json:"kubeconfigRef"`
}
KubernetesTargetSpec describes how to reach a remote target cluster.
func (*KubernetesTargetSpec) DeepCopy ¶
func (in *KubernetesTargetSpec) DeepCopy() *KubernetesTargetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesTargetSpec.
func (*KubernetesTargetSpec) DeepCopyInto ¶
func (in *KubernetesTargetSpec) DeepCopyInto(out *KubernetesTargetSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KubernetesTargetStatus ¶
type KubernetesTargetStatus struct {
rtv1.ConditionedStatus `json:",inline"`
// ConnectionStatus is Healthy when the target cluster's API is reachable, Down otherwise.
// +optional
ConnectionStatus string `json:"connectionStatus,omitempty"`
// Version is the Kubernetes version reported by the target cluster on the last successful probe.
// +optional
Version string `json:"version,omitempty"`
// KubeconfigSecretResourceVersion is the resourceVersion of the kubeconfig Secret used by the
// last successful probe, for rotation traceability.
// +optional
KubeconfigSecretResourceVersion string `json:"kubeconfigSecretResourceVersion,omitempty"`
// LastProbeTime is when the target's reachability was last checked.
// +optional
LastProbeTime *metav1.Time `json:"lastProbeTime,omitempty"`
}
KubernetesTargetStatus reports the observed reachability of the target cluster, refreshed by the KubernetesTarget reachability reconciler. It turns the passive reference into a registered spoke with lifecycle: a Ready condition, the reported Kubernetes version, and the credential the last probe used (for rotation traceability).
func (*KubernetesTargetStatus) DeepCopy ¶
func (in *KubernetesTargetStatus) DeepCopy() *KubernetesTargetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesTargetStatus.
func (*KubernetesTargetStatus) DeepCopyInto ¶
func (in *KubernetesTargetStatus) DeepCopyInto(out *KubernetesTargetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Managed ¶
type Managed struct {
// VersionInfo: the version information of the chart
// +optional
VersionInfo []VersionDetail `json:"versionInfo,omitempty"`
// Group: the generated custom resource Group
// +optional
Group string `json:"group,omitempty"`
// Kind: the generated custom resource Kind
// +optional
Kind string `json:"kind,omitempty"`
}
func (*Managed) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Managed.
func (*Managed) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusFieldMapping ¶
type StatusFieldMapping struct {
// ForPath is the dotted path under .status to write, e.g. "endpoint" or "network.host".
// +kubebuilder:validation:MinLength=1
ForPath string `json:"forPath"`
// Expression is a ${ jq } program evaluated over the projection root; a bare path is
// the trivial copy. Plain literals (no ${ } wrapper) are written verbatim.
// +kubebuilder:validation:MinLength=1
Expression string `json:"expression"`
// Type optionally pins the generated status property's scalar JSON-schema type. For
// complex (object/array) outputs use Schema or PreserveUnknownFields instead.
// +optional
// +kubebuilder:validation:Enum=string;integer;number;boolean;object;array
Type string `json:"type,omitempty"`
// Schema optionally supplies the full JSON-schema for a complex output (object, array,
// array of objects). Mutually exclusive with PreserveUnknownFields.
// +optional
// +kubebuilder:validation:Schemaless
// +kubebuilder:pruning:PreserveUnknownFields
Schema *apiextensionsv1.JSONSchemaProps `json:"schema,omitempty"`
// PreserveUnknownFields generates the status node with
// x-kubernetes-preserve-unknown-fields: true, retaining an arbitrary structure without
// pruning. Mutually exclusive with Type/Schema.
// +optional
PreserveUnknownFields bool `json:"preserveUnknownFields,omitempty"`
}
StatusFieldMapping is one projected status field (snowplow widgetDataTemplate item).
func (*StatusFieldMapping) DeepCopy ¶
func (in *StatusFieldMapping) DeepCopy() *StatusFieldMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusFieldMapping.
func (*StatusFieldMapping) DeepCopyInto ¶
func (in *StatusFieldMapping) DeepCopyInto(out *StatusFieldMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetReference ¶
type TargetReference struct {
// Name of the KubernetesTarget, resolved in the referencing object's own namespace.
Name string `json:"name"`
}
TargetReference references a namespaced KubernetesTarget by name. The target is always resolved in the referencing CompositionDefinition's OWN namespace, so no namespace field is carried here.
func (*TargetReference) DeepCopy ¶
func (in *TargetReference) DeepCopy() *TargetReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetReference.
func (*TargetReference) DeepCopyInto ¶
func (in *TargetReference) DeepCopyInto(out *TargetReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetStatus ¶
type TargetStatus struct {
// Mode: where the controller is deployed (Local or Remote).
// +optional
Mode string `json:"mode,omitempty"`
// ConnectionStatus: Healthy when the target cluster is reachable, Down otherwise.
// +optional
ConnectionStatus string `json:"connectionStatus,omitempty"`
// Version: the Kubernetes version reported by the target cluster.
// +optional
Version string `json:"version,omitempty"`
// KubeconfigSecretResourceVersion: the resourceVersion of the kubeconfig Secret last
// used to reach a remote target, for credential-rotation traceability.
// +optional
KubeconfigSecretResourceVersion string `json:"kubeconfigSecretResourceVersion,omitempty"`
}
TargetStatus reports the cluster the composition-dynamic-controller (and the generated CRD and RBAC) are deployed to.
func (*TargetStatus) DeepCopy ¶
func (in *TargetStatus) DeepCopy() *TargetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatus.
func (*TargetStatus) DeepCopyInto ¶
func (in *TargetStatus) DeepCopyInto(out *TargetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpgradePolicy ¶
type UpgradePolicy string
UpgradePolicy selects the composition-instance migration strategy on a chart-version bump.
const ( // UpgradePolicyAutomatic eagerly migrates every owned instance onto the current version. UpgradePolicyAutomatic UpgradePolicy = "Automatic" // UpgradePolicyManual migrates only when the upgrade-to-version annotation approves it. UpgradePolicyManual UpgradePolicy = "Manual" // UpgradePolicyPaused freezes migration entirely. UpgradePolicyPaused UpgradePolicy = "Paused" // AnnotationKeyUpgradeToVersion, on a CompositionDefinition with UpgradePolicy=Manual, approves // migrating its instances onto the named served version (typically the current one). AnnotationKeyUpgradeToVersion = "krateo.io/upgrade-to-version" )
type VersionDetail ¶
type VersionDetail struct {
// Version: the version of the chart that is served. It is the version of the CRD.
// +optional
Version string `json:"version"`
// Served: whether the version is served
// +optional
Served bool `json:"served"`
// Stored: whether the version is stored
// +optional
Stored bool `json:"stored"`
// Chart: the chart information
// +optional
Chart *ChartInfoProps `json:"chart"`
}
func (*VersionDetail) DeepCopy ¶
func (in *VersionDetail) DeepCopy() *VersionDetail
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionDetail.
func (*VersionDetail) DeepCopyInto ¶
func (in *VersionDetail) DeepCopyInto(out *VersionDetail)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.