Skip to content

Commit

Permalink
adopt github.com/sap/component-operator-runtime v0.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
cbarbian-sap committed Dec 31, 2023
1 parent 7211543 commit 5867011
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ SPDX-License-Identifier: Apache-2.0
package generator

import (
"context"
"fmt"
"io/fs"

Expand All @@ -29,7 +30,7 @@ func NewResourceGenerator(name string, fsys fs.FS, chartPath string, client clie
return &ResourceGenerator{generator: generator}, nil
}

func (g *ResourceGenerator) Generate(namespace string, name string, parameters componentoperatorruntimetypes.Unstructurable) ([]client.Object, error) {
func (g *ResourceGenerator) Generate(ctx context.Context, namespace string, name string, parameters componentoperatorruntimetypes.Unstructurable) ([]client.Object, error) {
values := parameters.ToUnstructured()

values["fullnameOverride"] = name
Expand All @@ -55,7 +56,7 @@ func (g *ResourceGenerator) Generate(namespace string, name string, parameters c
delete(values, "additionalResources")
}

resources, err := g.generator.Generate(namespace, name, componentoperatorruntimetypes.UnstructurableMap(values))
resources, err := g.generator.Generate(ctx, namespace, name, componentoperatorruntimetypes.UnstructurableMap(values))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 5867011

Please sign in to comment.