Add securityContext items and add pod security labes
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',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user