From faa9f6530e974e92b48a8fe1241387d185e7a3f5 Mon Sep 17 00:00:00 2001 From: Jonathan Dobson Date: Fri, 23 Jan 2026 17:53:32 -0700 Subject: [PATCH] STOR-2859: Add APIs for disabling force detach in KCM operator --- .../AAA_ungated.yaml | 78 ++++++++++ config/v1/types_controllermanager.go | 75 ++++++++++ ...ig-operator_01_controllermanagers.crd.yaml | 72 +++++++++ config/v1/zz_generated.deepcopy.go | 93 ++++++++++++ ..._generated.featuregated-crd-manifests.yaml | 22 +++ .../AAA_ungated.yaml | 73 ++++++++++ .../v1/zz_generated.swagger_doc_generated.go | 37 +++++ .../generated_openapi/zz_generated.openapi.go | 137 ++++++++++++++++++ ...ig-operator_01_controllermanagers.crd.yaml | 72 +++++++++ 9 files changed, 659 insertions(+) create mode 100644 config/v1/tests/controllermanagers.config.openshift.io/AAA_ungated.yaml create mode 100644 config/v1/types_controllermanager.go create mode 100644 config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_controllermanagers.crd.yaml create mode 100644 config/v1/zz_generated.featuregated-crd-manifests/controllermanagers.config.openshift.io/AAA_ungated.yaml create mode 100644 payload-manifests/crds/0000_10_config-operator_01_controllermanagers.crd.yaml diff --git a/config/v1/tests/controllermanagers.config.openshift.io/AAA_ungated.yaml b/config/v1/tests/controllermanagers.config.openshift.io/AAA_ungated.yaml new file mode 100644 index 00000000000..aba0780c369 --- /dev/null +++ b/config/v1/tests/controllermanagers.config.openshift.io/AAA_ungated.yaml @@ -0,0 +1,78 @@ +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this +name: "ControllerManager" +crdName: controllermanagers.config.openshift.io +tests: + onCreate: + - name: Should be able to create with default values + initial: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: + expected: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Enabled + - name: Should be able to create with force detach enabled + initial: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Enabled + expected: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Enabled + - name: Should be able to create with force detach disabled + initial: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Disabled + expected: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Disabled + - name: Should reject unsupported value of forceDetachOnTimeout + initial: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: INVALID + expectedError: "spec.forceDetachOnTimeout: Unsupported value: \"INVALID\": supported values: \"Enabled\", \"Disabled\"" + onUpdate: + - name: Enabled to Disabled + initial: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Enabled + updated: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Disabled + expected: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Disabled + - name: Disabled to default value + initial: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Disabled + updated: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: + expected: | + apiVersion: config.openshift.io/v1 + kind: ControllerManager + spec: + forceDetachOnTimeout: Enabled diff --git a/config/v1/types_controllermanager.go b/config/v1/types_controllermanager.go new file mode 100644 index 00000000000..467fac2a937 --- /dev/null +++ b/config/v1/types_controllermanager.go @@ -0,0 +1,75 @@ +package v1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ControllerManager holds cluster-wide config information to run the Kubernetes controller manager +// and influence its placement decisions. The canonical name for this config is `cluster`. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2668 +// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01 +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=controllermanagers,scope=Cluster +// +kubebuilder:subresource:status +// +kubebuilder:metadata:annotations=release.openshift.io/bootstrap-required=true +type ControllerManager struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitzero"` + // spec holds user settable values for configuration + // +required + Spec ControllerManagerSpec `json:"spec,omitzero"` + // status holds observed values from the cluster. They may not be overridden. + // +optional + Status ControllerManagerStatus `json:"status,omitzero"` +} + +// ControllerManagerSpec defines the desired state of the Kubernetes controller manager +// +kubebuilder:validation:MinProperties=1 +type ControllerManagerSpec struct { + // forceDetachOnTimeout expresses whether to allow kube-controller-manager + // to force detach volumes when unmount takes longer than the timeout. + // Valid values are Enabled and Disabled. If omitted, the default is Enabled. + // +default="Enabled" + // +optional + ForceDetachOnTimeout ForceDetachOnTimeoutPolicy `json:"forceDetachOnTimeout,omitempty"` +} + +// +kubebuilder:validation:Enum=Enabled;Disabled +type ForceDetachOnTimeoutPolicy string + +const ( + // ForceDetachOnTimeoutEnabled will allow kube-controller-manager to + // force detach volumes based on maximum unmount time and node status. + ForceDetachOnTimeoutEnabled ForceDetachOnTimeoutPolicy = "Enabled" + // ForceDetachOnTimeoutDisabled will prevent kube-controller-manager + // from force detaching volumes. + ForceDetachOnTimeoutDisabled ForceDetachOnTimeoutPolicy = "Disabled" +) + +// ControllerManagerStatus defines the observed state of the Kubernetes controller manager +// +kubebuilder:validation:MinProperties=1 +type ControllerManagerStatus struct { +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type ControllerManagerList struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard list's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + metav1.ListMeta `json:"metadata"` + + Items []ControllerManager `json:"items"` +} diff --git a/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_controllermanagers.crd.yaml b/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_controllermanagers.crd.yaml new file mode 100644 index 00000000000..70bf319a9c7 --- /dev/null +++ b/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_controllermanagers.crd.yaml @@ -0,0 +1,72 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2668 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/bootstrap-required: "true" + name: controllermanagers.config.openshift.io +spec: + group: config.openshift.io + names: + kind: ControllerManager + listKind: ControllerManagerList + plural: controllermanagers + singular: controllermanager + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: |- + ControllerManager holds cluster-wide config information to run the Kubernetes controller manager + and influence its placement decisions. The canonical name for this config is `cluster`. + + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec holds user settable values for configuration + minProperties: 1 + properties: + forceDetachOnTimeout: + default: Enabled + description: |- + forceDetachOnTimeout expresses whether to allow kube-controller-manager + to force detach volumes when unmount takes longer than the timeout. + Valid values are Enabled and Disabled. If omitted, the default is Enabled. + enum: + - Enabled + - Disabled + type: string + type: object + status: + description: status holds observed values from the cluster. They may not + be overridden. + minProperties: 1 + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/v1/zz_generated.deepcopy.go b/config/v1/zz_generated.deepcopy.go index 30b85b78e96..685678683ff 100644 --- a/config/v1/zz_generated.deepcopy.go +++ b/config/v1/zz_generated.deepcopy.go @@ -1771,6 +1771,99 @@ func (in *ConsoleStatus) DeepCopy() *ConsoleStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerManager) DeepCopyInto(out *ControllerManager) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManager. +func (in *ControllerManager) DeepCopy() *ControllerManager { + if in == nil { + return nil + } + out := new(ControllerManager) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControllerManager) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerManagerList) DeepCopyInto(out *ControllerManagerList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ControllerManager, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerList. +func (in *ControllerManagerList) DeepCopy() *ControllerManagerList { + if in == nil { + return nil + } + out := new(ControllerManagerList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ControllerManagerList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerManagerSpec) DeepCopyInto(out *ControllerManagerSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerSpec. +func (in *ControllerManagerSpec) DeepCopy() *ControllerManagerSpec { + if in == nil { + return nil + } + out := new(ControllerManagerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ControllerManagerStatus) DeepCopyInto(out *ControllerManagerStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerManagerStatus. +func (in *ControllerManagerStatus) DeepCopy() *ControllerManagerStatus { + if in == nil { + return nil + } + out := new(ControllerManagerStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Custom) DeepCopyInto(out *Custom) { *out = *in diff --git a/config/v1/zz_generated.featuregated-crd-manifests.yaml b/config/v1/zz_generated.featuregated-crd-manifests.yaml index 576fd510c61..fa9248caee1 100644 --- a/config/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/config/v1/zz_generated.featuregated-crd-manifests.yaml @@ -197,6 +197,28 @@ consoles.config.openshift.io: TopLevelFeatureGates: [] Version: v1 +controllermanagers.config.openshift.io: + Annotations: + release.openshift.io/bootstrap-required: "true" + ApprovedPRNumber: https://github.com/openshift/api/pull/2668 + CRDName: controllermanagers.config.openshift.io + Capability: "" + Category: "" + FeatureGates: [] + FilenameOperatorName: config-operator + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_10" + GroupName: config.openshift.io + HasStatus: true + KindName: ControllerManager + Labels: {} + PluralName: controllermanagers + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: [] + Version: v1 + dnses.config.openshift.io: Annotations: release.openshift.io/bootstrap-required: "true" diff --git a/config/v1/zz_generated.featuregated-crd-manifests/controllermanagers.config.openshift.io/AAA_ungated.yaml b/config/v1/zz_generated.featuregated-crd-manifests/controllermanagers.config.openshift.io/AAA_ungated.yaml new file mode 100644 index 00000000000..19739a9ed56 --- /dev/null +++ b/config/v1/zz_generated.featuregated-crd-manifests/controllermanagers.config.openshift.io/AAA_ungated.yaml @@ -0,0 +1,73 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2668 + api.openshift.io/filename-cvo-runlevel: "0000_10" + api.openshift.io/filename-operator: config-operator + api.openshift.io/filename-ordering: "01" + feature-gate.release.openshift.io/: "true" + release.openshift.io/bootstrap-required: "true" + name: controllermanagers.config.openshift.io +spec: + group: config.openshift.io + names: + kind: ControllerManager + listKind: ControllerManagerList + plural: controllermanagers + singular: controllermanager + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: |- + ControllerManager holds cluster-wide config information to run the Kubernetes controller manager + and influence its placement decisions. The canonical name for this config is `cluster`. + + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec holds user settable values for configuration + minProperties: 1 + properties: + forceDetachOnTimeout: + default: Enabled + description: |- + forceDetachOnTimeout expresses whether to allow kube-controller-manager + to force detach volumes when unmount takes longer than the timeout. + Valid values are Enabled and Disabled. If omitted, the default is Enabled. + enum: + - Enabled + - Disabled + type: string + type: object + status: + description: status holds observed values from the cluster. They may not + be overridden. + minProperties: 1 + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/v1/zz_generated.swagger_doc_generated.go b/config/v1/zz_generated.swagger_doc_generated.go index 7f0018950a9..4ba317db52a 100644 --- a/config/v1/zz_generated.swagger_doc_generated.go +++ b/config/v1/zz_generated.swagger_doc_generated.go @@ -982,6 +982,43 @@ func (ConsoleStatus) SwaggerDoc() map[string]string { return map_ConsoleStatus } +var map_ControllerManager = map[string]string{ + "": "ControllerManager holds cluster-wide config information to run the Kubernetes controller manager and influence its placement decisions. The canonical name for this config is `cluster`.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec holds user settable values for configuration", + "status": "status holds observed values from the cluster. They may not be overridden.", +} + +func (ControllerManager) SwaggerDoc() map[string]string { + return map_ControllerManager +} + +var map_ControllerManagerList = map[string]string{ + "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", +} + +func (ControllerManagerList) SwaggerDoc() map[string]string { + return map_ControllerManagerList +} + +var map_ControllerManagerSpec = map[string]string{ + "": "ControllerManagerSpec defines the desired state of the Kubernetes controller manager", + "forceDetachOnTimeout": "forceDetachOnTimeout expresses whether to allow kube-controller-manager to force detach volumes when unmount takes longer than the timeout. Valid values are Enabled and Disabled. If omitted, the default is Enabled.", +} + +func (ControllerManagerSpec) SwaggerDoc() map[string]string { + return map_ControllerManagerSpec +} + +var map_ControllerManagerStatus = map[string]string{ + "": "ControllerManagerStatus defines the observed state of the Kubernetes controller manager", +} + +func (ControllerManagerStatus) SwaggerDoc() map[string]string { + return map_ControllerManagerStatus +} + var map_AWSDNSSpec = map[string]string{ "": "AWSDNSSpec contains DNS configuration specific to the Amazon Web Services cloud provider.", "privateZoneIAMRole": "privateZoneIAMRole contains the ARN of an IAM role that should be assumed when performing operations on the cluster's private hosted zone specified in the cluster DNS config. When left empty, no role should be assumed.", diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 83a9e5b0375..d7640e83712 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -225,6 +225,10 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/config/v1.ConsoleList": schema_openshift_api_config_v1_ConsoleList(ref), "github.com/openshift/api/config/v1.ConsoleSpec": schema_openshift_api_config_v1_ConsoleSpec(ref), "github.com/openshift/api/config/v1.ConsoleStatus": schema_openshift_api_config_v1_ConsoleStatus(ref), + "github.com/openshift/api/config/v1.ControllerManager": schema_openshift_api_config_v1_ControllerManager(ref), + "github.com/openshift/api/config/v1.ControllerManagerList": schema_openshift_api_config_v1_ControllerManagerList(ref), + "github.com/openshift/api/config/v1.ControllerManagerSpec": schema_openshift_api_config_v1_ControllerManagerSpec(ref), + "github.com/openshift/api/config/v1.ControllerManagerStatus": schema_openshift_api_config_v1_ControllerManagerStatus(ref), "github.com/openshift/api/config/v1.Custom": schema_openshift_api_config_v1_Custom(ref), "github.com/openshift/api/config/v1.CustomFeatureGates": schema_openshift_api_config_v1_CustomFeatureGates(ref), "github.com/openshift/api/config/v1.CustomTLSProfile": schema_openshift_api_config_v1_CustomTLSProfile(ref), @@ -12330,6 +12334,139 @@ func schema_openshift_api_config_v1_ConsoleStatus(ref common.ReferenceCallback) } } +func schema_openshift_api_config_v1_ControllerManager(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ControllerManager holds cluster-wide config information to run the Kubernetes controller manager and influence its placement decisions. The canonical name for this config is `cluster`.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + }, + }, + "spec": { + SchemaProps: spec.SchemaProps{ + Description: "spec holds user settable values for configuration", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.ControllerManagerSpec"), + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Description: "status holds observed values from the cluster. They may not be overridden.", + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.ControllerManagerStatus"), + }, + }, + }, + Required: []string{"spec"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/config/v1.ControllerManagerSpec", "github.com/openshift/api/config/v1.ControllerManagerStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_openshift_api_config_v1_ControllerManagerList(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "kind": { + SchemaProps: spec.SchemaProps{ + Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Type: []string{"string"}, + Format: "", + }, + }, + "apiVersion": { + SchemaProps: spec.SchemaProps{ + Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + Type: []string{"string"}, + Format: "", + }, + }, + "metadata": { + SchemaProps: spec.SchemaProps{ + Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + }, + }, + "items": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.ControllerManager"), + }, + }, + }, + }, + }, + }, + Required: []string{"metadata", "items"}, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/config/v1.ControllerManager", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, + } +} + +func schema_openshift_api_config_v1_ControllerManagerSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ControllerManagerSpec defines the desired state of the Kubernetes controller manager", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "forceDetachOnTimeout": { + SchemaProps: spec.SchemaProps{ + Description: "forceDetachOnTimeout expresses whether to allow kube-controller-manager to force detach volumes when unmount takes longer than the timeout. Valid values are Enabled and Disabled. If omitted, the default is Enabled.", + Default: "Enabled", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + } +} + +func schema_openshift_api_config_v1_ControllerManagerStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ControllerManagerStatus defines the observed state of the Kubernetes controller manager", + Type: []string{"object"}, + }, + }, + } +} + func schema_openshift_api_config_v1_Custom(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/payload-manifests/crds/0000_10_config-operator_01_controllermanagers.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_controllermanagers.crd.yaml new file mode 100644 index 00000000000..70bf319a9c7 --- /dev/null +++ b/payload-manifests/crds/0000_10_config-operator_01_controllermanagers.crd.yaml @@ -0,0 +1,72 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/2668 + api.openshift.io/merged-by-featuregates: "true" + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + release.openshift.io/bootstrap-required: "true" + name: controllermanagers.config.openshift.io +spec: + group: config.openshift.io + names: + kind: ControllerManager + listKind: ControllerManagerList + plural: controllermanagers + singular: controllermanager + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: |- + ControllerManager holds cluster-wide config information to run the Kubernetes controller manager + and influence its placement decisions. The canonical name for this config is `cluster`. + + Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec holds user settable values for configuration + minProperties: 1 + properties: + forceDetachOnTimeout: + default: Enabled + description: |- + forceDetachOnTimeout expresses whether to allow kube-controller-manager + to force detach volumes when unmount takes longer than the timeout. + Valid values are Enabled and Disabled. If omitted, the default is Enabled. + enum: + - Enabled + - Disabled + type: string + type: object + status: + description: status holds observed values from the cluster. They may not + be overridden. + minProperties: 1 + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {}