Skip to content

Commit

Permalink
fix: change up some rendering logic to get rid of error
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronschweig committed Jan 15, 2025
1 parent 27d2fc4 commit cf7213f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/subroutines/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func (e *ExtensionSubroutine) Process(ctx context.Context, instance lifecycle.Ru
}

func RenderExtensionSpec(ctx context.Context, keyValues map[string]any, account *v1alpha1.Account, us *unstructured.Unstructured, path []string) error {
renderAccount := account.DeepCopy()
for key, value := range keyValues {
switch val := value.(type) {
case string: // render string values
Expand All @@ -97,7 +98,7 @@ func RenderExtensionSpec(ctx context.Context, keyValues map[string]any, account

var rendered bytes.Buffer
err = t.Execute(&rendered, map[string]any{
"Account": account,
"Account": *renderAccount,
})
if err != nil {
return err
Expand Down

0 comments on commit cf7213f

Please sign in to comment.