mirror of
https://github.com/kubernetes-sigs/node-feature-discovery.git
synced 2024-12-14 11:57:51 +00:00
Merge pull request #325 from marquiz/devel/hardening
Container image hardening
This commit is contained in:
commit
a68a4ec4fb
5 changed files with 33 additions and 0 deletions
|
@ -25,6 +25,9 @@ RUN make test
|
|||
# Create production image for running node feature discovery
|
||||
FROM debian:stretch-slim
|
||||
|
||||
# Run as unprivileged user
|
||||
USER 65534:65534
|
||||
|
||||
# Use more verbose logging of gRPC
|
||||
ENV GRPC_GO_LOG_SEVERITY_LEVEL="INFO"
|
||||
|
||||
|
|
|
@ -64,6 +64,12 @@ spec:
|
|||
fieldPath: spec.nodeName
|
||||
image: k8s.gcr.io/nfd/node-feature-discovery:v0.6.0
|
||||
name: nfd-master
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
command:
|
||||
- "nfd-master"
|
||||
- env:
|
||||
|
@ -73,6 +79,12 @@ spec:
|
|||
fieldPath: spec.nodeName
|
||||
image: k8s.gcr.io/nfd/node-feature-discovery:v0.6.0
|
||||
name: nfd-worker
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
command:
|
||||
- "nfd-worker"
|
||||
args:
|
||||
|
|
|
@ -79,6 +79,12 @@ spec:
|
|||
fieldPath: spec.nodeName
|
||||
image: k8s.gcr.io/nfd/node-feature-discovery:v0.6.0
|
||||
name: nfd-master
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
command:
|
||||
- "nfd-master"
|
||||
## Enable TLS authentication
|
||||
|
|
|
@ -23,6 +23,12 @@ spec:
|
|||
fieldPath: spec.nodeName
|
||||
image: k8s.gcr.io/nfd/node-feature-discovery:v0.6.0
|
||||
name: nfd-worker
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
command:
|
||||
- "nfd-worker"
|
||||
args:
|
||||
|
|
|
@ -32,6 +32,12 @@ spec:
|
|||
fieldPath: spec.nodeName
|
||||
image: k8s.gcr.io/nfd/node-feature-discovery:v0.6.0
|
||||
name: nfd-worker
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
command:
|
||||
- "nfd-worker"
|
||||
args:
|
||||
|
|
Loading…
Reference in a new issue