Skip to content

Commit

Permalink
Add the addon-resizer to the metrics-server chart
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Buil <[email protected]>
  • Loading branch information
manuelbuil committed Apr 10, 2024
1 parent 4a8568c commit 187831c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
--- charts-original/templates/deployment.yaml
+++ charts/templates/deployment.yaml
@@ -59,7 +59,7 @@
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
- image: {{ include "metrics-server.image" . }}
+ image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- {{ printf "--secure-port=%d" (int .Values.containerPort) }}
@@ -100,7 +100,7 @@
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
- image: {{ include "metrics-server.addonResizer.image" . }}
+ image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
+ image: {{ template "system_default_registry" . }}{{ .Values.addonResizer.image.repository }}:{{ .Values.addonResizer.image.tag }}
env:
- name: MY_POD_NAME
valueFrom:
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
port: {{ .Values.service.port }}
protocol: TCP
targetPort: https
+ ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }}
+ ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }}
selector:
{{- include "metrics-server.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@
# Add these labels to have metrics-server show up in `kubectl cluster-info`
# kubernetes.io/cluster-service: "true"
# kubernetes.io/name: "Metrics-server"
@@ -128,8 +129,8 @@
addonResizer:
enabled: false
image:
- repository: registry.k8s.io/autoscaling/addon-resizer
- tag: 1.8.20
+ repository: rancher/hardened-addon-resizer
+ tag: 1.8.20-build20240410
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
@@ -180,7 +181,8 @@

extraVolumes: []
Expand Down
2 changes: 1 addition & 1 deletion packages/rke2-metrics-server/package.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
url: https://github.com/kubernetes-sigs/metrics-server/releases/download/metrics-server-helm-chart-3.12.0/metrics-server-3.12.0.tgz
packageVersion: 00
packageVersion: 01

0 comments on commit 187831c

Please sign in to comment.