From 2dadc742290ff174abc4b6516fc69214d5c52f1c Mon Sep 17 00:00:00 2001 From: Abhinav Dahiya Date: Mon, 6 Apr 2020 13:01:58 -0700 Subject: [PATCH] config/v1/types_infrastructure.go: update the cloudConfig spec to define the generated one's location The cloudConfig is generated by the stitching together the user specifed config and the other platform spec in the infrstructure object. --- ...0000_10_config-operator_01_infrastructure.crd.yaml | 11 +++++++++-- config/v1/types_infrastructure.go | 9 +++++++++ config/v1/zz_generated.swagger_doc_generated.go | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml b/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml index 80e2de3b803..0bc82c4e412 100644 --- a/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml +++ b/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml @@ -40,11 +40,18 @@ spec: type: object properties: cloudConfig: - description: cloudConfig is a reference to a ConfigMap containing the + description: "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller - manager. The namespace for this config map is openshift-config. + manager. The namespace for this config map is openshift-config. \n + cloudConfig should only be consumed by the kube_cloud_config controller. + The controller is responsible for using the user configuration in + the spec for various platforms and combining that with the user provided + ConfigMap in this field to create a stitched kube cloud config. The + controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` + namespace with the kube cloud config is stored in `cloud.conf` key. + All the clients are expected to use the generated ConfigMap only." type: object properties: key: diff --git a/config/v1/types_infrastructure.go b/config/v1/types_infrastructure.go index ece13868b7a..d5aeb504ed7 100644 --- a/config/v1/types_infrastructure.go +++ b/config/v1/types_infrastructure.go @@ -26,6 +26,15 @@ type InfrastructureSpec struct { // This configuration file is used to configure the Kubernetes cloud provider integration // when using the built-in cloud provider integration or the external cloud controller manager. // The namespace for this config map is openshift-config. + // + // cloudConfig should only be consumed by the kube_cloud_config controller. + // The controller is responsible for using the user configuration in the spec + // for various platforms and combining that with the user provided ConfigMap in this field + // to create a stitched kube cloud config. + // The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace + // with the kube cloud config is stored in `cloud.conf` key. + // All the clients are expected to use the generated ConfigMap only. + // // +optional CloudConfig ConfigMapFileReference `json:"cloudConfig"` diff --git a/config/v1/zz_generated.swagger_doc_generated.go b/config/v1/zz_generated.swagger_doc_generated.go index 6b485ab441d..1b850ea5b44 100644 --- a/config/v1/zz_generated.swagger_doc_generated.go +++ b/config/v1/zz_generated.swagger_doc_generated.go @@ -800,7 +800,7 @@ func (InfrastructureList) SwaggerDoc() map[string]string { var map_InfrastructureSpec = map[string]string{ "": "InfrastructureSpec contains settings that apply to the cluster infrastructure.", - "cloudConfig": "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller manager. The namespace for this config map is openshift-config.", + "cloudConfig": "cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. This configuration file is used to configure the Kubernetes cloud provider integration when using the built-in cloud provider integration or the external cloud controller manager. The namespace for this config map is openshift-config.\n\ncloudConfig should only be consumed by the kube_cloud_config controller. The controller is responsible for using the user configuration in the spec for various platforms and combining that with the user provided ConfigMap in this field to create a stitched kube cloud config. The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace with the kube cloud config is stored in `cloud.conf` key. All the clients are expected to use the generated ConfigMap only.", "platformSpec": "platformSpec holds desired information specific to the underlying infrastructure provider.", }