diff --git a/api/bases/manila.openstack.org_manilaapis.yaml b/api/bases/manila.openstack.org_manilaapis.yaml index 2f6a5f31..facebc88 100644 --- a/api/bases/manila.openstack.org_manilaapis.yaml +++ b/api/bases/manila.openstack.org_manilaapis.yaml @@ -60,10 +60,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object extraMounts: items: properties: diff --git a/api/bases/manila.openstack.org_manilas.yaml b/api/bases/manila.openstack.org_manilas.yaml index baddda24..89a87b65 100644 --- a/api/bases/manila.openstack.org_manilas.yaml +++ b/api/bases/manila.openstack.org_manilas.yaml @@ -53,10 +53,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object extraMounts: items: properties: @@ -830,10 +826,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object networkAttachments: items: type: string @@ -950,10 +942,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object networkAttachments: items: type: string @@ -1020,10 +1008,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object networkAttachments: items: type: string diff --git a/api/bases/manila.openstack.org_manilaschedulers.yaml b/api/bases/manila.openstack.org_manilaschedulers.yaml index 61910048..dacaf67d 100644 --- a/api/bases/manila.openstack.org_manilaschedulers.yaml +++ b/api/bases/manila.openstack.org_manilaschedulers.yaml @@ -60,10 +60,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object extraMounts: items: properties: diff --git a/api/bases/manila.openstack.org_manilashares.yaml b/api/bases/manila.openstack.org_manilashares.yaml index 809d1ee2..697247db 100644 --- a/api/bases/manila.openstack.org_manilashares.yaml +++ b/api/bases/manila.openstack.org_manilashares.yaml @@ -60,10 +60,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object extraMounts: items: properties: diff --git a/api/v1beta1/common_types.go b/api/v1beta1/common_types.go index 63b0873a..003bbf48 100644 --- a/api/v1beta1/common_types.go +++ b/api/v1beta1/common_types.go @@ -81,11 +81,6 @@ type ManilaServiceTemplate struct { // to /etc//.conf.d directory a custom config file. CustomServiceConfig string `json:"customServiceConfig,omitempty"` - // +kubebuilder:validation:Optional - // ConfigOverwrite - interface to overwrite default config files like e.g. policy.json. - // But can also be used to add additional files. Those get added to the service config dir in /etc/ . - DefaultConfigOverwrite map[string]string `json:"defaultConfigOverwrite,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 diff --git a/api/v1beta1/manila_types.go b/api/v1beta1/manila_types.go index d376a0e9..97f45aa9 100644 --- a/api/v1beta1/manila_types.go +++ b/api/v1beta1/manila_types.go @@ -68,12 +68,6 @@ type ManilaSpec struct { // to /etc//.conf.d directory a custom config file. CustomServiceConfig string `json:"customServiceConfig,omitempty"` - // +kubebuilder:validation:Optional - // ConfigOverwrite - interface to overwrite default config files like e.g. policy.json. - // But can also be used to add additional files. Those get added to the service config dir in /etc/ . - // TODO: -> implement - DefaultConfigOverwrite map[string]string `json:"defaultConfigOverwrite,omitempty"` - // +kubebuilder:validation:Required // ManilaAPI - Spec definition for the API service of this Manila deployment ManilaAPI ManilaAPITemplate `json:"manilaAPI"` diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index d89e750d..c1fb0d96 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -484,13 +484,6 @@ func (in *ManilaServiceTemplate) DeepCopyInto(out *ManilaServiceTemplate) { } } out.Debug = in.Debug - if in.DefaultConfigOverwrite != nil { - in, out := &in.DefaultConfigOverwrite, &out.DefaultConfigOverwrite - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } if in.CustomServiceConfigSecrets != nil { in, out := &in.CustomServiceConfigSecrets, &out.CustomServiceConfigSecrets *out = make([]string, len(*in)) @@ -667,13 +660,6 @@ func (in *ManilaSpec) DeepCopyInto(out *ManilaSpec) { *out = *in out.ManilaTemplate = in.ManilaTemplate out.Debug = in.Debug - if in.DefaultConfigOverwrite != nil { - in, out := &in.DefaultConfigOverwrite, &out.DefaultConfigOverwrite - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } in.ManilaAPI.DeepCopyInto(&out.ManilaAPI) in.ManilaScheduler.DeepCopyInto(&out.ManilaScheduler) if in.ManilaShares != nil { diff --git a/config/crd/bases/manila.openstack.org_manilaapis.yaml b/config/crd/bases/manila.openstack.org_manilaapis.yaml index 2f6a5f31..facebc88 100644 --- a/config/crd/bases/manila.openstack.org_manilaapis.yaml +++ b/config/crd/bases/manila.openstack.org_manilaapis.yaml @@ -60,10 +60,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object extraMounts: items: properties: diff --git a/config/crd/bases/manila.openstack.org_manilas.yaml b/config/crd/bases/manila.openstack.org_manilas.yaml index baddda24..89a87b65 100644 --- a/config/crd/bases/manila.openstack.org_manilas.yaml +++ b/config/crd/bases/manila.openstack.org_manilas.yaml @@ -53,10 +53,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object extraMounts: items: properties: @@ -830,10 +826,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object networkAttachments: items: type: string @@ -950,10 +942,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object networkAttachments: items: type: string @@ -1020,10 +1008,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object networkAttachments: items: type: string diff --git a/config/crd/bases/manila.openstack.org_manilaschedulers.yaml b/config/crd/bases/manila.openstack.org_manilaschedulers.yaml index 61910048..dacaf67d 100644 --- a/config/crd/bases/manila.openstack.org_manilaschedulers.yaml +++ b/config/crd/bases/manila.openstack.org_manilaschedulers.yaml @@ -60,10 +60,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object extraMounts: items: properties: diff --git a/config/crd/bases/manila.openstack.org_manilashares.yaml b/config/crd/bases/manila.openstack.org_manilashares.yaml index 809d1ee2..697247db 100644 --- a/config/crd/bases/manila.openstack.org_manilashares.yaml +++ b/config/crd/bases/manila.openstack.org_manilashares.yaml @@ -60,10 +60,6 @@ spec: default: false type: boolean type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object extraMounts: items: properties: diff --git a/controllers/manila_controller.go b/controllers/manila_controller.go index cfed7862..6055a36a 100644 --- a/controllers/manila_controller.go +++ b/controllers/manila_controller.go @@ -834,10 +834,6 @@ func (r *ManilaReconciler) generateServiceConfig( // all other files get placed into /etc/ to allow overwrite of e.g. policy.json customData := map[string]string{manila.CustomConfigFileName: instance.Spec.CustomServiceConfig} - for key, data := range instance.Spec.DefaultConfigOverwrite { - customData[key] = data - } - keystoneAPI, err := keystonev1.GetKeystoneAPI(ctx, h, instance.Namespace, map[string]string{}) if err != nil { return err diff --git a/controllers/manilaapi_controller.go b/controllers/manilaapi_controller.go index 52e5c643..d308da96 100644 --- a/controllers/manilaapi_controller.go +++ b/controllers/manilaapi_controller.go @@ -802,10 +802,6 @@ func (r *ManilaAPIReconciler) generateServiceConfig( // customData hold any customization for the service. customData := map[string]string{manila.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig} - for key, data := range instance.Spec.DefaultConfigOverwrite { - customData[key] = data - } - customData[manila.CustomServiceConfigFileName] = instance.Spec.CustomServiceConfig // Fetch the two service config snippets (DefaultsConfigFileName and diff --git a/controllers/manilascheduler_controller.go b/controllers/manilascheduler_controller.go index 581ef177..18108536 100644 --- a/controllers/manilascheduler_controller.go +++ b/controllers/manilascheduler_controller.go @@ -534,7 +534,6 @@ func (r *ManilaSchedulerReconciler) getSecret( } // generateServiceConfig - create Secret to hold service-specific config -// TODO add DefaultConfigOverwrite func (r *ManilaSchedulerReconciler) generateServiceConfig( ctx context.Context, h *helper.Helper, @@ -551,10 +550,6 @@ func (r *ManilaSchedulerReconciler) generateServiceConfig( customData := map[string]string{manila.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig} - for key, data := range instance.Spec.DefaultConfigOverwrite { - customData[key] = data - } - customData[manila.CustomServiceConfigFileName] = instance.Spec.CustomServiceConfig // Fetch the two service config snippets (DefaultsConfigFileName and diff --git a/controllers/manilashare_controller.go b/controllers/manilashare_controller.go index 20c842af..734b7f8f 100644 --- a/controllers/manilashare_controller.go +++ b/controllers/manilashare_controller.go @@ -531,7 +531,6 @@ func (r *ManilaShareReconciler) getSecret( } // generateServiceConfig - create custom Secret to hold service-specific config -// TODO add DefaultConfigOverwrite func (r *ManilaShareReconciler) generateServiceConfig( ctx context.Context, h *helper.Helper, @@ -548,10 +547,6 @@ func (r *ManilaShareReconciler) generateServiceConfig( customData := map[string]string{manila.CustomServiceConfigFileName: instance.Spec.CustomServiceConfig} - for key, data := range instance.Spec.DefaultConfigOverwrite { - customData[key] = data - } - customData[manila.CustomServiceConfigFileName] = instance.Spec.CustomServiceConfig // Fetch the two service config snippets (DefaultsConfigFileName and