Skip to content

Commit dc20383

Browse files
committed
feat(manifests): Add securityContext to Thanos compact StatefulSets
1 parent 6fedb04 commit dc20383

File tree

5 files changed

+45
-0
lines changed

5 files changed

+45
-0
lines changed

examples/all/manifests/thanos-compact-shard0-statefulSet.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,17 @@ spec:
113113
requests:
114114
cpu: 0.123
115115
memory: 123Mi
116+
securityContext:
117+
allowPrivilegeEscalation: false
118+
capabilities:
119+
drop:
120+
- ALL
121+
readOnlyRootFilesystem: true
122+
runAsGroup: 65532
123+
runAsNonRoot: true
124+
runAsUser: 65534
125+
seccompProfile:
126+
type: RuntimeDefault
116127
terminationMessagePolicy: FallbackToLogsOnError
117128
volumeMounts:
118129
- mountPath: /var/thanos/compact

examples/all/manifests/thanos-compact-shard1-statefulSet.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,17 @@ spec:
113113
requests:
114114
cpu: 0.123
115115
memory: 123Mi
116+
securityContext:
117+
allowPrivilegeEscalation: false
118+
capabilities:
119+
drop:
120+
- ALL
121+
readOnlyRootFilesystem: true
122+
runAsGroup: 65532
123+
runAsNonRoot: true
124+
runAsUser: 65534
125+
seccompProfile:
126+
type: RuntimeDefault
116127
terminationMessagePolicy: FallbackToLogsOnError
117128
volumeMounts:
118129
- mountPath: /var/thanos/compact

examples/all/manifests/thanos-compact-shard2-statefulSet.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,17 @@ spec:
113113
requests:
114114
cpu: 0.123
115115
memory: 123Mi
116+
securityContext:
117+
allowPrivilegeEscalation: false
118+
capabilities:
119+
drop:
120+
- ALL
121+
readOnlyRootFilesystem: true
122+
runAsGroup: 65532
123+
runAsNonRoot: true
124+
runAsUser: 65534
125+
seccompProfile:
126+
type: RuntimeDefault
116127
terminationMessagePolicy: FallbackToLogsOnError
117128
volumeMounts:
118129
- mountPath: /var/thanos/compact

examples/all/manifests/thanos-compact-statefulSet.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ spec:
103103
requests:
104104
cpu: 0.123
105105
memory: 123Mi
106+
securityContext:
107+
allowPrivilegeEscalation: false
108+
capabilities:
109+
drop:
110+
- ALL
111+
readOnlyRootFilesystem: true
112+
runAsGroup: 65532
113+
runAsNonRoot: true
114+
runAsUser: 65534
115+
seccompProfile:
116+
type: RuntimeDefault
106117
terminationMessagePolicy: FallbackToLogsOnError
107118
volumeMounts:
108119
- mountPath: /var/thanos/compact

jsonnet/kube-thanos/kube-thanos-compact.libsonnet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ function(params) {
127127
),
128128
resources: if tc.config.resources != {} then tc.config.resources else {},
129129
terminationMessagePolicy: 'FallbackToLogsOnError',
130+
securityContext: tc.config.securityContextContainer,
130131
};
131132

132133
{

0 commit comments

Comments
 (0)