Skip to content

Commit 3290e45

Browse files
Update kubebuilder from v4.5.0 to v4.5.1 (#1239)
* Update kubebuilder from v4.5.0 to v4.5.1 * make --------- Co-authored-by: update-generated-files-action <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 2b7a7bb commit 3290e45

File tree

5 files changed

+44
-26
lines changed

5 files changed

+44
-26
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ test: manifests generate fmt vet setup-envtest ## Run tests.
6363

6464
# TODO(user): To use a different vendor for e2e tests, modify the setup under 'tests/e2e'.
6565
# The default setup assumes Kind is pre-installed and builds/loads the Manager Docker image locally.
66-
# Prometheus and CertManager are installed by default; skip with:
67-
# - PROMETHEUS_INSTALL_SKIP=true
66+
# CertManager is installed by default; skip with:
6867
# - CERT_MANAGER_INSTALL_SKIP=true
6968
.PHONY: test-e2e
7069
test-e2e: manifests generate fmt vet ## Run the e2e tests. Expected an isolated environment using Kind.
@@ -173,7 +172,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint
173172

174173
## Tool Versions
175174
KUSTOMIZE_VERSION ?= v5.5.0
176-
CONTROLLER_TOOLS_VERSION ?= v0.17.1
175+
CONTROLLER_TOOLS_VERSION ?= v0.17.2
177176
#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
178177
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
179178
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)

cmd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func main() {
144144

145145
// Metrics endpoint is enabled in 'config/default/kustomization.yaml'. The Metrics options configure the server.
146146
// More info:
147-
// - https://pkg.go.dev/sigs.k8s.io/[email protected].0/pkg/metrics/server
147+
// - https://pkg.go.dev/sigs.k8s.io/[email protected].2/pkg/metrics/server
148148
// - https://book.kubebuilder.io/reference/metrics.html
149149
metricsServerOptions := metricsserver.Options{
150150
BindAddress: metricsAddr,
@@ -156,7 +156,7 @@ func main() {
156156
// FilterProvider is used to protect the metrics endpoint with authn/authz.
157157
// These configurations ensure that only authorized users and service accounts
158158
// can access the metrics endpoint. The RBAC are configured in 'config/rbac/kustomization.yaml'. More info:
159-
// https://pkg.go.dev/sigs.k8s.io/[email protected].0/pkg/metrics/filters#WithAuthenticationAndAuthorization
159+
// https://pkg.go.dev/sigs.k8s.io/[email protected].2/pkg/metrics/filters#WithAuthenticationAndAuthorization
160160
metricsServerOptions.FilterProvider = filters.WithAuthenticationAndAuthorization
161161
}
162162

config/crd/bases/argocdcommenter.int128.github.io_applicationhealths.yaml

Lines changed: 1 addition & 1 deletion
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.17.1
6+
controller-gen.kubebuilder.io/version: v0.17.2
77
name: applicationhealths.argocdcommenter.int128.github.io
88
spec:
99
group: argocdcommenter.int128.github.io

config/default/kustomization.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,17 @@ patches:
7777
# delimiter: '.'
7878
# index: 0
7979
# create: true
80+
# - select: # Uncomment the following to set the Service name for TLS config in Prometheus ServiceMonitor
81+
# kind: ServiceMonitor
82+
# group: monitoring.coreos.com
83+
# version: v1
84+
# name: controller-manager-metrics-monitor
85+
# fieldPaths:
86+
# - spec.endpoints.0.tlsConfig.serverName
87+
# options:
88+
# delimiter: '.'
89+
# index: 0
90+
# create: true
8091
#
8192
# - source:
8293
# kind: Service
@@ -96,6 +107,17 @@ patches:
96107
# delimiter: '.'
97108
# index: 1
98109
# create: true
110+
# - select: # Uncomment the following to set the Service namespace for TLS in Prometheus ServiceMonitor
111+
# kind: ServiceMonitor
112+
# group: monitoring.coreos.com
113+
# version: v1
114+
# name: controller-manager-metrics-monitor
115+
# fieldPaths:
116+
# - spec.endpoints.0.tlsConfig.serverName
117+
# options:
118+
# delimiter: '.'
119+
# index: 1
120+
# create: true
99121
#
100122
# - source: # Uncomment the following block if you have any webhook
101123
# kind: Service
Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
# Patch for Prometheus ServiceMonitor to enable secure TLS configuration
22
# using certificates managed by cert-manager
3-
apiVersion: monitoring.coreos.com/v1
4-
kind: ServiceMonitor
5-
metadata:
6-
name: controller-manager-metrics-monitor
7-
namespace: system
8-
spec:
9-
endpoints:
10-
- tlsConfig:
11-
insecureSkipVerify: false
12-
ca:
13-
secret:
14-
name: metrics-server-cert
15-
key: ca.crt
16-
cert:
17-
secret:
18-
name: metrics-server-cert
19-
key: tls.crt
20-
keySecret:
21-
name: metrics-server-cert
22-
key: tls.key
3+
- op: replace
4+
path: /spec/endpoints/0/tlsConfig
5+
value:
6+
# SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize
7+
serverName: SERVICE_NAME.SERVICE_NAMESPACE.svc
8+
insecureSkipVerify: false
9+
ca:
10+
secret:
11+
name: metrics-server-cert
12+
key: ca.crt
13+
cert:
14+
secret:
15+
name: metrics-server-cert
16+
key: tls.crt
17+
keySecret:
18+
name: metrics-server-cert
19+
key: tls.key

0 commit comments

Comments
 (0)