From 34e9c0da6b96541345755aa5b303243554e03201 Mon Sep 17 00:00:00 2001 From: vito-laurenza-zocdoc Date: Fri, 15 Jan 2021 15:06:04 -0500 Subject: [PATCH] chore: reproduce restart analysis issue Signed-off-by: kyanagimoto --- artifacts/flagger/crd.yaml | 5 +++++ charts/flagger/crds/crd.yaml | 5 +++++ kustomize/base/flagger/crd.yaml | 5 +++++ test/workloads/deployment.yaml | 6 ++++++ test/workloads/init.sh | 1 + test/workloads/secret.yaml | 7 +++++++ 6 files changed, 29 insertions(+) create mode 100644 test/workloads/secret.yaml diff --git a/artifacts/flagger/crd.yaml b/artifacts/flagger/crd.yaml index 3713834fe..cbe103566 100644 --- a/artifacts/flagger/crd.yaml +++ b/artifacts/flagger/crd.yaml @@ -941,6 +941,11 @@ spec: - Failed - Terminating - Terminated + trackedConfigs: + description: TrackedConfig of this canary + additionalProperties: + type: string + type: object canaryWeight: description: Traffic weight routed to canary type: number diff --git a/charts/flagger/crds/crd.yaml b/charts/flagger/crds/crd.yaml index 3713834fe..cbe103566 100644 --- a/charts/flagger/crds/crd.yaml +++ b/charts/flagger/crds/crd.yaml @@ -941,6 +941,11 @@ spec: - Failed - Terminating - Terminated + trackedConfigs: + description: TrackedConfig of this canary + additionalProperties: + type: string + type: object canaryWeight: description: Traffic weight routed to canary type: number diff --git a/kustomize/base/flagger/crd.yaml b/kustomize/base/flagger/crd.yaml index 3713834fe..cbe103566 100644 --- a/kustomize/base/flagger/crd.yaml +++ b/kustomize/base/flagger/crd.yaml @@ -941,6 +941,11 @@ spec: - Failed - Terminating - Terminated + trackedConfigs: + description: TrackedConfig of this canary + additionalProperties: + type: string + type: object canaryWeight: description: Traffic weight routed to canary type: number diff --git a/test/workloads/deployment.yaml b/test/workloads/deployment.yaml index 390baa329..0cf8b2f55 100644 --- a/test/workloads/deployment.yaml +++ b/test/workloads/deployment.yaml @@ -31,6 +31,12 @@ spec: - name: podinfod image: stefanprodan/podinfo:3.1.0 imagePullPolicy: IfNotPresent + env: + - name: PODINFO_SECRET_VALUE + valueFrom: + secretKeyRef: + name: podinfo-secret + key: value ports: - name: http containerPort: 9898 diff --git a/test/workloads/init.sh b/test/workloads/init.sh index 3637c80e1..ff42fbe61 100755 --- a/test/workloads/init.sh +++ b/test/workloads/init.sh @@ -19,5 +19,6 @@ kubectl apply -k ${REPO_ROOT}/kustomize/tester kubectl -n test rollout status deployment/flagger-loadtester echo '>>> Deploy podinfo' +kubectl apply -f ${REPO_ROOT}/test/workloads/secret.yaml kubectl apply -f ${REPO_ROOT}/test/workloads/deployment.yaml kubectl apply -f ${REPO_ROOT}/test/workloads/daemonset.yaml diff --git a/test/workloads/secret.yaml b/test/workloads/secret.yaml new file mode 100644 index 000000000..cf8ec3d6d --- /dev/null +++ b/test/workloads/secret.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: podinfo-secret + namespace: test +stringData: + value: s3cr3t