mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 10:15:22 +00:00
Update to Go 1.19
This commit is contained in:
8
.github/workflows/go.yml
vendored
8
.github/workflows/go.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ^1.18
|
||||
go-version: '^1.19.0'
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ^1.18
|
||||
go-version: '^1.19.0'
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ^1.18
|
||||
go-version: '^1.19.0'
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ^1.18
|
||||
go-version: '^1.19.0'
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
run:
|
||||
deadline: 5m
|
||||
go: '1.19'
|
||||
|
||||
linters:
|
||||
# please, do not use `enable-all`: it's deprecated and will be removed soon.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/api
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/evanphx/json-patch v4.11.0+incompatible
|
||||
|
||||
@@ -85,7 +85,7 @@ End-of-message
|
||||
`Dockerfile` installs `kustomize fn` and copies the script into the container image.
|
||||
|
||||
```
|
||||
FROM golang:1.18-stretch
|
||||
FROM golang:1.19-bullseye
|
||||
RUN go get sigs.k8s.io/kustomize/cmd/config
|
||||
RUN mv /go/bin/config /usr/bin/config
|
||||
COPY nginx-template.sh /usr/bin/nginx-template.sh
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/cmd/config
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/go-errors/errors v1.4.2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM golang:1.18-stretch
|
||||
FROM golang:1.19-bullseye
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/cmd/config/internal/commands/e2e/e2econtainerconfig
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/kyaml v0.13.7
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ The script wraps itself using ` + "`" + `config run wrap -- $0` + "`" + ` which
|
||||
|
||||
` + "`" + `Dockerfile` + "`" + ` installs ` + "`" + `kustomize fn` + "`" + ` and copies the script into the container image.
|
||||
|
||||
FROM golang:1.18-stretch
|
||||
FROM golang:1.19-bullseye
|
||||
RUN go get sigs.k8s.io/kustomize/cmd/config
|
||||
RUN mv /go/bin/config /usr/bin/config
|
||||
COPY nginx-template.sh /usr/bin/nginx-template.sh
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/cmd/depprobcheck
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
k8s.io/cli-runtime v0.20.4
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/cmd/gorepomod
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require golang.org/x/mod v0.4.2
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/cmd/k8scopy
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/stretchr/testify v1.8.0
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module sigs.k8s.io/kustomize/cmd/mdtogo
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/cmd/pluginator/v2
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/rakyll/statik v0.1.7
|
||||
|
||||
@@ -85,7 +85,7 @@ func (c *Converter) Convert() error {
|
||||
}
|
||||
|
||||
func (c *Converter) getDockerfile() string {
|
||||
return `FROM golang:1.18-stretch
|
||||
return `FROM golang:1.19-bullseye
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY . .
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM golang:1.18-stretch
|
||||
FROM golang:1.19-bullseye
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY go.mod .
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/functions/examples/application-cr
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
k8s.io/apimachinery v0.20.4
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM golang:1.18-stretch
|
||||
FROM golang:1.19-bullseye
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY go.mod .
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/functions/examples/injection-tshirt-sizes
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/kyaml v0.13.7
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM golang:1.18-stretch
|
||||
FROM golang:1.19-bullseye
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY go.mod .
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/functions/examples/template-go-nginx
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/kyaml v0.13.7
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM golang:1.18-stretch
|
||||
FROM golang:1.19-bullseye
|
||||
ENV CGO_ENABLED=0
|
||||
RUN go get -v sigs.k8s.io/kustomize/kustomize
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ FROM alpine:latest as schemas
|
||||
RUN apk --no-cache add git
|
||||
RUN git clone --depth 1 https://github.com/instrumenta/kubernetes-json-schema.git
|
||||
|
||||
FROM golang:1.18-stretch as function
|
||||
FROM golang:1.19-bullseye as function
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY go.mod .
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/functions/examples/validator-kubeval
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/instrumenta/kubeval v0.0.0-20190918223246-8d013ec9fc56
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM golang:1.18-stretch
|
||||
FROM golang:1.19-bullseye
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY go.mod .
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/functions/examples/validator-resource-requests
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/kyaml v0.13.7
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/kustomize/v4
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/google/go-cmp v0.5.5
|
||||
|
||||
@@ -115,13 +115,13 @@ func Build(p framework.ResourceListProcessor, mode CLIMode, noPrintError bool) *
|
||||
// the function into a container image.
|
||||
// The gen command takes one argument: the directory where the Dockerfile will be created.
|
||||
//
|
||||
// go run main.go gen DIR/
|
||||
// go run main.go gen DIR/
|
||||
func AddGenerateDockerfile(cmd *cobra.Command) {
|
||||
gen := &cobra.Command{
|
||||
Use: "gen [DIR]",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if err := os.WriteFile(filepath.Join(args[0], "Dockerfile"), []byte(`FROM golang:1.18-alpine as builder
|
||||
if err := os.WriteFile(filepath.Join(args[0], "Dockerfile"), []byte(`FROM golang:1.19-alpine as builder
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
@@ -41,7 +41,7 @@ func TestCommand_dockerfile(t *testing.T) {
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
expected := `FROM golang:1.18-alpine as builder
|
||||
expected := `FROM golang:1.19-alpine as builder
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Copyright 2019 The Kubernetes Authors.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
FROM golang:1.18-stretch
|
||||
FROM golang:1.19-bullseye
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY . .
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/kyaml
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/annotationstransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/configmapgenerator
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/hashtransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/helmchartinflationgenerator
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/imdario/mergo v0.3.6
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/iampolicypgenerator
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/imagetagtransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/labeltransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/legacyordertransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/pkg/errors v0.9.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/namespacetransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/stretchr/testify v1.8.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/patchjson6902transformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/evanphx/json-patch v4.11.0+incompatible
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/patchstrategicmergetransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/stretchr/testify v1.8.0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/patchtransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/evanphx/json-patch v4.11.0+incompatible
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/prefixtransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/replacementtransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/replicacounttransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/secretgenerator
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/suffixtransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/builtin/valueaddtransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/bashedconfigmap
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/calvinduplicator
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/dateprefixer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/pkg/errors v0.9.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/printpluginenv
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/secretsfromdatabase
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/sedtransformer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/someservicegenerator
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/starlarkmixer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/stringprefixer
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/pkg/errors v0.9.1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/someteam.example.com/v1/validator
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module sigs.k8s.io/kustomize/plugin/untested/v1/gogetter
|
||||
|
||||
go 1.18
|
||||
go 1.19
|
||||
|
||||
require sigs.k8s.io/kustomize/api v0.11.5
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
# To test it locally, run it in a goreleaser container:
|
||||
#
|
||||
# # Get build image from cloudbuild.yaml
|
||||
# export GOLANG_IMAGE=golang:1.18
|
||||
# export GOLANG_IMAGE=golang:1.19
|
||||
#
|
||||
# # Drop into a shell
|
||||
# docker run -it --entrypoint=/bin/bash -v $(pwd):/go/src/github.com/kubernetes-sigs/kustomize -w /go/src/github.com/kubernetes-sigs/kustomize $GOLANG_IMAGE
|
||||
|
||||
@@ -39,7 +39,7 @@ steps:
|
||||
|
||||
# Run goreleaser indirectly via a shell script
|
||||
# to configure it properly.
|
||||
- name: golang:1.18
|
||||
- name: golang:1.19
|
||||
entrypoint: /bin/bash
|
||||
dir: myClone
|
||||
secretEnv: ['GITHUB_TOKEN']
|
||||
|
||||
@@ -9,7 +9,7 @@ description: >
|
||||
|
||||
First install the tools to build and run tests
|
||||
|
||||
### Install go 1.18
|
||||
### Install go 1.19
|
||||
|
||||
[Instructions](https://golang.org/doc/install)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user