Skip to content

Commit f051acc

Browse files
committed
feat(helm): update according to latest kubebuilder updates
1 parent ef1019c commit f051acc

File tree

10 files changed

+164
-273
lines changed

10 files changed

+164
-273
lines changed

charts/k6-operator/README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,26 @@ Kubernetes: `>=1.16.0-0`
2525
| Key | Type | Default | Description |
2626
|-----|------|---------|-------------|
2727
| affinity | object | `{}` | Affinity to be applied on all containers |
28-
| authProxy.containerSecurityContext | object | `{}` | A security context defines privileges and access control settings for the container. |
29-
| authProxy.enabled | bool | `true` | enables the protection of /metrics endpoint. (https://github.com/brancz/kube-rbac-proxy) |
30-
| authProxy.image.pullPolicy | string | `"IfNotPresent"` | pull policy for the image can be Always, Never, IfNotPresent (default: IfNotPresent) |
31-
| authProxy.image.registry | string | `"quay.io"` | |
32-
| authProxy.image.repository | string | `"brancz/kube-rbac-proxy"` | rbac-proxy image repository |
33-
| authProxy.image.tag | string | `"v0.18.2"` | rbac-proxy image tag |
34-
| authProxy.livenessProbe | object | `{}` | Liveness probe in Probe format |
35-
| authProxy.readinessProbe | object | `{}` | Readiness probe in Probe format |
36-
| authProxy.resources | object | `{}` | rbac-proxy resource limitation/request |
3728
| customAnnotations | object | `{}` | Custom Annotations to be applied on all resources |
3829
| customLabels | object | `{}` | Custom Label to be applied on all resources |
3930
| fullnameOverride | string | `""` | |
4031
| global.image | object | `{"pullSecrets":[],"registry":""}` | Global image configuration |
4132
| global.image.pullSecrets | list | `[]` | Optional set of global image pull secrets |
4233
| global.image.registry | string | `""` | Global image registry to use if it needs to be overridden for some specific use cases (e.g local registries, custom images, ...) |
4334
| installCRDs | bool | `true` | Installs CRDs as part of the release |
44-
| manager | object | `{"containerSecurityContext":{},"env":[],"envFrom":[],"image":{"pullPolicy":"IfNotPresent","registry":"ghcr.io","repository":"grafana/k6-operator","tag":"controller-v0.0.21"},"livenessProbe":{},"podSecurityContext":{},"readinessProbe":{},"replicas":1,"resources":{"limits":{"cpu":"100m","memory":"100Mi"},"requests":{"cpu":"100m","memory":"50Mi"}},"serviceAccount":{"create":true,"name":"k6-operator-controller"}}` | controller-manager configuration |
35+
| manager | object | `{"containerSecurityContext":{},"env":[],"envFrom":[],"image":{"pullPolicy":"IfNotPresent","registry":"ghcr.io","repository":"grafana/k6-operator","tag":"controller-v0.0.21"},"livenessProbe":{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":15,"periodSeconds":20},"podSecurityContext":{},"readinessProbe":{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":5,"periodSeconds":10},"replicas":1,"resources":{"limits":{"cpu":"100m","memory":"100Mi"},"requests":{"cpu":"100m","memory":"50Mi"}},"serviceAccount":{"create":true,"name":"k6-operator-controller"}}` | controller-manager configuration |
4536
| manager.containerSecurityContext | object | `{}` | A security context defines privileges and access control settings for the container. |
4637
| manager.env | list | `[]` | List of environment variables to set in the controller |
4738
| manager.envFrom | list | `[]` | List of sources to populate environment variables in the controller |
4839
| manager.image | object | `{"pullPolicy":"IfNotPresent","registry":"ghcr.io","repository":"grafana/k6-operator","tag":"controller-v0.0.21"}` | controller-manager image configuration |
4940
| manager.image.pullPolicy | string | `"IfNotPresent"` | pull policy for the image possible values Always, Never, IfNotPresent (default: IfNotPresent) |
5041
| manager.image.repository | string | `"grafana/k6-operator"` | controller-manager image repository |
5142
| manager.image.tag | string | `"controller-v0.0.21"` | controller-manager image tag |
52-
| manager.livenessProbe | object | `{}` | Liveness probe in Probe format |
43+
| manager.livenessProbe | object | `{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":15,"periodSeconds":20}` | Liveness probe in Probe format |
44+
| manager.livenessProbe.httpGet | object | `{"path":"/healthz","port":8081}` | HTTP liveness probe |
5345
| manager.podSecurityContext | object | `{}` | A security context defines privileges and access control settings for a pod. |
54-
| manager.readinessProbe | object | `{}` | Readiness probe in Probe format |
46+
| manager.readinessProbe | object | `{"httpGet":{"path":"/healthz","port":8081},"initialDelaySeconds":5,"periodSeconds":10}` | Readiness probe in Probe format |
47+
| manager.readinessProbe.httpGet | object | `{"path":"/healthz","port":8081}` | HTTP readiness probe |
5548
| manager.replicas | int | `1` | number of controller-manager replicas (default: 1) |
5649
| manager.resources | object | `{"limits":{"cpu":"100m","memory":"100Mi"},"requests":{"cpu":"100m","memory":"50Mi"}}` | controller-manager Resources definition |
5750
| manager.resources.limits | object | `{"cpu":"100m","memory":"100Mi"}` | controller-manager Resources limits |
@@ -78,6 +71,8 @@ Kubernetes: `>=1.16.0-0`
7871
| nodeSelector | object | `{}` | Node Selector to be applied on all containers |
7972
| podAnnotations | object | `{}` | Custom Annotations to be applied on all pods |
8073
| podLabels | object | `{}` | Custom Label to be applied on all pods |
74+
| rbac | object | `{"namespaced":false}` | RBAC configuration |
75+
| rbac.namespaced | bool | `false` | If true, does not install cluster RBAC resources |
8176
| service.annotations | object | `{}` | service custom annotations |
8277
| service.enabled | bool | `true` | enables the k6-operator service (default: false) |
8378
| service.labels | object | `{}` | service custom labels |

charts/k6-operator/samples/customAnnotationsAndLabels.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,6 @@ tolerations:
3838
operator: "Exists"
3939
effect: "NoSchedule"
4040

41-
authProxy:
42-
resources:
43-
limits:
44-
cpu: 100m
45-
memory: 100Mi
46-
requests:
47-
cpu: 100m
48-
memory: 50Mi
49-
5041
manager:
5142
image:
5243
registry: ghcr.io

charts/k6-operator/templates/_helpers.tpl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,3 @@ Create the name of the service account to use
103103
{{- .Release.Namespace | indent 1 }}
104104
{{- end }}
105105
{{- end -}}
106-
107-
108-
{{- define "k6-operator.livenessProbe" -}}
109-
{{- if .Values.authProxy.livenessProbe }}
110-
livenessProbe:
111-
{{- toYaml .Values.authProxy.livenessProbe | nindent 12 }}
112-
{{- end }}
113-
{{- end -}}
114-
115-
{{- define "k6-operator.readinessProbe" -}}
116-
{{- if .Values.authProxy.readinessProbe }}
117-
readinessProbe:
118-
{{- toYaml .Values.authProxy.readinessProbe | nindent 12 }}
119-
{{- end }}
120-
{{- end -}}

charts/k6-operator/templates/clusterRole.yaml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -142,27 +142,11 @@ rules:
142142
- get
143143
- patch
144144
- update
145-
{{- if .Values.authProxy.enabled }}
146145
---
147146
apiVersion: rbac.authorization.k8s.io/v1
148147
kind: ClusterRole
149148
metadata:
150-
name: {{ include "k6-operator.fullname" . }}-metrics-reader
151-
labels:
152-
{{- include "k6-operator.labels" . | nindent 4 }}
153-
{{- include "k6-operator.customLabels" . | default "" | nindent 4 }}
154-
annotations:
155-
{{- include "k6-operator.customAnnotations" . | default "" | nindent 4 }}
156-
rules:
157-
- nonResourceURLs:
158-
- /metrics
159-
verbs:
160-
- get
161-
---
162-
apiVersion: rbac.authorization.k8s.io/v1
163-
kind: ClusterRole
164-
metadata:
165-
name: {{ include "k6-operator.fullname" . }}-proxy-role
149+
name: {{ include "k6-operator.fullname" . }}-metrics-auth-role
166150
labels:
167151
{{- include "k6-operator.labels" . | nindent 4 }}
168152
{{- include "k6-operator.customLabels" . | default "" | nindent 4 }}
@@ -181,7 +165,21 @@ rules:
181165
- subjectaccessreviews
182166
verbs:
183167
- create
184-
{{- end }}
168+
---
169+
apiVersion: rbac.authorization.k8s.io/v1
170+
kind: ClusterRole
171+
metadata:
172+
name: {{ include "k6-operator.fullname" . }}-metrics-reader
173+
labels:
174+
{{- include "k6-operator.labels" . | nindent 4 }}
175+
{{- include "k6-operator.customLabels" . | default "" | nindent 4 }}
176+
annotations:
177+
{{- include "k6-operator.customAnnotations" . | default "" | nindent 4 }}
178+
rules:
179+
- nonResourceURLs:
180+
- /metrics
181+
verbs:
182+
- get
185183
---
186184
# permissions for end users to edit privateloadzones.
187185
apiVersion: rbac.authorization.k8s.io/v1

charts/k6-operator/templates/clusterRoleBinding.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,22 @@ roleRef:
1616
subjects:
1717
- kind: ServiceAccount
1818
name: {{ include "k6-operator.serviceAccountName" . }}
19-
namespace: {{- include "k6-operator.namespace" . -}}
20-
{{- if .Values.authProxy.enabled }}
19+
namespace: {{- include "k6-operator.namespace" . }}
2120
---
2221
apiVersion: rbac.authorization.k8s.io/v1
2322
kind: ClusterRoleBinding
2423
metadata:
25-
name: {{ include "k6-operator.fullname" . }}-proxy-rolebinding
24+
name: {{ include "k6-operator.fullname" . }}-metrics-auth-rolebinding
2625
labels:
2726
{{- include "k6-operator.customLabels" . | default "" | nindent 4 }}
2827
annotations:
2928
{{- include "k6-operator.customAnnotations" . | default "" | nindent 4 }}
3029
roleRef:
3130
apiGroup: rbac.authorization.k8s.io
3231
kind: ClusterRole
33-
name: {{ include "k6-operator.fullname" . }}-proxy-role
32+
name: {{ include "k6-operator.fullname" . }}-metrics-auth-role
3433
subjects:
3534
- kind: ServiceAccount
3635
name: {{ include "k6-operator.serviceAccountName" . }}
37-
namespace: {{- include "k6-operator.namespace" . -}}
38-
{{- end }}
36+
namespace: {{- include "k6-operator.namespace" . }}
3937
{{- end }}

charts/k6-operator/templates/deployment.yaml

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,10 @@ spec:
3434
- name: manager
3535
image: "{{ .Values.global.image.registry | default .Values.manager.image.registry }}/{{ .Values.manager.image.repository }}:{{ .Values.manager.image.tag }}"
3636
imagePullPolicy: {{ .Values.manager.image.pullPolicy }}
37-
{{- if .Values.manager.livenessProbe }}
3837
livenessProbe:
3938
{{- toYaml .Values.manager.livenessProbe | nindent 12 }}
40-
{{- end }}
41-
{{- if .Values.manager.readinessProbe }}
4239
readinessProbe:
4340
{{- toYaml .Values.manager.readinessProbe | nindent 12 }}
44-
{{- end }}
4541
resources:
4642
{{- toYaml .Values.manager.resources | nindent 12 }}
4743
{{- if .Values.manager.env }}
@@ -63,42 +59,11 @@ spec:
6359
command:
6460
- /manager
6561
args:
62+
- --health-probe-bind-address=:8081
6663
{{- if gt (int .Values.manager.replicas) 1 }}
67-
- --enable-leader-election
68-
{{- end }}
69-
{{- if .Values.authProxy.enabled }}
70-
- --metrics-addr=127.0.0.1:8080
64+
- --leader-elect
7165
{{- end }}
72-
{{- if .Values.authProxy.enabled }}
73-
- name: kube-rbac-proxy
74-
image: "{{ .Values.global.image.registry | default .Values.authProxy.image.registry }}/{{ .Values.authProxy.image.repository }}:{{ .Values.authProxy.image.tag }}"
75-
imagePullPolicy: {{ .Values.authProxy.image.pullPolicy }}
76-
{{- if .Values.authProxy.resources }}
77-
resources:
78-
{{- toYaml .Values.authProxy.resources | nindent 12 }}
79-
{{- end }}
80-
{{- if .Values.authProxy.livenessProbe }}
81-
livenessProbe:
82-
{{- toYaml .Values.authProxy.livenessProbe | nindent 12 }}
83-
{{- end }}
84-
{{- if .Values.authProxy.readinessProbe }}
85-
readinessProbe:
86-
{{- toYaml .Values.authProxy.readinessProbe | nindent 12 }}
87-
{{- end }}
88-
args:
89-
- --secure-listen-address=0.0.0.0:8443
90-
- --upstream=http://127.0.0.1:8080/
91-
- --logtostderr=true
92-
- --v=10
93-
{{- include "k6-operator.readinessProbe" . }}
94-
ports:
95-
- containerPort: 8443
96-
name: https
97-
{{- if .Values.authProxy.containerSecurityContext }}
98-
securityContext:
99-
{{- toYaml .Values.authProxy.containerSecurityContext | nindent 12 }}
100-
{{- end }}
101-
{{- end }}
66+
- --metrics-bind-address=127.0.0.1:8080
10267
serviceAccountName: {{ include "k6-operator.serviceAccountName" . }}
10368
{{- if .Values.global.image.pullSecrets }}
10469
imagePullSecrets:

charts/k6-operator/templates/role.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ metadata:
1111
{{- include "k6-operator.customAnnotations" . | default "" | nindent 4 }}
1212
rules:
1313
- apiGroups:
14-
- ""
14+
- ""
1515
resources:
16-
- configmaps
16+
- configmaps
1717
verbs:
18-
- get
19-
- list
20-
- watch
21-
- create
22-
- update
23-
- patch
24-
- delete
18+
- get
19+
- list
20+
- watch
21+
- create
22+
- update
23+
- patch
24+
- delete
2525
- apiGroups:
2626
- coordination.k8s.io
2727
resources:
@@ -32,9 +32,9 @@ rules:
3232
- list
3333
- update
3434
- apiGroups:
35-
- ""
35+
- ""
3636
resources:
37-
- events
37+
- events
3838
verbs:
39-
- create
40-
- patch
39+
- create
40+
- patch

charts/k6-operator/templates/service.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if or .Values.authProxy.enabled .Values.service.enabled }}
1+
{{- if .Values.service.enabled }}
22
apiVersion: v1
33
kind: Service
44
metadata:
@@ -21,6 +21,7 @@ spec:
2121
ports:
2222
- name: https
2323
port: 8443
24+
protocol: TCP
2425
targetPort: https
2526
selector:
2627
control-plane: "controller-manager"

0 commit comments

Comments
 (0)