Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyDesireResourceTypeForParent(parent *azcorearm.ResourceID) azcorearm.ResourceType
- func ReadDesireResourceTypeForParent(parent *azcorearm.ResourceID) azcorearm.ResourceType
- func ToClusterScopedApplyDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, applyDesireName string) string
- func ToClusterScopedReadDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, readDesireName string) string
- func ToManagementClusterScopedApplyDesireResourceIDString(stampIdentifier, applyDesireName string) string
- func ToManagementClusterScopedReadDesireResourceIDString(stampIdentifier, readDesireName string) string
- func ToNodePoolScopedApplyDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, nodePoolName, ... string) string
- func ToNodePoolScopedReadDesireResourceIDString(...) string
- func ToSystemAdminCredentialRequestScopedApplyDesireResourceIDString(...) string
- func ToSystemAdminCredentialRequestScopedReadDesireResourceIDString(...) string
- func ToSystemAdminCredentialRevocationScopedApplyDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, revocationName, ... string) string
- func ToSystemAdminCredentialRevocationScopedReadDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, revocationName, ... string) string
- type ApplyDesire
- func (in *ApplyDesire) DeepCopy() *ApplyDesire
- func (in *ApplyDesire) DeepCopyInto(out *ApplyDesire)
- func (in *ApplyDesire) DeepCopyObject() runtime.Object
- func (d *ApplyDesire) GetManagementCluster() *azcorearm.ResourceID
- func (o *ApplyDesire) GetObjectKind() schema.ObjectKind
- func (o *ApplyDesire) GetObjectMeta() metav1.Object
- type ApplyDesireList
- type ApplyDesireSpec
- type ApplyDesireStatus
- type ApplyDesireType
- type ManagementClusterAccessor
- type ReadDesire
- func (in *ReadDesire) DeepCopy() *ReadDesire
- func (in *ReadDesire) DeepCopyInto(out *ReadDesire)
- func (in *ReadDesire) DeepCopyObject() runtime.Object
- func (d *ReadDesire) GetManagementCluster() *azcorearm.ResourceID
- func (o *ReadDesire) GetObjectKind() schema.ObjectKind
- func (o *ReadDesire) GetObjectMeta() metav1.Object
- type ReadDesireList
- type ReadDesireSpec
- type ReadDesireStatus
- type ResourceReference
- type ServerSideApplyConfig
Constants ¶
const ( // ConditionTypeSuccessful is true when the controller most-recently observed the // desired effect of the *Desire achieved against the kube-apiserver. // // For an ApplyDesire it is retained for backwards compatibility and mirrors // whichever operation-specific condition applies — ConditionTypeSuccessfullyApplied // for Type=ServerSideApply, ConditionTypeSuccessfullyDeleted for Type=Delete. // Readers should prefer the operation-specific condition (see // kubeapplierapihelpers.IsConditionTruePreferring) and fall back to this one // only when the operation-specific condition is absent (e.g. a document last // written by an older kube-applier). It remains the primary condition for a // ReadDesire, which has a single observe operation. ConditionTypeSuccessful = "Successful" // ConditionTypeSuccessfullyApplied is true when the controller most-recently // observed that an ApplyDesire with Type=ServerSideApply achieved its desired // effect (the server-side apply succeeded). ConditionTypeSuccessfullyApplied = "SuccessfullyApplied" // ConditionTypeSuccessfullyDeleted is true when the controller most-recently // observed that an ApplyDesire with Type=Delete achieved its desired effect // (the target is gone). While finalizers are running it stays False with reason // ConditionReasonWaitingForDeletion. ConditionTypeSuccessfullyDeleted = "SuccessfullyDeleted" // ConditionTypeDegraded reports controller-level health for the *Desire. // True means the controller failed in a way unrelated to the kube-apiserver // rejecting our request. ConditionTypeDegraded = "Degraded" )
Condition types reported on every *Desire's .status.conditions.
const ( // ConditionReasonKubeAPIError is set when the kube-apiserver returned an error for our request. ConditionReasonKubeAPIError = "KubeAPIError" // ConditionReasonPreCheckFailed is set when we could not even issue the kube-apiserver request // (e.g. malformed kubeContent, or missing required spec.targetItem fields). An unresolvable GVR // is not a pre-check failure: the controller passes the GVR straight to the dynamic client // without consulting a RESTMapper, so the kube-apiserver rejects it as a ConditionReasonKubeAPIError. ConditionReasonPreCheckFailed = "PreCheckFailed" // ConditionReasonWaitingForDeletion is set on an ApplyDesire with Type=Delete when the // target item still exists in the cluster, either because finalizers are running or // the delete call has just been issued. ConditionReasonWaitingForDeletion = "WaitingForDeletion" // ConditionReasonNoErrors is the success reason matching the existing controller // convention (see backend's controllerutils.ReportSyncError). ConditionReasonNoErrors = "NoErrors" // ConditionReasonFailed is the failure reason matching the existing controller // convention (see backend's controllerutils.ReportSyncError). ConditionReasonFailed = "Failed" )
Condition reasons.
const ( ApplyDesireResourceTypeName = "applyDesires" ReadDesireResourceTypeName = "readDesires" )
const ( // TagControllerName is the well-known key under ApplyDesire.Tags and // ReadDesire.Tags that records which controller authored the desire. Every // desire persisted through the shared kubeapplierhelpers ensure helpers must // carry this tag so an operator (or a cleanup path) can attribute each stored // desire to the controller responsible for it. TagControllerName = "ControllerName" )
Variables ¶
var ( // ClusterScopedApplyDesireResourceType is applyDesires nested directly under a Cluster. ClusterScopedApplyDesireResourceType = nestedResourceType(coreapi.ClusterResourceTypeName, ApplyDesireResourceTypeName) // NodePoolScopedApplyDesireResourceType is applyDesires nested under a NodePool under a Cluster. NodePoolScopedApplyDesireResourceType = nestedResourceType(coreapi.ClusterResourceTypeName, coreapi.NodePoolResourceTypeName, ApplyDesireResourceTypeName) // ClusterScopedReadDesireResourceType is readDesires nested directly under a Cluster. ClusterScopedReadDesireResourceType = nestedResourceType(coreapi.ClusterResourceTypeName, ReadDesireResourceTypeName) // NodePoolScopedReadDesireResourceType is readDesires nested under a NodePool under a Cluster. NodePoolScopedReadDesireResourceType = nestedResourceType(coreapi.ClusterResourceTypeName, coreapi.NodePoolResourceTypeName, ReadDesireResourceTypeName) // SystemAdminCredentialRequestScopedApplyDesireResourceType is applyDesires nested under a SystemAdminCredentialRequest under a Cluster. SystemAdminCredentialRequestScopedApplyDesireResourceType = nestedResourceType(coreapi.ClusterResourceTypeName, coreapi.SystemAdminCredentialRequestResourceTypeName, ApplyDesireResourceTypeName) // SystemAdminCredentialRequestScopedReadDesireResourceType is readDesires nested under a SystemAdminCredentialRequest under a Cluster. SystemAdminCredentialRequestScopedReadDesireResourceType = nestedResourceType(coreapi.ClusterResourceTypeName, coreapi.SystemAdminCredentialRequestResourceTypeName, ReadDesireResourceTypeName) // SystemAdminCredentialRevocationScopedApplyDesireResourceType is applyDesires nested under a SystemAdminCredentialRevocation under a Cluster. SystemAdminCredentialRevocationScopedApplyDesireResourceType = nestedResourceType(coreapi.ClusterResourceTypeName, coreapi.SystemAdminCredentialRevocationResourceTypeName, ApplyDesireResourceTypeName) // SystemAdminCredentialRevocationScopedReadDesireResourceType is readDesires nested under a SystemAdminCredentialRevocation under a Cluster. SystemAdminCredentialRevocationScopedReadDesireResourceType = nestedResourceType(coreapi.ClusterResourceTypeName, coreapi.SystemAdminCredentialRevocationResourceTypeName, ReadDesireResourceTypeName) // ManagementClusterScopedApplyDesireResourceType is applyDesires nested under a ManagementCluster under a Stamp. ManagementClusterScopedApplyDesireResourceType = nestedResourceType(fleetapi.StampResourceTypeName, fleetapi.ManagementClusterResourceTypeName, ApplyDesireResourceTypeName) // ManagementClusterScopedReadDesireResourceType is readDesires nested under a ManagementCluster under a Stamp. ManagementClusterScopedReadDesireResourceType = nestedResourceType(fleetapi.StampResourceTypeName, fleetapi.ManagementClusterResourceTypeName, ReadDesireResourceTypeName) )
Functions ¶
func ApplyDesireResourceTypeForParent ¶
func ApplyDesireResourceTypeForParent(parent *azcorearm.ResourceID) azcorearm.ResourceType
ApplyDesireResourceTypeForParent derives the nested ApplyDesire resource type for an arbitrary parent by appending the applyDesires leaf to the parent's own type.
func ReadDesireResourceTypeForParent ¶
func ReadDesireResourceTypeForParent(parent *azcorearm.ResourceID) azcorearm.ResourceType
ReadDesireResourceTypeForParent is the ReadDesire parallel of ApplyDesireResourceTypeForParent.
func ToClusterScopedApplyDesireResourceIDString ¶
func ToClusterScopedApplyDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, applyDesireName string, ) string
ToClusterScopedApplyDesireResourceIDString returns the resource ID string for an ApplyDesire nested directly under a cluster.
func ToClusterScopedReadDesireResourceIDString ¶
func ToClusterScopedReadDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, readDesireName string, ) string
ToClusterScopedReadDesireResourceIDString returns the resource ID string for a ReadDesire nested directly under a cluster.
func ToManagementClusterScopedApplyDesireResourceIDString ¶
func ToManagementClusterScopedApplyDesireResourceIDString(stampIdentifier, applyDesireName string) string
ToManagementClusterScopedApplyDesireResourceIDString returns the resource ID string for an ApplyDesire nested under a ManagementCluster under a Stamp.
func ToManagementClusterScopedReadDesireResourceIDString ¶
func ToManagementClusterScopedReadDesireResourceIDString(stampIdentifier, readDesireName string) string
ToManagementClusterScopedReadDesireResourceIDString returns the resource ID string for a ReadDesire nested under a ManagementCluster under a Stamp.
func ToNodePoolScopedApplyDesireResourceIDString ¶
func ToNodePoolScopedApplyDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, nodePoolName, applyDesireName string, ) string
ToNodePoolScopedApplyDesireResourceIDString returns the resource ID string for an ApplyDesire nested under a node pool under a cluster.
func ToNodePoolScopedReadDesireResourceIDString ¶
func ToNodePoolScopedReadDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, nodePoolName, readDesireName string, ) string
ToNodePoolScopedReadDesireResourceIDString returns the resource ID string for a ReadDesire nested under a node pool under a cluster.
func ToSystemAdminCredentialRequestScopedApplyDesireResourceIDString ¶
func ToSystemAdminCredentialRequestScopedApplyDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, credentialRequestName, applyDesireName string, ) string
ToSystemAdminCredentialRequestScopedApplyDesireResourceIDString returns the resource ID string for an ApplyDesire nested under a SystemAdminCredentialRequest under a cluster.
func ToSystemAdminCredentialRequestScopedReadDesireResourceIDString ¶
func ToSystemAdminCredentialRequestScopedReadDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, credentialRequestName, readDesireName string, ) string
ToSystemAdminCredentialRequestScopedReadDesireResourceIDString returns the resource ID string for a ReadDesire nested under a SystemAdminCredentialRequest under a cluster.
func ToSystemAdminCredentialRevocationScopedApplyDesireResourceIDString ¶
func ToSystemAdminCredentialRevocationScopedApplyDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, revocationName, applyDesireName string, ) string
ToSystemAdminCredentialRevocationScopedApplyDesireResourceIDString returns the resource ID string for an ApplyDesire nested under a SystemAdminCredentialRevocation under a cluster.
func ToSystemAdminCredentialRevocationScopedReadDesireResourceIDString ¶
func ToSystemAdminCredentialRevocationScopedReadDesireResourceIDString(subscriptionName, resourceGroupName, clusterName, revocationName, readDesireName string, ) string
ToSystemAdminCredentialRevocationScopedReadDesireResourceIDString returns the resource ID string for a ReadDesire nested under a SystemAdminCredentialRevocation under a cluster.
Types ¶
type ApplyDesire ¶
type ApplyDesire struct {
// CosmosMetadata.ResourceID is nested under an HCPOpenShiftCluster (and
// optionally a NodePool) so that listing the partition by parent prefix
// naturally returns the desires associated with that resource — and so
// that cluster/nodepool deletion can sweep them.
// PartitionKey holds the lowercased Spec.ManagementCluster resource ID
// (e.g. "/providers/microsoft.redhatopenshift/stamps/1/managementclusters/default")
// so that all desires for one management cluster live together in one Cosmos
// partition (and one container, in the per-MC container model).
coreapi.CosmosMetadata `json:"cosmosMetadata"`
Spec ApplyDesireSpec `json:"spec"`
Status ApplyDesireStatus `json:"status"`
// Tags are optional key-value pairs stored alongside the desire in Cosmos.
// Callers filter on tag presence Go-side after listing.
Tags map[string]string `json:"tags,omitempty"`
}
ApplyDesire holds a single intent to either server-side-apply a Kubernetes object or delete one from the management cluster's apiserver. The .spec.type field discriminates between the two operations.
Each ApplyDesire targets exactly one kube object — there is no list form.
Deleting an ApplyDesire from Cosmos has no effect on the kube object that was applied or deleted. To stop reconciliation, remove the desire document.
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ApplyDesire) DeepCopy ¶
func (in *ApplyDesire) DeepCopy() *ApplyDesire
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyDesire.
func (*ApplyDesire) DeepCopyInto ¶
func (in *ApplyDesire) DeepCopyInto(out *ApplyDesire)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplyDesire) DeepCopyObject ¶
func (in *ApplyDesire) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ApplyDesire) GetManagementCluster ¶
func (d *ApplyDesire) GetManagementCluster() *azcorearm.ResourceID
func (*ApplyDesire) GetObjectKind ¶
func (o *ApplyDesire) GetObjectKind() schema.ObjectKind
func (*ApplyDesire) GetObjectMeta ¶
func (o *ApplyDesire) GetObjectMeta() metav1.Object
type ApplyDesireList ¶
type ApplyDesireList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ApplyDesire `json:"items"`
}
ApplyDesireList is a list of ApplyDesire resources compatible with runtime.Object for use with Kubernetes informer machinery. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ApplyDesireList) DeepCopy ¶
func (in *ApplyDesireList) DeepCopy() *ApplyDesireList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyDesireList.
func (*ApplyDesireList) DeepCopyInto ¶
func (in *ApplyDesireList) DeepCopyInto(out *ApplyDesireList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ApplyDesireList) DeepCopyObject ¶
func (in *ApplyDesireList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ApplyDesireList) GetObjectKind ¶
func (l *ApplyDesireList) GetObjectKind() schema.ObjectKind
type ApplyDesireSpec ¶
type ApplyDesireSpec struct {
// ManagementCluster names the management cluster whose kube-applier should
// reconcile this desire. It is the cosmos partition key for the
// kube-applier container; entries from one management cluster never see
// entries from another.
// This is the same resourceID as the fleetapi.ManagementCluster.CosmosMetadata.ResourceID
// Example: "/providers/microsoft.redhatopenshift/stamps/1/managementclusters/default"
ManagementCluster *azcorearm.ResourceID `json:"managementCluster"`
// Type discriminates the operation: ServerSideApply or Delete.
// +k8s:union
Type ApplyDesireType `json:"type"`
// TargetItem identifies the GVR (and optionally the namespace) of the
// target Kubernetes resource. For ServerSideApply, the controller uses
// Group + Resource verbatim rather than guessing a plural form from
// KubeContent's kind. Name and Namespace must agree with
// KubeContent.metadata.{name,namespace}; the controller does not
// re-derive them from the manifest. For Delete, TargetItem identifies
// the single kube object to delete.
TargetItem ResourceReference `json:"targetItem"`
// ServerSideApply holds the configuration for the ServerSideApply variant.
// Must be non-nil when Type=ServerSideApply; must be nil when Type=Delete.
// +k8s:unionMember=ServerSideApply
ServerSideApply *ServerSideApplyConfig `json:"serverSideApply,omitempty"`
}
ApplyDesireSpec is the specification for an ApplyDesire. It uses a discriminated union via the Type field:
- Type=ServerSideApply: the ServerSideApply field must be non-nil and contains the KubeContent to apply.
- Type=Delete: the ServerSideApply field must be nil. The controller deletes .spec.targetItem and waits for finalizers.
+k8s:discriminator=Type
func (*ApplyDesireSpec) DeepCopy ¶
func (in *ApplyDesireSpec) DeepCopy() *ApplyDesireSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyDesireSpec.
func (*ApplyDesireSpec) DeepCopyInto ¶
func (in *ApplyDesireSpec) DeepCopyInto(out *ApplyDesireSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplyDesireStatus ¶
type ApplyDesireStatus struct {
// Conditions reports per-desire reconciliation status. Well-known types:
// - "SuccessfullyApplied": set for Type=ServerSideApply. True means the SSA
// succeeded.
// - "SuccessfullyDeleted": set for Type=Delete. True means the target is
// gone. While finalizers are running it stays False with
// reason "WaitingForDeletion".
// - "Successful": retained for backwards compatibility. It mirrors whichever
// operation-specific condition applies (SuccessfullyApplied
// for ServerSideApply, SuccessfullyDeleted for Delete) with
// the same status/reason/message. Prefer the
// operation-specific condition; see
// kubeapplierapihelpers.IsConditionTruePreferring.
// - "Degraded": the controller is not making progress for an
// out-of-band reason.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// AppliedKubeGeneration records the metadata.generation of the
// Kubernetes object returned by the most recent successful server-side
// apply call. When the most recent apply attempt failed, this field is
// nil so that consumers can distinguish "last apply succeeded and the
// kube object is at generation N" from "last apply failed".
AppliedKubeGeneration *int64 `json:"appliedKubeGeneration,omitempty"`
}
func (*ApplyDesireStatus) DeepCopy ¶
func (in *ApplyDesireStatus) DeepCopy() *ApplyDesireStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyDesireStatus.
func (*ApplyDesireStatus) DeepCopyInto ¶
func (in *ApplyDesireStatus) DeepCopyInto(out *ApplyDesireStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ApplyDesireType ¶
type ApplyDesireType string
ApplyDesireType is the discriminator for the ApplyDesire union. +k8s:union
const ( // ApplyDesireTypeServerSideApply indicates the desire is a server-side-apply // of .spec.serverSideApply.kubeContent to the management cluster. // +k8s:unionMember ApplyDesireTypeServerSideApply ApplyDesireType = "ServerSideApply" // ApplyDesireTypeDelete indicates the desire is a deletion of .spec.targetItem // from the management cluster. // +k8s:unionMember ApplyDesireTypeDelete ApplyDesireType = "Delete" )
type ManagementClusterAccessor ¶
type ManagementClusterAccessor interface {
GetManagementCluster() *azcorearm.ResourceID
}
ManagementClusterAccessor is implemented by every *Desire so that the database layer can read the partition-key value (the management cluster resourceID) without importing this package's concrete types.
type ReadDesire ¶
type ReadDesire struct {
// CosmosMetadata.ResourceID is nested under an HCPOpenShiftCluster (and
// optionally a NodePool) so that listing the partition by parent prefix
// naturally returns the desires associated with that resource — and so
// that cluster/nodepool deletion can sweep them.
// PartitionKey holds the lowercased Spec.ManagementCluster resource ID
// (e.g. "/providers/microsoft.redhatopenshift/stamps/1/managementclusters/default")
// so that all desires for one management cluster live together in one Cosmos
// partition (and one container, in the per-MC container model).
coreapi.CosmosMetadata `json:"cosmosMetadata"`
Spec ReadDesireSpec `json:"spec"`
Status ReadDesireStatus `json:"status"`
// Tags are optional key-value pairs stored alongside the desire in Cosmos.
// Callers filter on tag presence Go-side after listing.
Tags map[string]string `json:"tags,omitempty"`
}
ReadDesire indicates a kube item in .spec.targetItem to issue a list/watch+informer for. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ReadDesire) DeepCopy ¶
func (in *ReadDesire) DeepCopy() *ReadDesire
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadDesire.
func (*ReadDesire) DeepCopyInto ¶
func (in *ReadDesire) DeepCopyInto(out *ReadDesire)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReadDesire) DeepCopyObject ¶
func (in *ReadDesire) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ReadDesire) GetManagementCluster ¶
func (d *ReadDesire) GetManagementCluster() *azcorearm.ResourceID
func (*ReadDesire) GetObjectKind ¶
func (o *ReadDesire) GetObjectKind() schema.ObjectKind
func (*ReadDesire) GetObjectMeta ¶
func (o *ReadDesire) GetObjectMeta() metav1.Object
type ReadDesireList ¶
type ReadDesireList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ReadDesire `json:"items"`
}
ReadDesireList is a list of ReadDesire resources compatible with runtime.Object for use with Kubernetes informer machinery. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ReadDesireList) DeepCopy ¶
func (in *ReadDesireList) DeepCopy() *ReadDesireList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadDesireList.
func (*ReadDesireList) DeepCopyInto ¶
func (in *ReadDesireList) DeepCopyInto(out *ReadDesireList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ReadDesireList) DeepCopyObject ¶
func (in *ReadDesireList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ReadDesireList) GetObjectKind ¶
func (l *ReadDesireList) GetObjectKind() schema.ObjectKind
type ReadDesireSpec ¶
type ReadDesireSpec struct {
// ManagementCluster names the management cluster whose kube-applier should
// reconcile this desire. It is the cosmos partition key for the
// kube-applier container; entries from one management cluster never see
// entries from another.
// This is the same resourceID as the fleetapi.ManagementCluster.CosmosMetadata.ResourceID
// Example: "/providers/microsoft.redhatopenshift/stamps/1/managementclusters/default"
ManagementCluster *azcorearm.ResourceID `json:"managementCluster"`
// TargetItem identifies the single kube object to read. The kube-applier
// runs a per-instance list/watch+informer scoped to this exact name and
// mirrors the live object into .status.kubeContent. Refresh frequency is
// not contractual, and .status carries no explicit observed-at timestamp.
TargetItem ResourceReference `json:"targetItem,omitempty"`
}
func (*ReadDesireSpec) DeepCopy ¶
func (in *ReadDesireSpec) DeepCopy() *ReadDesireSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadDesireSpec.
func (*ReadDesireSpec) DeepCopyInto ¶
func (in *ReadDesireSpec) DeepCopyInto(out *ReadDesireSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReadDesireStatus ¶
type ReadDesireStatus struct {
// Conditions reports per-desire reconciliation status. Well-known types:
// - "Successful": the informer has synced and KubeContent reflects
// the last observation.
// - "Degraded": the controller is not making progress for an
// out-of-band reason.
Conditions []metav1.Condition `json:"conditions,omitempty"`
// KubeContent holds the most recently observed state of TargetItem.
// nil means the target either has not been observed yet or is absent
// from the cluster — distinguish those two via the "Successful"
// condition (Unknown vs. True).
//
// When TargetItem is a core/v1 Secret, KubeContent is redacted before
// storage: structural fields (apiVersion, kind, type) and metadata are
// preserved, but annotations that can embed the full Secret (e.g.
// kubectl.kubernetes.io/last-applied-configuration) are stripped. In the
// data map only known-safe keys (currently "tls.crt") survive; all other
// data keys, along with all of binaryData and stringData, are removed to
// prevent private keys, passwords, and tokens from leaking into Cosmos.
KubeContent *runtime.RawExtension `json:"kubeContent,omitempty"`
}
func (*ReadDesireStatus) DeepCopy ¶
func (in *ReadDesireStatus) DeepCopy() *ReadDesireStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadDesireStatus.
func (*ReadDesireStatus) DeepCopyInto ¶
func (in *ReadDesireStatus) DeepCopyInto(out *ReadDesireStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceReference ¶
type ResourceReference struct {
// Group is the API group of the target resource. Empty for the core API.
Group string `json:"group"`
// Version is the API version of the target resource (e.g. "v1", "v1beta1").
// Required: the dynamic client builds URLs from it and has no fallback.
Version string `json:"version"`
// Resource is the lower-cased plural resource name (e.g. "configmaps").
// This is the URL-path segment, not Kind; it intentionally avoids
// RESTMapping logic in the controller.
Resource string `json:"resource"`
// Namespace is the namespace of the target Kubernetes resource. Leave
// empty for cluster-scoped Kubernetes resources. Note: this is the
// Kubernetes scope, not the Cosmos scope — every *Desire is itself
// nested under an HCPOpenShiftCluster (and possibly a NodePool) on the
// Cosmos side regardless of the value here.
Namespace string `json:"namespace,omitempty"`
// Name is the name of the target resource.
Name string `json:"name"`
}
ResourceReference identifies a single Kubernetes object on the management cluster. It is shared by every *Desire spec.targetItem (ApplyDesire, ReadDesire) so the kube-applier resolves the GVR and (if applicable) namespace + name without consulting a RESTMapper.
func (*ResourceReference) DeepCopy ¶
func (in *ResourceReference) DeepCopy() *ResourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceReference.
func (*ResourceReference) DeepCopyInto ¶
func (in *ResourceReference) DeepCopyInto(out *ResourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServerSideApplyConfig ¶
type ServerSideApplyConfig struct {
// KubeContent is a single Kubernetes object (not a List) to be applied
// with server-side-apply and Force=true. The object must carry apiVersion,
// kind, metadata.name, and metadata.namespace if namespaced.
//
// A nil pointer (or one with an empty Raw) is treated as a pre-check
// failure: the kube-applier needs an object to apply.
//
// The kube-applier always issues SSA with FieldManager="aro-hcp-kube-applier".
// The manager name is intentionally not configurable via this API: every
// field the kube-applier owns on the cluster traces to that one string,
// so an operator inspecting fieldsV1 metadata can attribute ownership at
// a glance.
KubeContent *runtime.RawExtension `json:"kubeContent,omitempty"`
}
ServerSideApplyConfig holds fields specific to the ServerSideApply variant of ApplyDesire.
func (*ServerSideApplyConfig) DeepCopy ¶
func (in *ServerSideApplyConfig) DeepCopy() *ServerSideApplyConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerSideApplyConfig.
func (*ServerSideApplyConfig) DeepCopyInto ¶
func (in *ServerSideApplyConfig) DeepCopyInto(out *ServerSideApplyConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.