Documentation
¶
Overview ¶
+kubebuilder:object:generate=true +groupName=clusters.openmcp.cloud
Index ¶
- Constants
- Variables
- type AccessRequest
- type AccessRequestList
- type AccessRequestSpec
- type AccessRequestStatus
- type Cluster
- type ClusterConfigRef
- type ClusterList
- type ClusterPhase
- type ClusterProfile
- type ClusterProfileList
- type ClusterProfileSpec
- type ClusterRequest
- type ClusterRequestList
- type ClusterRequestSpec
- type ClusterRequestStatus
- type ClusterSpec
- type ClusterStatus
- type CommonStatus
- type Condition
- func (in *Condition) DeepCopy() *Condition
- func (in *Condition) DeepCopyInto(out *Condition)
- func (c *Condition) GetLastTransitionTime() time.Time
- func (c *Condition) GetMessage() string
- func (c *Condition) GetReason() string
- func (c *Condition) GetStatus() ConditionStatus
- func (c *Condition) GetType() string
- func (cc Condition) IsFalse() bool
- func (cc Condition) IsTrue() bool
- func (cc Condition) IsUnknown() bool
- func (c *Condition) SetLastTransitionTime(t time.Time)
- func (c *Condition) SetMessage(m string)
- func (c *Condition) SetReason(r string)
- func (c *Condition) SetStatus(s ConditionStatus)
- func (c *Condition) SetType(t string)
- type ConditionList
- type ConditionStatus
- type K8sConfiguration
- type NamespacedObjectReference
- type ObjectReference
- type PermissionsRequest
- type RequestPhase
- type SupportedK8sVersion
- type Tenancy
Constants ¶
const ( // PURPOSE_PLATFORM means platform controllers will run on the cluster. PURPOSE_PLATFORM = "platform" // PURPOSE_WORKLOAD means workload controllers will run on the cluster. PURPOSE_WORKLOAD = "workload" // PURPOSE_ONBOARDING means the cluster is used for onboarding resources. // Onboarding clusters can be workerless. PURPOSE_ONBOARDING = "onboarding" // PURPOSE_MCP means the cluster is used as an MCP cluster. // MCP clusters can be workerless. PURPOSE_MCP = "mcp" )
const ( // K8sVersionLabel can be used to display the k8s version of the cluster. // This is useful since the cluster spec can contain only a partial version (e.g. "1.23") or no version at all, so the actual version can not be determined from the spec alone. // The responsible ClusterProvider has to set this label. K8sVersionLabel = GroupName + "/k8sversion" // ProviderInfoAnnotation can be used to display provider-specific information about the cluster. // The responsible ClusterProvider can set this annotation to display additional information about the cluster. // The value will be shown in a column when 'kubectl get clusters -o wide' is used. ProviderInfoAnnotation = GroupName + "/providerinfo" // ProviderLabel can be used to display the provider of the cluster. // It is also used to indicate the provider that is responsible for an AccessRequest. // For clusters, the responsible ClusterProvider has to set this label. // For AccessRequests, the generic controller that is part of the openMCP Operator sets it. ProviderLabel = GroupName + "/provider" // DeleteWithoutRequestsLabel marks that the corresponding cluster can be deleted if the scheduler removes the last request pointing to it. // Its value must be "true" for the label to take effect. DeleteWithoutRequestsLabel = GroupName + "/delete-without-requests" // ProfileLabel is used to make the profile information easily accessible on AccessRequests. ProfileLabel = GroupName + "/profile" )
const ( // ClusterRequestFinalizer is the finalizer used on ClusterRequest resources ClusterRequestFinalizer = GroupName + "/request" // RequestFinalizerOnClusterPrefix is the prefix for the finalizers that mark a Cluster as being referenced by a ClusterRequest. RequestFinalizerOnClusterPrefix = "request." + GroupName + "/" )
const GroupName = "clusters." + apiconst.OpenMCPGroupName
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: GroupName, 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 AccessRequest ¶
type AccessRequest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec AccessRequestSpec `json:"spec,omitempty"` Status AccessRequestStatus `json:"status,omitempty"` }
AccessRequest is the Schema for the accessrequests API
func (*AccessRequest) DeepCopy ¶
func (in *AccessRequest) DeepCopy() *AccessRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessRequest.
func (*AccessRequest) DeepCopyInto ¶
func (in *AccessRequest) DeepCopyInto(out *AccessRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AccessRequest) DeepCopyObject ¶
func (in *AccessRequest) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AccessRequestList ¶
type AccessRequestList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []AccessRequest `json:"items"` }
AccessRequestList contains a list of AccessRequest
func (*AccessRequestList) DeepCopy ¶
func (in *AccessRequestList) DeepCopy() *AccessRequestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessRequestList.
func (*AccessRequestList) DeepCopyInto ¶
func (in *AccessRequestList) DeepCopyInto(out *AccessRequestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AccessRequestList) DeepCopyObject ¶
func (in *AccessRequestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type AccessRequestSpec ¶
type AccessRequestSpec struct { // ClusterRef is the reference to the Cluster for which access is requested. // If set, requestRef will be ignored. // This value is immutable. // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="clusterRef is immutable" // +optional ClusterRef *NamespacedObjectReference `json:"clusterRef,omitempty"` // RequestRef is the reference to the ClusterRequest for whose Cluster access is requested. // Is ignored if clusterRef is set. // This value is immutable. // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="requestRef is immutable" // +optional RequestRef *NamespacedObjectReference `json:"requestRef,omitempty"` // Permissions are the requested permissions. Permissions []PermissionsRequest `json:"permissions"` }
+kubebuilder:validation:XValidation:rule="!has(oldSelf.clusterRef) || has(self.clusterRef)", message="clusterRef may not be removed once set" +kubebuilder:validation:XValidation:rule="!has(oldSelf.requestRef) || has(self.requestRef)", message="requestRef may not be removed once set"
func (*AccessRequestSpec) DeepCopy ¶
func (in *AccessRequestSpec) DeepCopy() *AccessRequestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessRequestSpec.
func (*AccessRequestSpec) DeepCopyInto ¶
func (in *AccessRequestSpec) DeepCopyInto(out *AccessRequestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AccessRequestStatus ¶
type AccessRequestStatus struct { CommonStatus `json:",inline"` // Phase is the current phase of the request. // +kubebuilder:default=Pending // +kubebuilder:validation:Enum=Pending;Granted;Denied Phase RequestPhase `json:"phase"` // SecretRef holds the reference to the secret that contains the actual credentials. SecretRef *NamespacedObjectReference `json:"secretRef,omitempty"` }
AccessRequestStatus defines the observed state of AccessRequest
func (*AccessRequestStatus) DeepCopy ¶
func (in *AccessRequestStatus) DeepCopy() *AccessRequestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessRequestStatus.
func (*AccessRequestStatus) DeepCopyInto ¶
func (in *AccessRequestStatus) DeepCopyInto(out *AccessRequestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cluster ¶
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec,omitempty"` Status ClusterStatus `json:"status,omitempty"` }
Cluster is the Schema for the clusters API
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Cluster) GetRequestUIDs ¶ added in v0.4.0
GetRequestUIDs returns the UIDs of all ClusterRequests that have marked this cluster with a corresponding finalizer.
func (*Cluster) GetTenancyCount ¶
GetTenancyCount returns the number of ClusterRequests currently pointing to this cluster. This is determined by counting the finalizers that have the corresponding prefix. Note that only unique finalizers are counted, so if there are multiple identical request finalizers (which should not happen), this method's return value might not match the actual number of finalizers with the prefix.
type ClusterConfigRef ¶
type ClusterConfigRef struct { // APIGroup is the group for the resource being referenced. // +kubebuilder:validation:MinLength=1 APIGroup string `json:"apiGroup"` // Kind is the kind of the resource being referenced. // +kubebuilder:validation:MinLength=1 Kind string `json:"kind"` // Name is the name of the resource being referenced. // Defaults to the name of the referencing resource, if not specified. // +optional Name string `json:"name,omitempty"` }
ClusterConfigRef is a reference to a cluster configuration.
func (*ClusterConfigRef) DeepCopy ¶
func (in *ClusterConfigRef) DeepCopy() *ClusterConfigRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConfigRef.
func (*ClusterConfigRef) DeepCopyInto ¶
func (in *ClusterConfigRef) DeepCopyInto(out *ClusterConfigRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterList ¶
type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Cluster `json:"items"` }
ClusterList contains a list of Cluster
func (*ClusterList) DeepCopy ¶
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterPhase ¶
type ClusterPhase string
const ( // CLUSTER_PHASE_UNKNOWN represents an unknown status for the cluster. CLUSTER_PHASE_UNKNOWN ClusterPhase = "Unknown" // CLUSTER_PHASE_READY represents a cluster that is ready. CLUSTER_PHASE_READY ClusterPhase = "Ready" // CLUSTER_PHASE_NOT_READY represents a cluster that is not ready. CLUSTER_PHASE_NOT_READY ClusterPhase = "Not Ready" // CLUSTER_PHASE_ERROR represents a cluster that could not be reconciled successfully. CLUSTER_PHASE_ERROR ClusterPhase = "Error" // CLUSTER_PHASE_DELETING represents a cluster that is being deleted. CLUSTER_PHASE_DELETING ClusterPhase = "In Deletion" // CLUSTER_PHASE_DELETING_ERROR represents a cluster that could not be reconciled successfully while being in deletion. CLUSTER_PHASE_DELETING_ERROR ClusterPhase = "Error In Deletion" )
const ( // PHASE_UNKNOWN represents an unknown phase for the cluster. PHASE_UNKNOWN ClusterPhase = "Unknown" // PHASE_PROGRESSING indicates that the cluster is being created or updated. PHASE_PROGRESSING ClusterPhase = "Progressing" // PHASE_SUCCEEDED indicates that the cluster is ready. PHASE_SUCCEEDED ClusterPhase = "Succeeded" // PHASE_FAILED indicates that an error occurred while creating or updating the cluster. PHASE_FAILED ClusterPhase = "Failed" // PHASE_DELETING indicates that the cluster is being deleted. PHASE_DELETING ClusterPhase = "Deleting" // PHASE_DELETION_FAILED indicates that an error occurred while deleting the cluster. PHASE_DELETION_FAILED ClusterPhase = "DeletionFailed" )
type ClusterProfile ¶
type ClusterProfile struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterProfileSpec `json:"spec,omitempty"` }
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"` }
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 ClusterProfileSpec ¶
type ClusterProfileSpec struct { // ProviderRef is a reference to the ClusterProvider ProviderRef ObjectReference `json:"providerRef"` // ProviderConfigRef is a reference to the provider-specific configuration. ProviderConfigRef ObjectReference `json:"providerConfigRef"` // SupportedVersions are the supported Kubernetes versions. SupportedVersions []SupportedK8sVersion `json:"supportedVersions"` }
ClusterProfileSpec defines the desired state of Provider.
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 ClusterRequest ¶
type ClusterRequest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterRequestSpec `json:"spec,omitempty"` Status ClusterRequestStatus `json:"status,omitempty"` }
ClusterRequest is the Schema for the clusters API
func (*ClusterRequest) DeepCopy ¶
func (in *ClusterRequest) DeepCopy() *ClusterRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRequest.
func (*ClusterRequest) DeepCopyInto ¶
func (in *ClusterRequest) DeepCopyInto(out *ClusterRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterRequest) DeepCopyObject ¶
func (in *ClusterRequest) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterRequest) FinalizerForCluster ¶
func (cr *ClusterRequest) FinalizerForCluster() string
FinalizerForCluster returns the finalizer that is used to mark that a specific request has pointed to a specific cluster. Apart from preventing the Cluster's deletion, this information is used to recover the Cluster if the status of the ClusterRequest ever gets lost.
type ClusterRequestList ¶
type ClusterRequestList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Cluster `json:"items"` }
ClusterRequestList contains a list of Cluster
func (*ClusterRequestList) DeepCopy ¶
func (in *ClusterRequestList) DeepCopy() *ClusterRequestList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRequestList.
func (*ClusterRequestList) DeepCopyInto ¶
func (in *ClusterRequestList) DeepCopyInto(out *ClusterRequestList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterRequestList) DeepCopyObject ¶
func (in *ClusterRequestList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterRequestSpec ¶
type ClusterRequestSpec struct { // Purpose is the purpose of the requested cluster. // +kubebuilder:validation:MinLength=1 Purpose string `json:"purpose"` }
+kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec is immutable"
func (*ClusterRequestSpec) DeepCopy ¶
func (in *ClusterRequestSpec) DeepCopy() *ClusterRequestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRequestSpec.
func (*ClusterRequestSpec) DeepCopyInto ¶
func (in *ClusterRequestSpec) DeepCopyInto(out *ClusterRequestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterRequestStatus ¶
type ClusterRequestStatus struct { CommonStatus `json:",inline"` // Phase is the current phase of the request. // +kubebuilder:default=Pending // +kubebuilder:validation:Enum=Pending;Granted;Denied Phase RequestPhase `json:"phase"` // Cluster is the reference to the Cluster that was returned as a result of a granted request. // Note that this information needs to be recoverable in case this status is lost, e.g. by adding a back reference in form of a finalizer to the Cluster resource. // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="cluster is immutable" Cluster *NamespacedObjectReference `json:"cluster,omitempty"` }
+kubebuilder:validation:XValidation:rule="!has(oldSelf.cluster) || has(self.cluster)", message="cluster may not be removed once set"
func (*ClusterRequestStatus) DeepCopy ¶
func (in *ClusterRequestStatus) DeepCopy() *ClusterRequestStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRequestStatus.
func (*ClusterRequestStatus) DeepCopyInto ¶
func (in *ClusterRequestStatus) DeepCopyInto(out *ClusterRequestStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterSpec ¶
type ClusterSpec struct { // Profile is a reference to the cluster provider. // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="profile is immutable" Profile string `json:"profile"` // ClusterConfigRef is a reference to a cluster configuration. // +optional ClusterConfigRef *ClusterConfigRef `json:"clusterConfigRef,omitempty"` // Kubernetes configuration for the cluster. Kubernetes K8sConfiguration `json:"kubernetes,omitempty"` // Purposes lists the purposes this cluster is intended for. // +kubebuilder:validation:MinItems=1 Purposes []string `json:"purposes,omitempty"` // Tenancy is the tenancy model of the cluster. // +kubebuilder:validation:Enum=Exclusive;Shared Tenancy Tenancy `json:"tenancy"` }
ClusterSpec defines the desired state of Cluster
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterStatus ¶
type ClusterStatus struct { CommonStatus `json:",inline"` // Phase is the current phase of the cluster. Phase ClusterPhase `json:"phase"` // APIServer is the API server endpoint of the cluster. // +optional APIServer string `json:"apiServer,omitempty"` // ProviderStatus is the provider-specific status of the cluster. // x-kubernetes-preserve-unknown-fields: true // +optional ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"` }
ClusterStatus defines the observed state of Cluster
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterStatus) GetProviderStatus ¶
func (cs *ClusterStatus) GetProviderStatus(into any) error
GetProviderStatus tries to unmarshal the provider status into the given variable.
func (*ClusterStatus) SetProviderStatus ¶
func (cs *ClusterStatus) SetProviderStatus(from any) error
SetProviderStatus marshals the given variable into the provider status.
type CommonStatus ¶
type CommonStatus struct { // ObservedGeneration is the generation of this resource that was last reconciled by the controller. ObservedGeneration int64 `json:"observedGeneration"` // LastReconcileTime is the time when the resource was last reconciled by the controller. LastReconcileTime metav1.Time `json:"lastReconcileTime"` // Reason is expected to contain a CamelCased string that provides further information in a machine-readable format. // +optional Reason string `json:"reason,omitempty"` // Message contains further details in a human-readable format. // +optional Message string `json:"message,omitempty"` // Conditions contains the conditions. // +optional Conditions ConditionList `json:"conditions,omitempty"` }
CommonStatus is a status shared by multiple resource. Note that a 'phase' is also part of the status, but it cannot be included in this struct. The reason is that we want to use string-like types for the phase, but the goddamn code generation does not support generics, no matter which annotations are added.
func (*CommonStatus) DeepCopy ¶
func (in *CommonStatus) DeepCopy() *CommonStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonStatus.
func (*CommonStatus) DeepCopyInto ¶
func (in *CommonStatus) DeepCopyInto(out *CommonStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Condition ¶
type Condition struct { // Type is the type of the condition. // Must be unique within the resource. Type string `json:"type"` // Status is the status of the condition. Status ConditionStatus `json:"status"` // Reason is expected to contain a CamelCased string that provides further information regarding the condition. // It should have a fixed value set (like an enum) to be machine-readable. The value set depends on the condition type. // It is optional, but should be filled at least when Status is not "True". // +optional Reason string `json:"reason,omitempty"` // Message contains further details regarding the condition. // It is meant for human users, Reason should be used for programmatic evaluation instead. // It is optional, but should be filled at least when Status is not "True". // +optional Message string `json:"message,omitempty"` // LastTransitionTime specifies the time when this condition's status last changed. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` }
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Condition) GetLastTransitionTime ¶
func (*Condition) GetMessage ¶
func (*Condition) GetStatus ¶
func (c *Condition) GetStatus() ConditionStatus
func (Condition) IsFalse ¶
IsFalse returns true if the Condition's status is "False". Note that the status can be "Unknown", so !IsFalse() is not the same as IsTrue().
func (Condition) IsTrue ¶
IsTrue returns true if the Condition's status is "True". Note that the status can be "Unknown", so !IsTrue() is not the same as IsFalse().
func (*Condition) SetLastTransitionTime ¶
func (*Condition) SetMessage ¶
func (*Condition) SetStatus ¶
func (c *Condition) SetStatus(s ConditionStatus)
type ConditionList ¶
type ConditionList []Condition
ConditionList is a list of Conditions.
func (ConditionList) DeepCopy ¶
func (in ConditionList) DeepCopy() ConditionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionList.
func (ConditionList) DeepCopyInto ¶
func (in ConditionList) DeepCopyInto(out *ConditionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionStatus ¶
type ConditionStatus string
const ( // CONDITION_UNKNOWN represents an unknown status for the condition. CONDITION_UNKNOWN ConditionStatus = "Unknown" // CONDITION_TRUE marks the condition as true. CONDITION_TRUE ConditionStatus = "True" // CONDITION_FALSE marks the condition as false. CONDITION_FALSE ConditionStatus = "False" )
func ConditionStatusFromBool ¶
func ConditionStatusFromBool(src bool) ConditionStatus
ConditionStatusFromBool converts a bool into the corresponding ConditionStatus.
func ConditionStatusFromBoolPtr ¶
func ConditionStatusFromBoolPtr(src *bool) ConditionStatus
ConditionStatusFromBoolPtr converts a bool pointer into the corresponding ConditionStatus. If nil, "Unknown" is returned.
type K8sConfiguration ¶
type K8sConfiguration struct { // Version is the k8s version of the cluster. Version string `json:"version,omitempty"` }
func (*K8sConfiguration) DeepCopy ¶
func (in *K8sConfiguration) DeepCopy() *K8sConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8sConfiguration.
func (*K8sConfiguration) DeepCopyInto ¶
func (in *K8sConfiguration) DeepCopyInto(out *K8sConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespacedObjectReference ¶
type NamespacedObjectReference struct { ObjectReference `json:",inline"` // Namespace is the namespace of the referenced resource. Namespace string `json:"namespace"` }
func (*NamespacedObjectReference) DeepCopy ¶
func (in *NamespacedObjectReference) DeepCopy() *NamespacedObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedObjectReference.
func (*NamespacedObjectReference) DeepCopyInto ¶
func (in *NamespacedObjectReference) DeepCopyInto(out *NamespacedObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectReference ¶
type ObjectReference struct { // Name is the name of the referenced resource. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` }
func (*ObjectReference) DeepCopy ¶
func (in *ObjectReference) DeepCopy() *ObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
func (*ObjectReference) DeepCopyInto ¶
func (in *ObjectReference) DeepCopyInto(out *ObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PermissionsRequest ¶
type PermissionsRequest struct { // Namespace is the namespace for which the permissions are requested. // If empty, this will result in a ClusterRole, otherwise in a Role in the respective namespace. // Note that for a Role, the namespace needs to either exist or a permission to create it must be included in the requested permissions (it will be created automatically then), otherwise the request will be rejected. // +optional Namespace string `json:"namespace,omitempty"` // Rules are the requested RBAC rules. Rules []rbacv1.PolicyRule `json:"rules"` }
func (*PermissionsRequest) DeepCopy ¶
func (in *PermissionsRequest) DeepCopy() *PermissionsRequest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PermissionsRequest.
func (*PermissionsRequest) DeepCopyInto ¶
func (in *PermissionsRequest) DeepCopyInto(out *PermissionsRequest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RequestPhase ¶
type RequestPhase string
const ( // REQUEST_PENDING indicates that the request has neither been granted nor denied yet. REQUEST_PENDING RequestPhase = "Pending" // REQUEST_GRANTED indicates that the request has been granted. REQUEST_GRANTED RequestPhase = "Granted" // REQUEST_DENIED indicates that the request has been denied. REQUEST_DENIED RequestPhase = "Denied" )
func (RequestPhase) IsDenied ¶ added in v0.4.0
func (p RequestPhase) IsDenied() bool
func (RequestPhase) IsGranted ¶ added in v0.4.0
func (p RequestPhase) IsGranted() bool
func (RequestPhase) IsPending ¶ added in v0.4.0
func (p RequestPhase) IsPending() bool
type SupportedK8sVersion ¶
type SupportedK8sVersion struct { // Version is the Kubernetes version. // +kubebuilder:validation:MinLength=5 Version string `json:"version"` // Deprecated indicates whether this version is deprecated. Deprecated bool `json:"deprecated,omitempty"` }
func (*SupportedK8sVersion) DeepCopy ¶
func (in *SupportedK8sVersion) DeepCopy() *SupportedK8sVersion
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupportedK8sVersion.
func (*SupportedK8sVersion) DeepCopyInto ¶
func (in *SupportedK8sVersion) DeepCopyInto(out *SupportedK8sVersion)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.