Skip to content

Commit

Permalink
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 d6f4fb9
Show file tree
Hide file tree
Showing 3 changed files with 9 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

0 comments on commit d6f4fb9

Please sign in to comment.