From 6e46647c0a4ce7c94144c03011e614f9e1e9a4ae Mon Sep 17 00:00:00 2001 From: Tomoya Nishide Date: Sat, 9 Jan 2021 18:17:52 +0900 Subject: [PATCH] project POD_NAME into the deployments for logging purpose --- config/500-controller.yaml | 4 ++++ config/500-webhook.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/config/500-controller.yaml b/config/500-controller.yaml index 810844090..776111337 100644 --- a/config/500-controller.yaml +++ b/config/500-controller.yaml @@ -66,6 +66,10 @@ spec: value: knative.dev/sources - name: SAMPLE_SOURCE_RA_IMAGE value: ko://knative.dev/sample-source/cmd/receive_adapter + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name securityContext: allowPrivilegeEscalation: false diff --git a/config/500-webhook.yaml b/config/500-webhook.yaml index 839323139..73e88a565 100644 --- a/config/500-webhook.yaml +++ b/config/500-webhook.yaml @@ -56,6 +56,10 @@ spec: value: knative.dev/eventing - name: WEBHOOK_NAME value: samplesource-webhook + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name ports: - containerPort: 9090 name: metrics