Skip to content

Commit

Permalink
Adopt the :nonroot base image (#2429)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmoor authored and knative-prow-robot committed Jan 23, 2020
1 parent e6bb273 commit ca2218c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .ko.yaml
@@ -0,0 +1,2 @@
# Use :nonroot base image for all containers
defaultBaseImage: gcr.io/distroless/static:nonroot
18 changes: 9 additions & 9 deletions config/channels/in-memory-channel/500-controller.yaml
Expand Up @@ -33,6 +33,7 @@ spec:
containers:
- name: controller
image: knative.dev/eventing/cmd/in_memory/channel_controller

env:
- name: CONFIG_LOGGING_NAME
value: config-logging
Expand All @@ -44,13 +45,12 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace

securityContext:
allowPrivilegeEscalation: false

ports:
- containerPort: 9090
name: metrics
volumeMounts:
- name: config-logging
mountPath: /etc/config-logging
volumes:
- name: config-logging
configMap:
name: config-logging
- name: metrics
containerPort: 9090
- name: profiling
containerPort: 8008
3 changes: 3 additions & 0 deletions config/core/deployments/controller.yaml
Expand Up @@ -59,6 +59,9 @@ spec:
- name: BROKER_IMAGE_PULL_SECRET_NAME
value:

securityContext:
allowPrivilegeEscalation: false

ports:
- name: metrics
containerPort: 9090
Expand Down
3 changes: 3 additions & 0 deletions config/core/deployments/sources-controller.yaml
Expand Up @@ -62,6 +62,9 @@ spec:
# that is containerized and substituted here.
value: knative.dev/eventing/cmd/apiserver_receive_adapter

securityContext:
allowPrivilegeEscalation: false

ports:
- name: metrics
containerPort: 9090
Expand Down
3 changes: 3 additions & 0 deletions config/core/deployments/webhook.yaml
Expand Up @@ -61,6 +61,9 @@ spec:
- name: WEBHOOK_NAME
value: eventing-webhook

securityContext:
allowPrivilegeEscalation: false

ports:
- name: https-webhook
containerPort: 8443
Expand Down

0 comments on commit ca2218c

Please sign in to comment.