diff --git a/Makefile b/Makefile index e50ebf4450b..496b63686ae 100644 --- a/Makefile +++ b/Makefile @@ -124,7 +124,7 @@ check-license: $(MYGOBIN)/addlicense .PHONY: lint lint: $(MYGOBIN)/golangci-lint $(MYGOBIN)/goimports $(builtinplugins) - ./hack/for-each-module.sh "make lint" + ./hack/for-each-module.sh "make lint" 46 .PHONY: apidiff apidiff: go-apidiff ## Run the go-apidiff to verify any API differences compared with origin/master @@ -142,11 +142,11 @@ test-unit-all: \ # This target is used by our Github Actions CI to run unit tests for all non-plugin modules in multiple GOOS environments. .PHONY: test-unit-non-plugin test-unit-non-plugin: - ./hack/for-each-module.sh "make test" "./plugin/*" 16 + ./hack/for-each-module.sh "make test" "./plugin/*" 17 .PHONY: build-non-plugin-all build-non-plugin-all: - ./hack/for-each-module.sh "make build" "./plugin/*" 16 + ./hack/for-each-module.sh "make build" "./plugin/*" 17 .PHONY: test-unit-kustomize-plugins test-unit-kustomize-plugins: diff --git a/api/krusty/fnplugin_test.go b/api/krusty/fnplugin_test.go index 7d86bccdf02..0b389da1613 100644 --- a/api/krusty/fnplugin_test.go +++ b/api/krusty/fnplugin_test.go @@ -679,7 +679,6 @@ metadata: } func TestFnContainerEnvVars(t *testing.T) { - t.Skip("it may failed by arm architecture") skipIfNoDocker(t) th := kusttest_test.MakeHarness(t) o := th.MakeOptionsPluginsEnabled() @@ -695,22 +694,28 @@ generators: apiVersion: v1 kind: ConfigMap metadata: - name: demo + name: e2econtainerenvgenerator annotations: config.kubernetes.io/function: | container: - image: quay.io/aodinokov/kpt-templater:0.0.1 + image: gcr.io/kustomize-functions/e2econtainerenvgenerator envs: - TESTTEMPLATE=value -data: - template: | - apiVersion: v1 - kind: ConfigMap - metadata: - name: env - data: - value: '{{ env "TESTTEMPLATE" }}' +template: | + apiVersion: v1 + kind: ConfigMap + metadata: + name: env + data: + value: %q `))) + build := exec.Command("docker", "build", ".", + "-f", "./cmd/config/internal/commands/e2e/e2econtainerenvgenerator/Dockerfile", + "-t", "gcr.io/kustomize-functions/e2econtainerenvgenerator", + ) + build.Dir = "../../" // Repo root + assert.NoError(t, build.Run()) + m, err := b.Run( fSys, tmpDir.String()) diff --git a/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/Dockerfile b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/Dockerfile new file mode 100644 index 00000000000..ea7b9a6c1af --- /dev/null +++ b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/Dockerfile @@ -0,0 +1,18 @@ +# Copyright 2019 The Kubernetes Authors. +# SPDX-License-Identifier: Apache-2.0 + +FROM golang:1.20-bullseye +ENV CGO_ENABLED=0 +WORKDIR /go/src/ + +# download modules +# COPY go.mod go.mod +# COPY go.sum go.sum +# RUN go mod download + +COPY . . +RUN go build -v -o /usr/local/bin/function ./cmd/config/internal/commands/e2e/e2econtainerenvgenerator + +FROM alpine:latest +COPY --from=0 /usr/local/bin/function /usr/local/bin/function +CMD ["function"] diff --git a/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/Makefile b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/Makefile new file mode 100644 index 00000000000..39d23522f77 --- /dev/null +++ b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/Makefile @@ -0,0 +1,9 @@ +# Copyright 2019 The Kubernetes Authors. +# SPDX-License-Identifier: Apache-2.0 + +include ../../../../../../Makefile-modules.mk + +.PHONY: image +image: + docker build . -t gcr.io/kustomize-functions/e2econtainerenvgenerator + docker push gcr.io/kustomize-functions/e2econtainerenvgenerator diff --git a/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/doc.go b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/doc.go new file mode 100644 index 00000000000..0dc140f7d64 --- /dev/null +++ b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/doc.go @@ -0,0 +1,6 @@ +// Copyright 2019 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 + +// Package main contains a function to be used for e2e testing. +// See https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md +package main diff --git a/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/go.mod b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/go.mod new file mode 100644 index 00000000000..2b9ca027df5 --- /dev/null +++ b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/go.mod @@ -0,0 +1,34 @@ +module sigs.k8s.io/kustomize/cmd/config/internal/commands/e2e/e2econtainerenvgenerator + +go 1.20 + +require sigs.k8s.io/kustomize/kyaml v0.14.2 + +require ( + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-errors/errors v1.4.2 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect + github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/xlab/treeprint v1.2.0 // indirect + golang.org/x/sys v0.8.0 // indirect + google.golang.org/protobuf v1.30.0 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961 // indirect + k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect +) + +replace sigs.k8s.io/kustomize/kyaml => ../../../../../../kyaml diff --git a/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/go.sum b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/go.sum new file mode 100644 index 00000000000..d14e2c41d12 --- /dev/null +++ b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/go.sum @@ -0,0 +1,82 @@ +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +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.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +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.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +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/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +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/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= +github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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= +k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961 h1:pqRVJGQJz6oeZby8qmPKXYIBjyrcv7EHCe/33UkZMYA= +k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961/go.mod h1:l8HTwL5fqnlns4jOveW1L75eo7R9KFHxiE0bsPGy428= +k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= +k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/main.go b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/main.go new file mode 100644 index 00000000000..54f336608bb --- /dev/null +++ b/cmd/config/internal/commands/e2e/e2econtainerenvgenerator/main.go @@ -0,0 +1,38 @@ +// Copyright 2019 The Kubernetes Authors. +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "fmt" + "os" + + "sigs.k8s.io/kustomize/kyaml/fn/framework" + "sigs.k8s.io/kustomize/kyaml/fn/framework/command" + "sigs.k8s.io/kustomize/kyaml/kio" + "sigs.k8s.io/kustomize/kyaml/yaml" +) + +func main() { + api := new(struct { + Template string `json:"template" yaml:"template"` + }) + // create the template + templateFn := func(items []*yaml.RNode) ([]*yaml.RNode, error) { + generated := []*yaml.RNode{} + for range items { + templateResult, err := yaml.Parse(fmt.Sprintf(api.Template, os.Getenv("TESTTEMPLATE"))) + if err != nil { + return nil, fmt.Errorf("failed to parse: %w", err) + } + generated = append(generated, templateResult) + } + return generated, nil + } + p := framework.SimpleProcessor{Config: api, Filter: kio.FilterFunc(templateFn)} + cmd := command.Build(p, command.StandaloneDisabled, false) + command.AddGenerateDockerfile(cmd) + if err := cmd.Execute(); err != nil { + os.Exit(1) + } +} diff --git a/go.work b/go.work index 510601ed368..8aa9261beb6 100644 --- a/go.work +++ b/go.work @@ -4,6 +4,7 @@ use ( ./api ./cmd/config ./cmd/config/internal/commands/e2e/e2econtainerconfig + ./cmd/config/internal/commands/e2e/e2econtainerenvgenerator ./cmd/depprobcheck ./cmd/gorepomod ./cmd/k8scopy diff --git a/hack/for-each-module.sh b/hack/for-each-module.sh index 6017d890b8e..2ebf22f1121 100755 --- a/hack/for-each-module.sh +++ b/hack/for-each-module.sh @@ -15,7 +15,7 @@ fi cmd=$1 skip_pattern="${2-}" -expected_module_count=${3:-45} +expected_module_count=${3:-46} seen=() # Hack scripts must be run from the root of the repository. @@ -25,11 +25,11 @@ export KUSTOMIZE_ROOT # verify all modules pass validation for i in $(find . -name go.mod -not -path "./site/*" -not -path "$skip_pattern"); do pushd . - cd $(dirname $i); + cd $(dirname "$i"); set +x dir=$(pwd) - module="${dir#$KUSTOMIZE_ROOT}" + module="${dir#"$KUSTOMIZE_ROOT"}" echo -e "\n----------------------------------------------------------" echo "Running command in $module" echo -e "----------------------------------------------------------" diff --git a/kyaml/fn/framework/example_test.go b/kyaml/fn/framework/example_test.go index 6c0766b5da4..2030bc3132a 100644 --- a/kyaml/fn/framework/example_test.go +++ b/kyaml/fn/framework/example_test.go @@ -479,7 +479,7 @@ kind: ResourceList items: - kind: Deployment apiVersion: apps/v1 - metadata: + metadata: name: custom spec: replicas: 6 @@ -555,7 +555,7 @@ items: kind: Deployment metadata: name: foo - namespace: default + namespace: default - apiVersion: apps/v1 kind: StatefulSet metadata: @@ -1034,7 +1034,7 @@ func ExampleVersionedAPIProcessor() { apiVersion: config.kubernetes.io/v1 kind: ResourceList functionConfig: - apiVersion: example.com/v1alpha1 + apiVersion: example.com/v1alpha1 kind: JavaSpringBoot metadata: name: my-app