From 88cd58811c538ad4c8f5510a086d3b317f6bad3f Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Wed, 9 Oct 2024 13:11:05 +0200 Subject: [PATCH] Update CustomServiceConfig docs Signed-off-by: Fabricio Aguiar --- README.md | 8 ++--- api/bases/heat.openstack.org_heatapis.yaml | 4 +-- api/bases/heat.openstack.org_heatcfnapis.yaml | 4 +-- api/bases/heat.openstack.org_heatengines.yaml | 4 +-- api/bases/heat.openstack.org_heats.yaml | 29 +++++++++---------- api/v1beta1/common_types.go | 4 +-- api/v1beta1/heat_types.go | 4 +-- .../bases/heat.openstack.org_heatapis.yaml | 4 +-- .../bases/heat.openstack.org_heatcfnapis.yaml | 4 +-- .../bases/heat.openstack.org_heatengines.yaml | 4 +-- .../crd/bases/heat.openstack.org_heats.yaml | 29 +++++++++---------- controllers/heat_controller.go | 4 +-- controllers/heatapi_controller.go | 4 +-- controllers/heatcfnapi_controller.go | 4 +-- controllers/heatengine_controller.go | 4 +-- 15 files changed, 56 insertions(+), 58 deletions(-) diff --git a/README.md b/README.md index ace3d398..7d2e565e 100644 --- a/README.md +++ b/README.md @@ -55,16 +55,16 @@ spec: ``` In this example, we are setting `num_engine_workers` to 4. After this resource has been updated, the controller will -regenerate the ConfigMap to include the updated values in the `custom.conf` file. +regenerate the Secret to include the updated values in the `01-custom.conf` file. ```sh -❯ oc get cm heat-config-data -o jsonpath={.data} | jq '."custom.conf"' | sed 's/\\n/\n/g' +❯ oc get secret heat-config-data -o jsonpath={.data} | jq '."01-custom.conf"' | sed 's/\\n/\n/g' "[DEFAULT] num_engine_workers=4 " ``` -We can see this change reflected in the `/etc/heat/heat.conf.d/custom.conf` file within each of the API and Engine pods: +We can see this change reflected in the `/etc/heat/heat.conf.d/01-custom.conf` file within each of the API and Engine pods: ```sh ❯ oc get po -l service=heat @@ -72,7 +72,7 @@ NAME READY STATUS RESTARTS AGE heat-api-5bd49b9c6d-6cprh 1/1 Running 0 2m51s heat-engine-5565547478-v2n4j 1/1 Running 0 2m51s -❯ oc exec -it heat-engine-5565547478-v2n4j -c heat-engine -- cat /etc/heat/heat.conf.d/custom.conf +❯ oc exec -it heat-engine-5565547478-v2n4j -c heat-engine -- cat /etc/heat/heat.conf.d/01-custom.conf [DEFAULT] num_engine_workers=4 ``` diff --git a/api/bases/heat.openstack.org_heatapis.yaml b/api/bases/heat.openstack.org_heatapis.yaml index a776b808..626b8a4e 100644 --- a/api/bases/heat.openstack.org_heatapis.yaml +++ b/api/bases/heat.openstack.org_heatapis.yaml @@ -51,13 +51,13 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The content gets - added to to /etc//.conf.d directory as custom.conf + added to to /etc/heat/heat.conf.d directory as 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service - config data. The content of each Secret gets added to the /etc//.conf.d + config data. The content of each Secret gets added to the /etc/heat/heat.conf.d directory as a custom config file. items: type: string diff --git a/api/bases/heat.openstack.org_heatcfnapis.yaml b/api/bases/heat.openstack.org_heatcfnapis.yaml index e6ffb216..10ca472d 100644 --- a/api/bases/heat.openstack.org_heatcfnapis.yaml +++ b/api/bases/heat.openstack.org_heatcfnapis.yaml @@ -51,13 +51,13 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The content gets - added to to /etc//.conf.d directory as custom.conf + added to to /etc/heat/heat.conf.d directory as 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service - config data. The content of each Secret gets added to the /etc//.conf.d + config data. The content of each Secret gets added to the /etc/heat/heat.conf.d directory as a custom config file. items: type: string diff --git a/api/bases/heat.openstack.org_heatengines.yaml b/api/bases/heat.openstack.org_heatengines.yaml index 8afd2efc..4561b7b6 100644 --- a/api/bases/heat.openstack.org_heatengines.yaml +++ b/api/bases/heat.openstack.org_heatengines.yaml @@ -51,13 +51,13 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The content gets - added to to /etc//.conf.d directory as custom.conf + added to to /etc/heat/heat.conf.d directory as 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service - config data. The content of each Secret gets added to the /etc//.conf.d + config data. The content of each Secret gets added to the /etc/heat/heat.conf.d directory as a custom config file. items: type: string diff --git a/api/bases/heat.openstack.org_heats.yaml b/api/bases/heat.openstack.org_heats.yaml index 39248f04..a8921139 100644 --- a/api/bases/heat.openstack.org_heats.yaml +++ b/api/bases/heat.openstack.org_heats.yaml @@ -48,13 +48,12 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The content gets - added to to /etc//.conf.d directory as custom.conf - file. + added to to /etc/heat/heat.conf.d directory as 01-custom.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service - config data. The content of each Secret gets added to the /etc//.conf.d + config data. The content of each Secret gets added to the /etc/heat/heat.conf.d directory as a custom config file. items: type: string @@ -89,15 +88,15 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The - content gets added to to /etc//.conf.d directory - as custom.conf file. + content gets added to to /etc/heat/heat.conf.d directory as + 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service config data. The content of each Secret gets - added to the /etc//.conf.d directory as a - custom config file. + added to the /etc/heat/heat.conf.d directory as a custom config + file. items: type: string type: array @@ -398,15 +397,15 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The - content gets added to to /etc//.conf.d directory - as custom.conf file. + content gets added to to /etc/heat/heat.conf.d directory as + 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service config data. The content of each Secret gets - added to the /etc//.conf.d directory as a - custom config file. + added to the /etc/heat/heat.conf.d directory as a custom config + file. items: type: string type: array @@ -707,15 +706,15 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The - content gets added to to /etc//.conf.d directory - as custom.conf file. + content gets added to to /etc/heat/heat.conf.d directory as + 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service config data. The content of each Secret gets - added to the /etc//.conf.d directory as a - custom config file. + added to the /etc/heat/heat.conf.d directory as a custom config + file. items: type: string type: array diff --git a/api/v1beta1/common_types.go b/api/v1beta1/common_types.go index 5dd144ae..f587a426 100644 --- a/api/v1beta1/common_types.go +++ b/api/v1beta1/common_types.go @@ -66,13 +66,13 @@ type HeatServiceTemplate struct { // +kubebuilder:validation:Optional // CustomServiceConfig - customize the service config using this parameter to change service defaults, // or overwrite rendered information using raw OpenStack config format. The content gets added to - // to /etc//.conf.d directory as custom.conf file. + // to /etc/heat/heat.conf.d directory as 02-custom-service.conf file. CustomServiceConfig string `json:"customServiceConfig,omitempty"` // +kubebuilder:validation:Optional // CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets // that contain sensitive service config data. The content of each Secret gets added to the - // /etc//.conf.d directory as a custom config file. + // /etc/heat/heat.conf.d directory as a custom config file. CustomServiceConfigSecrets []string `json:"customServiceConfigSecrets,omitempty"` // +kubebuilder:validation:Optional diff --git a/api/v1beta1/heat_types.go b/api/v1beta1/heat_types.go index 26fc12e1..59be6cf5 100644 --- a/api/v1beta1/heat_types.go +++ b/api/v1beta1/heat_types.go @@ -97,13 +97,13 @@ type HeatSpecBase struct { // +kubebuilder:validation:Optional // CustomServiceConfig - customize the service config using this parameter to change service defaults, // or overwrite rendered information using raw OpenStack config format. The content gets added to - // to /etc//.conf.d directory as custom.conf file. + // to /etc/heat/heat.conf.d directory as 01-custom.conf file. CustomServiceConfig string `json:"customServiceConfig,omitempty"` // +kubebuilder:validation:Optional // CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets // that contain sensitive service config data. The content of each Secret gets added to the - // /etc//.conf.d directory as a custom config file. + // /etc/heat/heat.conf.d directory as a custom config file. CustomServiceConfigSecrets []string `json:"customServiceConfigSecrets,omitempty"` // +kubebuilder:validation:Optional diff --git a/config/crd/bases/heat.openstack.org_heatapis.yaml b/config/crd/bases/heat.openstack.org_heatapis.yaml index a776b808..626b8a4e 100644 --- a/config/crd/bases/heat.openstack.org_heatapis.yaml +++ b/config/crd/bases/heat.openstack.org_heatapis.yaml @@ -51,13 +51,13 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The content gets - added to to /etc//.conf.d directory as custom.conf + added to to /etc/heat/heat.conf.d directory as 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service - config data. The content of each Secret gets added to the /etc//.conf.d + config data. The content of each Secret gets added to the /etc/heat/heat.conf.d directory as a custom config file. items: type: string diff --git a/config/crd/bases/heat.openstack.org_heatcfnapis.yaml b/config/crd/bases/heat.openstack.org_heatcfnapis.yaml index e6ffb216..10ca472d 100644 --- a/config/crd/bases/heat.openstack.org_heatcfnapis.yaml +++ b/config/crd/bases/heat.openstack.org_heatcfnapis.yaml @@ -51,13 +51,13 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The content gets - added to to /etc//.conf.d directory as custom.conf + added to to /etc/heat/heat.conf.d directory as 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service - config data. The content of each Secret gets added to the /etc//.conf.d + config data. The content of each Secret gets added to the /etc/heat/heat.conf.d directory as a custom config file. items: type: string diff --git a/config/crd/bases/heat.openstack.org_heatengines.yaml b/config/crd/bases/heat.openstack.org_heatengines.yaml index 8afd2efc..4561b7b6 100644 --- a/config/crd/bases/heat.openstack.org_heatengines.yaml +++ b/config/crd/bases/heat.openstack.org_heatengines.yaml @@ -51,13 +51,13 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The content gets - added to to /etc//.conf.d directory as custom.conf + added to to /etc/heat/heat.conf.d directory as 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service - config data. The content of each Secret gets added to the /etc//.conf.d + config data. The content of each Secret gets added to the /etc/heat/heat.conf.d directory as a custom config file. items: type: string diff --git a/config/crd/bases/heat.openstack.org_heats.yaml b/config/crd/bases/heat.openstack.org_heats.yaml index 39248f04..a8921139 100644 --- a/config/crd/bases/heat.openstack.org_heats.yaml +++ b/config/crd/bases/heat.openstack.org_heats.yaml @@ -48,13 +48,12 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The content gets - added to to /etc//.conf.d directory as custom.conf - file. + added to to /etc/heat/heat.conf.d directory as 01-custom.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service - config data. The content of each Secret gets added to the /etc//.conf.d + config data. The content of each Secret gets added to the /etc/heat/heat.conf.d directory as a custom config file. items: type: string @@ -89,15 +88,15 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The - content gets added to to /etc//.conf.d directory - as custom.conf file. + content gets added to to /etc/heat/heat.conf.d directory as + 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service config data. The content of each Secret gets - added to the /etc//.conf.d directory as a - custom config file. + added to the /etc/heat/heat.conf.d directory as a custom config + file. items: type: string type: array @@ -398,15 +397,15 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The - content gets added to to /etc//.conf.d directory - as custom.conf file. + content gets added to to /etc/heat/heat.conf.d directory as + 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service config data. The content of each Secret gets - added to the /etc//.conf.d directory as a - custom config file. + added to the /etc/heat/heat.conf.d directory as a custom config + file. items: type: string type: array @@ -707,15 +706,15 @@ spec: description: CustomServiceConfig - customize the service config using this parameter to change service defaults, or overwrite rendered information using raw OpenStack config format. The - content gets added to to /etc//.conf.d directory - as custom.conf file. + content gets added to to /etc/heat/heat.conf.d directory as + 02-custom-service.conf file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config using this parameter to specify Secrets that contain sensitive service config data. The content of each Secret gets - added to the /etc//.conf.d directory as a - custom config file. + added to the /etc/heat/heat.conf.d directory as a custom config + file. items: type: string type: array diff --git a/controllers/heat_controller.go b/controllers/heat_controller.go index 53e71e08..82314c38 100644 --- a/controllers/heat_controller.go +++ b/controllers/heat_controller.go @@ -1260,9 +1260,9 @@ func generateCustomData(instance *heatv1beta1.Heat, tlsCfg *tls.Service, db *mar const myCnf string = "my.cnf" // customData hold any customization for the service. - // custom.conf is going to /etc/heat/heat.conf.d + // 01-custom.conf is going to /etc/heat/heat.conf.d // all other files get placed into /etc/heat to allow overwrite of e.g. policy.json - // TODO: make sure custom.conf can not be overwritten + // TODO: make sure 01-custom.conf can not be overwritten customData := map[string]string{ heat.CustomConfigFileName: instance.Spec.CustomServiceConfig, myCnf: db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf diff --git a/controllers/heatapi_controller.go b/controllers/heatapi_controller.go index 6d9de11c..e1dafead 100644 --- a/controllers/heatapi_controller.go +++ b/controllers/heatapi_controller.go @@ -859,8 +859,8 @@ func (r *HeatAPIReconciler) generateServiceSecrets( } // customData hold any customization for the service. - // custom.conf is going to /etc/heat/heat.conf.d - // TODO: make sure custom.conf can not be overwritten + // 02-custom-service.conf is going to /etc/heat/heat.conf.d + // TODO: make sure 02-custom-service.conf can not be overwritten customData := map[string]string{ heat.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig, "my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf diff --git a/controllers/heatcfnapi_controller.go b/controllers/heatcfnapi_controller.go index 4d826d08..73db991a 100644 --- a/controllers/heatcfnapi_controller.go +++ b/controllers/heatcfnapi_controller.go @@ -856,8 +856,8 @@ func (r *HeatCfnAPIReconciler) generateServiceSecrets( } // customData hold any customization for the service. - // custom.conf is going to /etc/heat/heat.conf.d - // TODO: make sure custom.conf can not be overwritten + // 02-custom-service.conf is going to /etc/heat/heat.conf.d + // TODO: make sure 02-custom-service.conf can not be overwritten customData := map[string]string{ heat.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig, "my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf diff --git a/controllers/heatengine_controller.go b/controllers/heatengine_controller.go index 164dcf82..8087293d 100644 --- a/controllers/heatengine_controller.go +++ b/controllers/heatengine_controller.go @@ -568,8 +568,8 @@ func (r *HeatEngineReconciler) generateServiceSecrets( } // customData hold any customization for the service. - // custom.conf is going to /etc/heat/heat.conf.d - // TODO: make sure custom.conf can not be overwritten + // 02-custom-service.conf is going to /etc/heat/heat.conf.d + // TODO: make sure 02-custom-service.conf can not be overwritten customData := map[string]string{ heat.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig, "my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf