Skip to content

Commit 2d7dcb3

Browse files
authored
thanos: template busybox image (#614)
1 parent fd6c785 commit 2d7dcb3

File tree

5 files changed

+30
-5
lines changed

5 files changed

+30
-5
lines changed

thanos/charts/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ maintainers:
1111
name: thanos
1212
sources:
1313
- https://github.com/cloudoperators/greenhouse-extensions
14-
version: 0.1.4
14+
version: 0.1.5
1515
# thanos-release
1616
appVersion: v0.35.0
1717
keywords:

thanos/charts/templates/compactor.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ spec:
7070
name: data-volume
7171
initContainers:
7272
- name: init-permissions
73-
image: busybox
73+
{{- $registry := .Values.global.imageRegistry | default .Values.thanos.initChownData.image.registry -}}
74+
{{- if .Values.thanos.initChownData.image.sha }}
75+
image: "{{ $registry }}/{{ .Values.thanos.initChownData.image.repository }}:{{ .Values.thanos.initChownData.image.tag }}@sha256:{{ .Values.thanos.initChownData.image.sha }}"
76+
{{- else }}
77+
image: "{{ $registry }}/{{ .Values.thanos.initChownData.image.repository }}:{{ .Values.thanos.initChownData.image.tag }}"
78+
{{- end }}
7479
command: ['sh', '-c', 'chown 1000:3000 /data && chmod 750 /data']
7580
volumeMounts:
7681
- mountPath: /data

thanos/charts/templates/store.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ spec:
8787
name: data
8888
initContainers:
8989
- name: init-permissions
90-
image: busybox
90+
{{- $registry := .Values.global.imageRegistry | default .Values.thanos.initChownData.image.registry -}}
91+
{{- if .Values.thanos.initChownData.image.sha }}
92+
image: "{{ $registry }}/{{ .Values.thanos.initChownData.image.repository }}:{{ .Values.thanos.initChownData.image.tag }}@sha256:{{ .Values.thanos.initChownData.image.sha }}"
93+
{{- else }}
94+
image: "{{ $registry }}/{{ .Values.thanos.initChownData.image.repository }}:{{ .Values.thanos.initChownData.image.tag }}"
95+
{{- end }}
9196
command: ['sh', '-c', 'chown 1000:3000 /data && chmod 750 /data']
9297
securityContext:
9398
runAsUser: 0

thanos/charts/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ global:
55
## Labels to apply to all resources
66
commonLabels: {}
77

8+
# -- Overrides the registry globally for all images
9+
imageRegistry: null
10+
811
thanos:
912
image:
1013
repository: quay.io/thanos/thanos
@@ -16,6 +19,18 @@ thanos:
1619
# used across the stack
1720
httpAddress:
1821

22+
## Init container to set permissions
23+
initChownData:
24+
25+
## initChownData container image
26+
##
27+
image:
28+
# -- The Docker registry
29+
registry: docker.io
30+
repository: library/busybox
31+
tag: "stable"
32+
sha: ""
33+
1934
query:
2035
replicas:
2136
# defaults to info

thanos/plugindefinition.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spec:
1010
helmChart:
1111
name: thanos
1212
repository: "oci://ghcr.io/cloudoperators/greenhouse-extensions/charts"
13-
version: 0.1.4
13+
version: 0.1.5
1414
options:
1515
- default: null
1616
description: CLI param for Thanos Query
@@ -97,4 +97,4 @@ spec:
9797
description: TLS key for communication with Alertmanager
9898
required: false
9999
type: secret
100-
version: 0.2.4
100+
version: 0.2.5

0 commit comments

Comments
 (0)