cert-manager / helm-tool

helm-tool is an internal cert-manager utility (can be broken or removed) which generates Helm docs, schema files and performs linting.
Apache License 2.0
4 stars 3 forks source link

generate-helm-schema result is not ordered #40

Open M0NsTeRRR opened 2 months ago

M0NsTeRRR commented 2 months ago

Following https://github.com/cert-manager/trust-manager/pull/337

I've run make generate-helm-schema, and the command properly generated the schema, but the fields were not ordered, and the linter requested a correction. Running it again didn't fix the issue, so I fixed it manually.

https://storage.googleapis.com/cert-manager-prow-artifacts/pr-logs/pull/cert-manager_trust-manager/337/pull-trust-manager-verify/1812918236807696384/build-log.txt

full jobs logs ## Local cache [restore]: found latest cache directory. sending incremental file list delta-transmission disabled for local transfer or --whole-file ./ gateway-api-v0.6.2.yaml gateway-api-v1.0.0.yaml pebble-ba5f81dd80fa870cbc19326f2d5a46f45f0b5ee3.tar.gz containers/ containers/amd64/ containers/amd64/docker.io/ containers/amd64/docker.io/eafxx/ containers/amd64/docker.io/eafxx/bind+latest-9f74179f@sha256+0b8c766f5bedbcbe559c7970c8e923aa0c4ca771e62fcf8dba64ffab980c9a51.tar containers/amd64/docker.io/eafxx/bind+latest-ccf145d3@sha256+b6ea4da6cb689985a6729f20a1a2775b9211bdaebd2c956f22871624d4925db2.tar containers/amd64/docker.io/hashicorp/ containers/amd64/docker.io/hashicorp/vault+1.13.1@sha256+46b978105f46fa5c28851b1ea679f74c2ecbd24a6f92e6c7611c558e44f3baab.tar containers/amd64/docker.io/hashicorp/vault+1.14.1@sha256+436d056e8e2a96c7356720069c29229970466f4f686886289dcc94dfa21d3155.tar containers/amd64/docker.io/kindest/ containers/amd64/docker.io/kindest/node+v1.26.6@sha256+6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb.tar containers/amd64/docker.io/kindest/node+v1.29.0@sha256+eaa1450915475849a73a9227b8f201df25e55e268e5d619312131292e324d570.tar containers/amd64/ghcr.io/ containers/amd64/ghcr.io/cert-manager/ containers/amd64/ghcr.io/cert-manager/sample-external-issuer/ containers/amd64/ghcr.io/cert-manager/sample-external-issuer/controller+v0.3.0@sha256+6f7c87979b1e3bd92dc3ab54d037f80628547d7b58a8cb2b3bfa06c006b1ed9d.tar containers/amd64/ghcr.io/cert-manager/sample-external-issuer/controller+v0.4.0@sha256+964b378fe0dda7fc38ce3f211c3b24c780e44cef13c39d3206de985bad67f294.tar containers/amd64/ghcr.io/projectcontour/ containers/amd64/ghcr.io/projectcontour/contour+v1.24.1@sha256+39a804ce4b896de168915ae41358932c219443fd4ceffe37296a63f9adef0597.tar containers/amd64/ghcr.io/projectcontour/contour+v1.25.2@sha256+1570f04e96fb5e0ad71c2de61fee71c8d55b2fe5b7c827ce65e81bf7cc99bcbd.tar containers/amd64/registry.k8s.io/ containers/amd64/registry.k8s.io/ingress-nginx/ containers/amd64/registry.k8s.io/ingress-nginx/controller+v1.1.0@sha256+7464dc90abfaa084204176bcc0728f182b0611849395787143f6854dc6c38c85.tar containers/amd64/registry.k8s.io/ingress-nginx/controller+v1.9.4@sha256+0115d7e01987c13e1be90b09c223c3e0d8e9a92e97c0421e712ad3577e2d78e5.tar tools/ tools/crane@v0.11.0_linux_amd64 tools/crane@v0.16.1_linux_amd64 tools/ginkgo@v2.13.0_linux_amd64 tools/ginkgo@v2.9.5_linux_amd64 tools/go@1.21.11_linux_amd64.tar.gz tools/helm@v3.11.2_linux_amd64 tools/helm@v3.12.3_linux_amd64 tools/kind@v0.20.0_linux_amd64 tools/kubectl@v1.27.2_linux_amd64 tools/kubectl@v1.28.1_linux_amd64 tools/yq@v4.27.5_linux_amd64 tools/yq@v4.35.1_linux_amd64 total: matches=0 hash_hits=0 false_alarms=0 data=1857277561 sent 1,857,734,534 bytes received 683 bytes 337,770,039.45 bytes/sec total size is 1,857,277,561 speedup is 1.00 ## Local cache [restore]: provisioned /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/downloaded ########################################### ############### Start test ################ ########################################### ### JOB_NAME: pull-trust-manager-verify ### JOB_TYPE: presubmit ### PROW_JOB_ID: cb965b78-403f-4c81-8768-0a65dc01eaf1 ### REPO_OWNER: cert-manager ### REPO_NAME: trust-manager ### PULL_REFS: main:ef5428c07feaf8a2fdb5b79dc8d945beb22fdb1d,337:51170eee7ec5aec8915e650223fe99e6b3337bcd ### Command: make vendor-go verify ########################################### ### LOCAL_CACHE_ENABLED: true ### DOCKER_IN_DOCKER_ENABLED: false ########################################### mkdir -p _bin/scratch [info]: downloaded /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/downloaded/tools/go@1.22.5_linux_amd64.tar.gz [info]: downloaded /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/go_vendor/go@1.22.5_linux_amd64/goroot go: downloading github.com/cert-manager/boilersuite v0.1.0 [info]: downloaded /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/downloaded/tools/boilersuite@v0.1.0_linux_amd64 /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/tools/boilersuite . go: downloading github.com/princjef/gomarkdoc v1.1.0 go: downloading github.com/sergi/go-diff v1.3.1 go: downloading github.com/spf13/cobra v1.1.3 go: downloading github.com/princjef/termdiff v0.1.0 go: downloading github.com/spf13/viper v1.7.1 go: downloading github.com/go-git/go-git/v5 v5.3.0 go: downloading github.com/sirupsen/logrus v1.8.1 go: downloading github.com/x-cray/logrus-prefixed-formatter v0.5.2 go: downloading mvdan.cc/xurls/v2 v2.2.0 go: downloading github.com/logrusorgru/aurora/v4 v4.0.0 go: downloading golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a go: downloading github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d go: downloading github.com/spf13/afero v1.6.0 go: downloading github.com/magiconair/properties v1.8.5 go: downloading github.com/pelletier/go-toml v1.9.1 go: downloading github.com/mitchellh/mapstructure v1.4.1 go: downloading github.com/fsnotify/fsnotify v1.4.9 go: downloading github.com/spf13/cast v1.3.1 go: downloading github.com/spf13/jwalterweatherman v1.1.0 go: downloading github.com/subosito/gotenv v1.2.0 go: downloading golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 go: downloading golang.org/x/text v0.3.6 go: downloading github.com/mattn/go-colorable v0.1.8 go: downloading github.com/mattn/go-isatty v0.0.12 go: downloading github.com/go-git/go-billy/v5 v5.3.1 go: downloading github.com/emirpasic/gods v1.12.0 go: downloading github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 go: downloading github.com/go-git/gcfg v1.5.0 go: downloading github.com/kevinburke/ssh_config v1.1.0 go: downloading github.com/xanzy/ssh-agent v0.3.0 go: downloading golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 go: downloading golang.org/x/term v0.0.0-20210503060354-a79de5458b56 go: downloading gopkg.in/warnings.v0 v0.1.2 [info]: downloaded /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/downloaded/tools/gomarkdoc@v1.1.0_linux_amd64 /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/tools/gomarkdoc \ --check \ --format github --repository.url "https://github.com/cert-manager/trust-manager" --repository.default-branch main --repository.path / \ --output docs/api/api.md \ github.com/cert-manager/trust-manager/pkg/apis/trust/v1alpha1 \ || (echo "docs are not up to date; run 'make generate' and commit the result" && exit 1) make/_shared/generate-verify//util/verify.sh make vendor-go generate-base make[1]: Entering directory '/tmp/verify.sh.hEID914v' mkdir -p _bin/scratch cp -r make/_shared/repository-base//base//. ./ cp -r make/_shared/repository-base//base-dependabot//. ./ make[1]: Leaving directory '/tmp/verify.sh.hEID914v' make/_shared/generate-verify//util/verify.sh make vendor-go generate-crds make[1]: Entering directory '/tmp/verify.sh.wbgtEADa' mkdir -p _bin/scratch go: downloading sigs.k8s.io/controller-tools v0.15.0 go: downloading golang.org/x/tools v0.20.0 go: downloading k8s.io/apiextensions-apiserver v0.30.0 go: downloading github.com/fatih/color v1.16.0 go: downloading k8s.io/apimachinery v0.30.0 go: downloading k8s.io/api v0.30.0 go: downloading github.com/gobuffalo/flect v1.0.2 go: downloading github.com/mattn/go-isatty v0.0.20 go: downloading golang.org/x/sys v0.19.0 go: downloading k8s.io/utils v0.0.0-20230726121419-3b25d923346b go: downloading k8s.io/klog/v2 v2.120.1 go: downloading golang.org/x/net v0.24.0 go: downloading golang.org/x/text v0.14.0 go: downloading golang.org/x/mod v0.17.0 [info]: downloaded /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/downloaded/tools/controller-gen@v0.15.0_linux_amd64 [info]: downloaded /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/downloaded/tools/yq@v4.43.1_linux_amd64 rm -rf _bin/scratch/crds mkdir -p _bin/scratch/crds /tmp/verify.sh.wbgtEADa/_bin/tools/controller-gen crd \ paths=./cmd/... paths=./deploy/... paths=./design/... paths=./docs/... paths=./pkg/... paths=./test/... paths=./trust-packages/... \ output:crd:artifacts:config=_bin/scratch/crds echo "Updating CRDs with helm templating, writing to deploy/charts/trust-manager/templates" Updating CRDs with helm templating, writing to deploy/charts/trust-manager/templates make[1]: Leaving directory '/tmp/verify.sh.wbgtEADa' make/_shared/generate-verify//util/verify.sh make vendor-go generate-deepcopy make[1]: Entering directory '/tmp/verify.sh.V9Jpu30p' mkdir -p _bin/scratch /tmp/verify.sh.V9Jpu30p/_bin/tools/controller-gen object:headerFile=make/_shared/boilerplate//template/boilerplate.go.txt paths=./cmd/... paths=./deploy/... paths=./design/... paths=./docs/... paths=./pkg/... paths=./test/... paths=./trust-packages/... make[1]: Leaving directory '/tmp/verify.sh.V9Jpu30p' make/_shared/generate-verify//util/verify.sh make vendor-go generate-go-mod-tidy make[1]: Entering directory '/tmp/verify.sh.6ZWAqkSg' mkdir -p _bin/scratch Running 'go mod tidy' in directory '.' go: downloading github.com/stretchr/testify v1.9.0 go: downloading github.com/inconshreveable/mousetrap v1.1.0 go: downloading github.com/go-task/slim-sprig/v3 v3.0.0 go: downloading golang.org/x/tools v0.21.0 go: downloading github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 go: downloading github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 go: downloading github.com/pmezard/go-difflib v1.0.0 go: downloading gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c go: downloading github.com/creack/pty v1.1.18 go: downloading github.com/sergi/go-diff v1.1.0 go: downloading github.com/stretchr/objx v0.5.2 go: downloading go.uber.org/goleak v1.3.0 go: downloading github.com/rogpeppe/go-internal v1.10.0 Running 'go mod tidy' in directory './trust-packages/debian' make[1]: Leaving directory '/tmp/verify.sh.6ZWAqkSg' make/_shared/generate-verify//util/verify.sh make vendor-go generate-golangci-lint-config make[1]: Entering directory '/tmp/verify.sh.LwoOt6e7' mkdir -p _bin/scratch cp .golangci.yaml _bin/scratch/golangci-lint.yaml.tmp /tmp/verify.sh.LwoOt6e7/_bin/tools/yq -i 'del(.linters.enable)' _bin/scratch/golangci-lint.yaml.tmp /tmp/verify.sh.LwoOt6e7/_bin/tools/yq eval-all -i '. as $item ireduce ({}; . * $item)' _bin/scratch/golangci-lint.yaml.tmp make/_shared/go//.golangci.override.yaml /tmp/verify.sh.LwoOt6e7/_bin/tools/yq -i '(.. | select(tag == "!!str")) |= sub("{{REPO-NAME}}", "github.com/cert-manager/trust-manager")' _bin/scratch/golangci-lint.yaml.tmp mv _bin/scratch/golangci-lint.yaml.tmp .golangci.yaml make[1]: Leaving directory '/tmp/verify.sh.LwoOt6e7' make/_shared/generate-verify//util/verify.sh make vendor-go generate-govulncheck make[1]: Entering directory '/tmp/verify.sh.sldf6Vd0' mkdir -p _bin/scratch cp -r make/_shared/go//base//. ./ make[1]: Leaving directory '/tmp/verify.sh.sldf6Vd0' make/_shared/generate-verify//util/verify.sh make vendor-go generate-helm-docs make[1]: Entering directory '/tmp/verify.sh.OlE8d0A8' mkdir -p _bin/scratch go: downloading github.com/cert-manager/helm-tool v0.5.1 go: downloading k8s.io/kube-openapi v0.0.0-20240105020646-a37d4de58910 go: downloading github.com/google/uuid v1.5.0 go: downloading golang.org/x/crypto v0.18.0 go: downloading github.com/shopspring/decimal v1.2.0 go: downloading google.golang.org/protobuf v1.27.1 go: downloading github.com/golang/protobuf v1.5.2 [info]: downloaded /home/prow/go/src/github.com/cert-manager/trust-manager/_bin/downloaded/tools/helm-tool@v0.5.1_linux_amd64 /tmp/verify.sh.OlE8d0A8/_bin/tools/helm-tool inject -i deploy/charts/trust-manager/values.yaml -o deploy/charts/trust-manager/README.md --header-search "^" --footer-search "^" make[1]: Leaving directory '/tmp/verify.sh.OlE8d0A8' diff '--exclude=.git' '--exclude=_bin' --new-file --unified --show-c-function --recursive /home/prow/go/src/github.com/cert-manager/trust-manager/deploy/charts/trust-manager/README.md /tmp/verify.sh.OlE8d0A8/deploy/charts/trust-manager/README.md --- /home/prow/go/src/github.com/cert-manager/trust-manager/deploy/charts/trust-manager/README.md 2024-07-15 18:32:47.411589621 +0000 +++ /tmp/verify.sh.OlE8d0A8/deploy/charts/trust-manager/README.md 2024-07-15 18:33:44.932019744 +0000 @@ -383,6 +383,20 @@ Timeout of webhook HTTP request. > ``` The type of Kubernetes Service used by the Webhook. +#### **app.webhook.service.ipFamilyPolicy** ~ `string` +> Default value: +> ```yaml +> "" +> ``` + +Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) +#### **app.webhook.service.ipFamilies** ~ `array` +> Default value: +> ```yaml +> [] +> ``` + +Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. #### **app.webhook.service.nodePort** ~ `number` The nodePort set on the Service used by the webhook. @@ -438,6 +452,20 @@ Create a Service resource to expose the > ``` The Service type to expose metrics. +#### **app.metrics.service.ipFamilyPolicy** ~ `string` +> Default value: +> ```yaml +> "" +> ``` + +Set the ip family policy to configure dual-stack see [Configure dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) +#### **app.metrics.service.ipFamilies** ~ `array` +> Default value: +> ```yaml +> [] +> ``` + +Sets the families that should be supported and the order in which they should be applied to ClusterIP as well. Can be IPv4 and/or IPv6. #### **app.metrics.service.servicemonitor.enabled** ~ `bool` > Default value: > ```yaml Project '/home/prow/go/src/github.com/cert-manager/trust-manager' is out of date. Please run 'make vendor-go generate-helm-docs' make: *** [make/_shared/generate-verify/02_mod.mk:26: verify-generate-helm-docs] Error 1 ########################################### ################ End test ################# ########################################### ## EXIT_VALUE: 2 ## Elapsed Time: 49 seconds ########################################### ## Local cache [update]: Job failed, not updating cache.
inteon commented 2 weeks ago

Unfortunately, I haven't been able to replicate this issue. On my machine, CI, etc. the Helm schema always seems to be ordered correctly.