diff --git a/api/bases/barbican.openstack.org_barbicanapis.yaml b/api/bases/barbican.openstack.org_barbicanapis.yaml index 91ad5c86..71010bfd 100644 --- a/api/bases/barbican.openstack.org_barbicanapis.yaml +++ b/api/bases/barbican.openstack.org_barbicanapis.yaml @@ -52,8 +52,8 @@ 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//.conf.d directory as a custom + config file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config diff --git a/api/bases/barbican.openstack.org_barbicankeystonelisteners.yaml b/api/bases/barbican.openstack.org_barbicankeystonelisteners.yaml index 474bedd0..bdea1d33 100644 --- a/api/bases/barbican.openstack.org_barbicankeystonelisteners.yaml +++ b/api/bases/barbican.openstack.org_barbicankeystonelisteners.yaml @@ -54,8 +54,8 @@ 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//.conf.d directory as a custom + config file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config diff --git a/api/bases/barbican.openstack.org_barbicanworkers.yaml b/api/bases/barbican.openstack.org_barbicanworkers.yaml index 96e41703..41dadbc2 100644 --- a/api/bases/barbican.openstack.org_barbicanworkers.yaml +++ b/api/bases/barbican.openstack.org_barbicanworkers.yaml @@ -52,8 +52,8 @@ 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//.conf.d directory as a custom + config file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config diff --git a/api/v1beta1/common_types.go b/api/v1beta1/common_types.go index b23275c9..4025f795 100644 --- a/api/v1beta1/common_types.go +++ b/api/v1beta1/common_types.go @@ -46,12 +46,6 @@ type BarbicanTemplate struct { // PasswordSelectors - Selectors to identify the ServiceUser password from the Secret PasswordSelectors PasswordSelector `json:"passwordSelectors"` - // +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. - CustomServiceConfig string `json:"customServiceConfig,omitempty"` - // +kubebuilder:validation:Required // ServiceAccount - service account name used internally to provide Barbican services the default SA name ServiceAccount string `json:"serviceAccount"` diff --git a/config/crd/bases/barbican.openstack.org_barbicanapis.yaml b/config/crd/bases/barbican.openstack.org_barbicanapis.yaml index 91ad5c86..71010bfd 100644 --- a/config/crd/bases/barbican.openstack.org_barbicanapis.yaml +++ b/config/crd/bases/barbican.openstack.org_barbicanapis.yaml @@ -52,8 +52,8 @@ 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//.conf.d directory as a custom + config file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config diff --git a/config/crd/bases/barbican.openstack.org_barbicankeystonelisteners.yaml b/config/crd/bases/barbican.openstack.org_barbicankeystonelisteners.yaml index 474bedd0..bdea1d33 100644 --- a/config/crd/bases/barbican.openstack.org_barbicankeystonelisteners.yaml +++ b/config/crd/bases/barbican.openstack.org_barbicankeystonelisteners.yaml @@ -54,8 +54,8 @@ 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//.conf.d directory as a custom + config file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config diff --git a/config/crd/bases/barbican.openstack.org_barbicanworkers.yaml b/config/crd/bases/barbican.openstack.org_barbicanworkers.yaml index 96e41703..41dadbc2 100644 --- a/config/crd/bases/barbican.openstack.org_barbicanworkers.yaml +++ b/config/crd/bases/barbican.openstack.org_barbicanworkers.yaml @@ -52,8 +52,8 @@ 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//.conf.d directory as a custom + config file. type: string customServiceConfigSecrets: description: CustomServiceConfigSecrets - customize the service config diff --git a/controllers/barbicanapi_controller.go b/controllers/barbicanapi_controller.go index 8dbed838..28036e41 100644 --- a/controllers/barbicanapi_controller.go +++ b/controllers/barbicanapi_controller.go @@ -271,8 +271,8 @@ func (r *BarbicanAPIReconciler) generateServiceConfigs( } // customData hold any customization for the service. customData := map[string]string{ - common.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig, - "my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf + barbican.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig, + "my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf } for key, data := range instance.Spec.DefaultConfigOverwrite { diff --git a/controllers/barbicankeystonelistener_controller.go b/controllers/barbicankeystonelistener_controller.go index b2dee50d..fddd527e 100644 --- a/controllers/barbicankeystonelistener_controller.go +++ b/controllers/barbicankeystonelistener_controller.go @@ -252,8 +252,8 @@ func (r *BarbicanKeystoneListenerReconciler) generateServiceConfigs( } // customData hold any customization for the service. customData := map[string]string{ - common.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig, - "my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf + barbican.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig, + "my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf } Log.Info(fmt.Sprintf("[KeystoneListener] instance type %s", instance.GetObjectKind().GroupVersionKind().Kind)) diff --git a/controllers/barbicanworker_controller.go b/controllers/barbicanworker_controller.go index 77f62744..f610f4a2 100644 --- a/controllers/barbicanworker_controller.go +++ b/controllers/barbicanworker_controller.go @@ -241,8 +241,8 @@ func (r *BarbicanWorkerReconciler) generateServiceConfigs( } // customData hold any customization for the service. customData := map[string]string{ - common.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig, - "my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf + barbican.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig, + "my.cnf": db.GetDatabaseClientConfig(tlsCfg), //(mschuppert) for now just get the default my.cnf } Log.Info(fmt.Sprintf("[Worker] instance type %s", instance.GetObjectKind().GroupVersionKind().Kind)) diff --git a/pkg/barbican/const.go b/pkg/barbican/const.go index 154388c2..992d5497 100644 --- a/pkg/barbican/const.go +++ b/pkg/barbican/const.go @@ -33,9 +33,9 @@ const ( // CustomConfigFileName - CustomConfigFileName = "01-custom.conf" // CustomServiceConfigFileName - - CustomServiceConfigFileName = "02-service.conf" + CustomServiceConfigFileName = "02-service-custom.conf" // CustomServiceConfigSecretsFileName - - CustomServiceConfigSecretsFileName = "03-secrets.conf" + CustomServiceConfigSecretsFileName = "03-secrets-custom.conf" // BarbicanAPI defines the barbican-api group BarbicanAPI storage.PropagationType = "BarbicanAPI" // BarbicanWorker defines the barbican-worker group diff --git a/templates/barbican/config/barbican-api-config.json b/templates/barbican/config/barbican-api-config.json index f5450116..d5fe8f04 100644 --- a/templates/barbican/config/barbican-api-config.json +++ b/templates/barbican/config/barbican-api-config.json @@ -8,15 +8,15 @@ "perm": "0600" }, { - "source": "/var/lib/config-data/default/02-service.conf", - "dest": "/etc/barbican/barbican.conf.d/02-service.conf", + "source": "/var/lib/config-data/default/02-service-custom.conf", + "dest": "/etc/barbican/barbican.conf.d/custom.conf", "owner": "barbican", "perm": "0600", "optional": true }, { - "source": "/var/lib/config-data/default/03-secrets.conf", - "dest": "/etc/barbican/barbican.conf.d/03-secrets.conf", + "source": "/var/lib/config-data/default/03-secrets-custom.conf", + "dest": "/etc/barbican/barbican.conf.d/03-secrets-custom.conf", "owner": "barbican", "perm": "0640", "optional": true diff --git a/templates/barbican/config/barbican-keystone-listener-config.json b/templates/barbican/config/barbican-keystone-listener-config.json index e71b8606..077b3b81 100644 --- a/templates/barbican/config/barbican-keystone-listener-config.json +++ b/templates/barbican/config/barbican-keystone-listener-config.json @@ -8,15 +8,15 @@ "perm": "0600" }, { - "source": "/var/lib/config-data/default/02-service.conf", - "dest": "/etc/barbican/barbican.conf.d/02-service.conf", + "source": "/var/lib/config-data/default/02-service-custom.conf", + "dest": "/etc/barbican/barbican.conf.d/custom.conf", "owner": "barbican", "perm": "0600", "optional": true }, { - "source": "/var/lib/config-data/default/03-secrets.conf", - "dest": "/etc/barbican/barbican.conf.d/03-secrets.conf", + "source": "/var/lib/config-data/default/03-secrets-custom.conf", + "dest": "/etc/barbican/barbican.conf.d/03-secrets-custom.conf", "owner": "barbican", "perm": "0640", "optional": true diff --git a/templates/barbican/config/barbican-worker-config.json b/templates/barbican/config/barbican-worker-config.json index 667f71f2..18d91f3f 100644 --- a/templates/barbican/config/barbican-worker-config.json +++ b/templates/barbican/config/barbican-worker-config.json @@ -8,15 +8,15 @@ "perm": "0600" }, { - "source": "/var/lib/config-data/default/02-service.conf", - "dest": "/etc/barbican/barbican.conf.d/02-service.conf", + "source": "/var/lib/config-data/default/02-service-custom.conf", + "dest": "/etc/barbican/barbican.conf.d/custom.conf", "owner": "barbican", "perm": "0600", "optional": true }, { - "source": "/var/lib/config-data/default/03-secrets.conf", - "dest": "/etc/barbican/barbican.conf.d/03-secrets.conf", + "source": "/var/lib/config-data/default/03-secrets-custom.conf", + "dest": "/etc/barbican/barbican.conf.d/03-secrets-custom.conf", "owner": "barbican", "perm": "0640", "optional": true