Skip to content

Commit

Permalink
Add securityContext items and add pod security labes
Browse files Browse the repository at this point in the history
  • Loading branch information
metalmatze committed May 31, 2023
1 parent 3fff8b5 commit a95f7b9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jsonnet/kube-prometheus/addons/pyrra.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
securityContext: {
allowPrivilegeEscalation: false,
readOnlyRootFilesystem: true,
runAsNonRoot: true,
capabilities: { drop: ['ALL'] },
seccompProfile: { type: 'RuntimeDefault' },
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ function(params) {
allowPrivilegeEscalation: false,
readOnlyRootFilesystem: true,
capabilities: { drop: ['ALL'] },
seccompProfile: { type: 'RuntimeDefault' },
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ function(params) {
securityContext: {
allowPrivilegeEscalation: false,
readOnlyRootFilesystem: true,
runAsNonRoot: true,
capabilities: { drop: ['ALL'] },
seccompProfile: { type: 'RuntimeDefault' },
},
};

Expand Down
4 changes: 4 additions & 0 deletions jsonnet/kube-prometheus/main.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ local utils = import './lib/utils.libsonnet';
kind: 'Namespace',
metadata: {
name: $.values.common.namespace,
labels: {
'pod-security.kubernetes.io/warn': 'privileged',
'pod-security.kubernetes.io/warn-version': 'latest',
},
},
},
},
Expand Down

0 comments on commit a95f7b9

Please sign in to comment.