Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DNM] Update secret Template for PostRenderCleanup #857

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions controllers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,15 +409,16 @@ func (r *ReconcilerBase) generateConfigsGeneric(
}
cms := []util.Template{
{
Name: configName,
Namespace: instance.GetNamespace(),
Type: util.TemplateTypeConfig,
InstanceType: instance.GetObjectKind().GroupVersionKind().Kind,
ConfigOptions: templateParameters,
Labels: cmLabels,
CustomData: extraData,
Annotations: map[string]string{},
AdditionalTemplate: extraTemplates,
Name: configName,
Namespace: instance.GetNamespace(),
Type: util.TemplateTypeConfig,
InstanceType: instance.GetObjectKind().GroupVersionKind().Kind,
ConfigOptions: templateParameters,
Labels: cmLabels,
CustomData: extraData,
Annotations: map[string]string{},
AdditionalTemplate: extraTemplates,
PostProcessConfFilesCleanup: true,
},
}
if withScripts {
Expand Down
13 changes: 7 additions & 6 deletions controllers/nova_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1705,12 +1705,13 @@ func (r *NovaReconciler) ensureTopLevelSecret(
)

template := util.Template{
Name: secretName,
Namespace: instance.Namespace,
Type: util.TemplateTypeNone,
InstanceType: instance.GetObjectKind().GroupVersionKind().Kind,
Labels: labels,
CustomData: data,
Name: secretName,
Namespace: instance.Namespace,
Type: util.TemplateTypeNone,
InstanceType: instance.GetObjectKind().GroupVersionKind().Kind,
Labels: labels,
CustomData: data,
PostProcessConfFilesCleanup: true,
}

err := secret.EnsureSecrets(ctx, h, instance, []util.Template{template}, nil)
Expand Down
15 changes: 8 additions & 7 deletions controllers/novametadata_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,13 +819,14 @@ func (r *NovaMetadataReconciler) generateNeutronConfigs(

cms := []util.Template{
{
Name: configName,
Namespace: instance.GetNamespace(),
Type: util.TemplateTypeNone,
InstanceType: instance.GetObjectKind().GroupVersionKind().Kind,
ConfigOptions: templateParameters,
Labels: labels,
AdditionalTemplate: templates,
Name: configName,
Namespace: instance.GetNamespace(),
Type: util.TemplateTypeNone,
InstanceType: instance.GetObjectKind().GroupVersionKind().Kind,
ConfigOptions: templateParameters,
Labels: labels,
AdditionalTemplate: templates,
PostProcessConfFilesCleanup: true,
},
}

Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ replace github.com/openstack-k8s-operators/nova-operator/api => ./api
// mschuppert: map to latest commit from release-4.13 tag
// must consistent within modules and service operators
replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 //allow-merging

replace github.com/openstack-k8s-operators/lib-common/modules/common => github.com/auniyal61/lib-common/modules/common v0.0.0-20240917072433-a7150d4fcb60
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
github.com/auniyal61/lib-common/modules/common v0.0.0-20240917072433-a7150d4fcb60 h1:s/isToyL74e30rpcm048bnq07rRwynna2tkG5flFiUk=
github.com/auniyal61/lib-common/modules/common v0.0.0-20240917072433-a7150d4fcb60/go.mod h1:6zxa5xg9uvpObVKFSJa/SA+vDDlgh0Q1aswxDB2XbxU=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
Expand Down Expand Up @@ -78,8 +80,6 @@ github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20240730162859-9
github.com/openstack-k8s-operators/infra-operator/apis v0.4.1-0.20240730162859-91b64b2d2de7/go.mod h1:OamtaW9c7aCtfUmxc/r+/XJS7XRI7s5iR//SZ8ilSwk=
github.com/openstack-k8s-operators/keystone-operator/api v0.4.1-0.20240730210414-ba2309d261a2 h1:F5NZmK9Gr12bHmNCJDRy7ad3I5j97adJ5Gm9HjSwV5g=
github.com/openstack-k8s-operators/keystone-operator/api v0.4.1-0.20240730210414-ba2309d261a2/go.mod h1:cSNSeN7+pXC/DLwtGoT9HsbdUYzbAnLHGtXN9/uugk8=
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240905123813-174296c09ec6 h1:VSbVNzUa41hybq/lZi0L8bNv/yzYyNylc8yKSEO+ZCA=
github.com/openstack-k8s-operators/lib-common/modules/common v0.4.1-0.20240905123813-174296c09ec6/go.mod h1:6zxa5xg9uvpObVKFSJa/SA+vDDlgh0Q1aswxDB2XbxU=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.4.1-0.20240730142703-7fd3da600c9d h1:SRB1rCIVpaVhKxJPkSXE9CNN+xHSrdgXzrRV9ed/hIc=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.4.1-0.20240730142703-7fd3da600c9d/go.mod h1:TyZh5+Uwxb1vcyY44H5GJVulvlQxU05TTAPQ4tSmbzY=
github.com/openstack-k8s-operators/lib-common/modules/test v0.4.1-0.20240730142703-7fd3da600c9d h1:P5tF3/shBcQf0HkPHWcr5Ri+jsRStMPbGOPQw4qRHRI=
Expand Down
Loading