Skip to content

Commit

Permalink
Merge pull request #325 from marquiz/devel/hardening
Browse files Browse the repository at this point in the history
Container image hardening
  • Loading branch information
k8s-ci-robot authored Aug 21, 2020
2 parents b6e3109 + 3cd2d34 commit a68a4ec
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
12 changes: 12 additions & 0 deletions nfd-daemonset-combined.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions nfd-master.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions nfd-worker-daemonset.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions nfd-worker-job.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a68a4ec

Please sign in to comment.