Skip to content

Commit

Permalink
[DNM] Update secret Template for PostRenderCleanup
Browse files Browse the repository at this point in the history
Opting to remove extra lines from nova confs

Depends-On: openstack-k8s-operators/lib-common#557
  • Loading branch information
auniyal61 committed Sep 11, 2024
1 parent b05427a commit f0815db
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions controllers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ func (r *ReconcilerBase) generateConfigsGeneric(
CustomData: extraData,
Annotations: map[string]string{},
AdditionalTemplate: extraTemplates,
PostRenderCleanup: 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,
PostRenderCleanup: true,
}

err := secret.EnsureSecrets(ctx, h, instance, []util.Template{template}, nil)
Expand Down
1 change: 1 addition & 0 deletions controllers/novametadata_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ func (r *NovaMetadataReconciler) generateNeutronConfigs(
ConfigOptions: templateParameters,
Labels: labels,
AdditionalTemplate: templates,
PostRenderCleanup: 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/auniyal61/lib-common/modules/common => github.com/auniyal61/lib-common/modules/common v0.0.0-20240911213611-6043e8008c60

0 comments on commit f0815db

Please sign in to comment.