mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
Merge pull request #5963 from koba1t/chore/introduce_go_tool_directive
introduce go tool directive
This commit is contained in:
@@ -2,6 +2,8 @@ module sigs.k8s.io/kustomize/cmd/gorepomod
|
||||
|
||||
go 1.24.0
|
||||
|
||||
tool sigs.k8s.io/kustomize/cmd/gorepomod
|
||||
|
||||
require (
|
||||
github.com/spf13/viper v1.20.0
|
||||
github.com/stretchr/testify v1.10.0
|
||||
|
||||
@@ -2,6 +2,8 @@ module sigs.k8s.io/kustomize/cmd/k8scopy
|
||||
|
||||
go 1.24.0
|
||||
|
||||
tool sigs.k8s.io/kustomize/cmd/k8scopy
|
||||
|
||||
require (
|
||||
github.com/stretchr/testify v1.10.0
|
||||
sigs.k8s.io/yaml v1.5.0
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
module sigs.k8s.io/kustomize/cmd/mdtogo
|
||||
|
||||
go 1.24.0
|
||||
|
||||
tool sigs.k8s.io/kustomize/cmd/mdtogo
|
||||
|
||||
@@ -2,6 +2,8 @@ module sigs.k8s.io/kustomize/cmd/pluginator/v2
|
||||
|
||||
go 1.24.0
|
||||
|
||||
tool sigs.k8s.io/kustomize/cmd/pluginator/v2
|
||||
|
||||
require (
|
||||
github.com/spf13/cobra v1.9.1
|
||||
github.com/stretchr/testify v1.10.0
|
||||
|
||||
@@ -17,7 +17,7 @@ require (
|
||||
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/google/gnostic-models v0.6.9 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
|
||||
@@ -36,8 +36,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
|
||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
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/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
|
||||
github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
|
||||
github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw=
|
||||
|
||||
@@ -10,7 +10,7 @@ require (
|
||||
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/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/google/gnostic-models v0.6.9 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
|
||||
@@ -129,8 +129,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
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/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
|
||||
|
||||
@@ -10,7 +10,7 @@ require (
|
||||
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/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/google/gnostic-models v0.6.9 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
|
||||
@@ -129,8 +129,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
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/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
|
||||
|
||||
@@ -14,7 +14,7 @@ require (
|
||||
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/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/gnostic-models v0.6.9 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
|
||||
@@ -153,8 +153,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
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/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
|
||||
|
||||
@@ -10,7 +10,7 @@ require (
|
||||
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/golang/protobuf v1.5.3 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/gnostic-models v0.6.9 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
|
||||
@@ -128,8 +128,8 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
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/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54=
|
||||
|
||||
56
hack/go.mod
56
hack/go.mod
@@ -2,20 +2,35 @@ module sigs.k8s.io/kustomize/hack
|
||||
|
||||
go 1.24.0
|
||||
|
||||
require (
|
||||
github.com/campoy/embedmd v1.0.0
|
||||
github.com/cli/cli v1.2.1
|
||||
github.com/go-bindata/go-bindata/v3 v3.1.3
|
||||
github.com/gohugoio/hugo v0.120.4
|
||||
github.com/golangci/golangci-lint v1.64.8
|
||||
github.com/google/addlicense v1.1.1
|
||||
github.com/instrumenta/kubeval v0.16.1
|
||||
github.com/joelanford/go-apidiff v0.6.0
|
||||
github.com/monopole/mdrip v1.0.3
|
||||
golang.org/x/tools v0.36.0
|
||||
sigs.k8s.io/controller-tools v0.14.0
|
||||
sigs.k8s.io/kind v0.21.0
|
||||
sigs.k8s.io/kustomize/cmd/mdtogo v0.0.0-20240208073625-b154361c0042
|
||||
tool (
|
||||
// for embeding code and manifest into markdown docs
|
||||
github.com/campoy/embedmd
|
||||
// for creating GitHub PRs & releases
|
||||
github.com/cli/cli/cmd/gh
|
||||
// for bundling non-go files into go binaries
|
||||
github.com/go-bindata/go-bindata/v3/go-bindata
|
||||
// for site serving
|
||||
github.com/gohugoio/hugo
|
||||
// for code linting
|
||||
github.com/golangci/golangci-lint/cmd/golangci-lint
|
||||
// for license file header injection
|
||||
github.com/google/addlicense
|
||||
// for validating k8s manifests
|
||||
github.com/instrumenta/kubeval
|
||||
// for checking Go API compatibility
|
||||
github.com/joelanford/go-apidiff
|
||||
// for testable markdown examples
|
||||
github.com/monopole/mdrip
|
||||
// for code formatting
|
||||
golang.org/x/tools/cmd/goimports
|
||||
// for code generation
|
||||
golang.org/x/tools/cmd/stringer
|
||||
// for generating CRDs
|
||||
sigs.k8s.io/controller-tools/cmd/controller-gen
|
||||
// for local testing
|
||||
sigs.k8s.io/kind
|
||||
// for cobra command help text generation from markdown
|
||||
sigs.k8s.io/kustomize/cmd/mdtogo
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -114,6 +129,7 @@ require (
|
||||
github.com/briandowns/spinner v1.11.1 // indirect
|
||||
github.com/butuzov/ireturn v0.3.1 // indirect
|
||||
github.com/butuzov/mirror v1.3.0 // indirect
|
||||
github.com/campoy/embedmd v1.0.0 // indirect
|
||||
github.com/catenacyber/perfsprint v0.8.2 // indirect
|
||||
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
|
||||
@@ -123,6 +139,7 @@ require (
|
||||
github.com/chavacava/garif v0.1.0 // indirect
|
||||
github.com/ckaznocha/intrange v0.3.0 // indirect
|
||||
github.com/clbanning/mxj/v2 v2.7.0 // indirect
|
||||
github.com/cli/cli v1.2.1 // indirect
|
||||
github.com/cli/safeexec v1.0.1 // indirect
|
||||
github.com/cloudflare/circl v1.6.1 // indirect
|
||||
github.com/cncf/xds/go v0.0.0-20240905190251-b4127c9b8d78 // indirect
|
||||
@@ -153,6 +170,7 @@ require (
|
||||
github.com/getkin/kin-openapi v0.131.0 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/ghostiam/protogetter v0.3.9 // indirect
|
||||
github.com/go-bindata/go-bindata/v3 v3.1.3 // indirect
|
||||
github.com/go-critic/go-critic v0.12.0 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.6.0 // indirect
|
||||
@@ -175,6 +193,7 @@ require (
|
||||
github.com/gofrs/flock v0.12.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/gohugoio/go-i18n/v2 v2.1.3-0.20230805085216-e63c13218d0e // indirect
|
||||
github.com/gohugoio/hugo v0.120.4 // indirect
|
||||
github.com/gohugoio/locales v0.14.0 // indirect
|
||||
github.com/gohugoio/localescompressed v1.0.1 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
|
||||
@@ -184,10 +203,12 @@ require (
|
||||
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
|
||||
github.com/golangci/go-printf-func-name v0.1.0 // indirect
|
||||
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
|
||||
github.com/golangci/golangci-lint v1.64.8 // indirect
|
||||
github.com/golangci/misspell v0.6.0 // indirect
|
||||
github.com/golangci/plugin-module-register v0.1.1 // indirect
|
||||
github.com/golangci/revgrep v0.8.0 // indirect
|
||||
github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect
|
||||
github.com/google/addlicense v1.1.1 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/s2a-go v0.1.9 // indirect
|
||||
@@ -216,12 +237,14 @@ require (
|
||||
github.com/henvic/httpretty v0.0.6 // indirect
|
||||
github.com/hexops/gotextdiff v1.0.3 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/instrumenta/kubeval v0.16.1 // indirect
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/jdkato/prose v1.2.1 // indirect
|
||||
github.com/jgautheron/goconst v1.7.1 // indirect
|
||||
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
|
||||
github.com/jjti/go-spancheck v0.6.4 // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/joelanford/go-apidiff v0.6.0 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/julz/importas v0.2.0 // indirect
|
||||
@@ -265,6 +288,7 @@ require (
|
||||
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/monopole/mdrip v1.0.3 // indirect
|
||||
github.com/moricho/tparallel v0.3.2 // indirect
|
||||
github.com/muesli/reflow v0.1.0 // indirect
|
||||
github.com/muesli/smartcrop v0.3.0 // indirect
|
||||
@@ -385,6 +409,7 @@ require (
|
||||
golang.org/x/term v0.34.0 // indirect
|
||||
golang.org/x/text v0.28.0 // indirect
|
||||
golang.org/x/time v0.10.0 // indirect
|
||||
golang.org/x/tools v0.36.0 // indirect
|
||||
golang.org/x/tools/go/expect v0.1.1-deprecated // indirect
|
||||
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect
|
||||
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
|
||||
@@ -407,7 +432,10 @@ require (
|
||||
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
|
||||
mvdan.cc/gofumpt v0.7.0 // indirect
|
||||
mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect
|
||||
sigs.k8s.io/controller-tools v0.14.0 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/kind v0.21.0 // indirect
|
||||
sigs.k8s.io/kustomize/cmd/mdtogo v0.0.0-20240208073625-b154361c0042 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
|
||||
sigs.k8s.io/yaml v1.5.0 // indirect
|
||||
software.sslmate.com/src/go-pkcs12 v0.2.0 // indirect
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
// Copyright 2022 The Kubernetes Authors.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//go:build tools
|
||||
// +build tools
|
||||
|
||||
// This package imports tools required by build scripts.
|
||||
// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
|
||||
// To update the pinned versions, update `go.mod` or call `go get URL@VERSION“
|
||||
package hack
|
||||
|
||||
import (
|
||||
// for code generation
|
||||
_ "golang.org/x/tools/cmd/stringer"
|
||||
// for code formatting
|
||||
_ "golang.org/x/tools/cmd/goimports"
|
||||
// for code linting
|
||||
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
// for site serving
|
||||
_ "github.com/gohugoio/hugo"
|
||||
// for testable markdown examples
|
||||
_ "github.com/monopole/mdrip"
|
||||
// for cobra command help text generation from markdown
|
||||
_ "sigs.k8s.io/kustomize/cmd/mdtogo"
|
||||
// for license file header injection
|
||||
_ "github.com/google/addlicense"
|
||||
// for local testing
|
||||
_ "sigs.k8s.io/kind"
|
||||
// for embeding code and manifest into markdown docs
|
||||
_ "github.com/campoy/embedmd"
|
||||
// for generating CRDs
|
||||
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
|
||||
// for bundling non-go files into go binaries
|
||||
_ "github.com/go-bindata/go-bindata/v3/go-bindata"
|
||||
// for checking Go API compatibility
|
||||
_ "github.com/joelanford/go-apidiff"
|
||||
// for creating GitHub PRs & releases
|
||||
_ "github.com/cli/cli/cmd/gh"
|
||||
// for validating k8s manifests
|
||||
_ "github.com/instrumenta/kubeval"
|
||||
)
|
||||
@@ -20,13 +20,12 @@ This document describes how to perform a [semver release]
|
||||
of one of the several [Go modules] in this repository.
|
||||
|
||||
In this repo, releasing a module is accomplished by applying
|
||||
a tag to the repo and pushing it upstream. A minor release
|
||||
a tag to the repo and pushing it upstream. A minor release
|
||||
branch is also created as necessary to track patch releases.
|
||||
|
||||
A properly formatted tag (described below) contains
|
||||
the module name and version.
|
||||
A properly formatted tag (described below) contains the module name and version.
|
||||
|
||||
Pushing the tag upstream will trigger [GitHub Actions] to build a release and make it available on the [release page].
|
||||
Pushing the tag upstream will trigger [GitHub Actions] to build a release and make it available on the [release page].
|
||||
[GitHub Actions] reads its instructions from the [`release.yaml`] file in `.github/workflows` directory.
|
||||
|
||||
And, container image contains `kustomize` binary will build [Google Cloud Build] that instructions from [`cloudbuild_kustomize_image.yaml`] file triggered by tags contain `kustomize` and release versions.
|
||||
@@ -41,22 +40,21 @@ for an explanation of the path-like portion of these tags.
|
||||
|
||||
Go's [semver]-compatible version tags take the form `v{major}.{minor}.{patch}`:
|
||||
|
||||
| major | minor | patch |
|
||||
| :---: | :---: | :---: |
|
||||
| API change | enhancements | bug fixes |
|
||||
| major | minor | patch |
|
||||
| :-----------: | :---------------: | :--------------------: |
|
||||
| API change | enhancements | bug fixes |
|
||||
| manual update | maybe auto-update | auto-update encouraged |
|
||||
|
||||
- If there are only bug fixes or refactors, increment `patch` from whatever it is now.
|
||||
- If there are new features, increment `minor`.
|
||||
- If there's an API change (either the Go API or the CLI behavior
|
||||
with respect to CLI arguments and flags), increment `major`.
|
||||
- If there are only bug fixes or refactors, increment `patch` from whatever it is now.
|
||||
- If there are new features, increment `minor`.
|
||||
- If there's an API change (either the Go API or the CLI behavior with respect to CLI arguments and flags), increment `major`.
|
||||
|
||||
## Release sequence
|
||||
|
||||
The dependencies determine the release order:
|
||||
|
||||
| module | depends on |
|
||||
| --- | --- |
|
||||
| module | depends on |
|
||||
| ---------------------------------- | --------------------- |
|
||||
| `sigs.k8s.io/kustomize/kyaml` | no local dependencies |
|
||||
| `sigs.k8s.io/kustomize/cmd/config` | `kyaml`, |
|
||||
| `sigs.k8s.io/kustomize/api` | `kyaml` |
|
||||
@@ -101,12 +99,6 @@ The release scripts expect Kustomize code to be cloned at a path ending in `sigs
|
||||
source releasing/helpers.sh
|
||||
```
|
||||
|
||||
#### Install the release tool
|
||||
|
||||
```
|
||||
( cd cmd/gorepomod; go install . )
|
||||
```
|
||||
|
||||
#### Authenticate to github using [gh](https://github.com/cli/cli) (version [1.8.1](https://github.com/cli/cli/releases/tag/v1.8.1) or higher).
|
||||
|
||||
```
|
||||
@@ -118,8 +110,7 @@ gh auth login
|
||||
#### Establish clean state
|
||||
|
||||
```
|
||||
refreshMaster &&
|
||||
testKustomizeRepo
|
||||
refreshMaster && testKustomizeRepo
|
||||
```
|
||||
|
||||
While you're waiting for the tests, review the commit log:
|
||||
@@ -130,18 +121,18 @@ releasing/compile-changelog.sh kyaml HEAD
|
||||
|
||||
Based on the changes to be included in this release, decide whether a patch, minor or major version bump is needed: [semver review].
|
||||
|
||||
kyaml has no intra-repo deps, so if the tests pass,
|
||||
it can just be released.
|
||||
kyaml has no intra-repo deps, so if the tests pass, it can just be released.
|
||||
|
||||
#### Release it
|
||||
|
||||
The default increment is a new patch version.
|
||||
|
||||
```
|
||||
gorepomod release kyaml [patch|minor|major] --doIt
|
||||
go tool gorepomod release kyaml [patch|minor|major] --doIt
|
||||
```
|
||||
|
||||
Note the version:
|
||||
|
||||
```
|
||||
versionKyaml=v0.10.20 # EDIT THIS!
|
||||
```
|
||||
@@ -149,23 +140,25 @@ versionKyaml=v0.10.20 # EDIT THIS!
|
||||
See the process of the [build history of GitHub Actions job].
|
||||
|
||||
Undraft the release on the [kustomize repo release page]:
|
||||
* Make sure the version number is what you expect.
|
||||
* Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors).
|
||||
* Make sure each commit left in the release notes includes a PR reference.
|
||||
|
||||
- Make sure the version number is what you expect.
|
||||
- Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors).
|
||||
- Make sure each commit left in the release notes includes a PR reference.
|
||||
|
||||
## Release `cmd/config`
|
||||
|
||||
#### Pin to the most recent kyaml
|
||||
|
||||
```
|
||||
gorepomod pin kyaml --doIt
|
||||
go tool gorepomod pin kyaml --doIt
|
||||
```
|
||||
|
||||
Create the PR:
|
||||
|
||||
```
|
||||
createBranch pinToKyaml "Update kyaml to $versionKyaml"
|
||||
```
|
||||
|
||||
```
|
||||
createPr
|
||||
```
|
||||
@@ -173,9 +166,9 @@ createPr
|
||||
Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass.
|
||||
|
||||
Once the PR merges, get back on master and do paranoia test:
|
||||
|
||||
```
|
||||
refreshMaster &&
|
||||
testKustomizeRepo
|
||||
refreshMaster && testKustomizeRepo
|
||||
```
|
||||
|
||||
While you're waiting for the tests, review the commit log:
|
||||
@@ -189,10 +182,11 @@ Based on the changes to be included in this release, decide whether a patch, min
|
||||
#### Release it
|
||||
|
||||
```
|
||||
gorepomod release cmd/config [patch|minor|major] --doIt
|
||||
go tool gorepomod release cmd/config [patch|minor|major] --doIt
|
||||
```
|
||||
|
||||
Note the version:
|
||||
|
||||
```
|
||||
versionCmdConfig=v0.9.12 # EDIT THIS!
|
||||
```
|
||||
@@ -200,34 +194,33 @@ versionCmdConfig=v0.9.12 # EDIT THIS!
|
||||
See the process of the [build history of GitHub Actions job].
|
||||
|
||||
Undraft the release on the [kustomize repo release page]:
|
||||
* Make sure the version number is what you expect.
|
||||
* Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors).
|
||||
* Make sure each commit left in the release notes includes a PR reference.
|
||||
|
||||
- Make sure the version number is what you expect.
|
||||
- Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors).
|
||||
- Make sure each commit left in the release notes includes a PR reference.
|
||||
|
||||
## Release `api`
|
||||
|
||||
This is the kustomize API, used by the kustomize CLI.
|
||||
|
||||
|
||||
#### Pin to the new cmd/config
|
||||
|
||||
```
|
||||
gorepomod pin cmd/config --doIt
|
||||
go tool gorepomod pin cmd/config --doIt
|
||||
```
|
||||
|
||||
Create the PR:
|
||||
|
||||
```
|
||||
createBranch pinToCmdConfig "Update cmd/config to $versionCmdConfig" &&
|
||||
createPr
|
||||
createBranch pinToCmdConfig "Update cmd/config to $versionCmdConfig" && createPr
|
||||
```
|
||||
|
||||
Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass.
|
||||
|
||||
Once the PR merges, get back on master and do paranoia test:
|
||||
|
||||
```
|
||||
refreshMaster &&
|
||||
testKustomizeRepo
|
||||
refreshMaster && testKustomizeRepo
|
||||
```
|
||||
|
||||
While you're waiting for the tests, review the commit log:
|
||||
@@ -241,10 +234,11 @@ Based on the changes to be included in this release, decide whether a patch, min
|
||||
#### Release it
|
||||
|
||||
```
|
||||
gorepomod release api [patch|minor|major] --doIt
|
||||
go tool gorepomod release api [patch|minor|major] --doIt
|
||||
```
|
||||
|
||||
Note the version:
|
||||
|
||||
```
|
||||
versionApi=v0.8.10 # EDIT THIS!
|
||||
```
|
||||
@@ -252,10 +246,10 @@ versionApi=v0.8.10 # EDIT THIS!
|
||||
See the process of the [build history of GitHub Actions job].
|
||||
|
||||
Undraft the release on the [kustomize repo release page]:
|
||||
* Make sure the version number is what you expect.
|
||||
* Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors).
|
||||
* Make sure each commit left in the release notes includes a PR reference.
|
||||
|
||||
- Make sure the version number is what you expect.
|
||||
- Remove references to commits that aren't relevant to end users of this module (e.g. test commits, refactors).
|
||||
- Make sure each commit left in the release notes includes a PR reference.
|
||||
|
||||
## Release the kustomize CLI
|
||||
|
||||
@@ -270,21 +264,21 @@ Example: https://github.com/kubernetes-sigs/kustomize/pull/5021
|
||||
#### Pin to the new API
|
||||
|
||||
```
|
||||
gorepomod pin api --doIt
|
||||
go tool gorepomod pin api --doIt
|
||||
```
|
||||
|
||||
Create the PR:
|
||||
|
||||
```
|
||||
createBranch pinToApi "Update api to $versionApi" &&
|
||||
createPr
|
||||
createBranch pinToApi "Update api to $versionApi" && createPr
|
||||
```
|
||||
|
||||
Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass.
|
||||
|
||||
Once the PR merges, get back on master and do paranoia test:
|
||||
|
||||
```
|
||||
refreshMaster &&
|
||||
testKustomizeRepo
|
||||
refreshMaster && testKustomizeRepo
|
||||
```
|
||||
|
||||
While you're waiting for the tests, review the commit log:
|
||||
@@ -298,7 +292,7 @@ Based on the changes to be included in this release, decide whether a patch, min
|
||||
#### Release it
|
||||
|
||||
```
|
||||
gorepomod release kustomize [patch|minor|major] --doIt
|
||||
go tool gorepomod release kustomize [patch|minor|major] --doIt
|
||||
```
|
||||
|
||||
See the process of the [build history of GitHub Actions job].
|
||||
@@ -306,29 +300,27 @@ See the process of the [build history of GitHub Actions job].
|
||||
And check the process of [the build status for container image].
|
||||
|
||||
Undraft the release on the [kustomize repo release page]:
|
||||
* Make sure the version number is what you expect.
|
||||
* Remove references to commits that aren't relevant to end users of the CLI (e.g. test commits, refactors, changes that only surface in Go).
|
||||
* Make sure each commit left in the release notes includes a PR reference.
|
||||
|
||||
- Make sure the version number is what you expect.
|
||||
- Remove references to commits that aren't relevant to end users of the CLI (e.g. test commits, refactors, changes that only surface in Go).
|
||||
- Make sure each commit left in the release notes includes a PR reference.
|
||||
|
||||
## Confirm the kustomize binary is correct
|
||||
|
||||
[installation instructions]: https://kubectl.docs.kubernetes.io/installation/kustomize/binaries/
|
||||
|
||||
* Follow the [installation instructions] to install your new
|
||||
release and make sure it reports the expected version number.
|
||||
- Follow the [installation instructions] to install your new release and make sure it reports the expected version number.
|
||||
|
||||
If not, something is very wrong.
|
||||
|
||||
* Visit the [release page] and edit the release notes as desired.
|
||||
- Visit the [release page] and edit the release notes as desired.
|
||||
|
||||
## Return the repo to development mode
|
||||
|
||||
Go back into development mode, where all modules depend on in-repo code:
|
||||
|
||||
```
|
||||
gorepomod unpin api --doIt &&
|
||||
gorepomod unpin cmd/config --doIt &&
|
||||
gorepomod unpin kyaml --doIt
|
||||
go tool gorepomod unpin api --doIt && go tool gorepomod unpin cmd/config --doIt && go tool gorepomod unpin kyaml --doIt
|
||||
```
|
||||
|
||||
[Makefile]: https://github.com/kubernetes-sigs/kustomize/blob/master/Makefile
|
||||
@@ -341,17 +333,17 @@ sed -i "" "s/LATEST_RELEASE=.*/LATEST_RELEASE=v5.0.0/" Makefile
|
||||
```
|
||||
|
||||
Create the PR:
|
||||
|
||||
```
|
||||
createBranch unpinEverything "Back to development mode; unpin the modules" &&
|
||||
createPr
|
||||
createBranch unpinEverything "Back to development mode; unpin the modules" && createPr
|
||||
```
|
||||
|
||||
Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass.
|
||||
|
||||
Once the PR merges, get back on master and do paranoia test:
|
||||
|
||||
```
|
||||
refreshMaster &&
|
||||
testKustomizeRepo
|
||||
refreshMaster && testKustomizeRepo
|
||||
```
|
||||
|
||||
## Publish Official Docker Image
|
||||
@@ -380,6 +372,7 @@ To update the version of kustomize shipped with kubectl, first
|
||||
fork and clone the [kubernetes/kubernetes] repo.
|
||||
|
||||
In the root of the [kubernetes/kubernetes] repo, run the following command:
|
||||
|
||||
```bash
|
||||
./hack/update-kustomize.sh
|
||||
```
|
||||
@@ -396,7 +389,6 @@ https://github.com/kubernetes/kubernetes/pull/103419
|
||||
|
||||
https://github.com/kubernetes/kubernetes/pull/106389
|
||||
|
||||
|
||||
# Testing changes to the release pipeline
|
||||
|
||||
You can test the release script locally by running [`create-release.sh`].
|
||||
|
||||
Reference in New Issue
Block a user