From 34f75c39767a49234789b41c5f5fae0f21674d95 Mon Sep 17 00:00:00 2001 From: Gloria Ciavarrini Date: Wed, 19 Feb 2025 14:39:13 +0100 Subject: [PATCH] Add asset generation generate cmd Signed-off-by: Jordi Gil Signed-off-by: Gloria Ciavarrini --- cmd/asset_generation/generate/generate.go | 21 ++ .../generate/generate_suite_test.go | 13 + .../generate/generate_test.go | 68 ++++ cmd/asset_generation/generate/helm/helm.go | 192 ++++++++++ .../generate/helm/helm_suite_test.go | 13 + .../generate/helm/helm_test.go | 327 ++++++++++++++++++ cmd/root.go | 2 + go.mod | 42 ++- go.sum | 96 +++++ test-data/asset_generation/helm/discover.yaml | 2 + .../helm/k8s_only/.helmignore | 23 ++ .../asset_generation/helm/k8s_only/Chart.yaml | 24 ++ .../helm/k8s_only/templates/configmap.yaml | 9 + .../helm/mixed_templates/.helmignore | 23 ++ .../helm/mixed_templates/Chart.yaml | 24 ++ .../mixed_templates/files/konveyor/Dockerfile | 6 + .../mixed_templates/templates/configmap.yaml | 9 + 17 files changed, 893 insertions(+), 1 deletion(-) create mode 100644 cmd/asset_generation/generate/generate.go create mode 100644 cmd/asset_generation/generate/generate_suite_test.go create mode 100644 cmd/asset_generation/generate/generate_test.go create mode 100644 cmd/asset_generation/generate/helm/helm.go create mode 100644 cmd/asset_generation/generate/helm/helm_suite_test.go create mode 100644 cmd/asset_generation/generate/helm/helm_test.go create mode 100644 test-data/asset_generation/helm/discover.yaml create mode 100644 test-data/asset_generation/helm/k8s_only/.helmignore create mode 100644 test-data/asset_generation/helm/k8s_only/Chart.yaml create mode 100644 test-data/asset_generation/helm/k8s_only/templates/configmap.yaml create mode 100644 test-data/asset_generation/helm/mixed_templates/.helmignore create mode 100644 test-data/asset_generation/helm/mixed_templates/Chart.yaml create mode 100644 test-data/asset_generation/helm/mixed_templates/files/konveyor/Dockerfile create mode 100644 test-data/asset_generation/helm/mixed_templates/templates/configmap.yaml diff --git a/cmd/asset_generation/generate/generate.go b/cmd/asset_generation/generate/generate.go new file mode 100644 index 00000000..5421128f --- /dev/null +++ b/cmd/asset_generation/generate/generate.go @@ -0,0 +1,21 @@ +package generate + +import ( + "github.com/go-logr/logr" + "github.com/konveyor-ecosystem/kantra/cmd/asset_generation/generate/helm" + "github.com/spf13/cobra" +) + +func NewGenerateCommand(log logr.Logger) *cobra.Command { + cmd := &cobra.Command{ + Use: "generate", + GroupID: "assetGeneration", + Short: "Analyze the source platform and/or application and output discovery manifest.", + Run: func(cmd *cobra.Command, _ []string) { + cmd.Help() + }, + } + cmd.AddCommand(helm.NewGenerateHelmCommand(log)) + + return cmd +} diff --git a/cmd/asset_generation/generate/generate_suite_test.go b/cmd/asset_generation/generate/generate_suite_test.go new file mode 100644 index 00000000..74f9f8dd --- /dev/null +++ b/cmd/asset_generation/generate/generate_suite_test.go @@ -0,0 +1,13 @@ +package generate_test + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestGenerate(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Generate Suite") +} diff --git a/cmd/asset_generation/generate/generate_test.go b/cmd/asset_generation/generate/generate_test.go new file mode 100644 index 00000000..6fb09951 --- /dev/null +++ b/cmd/asset_generation/generate/generate_test.go @@ -0,0 +1,68 @@ +package generate_test + +import ( + "bufio" + "bytes" + + "github.com/bombsimon/logrusr/v3" + "github.com/go-logr/logr" + "github.com/konveyor-ecosystem/kantra/cmd/asset_generation/generate" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +var _ = Describe("Generate Command", func() { + + var _ = Context("Flag Behavior Verification", func() { + + var ( + logger logr.Logger + out bytes.Buffer + err bytes.Buffer + writer *bufio.Writer = bufio.NewWriter(&out) + c *cobra.Command + ) + + var _ = BeforeEach(func() { + // Reset buffers before each test + writer.Reset(&out) + + // Set up logger + logrusLog := logrus.New() + logrusLog.SetOutput(&out) + logrusLog.SetFormatter(&logrus.TextFormatter{}) + logger = logrusr.New(logrusLog) + + // Create command instance + c = generate.NewGenerateCommand(logger) + c.SetOut(writer) + c.SetErr(&err) + }) + + DescribeTable("Command Flag Behavior", + func(args []string, expectedOutput string, expectError bool, expectedError string) { + c.SetArgs(args) + err := c.Execute() + writer.Flush() + if expectError { + Expect(err).To(HaveOccurred()) + Expect(err).Should(MatchError(expectedError)) + } else { + Expect(err).NotTo(HaveOccurred()) + } + Expect(out.String()).To(ContainSubstring(expectedOutput)) + + }, + Entry("should print the help message when no flags are used containing entries for each template engine", + []string{}, "helm generate the helm template manifests", false, ""), + + Entry("should return an error message for an invalid command", + []string{"invalid-command"}, "", true, "unknown command \"invalid-command\" for \"generate\""), + + Entry("should return an error message for an invalid flag", + []string{"--invalid-flag"}, "Usage:\n", true, "unknown flag: --invalid-flag"), + ) + }) +}) diff --git a/cmd/asset_generation/generate/helm/helm.go b/cmd/asset_generation/generate/helm/helm.go new file mode 100644 index 00000000..8e3031ce --- /dev/null +++ b/cmd/asset_generation/generate/helm/helm.go @@ -0,0 +1,192 @@ +package helm + +import ( + "fmt" + "io" + "maps" + "os" + "path/filepath" + "strings" + + "github.com/go-logr/logr" + "github.com/spf13/cobra" + "gopkg.in/yaml.v3" + "k8s.io/helm/pkg/strvals" + + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chart/loader" + "helm.sh/helm/v3/pkg/chartutil" + "helm.sh/helm/v3/pkg/engine" +) + +const ( + konveyorDirectoryName = "files/konveyor" +) + +var ( + input string + outputDir string + chartDir string + nonK8SOnly bool + setValues []string +) + +func NewGenerateHelmCommand(log logr.Logger) *cobra.Command { + cmd := &cobra.Command{ + Use: "helm", + Short: "generate the helm template manifests", + RunE: func(cmd *cobra.Command, args []string) error { + return helm(cmd.OutOrStdout()) + }, + } + cmd.Flags().StringVar(&chartDir, "chart-dir", "", "Directory to the Helm chart to use for chart generation.") + cmd.Flags().StringVar(&input, "input", "", "Specifies the discover manifest file") + cmd.Flags().StringVar(&outputDir, "output-dir", "", "Directory to save the generated Helm chart. Defaults to stdout") + cmd.Flags().BoolVar(&nonK8SOnly, "non-k8s-only", false, "Render only the non-Kubernetes templates located in the files/konveyor directory of the chart") + cmd.Flags().StringArrayVar(&setValues, "set", []string{}, "Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2)") + + // Validation + cmd.MarkFlagDirname("chart-dir") + cmd.MarkFlagDirname("output-dir") + cmd.MarkFlagFilename("input") + // Required + cmd.MarkFlagRequired("chart-dir") + cmd.MarkFlagRequired("input") + + return cmd +} + +func helm(out io.Writer) error { + chart, err := loadChart() + if err != nil { + return err + } + values, err := loadDiscoverManifest() + if err != nil { + return err + } + if len(setValues) > 0 { + v, err := parseValues() + if err != nil { + return err + } + maps.Copy(values, v) + } + chart.Values = values + rendered := make(map[string]string) + if !nonK8SOnly { + rendered, err = generateK8sTemplates(*chart) + if err != nil { + return err + } + } + r, err := generateNonK8sTemplates(*chart) + if err != nil { + return err + } + maps.Copy(rendered, r) + + o := output{out: out} + print := o.toStdout + if outputDir != "" { + err = os.MkdirAll(outputDir, 0755) + if err != nil { + return err + } + print = toFile + } + for f, c := range rendered { + err = print(f, c) + if err != nil { + return err + } + } + return nil +} + +type output struct { + out io.Writer +} + +func (o output) toStdout(filename, contents string) error { + fmt.Fprintf(o.out, "---\n# Source: %s\n%s", filename, contents) + return nil +} + +func toFile(filename, contents string) error { + fn := filepath.Base(filename) + dst := filepath.Join(outputDir, fn) + // Add an extra line to make it yaml compliant since helm doesn't seem to do it. + contents = fmt.Sprintln(contents) + return os.WriteFile(dst, []byte(contents), 0644) +} + +func loadChart() (*chart.Chart, error) { + l, err := loader.Loader(chartDir) + if err != nil { + return nil, fmt.Errorf("unable to load chart: %s", err) + } + return l.Load() +} + +func loadDiscoverManifest() (map[string]interface{}, error) { + d, err := os.ReadFile(input) + if err != nil { + return nil, fmt.Errorf("unable to load discover manifest: %s", err) + } + var m map[string]interface{} + err = yaml.Unmarshal(d, &m) + return m, err +} + +func generateK8sTemplates(chart chart.Chart) (map[string]string, error) { + return generateTemplates(chart) +} + +func generateNonK8sTemplates(chart chart.Chart) (map[string]string, error) { + chart.Templates = filterTemplatesByPath(konveyorDirectoryName, chart.Files) + return generateTemplates(chart) +} + +func generateTemplates(chart chart.Chart) (map[string]string, error) { + e := engine.Engine{} + options := chartutil.ReleaseOptions{ + Name: chart.Name(), + Namespace: "", + Revision: 1, + IsInstall: false, + IsUpgrade: false, + } + valuesToRender, err := chartutil.ToRenderValues(&chart, chart.Values, options, chartutil.DefaultCapabilities.Copy()) + if err != nil { + return nil, fmt.Errorf("failed to render the values for chart %s: %s", chart.Name(), err) + } + chart.Values = valuesToRender + rendered, err := e.Render(&chart, valuesToRender) + if err != nil { + return nil, fmt.Errorf("failed to render the templates for chart %s: %s", chart.Name(), err) + } + return rendered, nil + +} + +func filterTemplatesByPath(pathPrefix string, files []*chart.File) []*chart.File { + ret := []*chart.File{} + for _, f := range files { + if strings.HasPrefix(f.Name, pathPrefix) { + ret = append(ret, f) + } + } + return ret +} + +func parseValues() (map[string]interface{}, error) { + // User specified a value via --set + base := make(map[string]interface{}) + for _, value := range setValues { + if err := strvals.ParseInto(value, base); err != nil { + return nil, fmt.Errorf("failed parsing --set data:%s", err) + } + } + return base, nil +} diff --git a/cmd/asset_generation/generate/helm/helm_suite_test.go b/cmd/asset_generation/generate/helm/helm_suite_test.go new file mode 100644 index 00000000..dcafcbab --- /dev/null +++ b/cmd/asset_generation/generate/helm/helm_suite_test.go @@ -0,0 +1,13 @@ +package helm_test + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestHelm(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Helm Suite") +} diff --git a/cmd/asset_generation/generate/helm/helm_test.go b/cmd/asset_generation/generate/helm/helm_test.go new file mode 100644 index 00000000..fa76e0d4 --- /dev/null +++ b/cmd/asset_generation/generate/helm/helm_test.go @@ -0,0 +1,327 @@ +package helm_test + +import ( + "bytes" + "os" + "path" + "strings" + + "github.com/bombsimon/logrusr/v3" + "github.com/go-logr/logr" + "github.com/konveyor-ecosystem/kantra/cmd/asset_generation/generate/helm" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" +) + +var _ = Describe("Helm command", func() { + + type cmdFlags struct { + input string + chartDir string + output string + nonK8s bool + set []string + } + + type testCase struct { + args []string + expectedError string + expectedOut string + } + + var ( + logger logr.Logger + outBuffer bytes.Buffer + errBuffer bytes.Buffer + c *cobra.Command + ) + + const ( + testDiscoverPath = "../../../../test-data/asset_generation/helm/discover.yaml" + chartDir = "../../../../test-data/asset_generation/helm/" + ) + + var _ = BeforeEach(func() { + logrusLog := logrus.New() + logrusLog.SetOutput(&outBuffer) + logrusLog.SetFormatter(&logrus.TextFormatter{}) + logger = logrusr.New(logrusLog) + outBuffer = bytes.Buffer{} + errBuffer = bytes.Buffer{} + c = helm.NewGenerateHelmCommand(logger) + c.SetOut(&outBuffer) + c.SetErr(&errBuffer) + }) + DescribeTable("validating the execution when not generating templates", + func(tc testCase) { + c.SetArgs(tc.args) + err := c.Execute() + + if tc.expectedError != "" { + Expect(err).To(HaveOccurred()) + Expect(err).Should(MatchError(tc.expectedError)) + + } else { + Expect(err).NotTo(HaveOccurred()) + Expect(outBuffer.String()).To(ContainSubstring(tc.expectedOut)) + } + }, + + Entry("shows the help message when the -h flag is used", + testCase{args: []string{"-h"}, expectedError: "", expectedOut: "generate the helm template manifests"}), + + Entry("shows the error message when no flags are provided", + testCase{args: []string{}, expectedError: `required flag(s) "chart-dir", "input" not set`}), + + Entry("shows the error message when only the input flag is provided", + testCase{args: []string{"--input", "discover.yaml"}, expectedError: `required flag(s) "chart-dir" not set`}), + + Entry("shows the error message when only the chart-dir flag is provided", + testCase{args: []string{"--chart-dir", chartDir}, expectedError: `required flag(s) "input" not set`}), + + Entry("shows the error message when only the non-required flags are provided", + testCase{args: []string{"--non-k8s-only", "--output-dir", "./", "--set", "foo=bar"}, expectedError: `required flag(s) "chart-dir", "input" not set`}), + + Entry("shows an error message when the input flag points to an invalid file", + testCase{args: []string{"--input", "nonexistent.file", "--chart-dir", path.Join(chartDir, "k8s_only")}, + expectedError: `unable to load discover manifest: open nonexistent.file: no such file or directory`}), + + Entry("shows an error message when the chart-dir flag points to an invalid directory", + testCase{args: []string{"--input", testDiscoverPath, "--chart-dir", "nonexistent.dir"}, + expectedError: `unable to load chart: stat nonexistent.dir: no such file or directory`}), + + Entry("shows an error message when the set flag contains an invalid k/v pair", + testCase{args: []string{"--input", testDiscoverPath, "--chart-dir", path.Join(chartDir, "k8s_only"), "--set", "a,1"}, + expectedError: `failed parsing --set data:key "a" has no value (cannot end with ,)`}), + ) + + var _ = When("validating the execution when generating templates", func() { + + Context("when using the output flag", func() { + var ( + manifests = map[string]string{ + "configmap.yaml": `apiVersion: v1 +data: + chartName: hello world! +kind: ConfigMap +metadata: + name: sample + +`, "Dockerfile": `FROM python:3 + +RUN echo hello world! +`} + ) + It("generates the manifest files in the specified directory", func() { + + tmpDir, err := os.MkdirTemp("", "generate") + Expect(err).NotTo(HaveOccurred()) + defer os.RemoveAll(tmpDir) + c.SetArgs([]string{ + "--input", testDiscoverPath, + "--chart-dir", path.Join(chartDir, "mixed_templates"), + "--output-dir", tmpDir}) + err = c.Execute() + Expect(err).NotTo(HaveOccurred()) + Expect(outBuffer.String()).To(BeEmpty()) + Expect(errBuffer.String()).To(BeEmpty()) + f, err := os.ReadDir(tmpDir) + Expect(err).NotTo(HaveOccurred()) + Expect(len(f)).To(Equal(len(manifests))) + for k, v := range manifests { + m, err := os.ReadFile(path.Join(tmpDir, k)) + Expect(err).NotTo(HaveOccurred()) + Expect(string(m)).To(Equal(v)) + } + }) + }) + + DescribeTable("when sending the results to stdout", func(flags cmdFlags, expected string) { + args := []string{} + if flags.input != "" { + args = append(args, []string{"--input", flags.input}...) + } + if flags.chartDir != "" { + args = append(args, []string{"--chart-dir", flags.chartDir}...) + } + if len(flags.set) > 0 { + for _, s := range flags.set { + args = append(args, append([]string{"--set"}, s)...) + } + } + if flags.nonK8s { + args = append(args, "--non-k8s-only") + } + c.SetArgs(args) + err := c.Execute() + Expect(err).NotTo(HaveOccurred()) + results := strings.Split(outBuffer.String(), "---\n") + se := strings.Split(expected, "---\n") + Expect(len(results)).To(Equal(len(se))) + for _, v := range results { + Expect(v).To(BeElementOf(se)) + } + }, + Entry("generates the manifests for a K8s chart using the discover manifest as input", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "k8s_only"), + }, `--- +# Source: k8s_only/templates/configmap.yaml +apiVersion: v1 +data: + chartName: hello world! +kind: ConfigMap +metadata: + name: sample +`), + Entry("generates the manifests for a K8s chart while overriding the variable in the discover.yaml", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "k8s_only"), + set: []string{"foo.bar=bar.foo"}, + }, `--- +# Source: k8s_only/templates/configmap.yaml +apiVersion: v1 +data: + chartName: bar.foo +kind: ConfigMap +metadata: + name: sample +`), + Entry("generates the manifests for a K8s chart while adding a new variable that is interpreted in the template", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "k8s_only"), + set: []string{"extra.value=Lorem Ipsum"}, + }, `--- +# Source: k8s_only/templates/configmap.yaml +apiVersion: v1 +data: + chartName: hello world! + extraValue: Lorem Ipsum +kind: ConfigMap +metadata: + name: sample +`), + Entry("generates no manifest in a K8s chart when specifying the flag to generate only the non-K8s templates", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "k8s_only"), + nonK8s: true, + }, "", + ), + Entry("generates both non-K8s and K8s manifests in a chart that contains both type of templates with the discover manifest as input", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "mixed_templates"), + }, `--- +# Source: mixed_templates/templates/configmap.yaml +apiVersion: v1 +data: + chartName: hello world! +kind: ConfigMap +metadata: + name: sample +--- +# Source: mixed_templates/files/konveyor/Dockerfile +FROM python:3 + +RUN echo hello world!`), + Entry("with a chart with mixed templates and overriding the variable in the values.yaml", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "mixed_templates"), + set: []string{"foo.bar=bar.foo"}, + }, `--- +# Source: mixed_templates/templates/configmap.yaml +apiVersion: v1 +data: + chartName: bar.foo +kind: ConfigMap +metadata: + name: sample +--- +# Source: mixed_templates/files/konveyor/Dockerfile +FROM python:3 + +RUN echo bar.foo`), + Entry("with a chart with mixed templates and adding a new variable that is captured in the template", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "mixed_templates"), + set: []string{"extra.value=Lorem Ipsum"}, + }, `--- +# Source: mixed_templates/files/konveyor/Dockerfile +FROM python:3 + +RUN echo hello world! +RUN echo Lorem Ipsum +--- +# Source: mixed_templates/templates/configmap.yaml +apiVersion: v1 +data: + chartName: hello world! + extraValue: Lorem Ipsum +kind: ConfigMap +metadata: + name: sample +`), + Entry("with a chart with mixed templates with multiple variables as input", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "mixed_templates"), + set: []string{"extra.value=Lorem Ipsum", "foo.bar=bar foo"}, + }, `--- +# Source: mixed_templates/files/konveyor/Dockerfile +FROM python:3 + +RUN echo bar foo +RUN echo Lorem Ipsum +--- +# Source: mixed_templates/templates/configmap.yaml +apiVersion: v1 +data: + chartName: bar foo + extraValue: Lorem Ipsum +kind: ConfigMap +metadata: + name: sample +`), + Entry("with a chart with mixed templates with multiple variables as input in a single set flag", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "mixed_templates"), + set: []string{"extra.value=Lorem Ipsum,foo.bar=bar foo"}, + }, `--- +# Source: mixed_templates/files/konveyor/Dockerfile +FROM python:3 + +RUN echo bar foo +RUN echo Lorem Ipsum +--- +# Source: mixed_templates/templates/configmap.yaml +apiVersion: v1 +data: + chartName: bar foo + extraValue: Lorem Ipsum +kind: ConfigMap +metadata: + name: sample +`), + Entry("only generates the non-K8s manifests in a chart that contains both type of templates", + cmdFlags{ + input: testDiscoverPath, + chartDir: path.Join(chartDir, "mixed_templates"), + nonK8s: true, + }, `--- +# Source: mixed_templates/files/konveyor/Dockerfile +FROM python:3 + +RUN echo hello world!`, + ), + ) + }) +}) diff --git a/cmd/root.go b/cmd/root.go index 31e3d912..fde6f93e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -10,6 +10,7 @@ import ( "github.com/bombsimon/logrusr/v3" "github.com/konveyor-ecosystem/kantra/cmd/asset_generation/discover" + "github.com/konveyor-ecosystem/kantra/cmd/asset_generation/generate" "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -56,6 +57,7 @@ func init() { rootCmd.AddCommand(NewTestCommand(logger)) rootCmd.AddCommand(NewVersionCommand()) rootCmd.AddCommand(discover.NewDiscoverCommand(logger)) + rootCmd.AddCommand(generate.NewGenerateCommand(logger)) } // Execute adds all child commands to the root command and sets flags appropriately. diff --git a/go.mod b/go.mod index 65eda57e..7f5f2be0 100644 --- a/go.mod +++ b/go.mod @@ -16,59 +16,99 @@ require ( go.opentelemetry.io/otel/trace v1.29.0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 + helm.sh/helm/v3 v3.17.1 + k8s.io/helm v2.17.0+incompatible ) require ( cloud.google.com/go/compute/metadata v0.5.0 // indirect + dario.cat/mergo v1.0.1 // indirect + github.com/BurntSushi/toml v1.4.0 // indirect + github.com/Masterminds/goutils v1.1.1 // indirect + github.com/Masterminds/semver/v3 v3.3.0 // indirect + github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/antchfx/xpath v1.3.1 // indirect github.com/bufbuild/protocompile v0.10.0 // indirect github.com/cbroglie/mustache v1.4.0 // indirect github.com/containerd/typeurl/v2 v2.1.1 // indirect + github.com/cyphar/filepath-securejoin v0.3.6 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect + github.com/gobwas/glob v0.2.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20250208200701-d0013a598941 // indirect github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect + github.com/huandu/xstrings v1.5.0 // indirect github.com/invopop/yaml v0.2.0 // indirect github.com/jhump/protoreflect v1.16.0 // indirect github.com/josharian/intern v1.0.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/moby/buildkit v0.14.1 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.11 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect + github.com/spf13/cast v1.7.0 // indirect github.com/swaggest/jsonschema-go v0.3.72 // indirect github.com/swaggest/openapi-go v0.2.54 // indirect github.com/swaggest/refl v1.3.0 // indirect github.com/vifraa/gopom v1.0.0 // indirect + github.com/x448/float16 v0.8.4 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect go.opentelemetry.io/otel/metric v1.29.0 // indirect go.opentelemetry.io/otel/sdk v1.29.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect + golang.org/x/crypto v0.33.0 // indirect golang.org/x/mod v0.23.0 // indirect golang.org/x/net v0.35.0 // indirect golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sys v0.30.0 // indirect + golang.org/x/term v0.29.0 // indirect golang.org/x/text v0.22.0 // indirect + golang.org/x/time v0.7.0 // indirect golang.org/x/tools v0.30.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7 // indirect google.golang.org/grpc v1.68.0-dev // indirect google.golang.org/protobuf v1.36.3 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect + k8s.io/api v0.32.1 // indirect + k8s.io/apiextensions-apiserver v0.32.1 // indirect + k8s.io/apimachinery v0.32.1 // indirect + k8s.io/client-go v0.32.1 // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect + sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) require ( diff --git a/go.sum b/go.sum index 91c7b632..f20d3c55 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,17 @@ cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= +github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= +github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0= +github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= +github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs= +github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0= github.com/PaesslerAG/gval v1.2.4 h1:rhX7MpjJlcxYwL2eTTYIOBUyEKZ+A96T9vQySWkVUiU= github.com/PaesslerAG/gval v1.2.4/go.mod h1:XRFLwvmkTEdYziLdaCeCa5ImcGVrfQbeNUbVR+C6xac= github.com/PaesslerAG/jsonpath v0.1.0 h1:gADYeifvlqK3R3i2cR5B4DGgxLXIPb3TRTH1mGi0jPI= @@ -25,21 +37,32 @@ github.com/codingconcepts/env v0.0.0-20200821220118-a8fbf8d84482/go.mod h1:TM9ug github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.3.6 h1:4d9N5ykBnSp5Xn2JkhocYDkOpURL/18CYMpo6xB9uWM= +github.com/cyphar/filepath-securejoin v0.3.6/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/devfile/alizer v1.6.1 h1:5G0SHFAcFNTwqsaZu5pir2pBJ04hg/F6d/lfQeAs7YY= github.com/devfile/alizer v1.6.1/go.mod h1:RHcz/nRPIlHNIfG3wTmVLrS8IyM+4CB841S/WKFXDiw= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/fabianvf/windup-rulesets-yaml v0.5.3 h1:CiOdTNIggt2NHwSpuCAJWKO5/X7t+Hq9+qXZ7lziGK8= github.com/fabianvf/windup-rulesets-yaml v0.5.3/go.mod h1:rv/Pzx5zMXKHbexpa8AeAI91Cb8Mw532jmx4HkgjGOc= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/gciavarrini/cf-application-discovery v0.0.0-20250212150920-7c54782f247e h1:oHUJXglRsqYck0nPwUFp/OElqPWspHQRr8OgEG+yiSo= github.com/gciavarrini/cf-application-discovery v0.0.0-20250212150920-7c54782f247e/go.mod h1:GOEaqmYOZJhDMUOv3iKClVPzTYK8Md4R9gUErX0CD/8= github.com/getkin/kin-openapi v0.108.0 h1:EYf0GtsKa4hQNIlplGS+Au7NEfGQ1F7MoHD2kcVevPQ= github.com/getkin/kin-openapi v0.108.0/go.mod h1:QtwUNt0PAAgIIBEvFWYfB7dfngxtAaqCX1zYHMZDeK8= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -48,13 +71,19 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= @@ -64,10 +93,16 @@ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4er github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20250208200701-d0013a598941 h1:43XjGa6toxLpeksjcxs1jIoIyr+vUfOqY2c6HB4bpoc= github.com/google/pprof v0.0.0-20250208200701-d0013a598941/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -75,6 +110,8 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI= +github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -86,6 +123,8 @@ github.com/jhump/protoreflect v1.16.0 h1:54fZg+49widqXYQ0b+usAFHbMkBGR4PpXrsHc8+ github.com/jhump/protoreflect v1.16.0/go.mod h1:oYPd7nPvcBw/5wlDfm/AVmU9zH9BgqGCI469pGxfj/8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konveyor/analyzer-lsp v0.6.0-alpha.2.0.20250115183201-2f9344a41b10 h1:0x1Mk5jPommKpN2NKpkQxn5FJLAfohSjLalsRijx19I= @@ -93,6 +132,7 @@ github.com/konveyor/analyzer-lsp v0.6.0-alpha.2.0.20250115183201-2f9344a41b10/go github.com/konveyor/analyzer-lsp/external-providers/java-external-provider v0.0.0-20250129143638-35bb8a364cdb h1:mWDDNdukmdowsS8/1XBpjfisqH/a+teyo2FpSxhZJM8= github.com/konveyor/analyzer-lsp/external-providers/java-external-provider v0.0.0-20250129143638-35bb8a364cdb/go.mod h1:9hR5THTSExZSAPz8uDEVgm2gm47F8gqFj8cU9K/d32M= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -103,10 +143,21 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/buildkit v0.14.1 h1:2epLCZTkn4CikdImtsLtIa++7DzCimrrZCT1sway+oI= github.com/moby/buildkit v0.14.1/go.mod h1:1XssG7cAqv5Bz1xcGMxJL123iCv5TYN4Z/qf647gfuk= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU= @@ -132,6 +183,8 @@ github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -159,6 +212,15 @@ github.com/swaggest/refl v1.3.0 h1:PEUWIku+ZznYfsoyheF97ypSduvMApYyGkYF3nabS0I= github.com/swaggest/refl v1.3.0/go.mod h1:3Ujvbmh1pfSbDYjC6JGG7nMgPvpG0ehQL4iNonnLNbg= github.com/vifraa/gopom v1.0.0 h1:L9XlKbyvid8PAIK8nr0lihMApJQg/12OBvMA28BcWh0= github.com/vifraa/gopom v1.0.0/go.mod h1:oPa1dcrGrtlO37WPDBm5SqHAT+wTgF8An1Q71Z6Vv4o= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= @@ -188,6 +250,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= +golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -227,12 +291,16 @@ golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= +golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -256,6 +324,10 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -265,3 +337,27 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +helm.sh/helm/v3 v3.17.1 h1:gzVoAD+qVuoJU6KDMSAeo0xRJ6N1znRxz3wyuXRmJDk= +helm.sh/helm/v3 v3.17.1/go.mod h1:nvreuhuR+j78NkQcLC3TYoprCKStLyw5P4T7E5itv2w= +k8s.io/api v0.32.1 h1:f562zw9cy+GvXzXf0CKlVQ7yHJVYzLfL6JAS4kOAaOc= +k8s.io/api v0.32.1/go.mod h1:/Yi/BqkuueW1BgpoePYBRdDYfjPF5sgTr5+YqDZra5k= +k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw= +k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto= +k8s.io/apimachinery v0.32.1 h1:683ENpaCBjma4CYqsmZyhEzrGz6cjn1MY/X2jB2hkZs= +k8s.io/apimachinery v0.32.1/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU= +k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg= +k8s.io/helm v2.17.0+incompatible h1:Bpn6o1wKLYqKM3+Osh8e+1/K2g/GsQJ4F4yNF2+deao= +k8s.io/helm v2.17.0+incompatible/go.mod h1:LZzlS4LQBHfciFOurYBFkCMTaZ0D1l+p0teMg7TSULI= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y= +k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= +k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= +sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA= +sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/test-data/asset_generation/helm/discover.yaml b/test-data/asset_generation/helm/discover.yaml new file mode 100644 index 00000000..e79b2bc9 --- /dev/null +++ b/test-data/asset_generation/helm/discover.yaml @@ -0,0 +1,2 @@ +foo: + bar: hello world! diff --git a/test-data/asset_generation/helm/k8s_only/.helmignore b/test-data/asset_generation/helm/k8s_only/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/test-data/asset_generation/helm/k8s_only/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/test-data/asset_generation/helm/k8s_only/Chart.yaml b/test-data/asset_generation/helm/k8s_only/Chart.yaml new file mode 100644 index 00000000..5f57f5d7 --- /dev/null +++ b/test-data/asset_generation/helm/k8s_only/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: k8s_only +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/test-data/asset_generation/helm/k8s_only/templates/configmap.yaml b/test-data/asset_generation/helm/k8s_only/templates/configmap.yaml new file mode 100644 index 00000000..b685e0bc --- /dev/null +++ b/test-data/asset_generation/helm/k8s_only/templates/configmap.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +data: + chartName: {{ .Values.foo.bar }} + {{- if .Values.extra }} + extraValue: {{ .Values.extra.value }} + {{- end}} +kind: ConfigMap +metadata: + name: sample diff --git a/test-data/asset_generation/helm/mixed_templates/.helmignore b/test-data/asset_generation/helm/mixed_templates/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/test-data/asset_generation/helm/mixed_templates/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/test-data/asset_generation/helm/mixed_templates/Chart.yaml b/test-data/asset_generation/helm/mixed_templates/Chart.yaml new file mode 100644 index 00000000..890c9a6a --- /dev/null +++ b/test-data/asset_generation/helm/mixed_templates/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: mixed_templates +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" diff --git a/test-data/asset_generation/helm/mixed_templates/files/konveyor/Dockerfile b/test-data/asset_generation/helm/mixed_templates/files/konveyor/Dockerfile new file mode 100644 index 00000000..5052f2a7 --- /dev/null +++ b/test-data/asset_generation/helm/mixed_templates/files/konveyor/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3 + +RUN echo {{ .Values.foo.bar }} +{{- if .Values.extra }} +RUN echo {{ .Values.extra.value }} +{{ end }} \ No newline at end of file diff --git a/test-data/asset_generation/helm/mixed_templates/templates/configmap.yaml b/test-data/asset_generation/helm/mixed_templates/templates/configmap.yaml new file mode 100644 index 00000000..b685e0bc --- /dev/null +++ b/test-data/asset_generation/helm/mixed_templates/templates/configmap.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +data: + chartName: {{ .Values.foo.bar }} + {{- if .Values.extra }} + extraValue: {{ .Values.extra.value }} + {{- end}} +kind: ConfigMap +metadata: + name: sample