Merge pull request #2178 from prometheus-operator/seccomp
Add securityContext items and add pod security labels
This commit is contained in:
@@ -80,6 +80,9 @@
|
|||||||
securityContext: {
|
securityContext: {
|
||||||
allowPrivilegeEscalation: false,
|
allowPrivilegeEscalation: false,
|
||||||
readOnlyRootFilesystem: true,
|
readOnlyRootFilesystem: true,
|
||||||
|
runAsNonRoot: true,
|
||||||
|
capabilities: { drop: ['ALL'] },
|
||||||
|
seccompProfile: { type: 'RuntimeDefault' },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -63,5 +63,6 @@ function(params) {
|
|||||||
allowPrivilegeEscalation: false,
|
allowPrivilegeEscalation: false,
|
||||||
readOnlyRootFilesystem: true,
|
readOnlyRootFilesystem: true,
|
||||||
capabilities: { drop: ['ALL'] },
|
capabilities: { drop: ['ALL'] },
|
||||||
|
seccompProfile: { type: 'RuntimeDefault' },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,7 +280,9 @@ function(params) {
|
|||||||
securityContext: {
|
securityContext: {
|
||||||
allowPrivilegeEscalation: false,
|
allowPrivilegeEscalation: false,
|
||||||
readOnlyRootFilesystem: true,
|
readOnlyRootFilesystem: true,
|
||||||
|
runAsNonRoot: true,
|
||||||
capabilities: { drop: ['ALL'] },
|
capabilities: { drop: ['ALL'] },
|
||||||
|
seccompProfile: { type: 'RuntimeDefault' },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -150,6 +150,10 @@ local utils = import './lib/utils.libsonnet';
|
|||||||
kind: 'Namespace',
|
kind: 'Namespace',
|
||||||
metadata: {
|
metadata: {
|
||||||
name: $.values.common.namespace,
|
name: $.values.common.namespace,
|
||||||
|
labels: {
|
||||||
|
'pod-security.kubernetes.io/warn': 'privileged',
|
||||||
|
'pod-security.kubernetes.io/warn-version': 'latest',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ spec:
|
|||||||
runAsGroup: 65532
|
runAsGroup: 65532
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
runAsUser: 65532
|
runAsUser: 65532
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
kubernetes.io/os: linux
|
||||||
serviceAccountName: blackbox-exporter
|
serviceAccountName: blackbox-exporter
|
||||||
|
|||||||
@@ -76,6 +76,8 @@ spec:
|
|||||||
runAsGroup: 65532
|
runAsGroup: 65532
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
runAsUser: 65532
|
runAsUser: 65532
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
- args:
|
- args:
|
||||||
- --secure-listen-address=:9443
|
- --secure-listen-address=:9443
|
||||||
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
|
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
|
||||||
@@ -101,6 +103,8 @@ spec:
|
|||||||
runAsGroup: 65532
|
runAsGroup: 65532
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
runAsUser: 65532
|
runAsUser: 65532
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
kubernetes.io/os: linux
|
||||||
serviceAccountName: kube-state-metrics
|
serviceAccountName: kube-state-metrics
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ spec:
|
|||||||
runAsGroup: 65532
|
runAsGroup: 65532
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
runAsUser: 65532
|
runAsUser: 65532
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
hostPID: true
|
hostPID: true
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ spec:
|
|||||||
drop:
|
drop:
|
||||||
- ALL
|
- ALL
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
|
runAsNonRoot: true
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
startupProbe:
|
startupProbe:
|
||||||
failureThreshold: 18
|
failureThreshold: 18
|
||||||
httpGet:
|
httpGet:
|
||||||
|
|||||||
@@ -73,6 +73,8 @@ spec:
|
|||||||
runAsGroup: 65532
|
runAsGroup: 65532
|
||||||
runAsNonRoot: true
|
runAsNonRoot: true
|
||||||
runAsUser: 65532
|
runAsUser: 65532
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/os: linux
|
kubernetes.io/os: linux
|
||||||
securityContext:
|
securityContext:
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
metadata:
|
||||||
|
labels:
|
||||||
|
pod-security.kubernetes.io/warn: privileged
|
||||||
|
pod-security.kubernetes.io/warn-version: latest
|
||||||
name: monitoring
|
name: monitoring
|
||||||
|
|||||||
Reference in New Issue
Block a user