File tree Expand file tree Collapse file tree 12 files changed +25
-16
lines changed
component-config-tutorial/testdata/project
cronjob-tutorial/testdata/project
common/kustomize/v2/scaffolds
golang/v4/scaffolds/internal/templates
project-v4-multigroup-with-deploy-image
project-v4-with-deploy-image Expand file tree Collapse file tree 12 files changed +25
-16
lines changed Original file line number Diff line number Diff line change @@ -65,10 +65,11 @@ test: manifests generate fmt vet envtest ## Run tests.
65
65
KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " go test ./... -coverprofile cover.out
66
66
67
67
GOLANGCI_LINT = $(shell pwd) /bin/golangci-lint
68
+ GOLANGCI_LINT_VERSION ?= v1.54.2
68
69
golangci-lint :
69
70
@[ -f $( GOLANGCI_LINT) ] || { \
70
71
set -e ; \
71
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) v1.54.2 ; \
72
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) $( GOLANGCI_LINT_VERSION ) ; \
72
73
}
73
74
74
75
.PHONY : lint
Original file line number Diff line number Diff line change @@ -65,10 +65,11 @@ test: manifests generate fmt vet envtest ## Run tests.
65
65
KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " go test ./... -coverprofile cover.out
66
66
67
67
GOLANGCI_LINT = $(shell pwd) /bin/golangci-lint
68
+ GOLANGCI_LINT_VERSION ?= v1.54.2
68
69
golangci-lint :
69
70
@[ -f $( GOLANGCI_LINT) ] || { \
70
71
set -e ; \
71
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) v1.54.2 ; \
72
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) $( GOLANGCI_LINT_VERSION ) ; \
72
73
}
73
74
74
75
.PHONY : lint
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ package scaffolds
18
18
19
19
import (
20
20
"fmt"
21
+
21
22
pluginutil "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util"
22
23
23
24
log "github.com/sirupsen/logrus"
Original file line number Diff line number Diff line change @@ -129,10 +129,11 @@ test: manifests generate fmt vet envtest ## Run tests.
129
129
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out
130
130
131
131
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
132
+ GOLANGCI_LINT_VERSION ?= v1.54.2
132
133
golangci-lint:
133
134
@[ -f $(GOLANGCI_LINT) ] || { \
134
135
set -e ;\
135
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.54.2 ;\
136
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) $(GOLANGCI_LINT_VERSION) ;\
136
137
}
137
138
138
139
.PHONY: lint
Original file line number Diff line number Diff line change @@ -65,10 +65,11 @@ test: manifests generate fmt vet envtest ## Run tests.
65
65
KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " go test ./... -coverprofile cover.out
66
66
67
67
GOLANGCI_LINT = $(shell pwd) /bin/golangci-lint
68
+ GOLANGCI_LINT_VERSION ?= v1.54.2
68
69
golangci-lint :
69
70
@[ -f $( GOLANGCI_LINT) ] || { \
70
71
set -e ; \
71
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) v1.54.2 ; \
72
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) $( GOLANGCI_LINT_VERSION ) ; \
72
73
}
73
74
74
75
.PHONY : lint
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ resources:
17
17
patches :
18
18
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
19
19
# patches here are for enabling the conversion webhook for each CRD
20
- # - path: patches/webhook_in_crew_captains.yaml
21
- # - path: patches/webhook_in_ship_frigates.yaml
22
- # - path: patches/webhook_in_ship_destroyers.yaml
23
- # - path: patches/webhook_in_ship_cruisers.yaml
24
- # - path: patches/webhook_in_sea-creatures_krakens.yaml
20
+ - path : patches/webhook_in_crew_captains.yaml
21
+ - path : patches/webhook_in_ship_frigates.yaml
22
+ - path : patches/webhook_in_ship_destroyers.yaml
23
+ - path : patches/webhook_in_ship_cruisers.yaml
24
+ - path : patches/webhook_in_sea-creatures_krakens.yaml
25
25
# - path: patches/webhook_in_sea-creatures_leviathans.yaml
26
26
# - path: patches/webhook_in_foo.policy_healthcheckpolicies.yaml
27
27
# - path: patches/webhook_in_foo_bars.yaml
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ resources:
20
20
- ../manager
21
21
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
22
22
# crd/kustomization.yaml
23
- # - ../webhook
23
+ - ../webhook
24
24
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required.
25
25
# - ../certmanager
26
26
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
@@ -34,7 +34,7 @@ patchesStrategicMerge:
34
34
35
35
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
36
36
# crd/kustomization.yaml
37
- # - manager_webhook_patch.yaml
37
+ - manager_webhook_patch.yaml
38
38
39
39
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'.
40
40
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks.
Original file line number Diff line number Diff line change @@ -65,10 +65,11 @@ test: manifests generate fmt vet envtest ## Run tests.
65
65
KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " go test ./... -coverprofile cover.out
66
66
67
67
GOLANGCI_LINT = $(shell pwd) /bin/golangci-lint
68
+ GOLANGCI_LINT_VERSION ?= v1.54.2
68
69
golangci-lint :
69
70
@[ -f $( GOLANGCI_LINT) ] || { \
70
71
set -e ; \
71
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) v1.54.2 ; \
72
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) $( GOLANGCI_LINT_VERSION ) ; \
72
73
}
73
74
74
75
.PHONY : lint
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ patches:
22
22
- path : patches/webhook_in_ship_destroyers.yaml
23
23
- path : patches/webhook_in_ship_cruisers.yaml
24
24
- path : patches/webhook_in_sea-creatures_krakens.yaml
25
- - path : patches/webhook_in_sea-creatures_leviathans.yaml
25
+ # - path: patches/webhook_in_sea-creatures_leviathans.yaml
26
26
# - path: patches/webhook_in_foo.policy_healthcheckpolicies.yaml
27
27
# - path: patches/webhook_in_foo_bars.yaml
28
28
# - path: patches/webhook_in_fiz_bars.yaml
Original file line number Diff line number Diff line change @@ -65,10 +65,11 @@ test: manifests generate fmt vet envtest ## Run tests.
65
65
KUBEBUILDER_ASSETS=" $( shell $( ENVTEST) use $( ENVTEST_K8S_VERSION) --bin-dir $( LOCALBIN) -p path) " go test ./... -coverprofile cover.out
66
66
67
67
GOLANGCI_LINT = $(shell pwd) /bin/golangci-lint
68
+ GOLANGCI_LINT_VERSION ?= v1.54.2
68
69
golangci-lint :
69
70
@[ -f $( GOLANGCI_LINT) ] || { \
70
71
set -e ; \
71
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) v1.54.2 ; \
72
+ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT ) ) $( GOLANGCI_LINT_VERSION ) ; \
72
73
}
73
74
74
75
.PHONY : lint
You can’t perform that action at this time.
0 commit comments