Skip to content

Commit

Permalink
OCPCLOUD-2010: Add CloudControllerManagerStatus to the External pla…
Browse files Browse the repository at this point in the history
…tform status

Partially revert PR #1409 in order to support
external platform type.

* Enhancement doc update PR (<placeholder>)
  • Loading branch information
adriengentil committed Jun 12, 2023
1 parent ca79cab commit 1974bb3
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 3 deletions.
Expand Up @@ -592,6 +592,19 @@ spec:
type: object
external:
description: External contains settings specific to the generic External infrastructure provider.
properties:
cloudControllerManager:
description: CloudControllerManager contains settings specific to the external Cloud Controller Manager (a.k.a. CCM or CPI)
properties:
state:
default: ""
description: "state determines whether or not an external Cloud Controller Manager is expected to be installed within the cluster. https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/#running-cloud-controller-manager \n When set to \"External\", new nodes will be tainted as uninitialized when created, preventing them from running workloads until they are initialized by the cloud controller manager. When omitted or set to \"None\", new nodes will be not tainted and no extra initialization from the cloud controller manager is expected."
enum:
- ""
- External
- None
type: string
type: object
type: object
gcp:
description: GCP contains settings specific to the Google Cloud Platform infrastructure provider.
Expand Down
Expand Up @@ -615,6 +615,19 @@ spec:
type: object
external:
description: External contains settings specific to the generic External infrastructure provider.
properties:
cloudControllerManager:
description: CloudControllerManager contains settings specific to the external Cloud Controller Manager (a.k.a. CCM or CPI)
properties:
state:
default: ""
description: "state determines whether or not an external Cloud Controller Manager is expected to be installed within the cluster. https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/#running-cloud-controller-manager \n When set to \"External\", new nodes will be tainted as uninitialized when created, preventing them from running workloads until they are initialized by the cloud controller manager. When omitted or set to \"None\", new nodes will be not tainted and no extra initialization from the cloud controller manager is expected."
enum:
- ""
- External
- None
type: string
type: object
type: object
gcp:
description: GCP contains settings specific to the Google Cloud Platform infrastructure provider.
Expand Down
38 changes: 37 additions & 1 deletion config/v1/types_infrastructure.go
Expand Up @@ -315,8 +315,44 @@ type PlatformSpec struct {
External *ExternalPlatformSpec `json:"external,omitempty"`
}

// CloudControllerManagerState defines whether Cloud Controller Manager presence is expected or not
type CloudControllerManagerState string

const (
// Cloud Controller Manager is enabled and expected to be installed.
// This value indicates that new nodes should be tainted as uninitialized when created,
// preventing them from running workloads until they are initialized by the cloud controller manager.
CloudControllerManagerExternal CloudControllerManagerState = "External"

// Cloud Controller Manager is disabled and not expected to be installed.
// This value indicates that new nodes should not be tainted
// and no extra node initialization is expected from the cloud controller manager.
CloudControllerManagerNone CloudControllerManagerState = "None"
)

// CloudControllerManagerStatus holds the state of Cloud Controller Manager (a.k.a. CCM or CPI) related settings
type CloudControllerManagerStatus struct {
// state determines whether or not an external Cloud Controller Manager is expected to
// be installed within the cluster.
// https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/#running-cloud-controller-manager
//
// When set to "External", new nodes will be tainted as uninitialized when created,
// preventing them from running workloads until they are initialized by the cloud controller manager.
// When omitted or set to "None", new nodes will be not tainted
// and no extra initialization from the cloud controller manager is expected.
// +kubebuilder:default:=""
// +default=""
// +kubebuilder:validation:Enum="";External;None
// +optional
State CloudControllerManagerState `json:"state"`
}

// ExternalPlatformStatus holds the current status of the generic External infrastructure provider.
type ExternalPlatformStatus struct{}
type ExternalPlatformStatus struct {
// CloudControllerManager contains settings specific to the external Cloud Controller Manager (a.k.a. CCM or CPI)
// +optional
CloudControllerManager CloudControllerManagerStatus `json:"cloudControllerManager"`
}

// PlatformStatus holds the current status specific to the underlying infrastructure provider
// of the current cluster. Since these are used at status-level for the underlying cluster, it
Expand Down
17 changes: 17 additions & 0 deletions config/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion config/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 19 additions & 1 deletion openapi/openapi.json
Expand Up @@ -4902,6 +4902,17 @@
}
}
},
"com.github.openshift.api.config.v1.CloudControllerManagerStatus": {
"description": "CloudControllerManagerStatus holds the state of Cloud Controller Manager (a.k.a. CCM or CPI) related settings",
"type": "object",
"properties": {
"state": {
"description": "state determines whether or not an external Cloud Controller Manager is expected to be installed within the cluster. https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/#running-cloud-controller-manager\n\nWhen set to \"External\", new nodes will be tainted as uninitialized when created, preventing them from running workloads until they are initialized by the cloud controller manager. When omitted or set to \"None\", new nodes will be not tainted and no extra initialization from the cloud controller manager is expected.",
"type": "string",
"default": ""
}
}
},
"com.github.openshift.api.config.v1.ClusterCondition": {
"description": "ClusterCondition is a union of typed cluster conditions. The 'type' property determines which of the type-specific properties are relevant. When evaluated on a cluster, the condition may match, not match, or fail to evaluate.",
"type": "object",
Expand Down Expand Up @@ -5982,7 +5993,14 @@
},
"com.github.openshift.api.config.v1.ExternalPlatformStatus": {
"description": "ExternalPlatformStatus holds the current status of the generic External infrastructure provider.",
"type": "object"
"type": "object",
"properties": {
"cloudControllerManager": {
"description": "CloudControllerManager contains settings specific to the external Cloud Controller Manager (a.k.a. CCM or CPI)",
"default": {},
"$ref": "#/definitions/com.github.openshift.api.config.v1.CloudControllerManagerStatus"
}
}
},
"com.github.openshift.api.config.v1.FeatureGate": {
"description": "Feature holds cluster-wide information about feature gates. The canonical name is `cluster`\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).",
Expand Down

0 comments on commit 1974bb3

Please sign in to comment.