Skip to content

Commit

Permalink
Merge pull request #180 from fmount/defaultconfigoverride
Browse files Browse the repository at this point in the history
Remove DefaultConfigOverwrite from CRD
  • Loading branch information
openshift-merge-bot[bot] authored Nov 27, 2023
2 parents 0f768e0 + ae69772 commit 81ffbc2
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 99 deletions.
4 changes: 0 additions & 4 deletions api/bases/manila.openstack.org_manilaapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
extraMounts:
items:
properties:
Expand Down
16 changes: 0 additions & 16 deletions api/bases/manila.openstack.org_manilas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
extraMounts:
items:
properties:
Expand Down Expand Up @@ -830,10 +826,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
networkAttachments:
items:
type: string
Expand Down Expand Up @@ -950,10 +942,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
networkAttachments:
items:
type: string
Expand Down Expand Up @@ -1020,10 +1008,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
networkAttachments:
items:
type: string
Expand Down
4 changes: 0 additions & 4 deletions api/bases/manila.openstack.org_manilaschedulers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
extraMounts:
items:
properties:
Expand Down
4 changes: 0 additions & 4 deletions api/bases/manila.openstack.org_manilashares.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
extraMounts:
items:
properties:
Expand Down
5 changes: 0 additions & 5 deletions api/v1beta1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ type ManilaServiceTemplate struct {
// to /etc/<service>/<service>.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/<service> .
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
Expand Down
6 changes: 0 additions & 6 deletions api/v1beta1/manila_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ type ManilaSpec struct {
// to /etc/<service>/<service>.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/<service> .
// 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"`
Expand Down
14 changes: 0 additions & 14 deletions api/v1beta1/zz_generated.deepcopy.go

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

4 changes: 0 additions & 4 deletions config/crd/bases/manila.openstack.org_manilaapis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
extraMounts:
items:
properties:
Expand Down
16 changes: 0 additions & 16 deletions config/crd/bases/manila.openstack.org_manilas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
extraMounts:
items:
properties:
Expand Down Expand Up @@ -830,10 +826,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
networkAttachments:
items:
type: string
Expand Down Expand Up @@ -950,10 +942,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
networkAttachments:
items:
type: string
Expand Down Expand Up @@ -1020,10 +1008,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
networkAttachments:
items:
type: string
Expand Down
4 changes: 0 additions & 4 deletions config/crd/bases/manila.openstack.org_manilaschedulers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
extraMounts:
items:
properties:
Expand Down
4 changes: 0 additions & 4 deletions config/crd/bases/manila.openstack.org_manilashares.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ spec:
default: false
type: boolean
type: object
defaultConfigOverwrite:
additionalProperties:
type: string
type: object
extraMounts:
items:
properties:
Expand Down
4 changes: 0 additions & 4 deletions controllers/manila_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,6 @@ func (r *ManilaReconciler) generateServiceConfig(
// all other files get placed into /etc/<service> 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
Expand Down
4 changes: 0 additions & 4 deletions controllers/manilaapi_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions controllers/manilascheduler_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
5 changes: 0 additions & 5 deletions controllers/manilashare_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 81ffbc2

Please sign in to comment.