Skip to content

Commit bcb2d41

Browse files
authored
Merge pull request #993 from kubeshop/remove-rbac-proxy
feat: remove rbac proxy
2 parents 1021004 + f94120f commit bcb2d41

File tree

5 files changed

+18
-23
lines changed

5 files changed

+18
-23
lines changed

charts/testkube-operator/templates/deployment.yaml

+5-18
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,12 @@ spec:
3737
priorityClassName: {{ .Values.priorityClassName }}
3838
{{- end }}
3939
containers:
40-
- name: kube-rbac-proxy
41-
args:
42-
- --secure-listen-address=0.0.0.0:8443
43-
- --upstream=http://127.0.0.1:8080/
44-
- --v=10
45-
{{- toYaml .Values.args | nindent 8 }}
46-
image: {{ include "global.images.image" (dict "imageRoot" .Values.proxy.image "global" .Values.global) }}
47-
imagePullPolicy: {{ .Values.proxy.image.pullPolicy }}
48-
{{- if .Values.proxy.resources }}
49-
resources: {{ toYaml .Values.proxy.resources | nindent 10 }}
50-
{{- end }}
51-
ports:
52-
- containerPort: 9443
53-
name: https
54-
securityContext: {{ include "testkube-operator.containerSecurityContext" . | nindent 10 }}
5540
- name: manager
5641
args:
5742
- --health-probe-bind-address=:{{ .Values.healthcheckPort }}
58-
- --metrics-bind-address=127.0.0.1:8080
43+
- --metrics-bind-address=:{{ .Values.metricsServerPort }}
44+
- --webhook-cert-path=/tmp/k8s-webhook-server/serving-certs
45+
- --metrics-cert-path=/tmp/k8s-webhook-server/serving-certs
5946
- --leader-elect
6047
command:
6148
- /manager
@@ -75,7 +62,7 @@ spec:
7562
{{- if not .Values.webhook.enabled }}
7663
- name: ENABLE_WEBHOOKS
7764
value: "false"
78-
{{- end }}
65+
{{- end }}
7966
{{- if .Values.useArgoCDSync }}
8067
- name: APISERVER_USE_ARGOCD_SYNC
8168
value: "true"
@@ -92,7 +79,7 @@ spec:
9279
value: "true"
9380
{{- end }}
9481
ports:
95-
- containerPort: 9443
82+
- containerPort: {{ .Values.webhookServerPort }}
9683
name: webhook-server
9784
protocol: TCP
9885
livenessProbe:

charts/testkube-operator/templates/service.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ metadata:
1818
spec:
1919
ports:
2020
- name: https
21-
port: 8443
21+
port: {{ .Values.metricsServerPort }}
2222
targetPort: https
2323
selector:
2424
control-plane: controller-manager
@@ -41,7 +41,7 @@ spec:
4141
ports:
4242
- port: 443
4343
protocol: TCP
44-
targetPort: 9443
44+
targetPort: {{ .Values.webhookServerPort }}
4545
selector:
4646
control-plane: controller-manager
4747
{{- end }}

charts/testkube-operator/templates/webhook-cert-create.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ spec:
111111
{{- toYaml .Values.global.nodeSelector | nindent 8 }}
112112
{{- end }}
113113
backoffLimit: 5
114-
{{- end }}
114+
{{- end }}

charts/testkube-operator/values.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,13 @@ proxy:
8787

8888
## Testkube API full name
8989
apiFullname: "testkube-api-server"
90-
## Testkube API port
90+
# -- Testkube API port
9191
apiPort: 8088
92-
## Testkube Operator healthcheck port
92+
# -- Testkube Operator webhook server port
93+
webhookServerPort: 9443
94+
# -- Testkube Operator metrics server port
95+
metricsServerPort: 8443
96+
# -- Testkube Operator healthcheck port
9397
healthcheckPort: 8081
9498
# use ArgoCD sync owner references
9599
useArgoCDSync: false

charts/testkube/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,10 @@ testkube-operator:
977977
apiFullname: "testkube-api-server"
978978
# -- Testkube API port
979979
apiPort: 8088
980+
# -- Testkube Operator webhook server port
981+
webhookServerPort: 9443
982+
# -- Testkube Operator metrics server port
983+
metricsServerPort: 8443
980984
# -- Testkube Operator healthcheck port
981985
healthcheckPort: 8081
982986
# -- Use ArgoCD sync owner references

0 commit comments

Comments
 (0)