Skip to content

Commit ee21c5d

Browse files
📖 upgrade samples used on the docs
1 parent 26d12ab commit ee21c5d

File tree

24 files changed

+1017
-841
lines changed

24 files changed

+1017
-841
lines changed

docs/book/src/component-config-tutorial/testdata/project/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.17 as builder
2+
FROM golang:1.18 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests

docs/book/src/component-config-tutorial/testdata/project/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Image URL to use all building/pushing image targets
33
IMG ?= controller:latest
44
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
5-
ENVTEST_K8S_VERSION = 1.23
5+
ENVTEST_K8S_VERSION = 1.24.1
66

77
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
88
ifeq (,$(shell go env GOBIN))
@@ -114,7 +114,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
114114

115115
## Tool Versions
116116
KUSTOMIZE_VERSION ?= v3.8.7
117-
CONTROLLER_TOOLS_VERSION ?= v0.8.0
117+
CONTROLLER_TOOLS_VERSION ?= v0.9.0
118118

119119
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
120120
.PHONY: kustomize

docs/book/src/component-config-tutorial/testdata/project/config/crd/bases/config.tutorial.kubebuilder.io_projectconfigs.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.8.0
6+
controller-gen.kubebuilder.io/version: v0.9.0
77
creationTimestamp: null
88
name: projectconfigs.config.tutorial.kubebuilder.io
99
spec:
@@ -187,9 +187,3 @@ spec:
187187
storage: true
188188
subresources:
189189
status: {}
190-
status:
191-
acceptedNames:
192-
kind: ""
193-
plural: ""
194-
conditions: []
195-
storedVersions: []

docs/book/src/component-config-tutorial/testdata/project/config/default/manager_auth_proxy_patch.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ spec:
1010
spec:
1111
containers:
1212
- name: kube-rbac-proxy
13+
securityContext:
14+
allowPrivilegeEscalation: false
15+
capabilities:
16+
drop:
17+
- "ALL"
1318
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.12.0
1419
args:
1520
- "--secure-listen-address=0.0.0.0:8443"
@@ -27,3 +32,8 @@ spec:
2732
requests:
2833
cpu: 5m
2934
memory: 64Mi
35+
- name: manager
36+
args:
37+
- "--health-probe-bind-address=:8081"
38+
- "--metrics-bind-address=127.0.0.1:8080"
39+
- "--leader-elect"

docs/book/src/component-config-tutorial/testdata/project/config/manager/manager.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,23 @@ spec:
2626
spec:
2727
securityContext:
2828
runAsNonRoot: true
29+
# TODO(user): For common cases that do not require escalating privileges
30+
# it is recommended to ensure that all your Pods/Containers are restrictive.
31+
# More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
32+
# Please uncomment the following code if your project does NOT have to work on old Kubernetes
33+
# versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
34+
# seccompProfile:
35+
# type: RuntimeDefault
2936
containers:
3037
- command:
3138
- /manager
3239
image: controller:latest
3340
name: manager
3441
securityContext:
3542
allowPrivilegeEscalation: false
43+
capabilities:
44+
drop:
45+
- "ALL"
3646
livenessProbe:
3747
httpGet:
3848
path: /healthz
Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module tutorial.kubebuilder.io/project
22

3-
go 1.17
3+
go 1.18
44

55
require (
6-
k8s.io/apimachinery v0.23.5
7-
k8s.io/client-go v0.23.5
8-
sigs.k8s.io/controller-runtime v0.11.2
6+
k8s.io/apimachinery v0.24.0
7+
k8s.io/client-go v0.24.0
8+
sigs.k8s.io/controller-runtime v0.12.1
99
)
1010

1111
require (
@@ -16,55 +16,64 @@ require (
1616
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
1717
github.com/Azure/go-autorest/logger v0.2.1 // indirect
1818
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
19+
github.com/PuerkitoBio/purell v1.1.1 // indirect
20+
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
1921
github.com/beorn7/perks v1.0.1 // indirect
20-
github.com/cespare/xxhash/v2 v2.1.1 // indirect
22+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
2123
github.com/davecgh/go-spew v1.1.1 // indirect
24+
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
2225
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
2326
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
2427
github.com/fsnotify/fsnotify v1.5.1 // indirect
2528
github.com/go-logr/logr v1.2.0 // indirect
2629
github.com/go-logr/zapr v1.2.0 // indirect
30+
github.com/go-openapi/jsonpointer v0.19.5 // indirect
31+
github.com/go-openapi/jsonreference v0.19.5 // indirect
32+
github.com/go-openapi/swag v0.19.14 // indirect
2733
github.com/gogo/protobuf v1.3.2 // indirect
2834
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
2935
github.com/golang/protobuf v1.5.2 // indirect
36+
github.com/google/gnostic v0.5.7-v3refs // indirect
3037
github.com/google/go-cmp v0.5.5 // indirect
3138
github.com/google/gofuzz v1.1.0 // indirect
3239
github.com/google/uuid v1.1.2 // indirect
33-
github.com/googleapis/gnostic v0.5.5 // indirect
3440
github.com/imdario/mergo v0.3.12 // indirect
41+
github.com/josharian/intern v1.0.0 // indirect
3542
github.com/json-iterator/go v1.1.12 // indirect
43+
github.com/mailru/easyjson v0.7.6 // indirect
3644
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
3745
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3846
github.com/modern-go/reflect2 v1.0.2 // indirect
47+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3948
github.com/pkg/errors v0.9.1 // indirect
40-
github.com/prometheus/client_golang v1.11.0 // indirect
49+
github.com/prometheus/client_golang v1.12.1 // indirect
4150
github.com/prometheus/client_model v0.2.0 // indirect
42-
github.com/prometheus/common v0.28.0 // indirect
43-
github.com/prometheus/procfs v0.6.0 // indirect
51+
github.com/prometheus/common v0.32.1 // indirect
52+
github.com/prometheus/procfs v0.7.3 // indirect
4453
github.com/spf13/pflag v1.0.5 // indirect
4554
go.uber.org/atomic v1.7.0 // indirect
4655
go.uber.org/multierr v1.6.0 // indirect
4756
go.uber.org/zap v1.19.1 // indirect
48-
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
49-
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
50-
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
51-
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
52-
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
57+
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
58+
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
59+
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
60+
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
61+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
5362
golang.org/x/text v0.3.7 // indirect
54-
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
63+
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
5564
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
5665
google.golang.org/appengine v1.6.7 // indirect
5766
google.golang.org/protobuf v1.27.1 // indirect
5867
gopkg.in/inf.v0 v0.9.1 // indirect
5968
gopkg.in/yaml.v2 v2.4.0 // indirect
6069
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
61-
k8s.io/api v0.23.5 // indirect
62-
k8s.io/apiextensions-apiserver v0.23.5 // indirect
63-
k8s.io/component-base v0.23.5 // indirect
64-
k8s.io/klog/v2 v2.30.0 // indirect
65-
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
66-
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
67-
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
70+
k8s.io/api v0.24.0 // indirect
71+
k8s.io/apiextensions-apiserver v0.24.0 // indirect
72+
k8s.io/component-base v0.24.0 // indirect
73+
k8s.io/klog/v2 v2.60.1 // indirect
74+
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
75+
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
76+
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
6877
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
6978
sigs.k8s.io/yaml v1.3.0 // indirect
7079
)

0 commit comments

Comments
 (0)