From dd79deeb29f4ef92f70d602cc21447b46ab41970 Mon Sep 17 00:00:00 2001 From: harikrongali <81331774+harikrongali@users.noreply.github.com> Date: Wed, 12 Jan 2022 12:48:55 -0800 Subject: [PATCH] docs: fix doc for valueFrom fields for analysis args Signed-off-by: hari rongali doc: update example to refer canary target groups Signed-off-by: hari rongali doc: cleanup example Signed-off-by: hari rongali doc: add clarification for rollout status Signed-off-by: hari rongali --- docs/features/analysis.md | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/docs/features/analysis.md b/docs/features/analysis.md index acffd7f04f..8ffaf10d31 100644 --- a/docs/features/analysis.md +++ b/docs/features/analysis.md @@ -426,9 +426,9 @@ spec: valueFrom: podTemplateHashValue: Latest ``` -Analysis arguments also support valueFrom for reading any Rollout fields and passing them as arguments to AnalysisTemplate. -An example would be to reference metadata labels like env and region and passing them along to AnalysisTemplate, or any field -from the Rollout status +Analysis arguments also support valueFrom for reading metadata fields and passing them as arguments to AnalysisTemplate. +An example would be to reference metadata labels like env and region and passing them along to AnalysisTemplate. + ```yaml apiVersion: argoproj.io/v1alpha1 kind: Rollout @@ -458,10 +458,38 @@ spec: valueFrom: fieldRef: fieldPath: metadata.labels['region'] - - name: canary-hash +``` + +!!! important + Available since v1.2 +Analysis arguments also support valueFrom for reading any field from Rollout status and passing them as arguments to AnalysisTemplate. +Following example references Rollout status field like aws canaryTargetGroup name and passing them along to AnalysisTemplate + +from the Rollout status +```yaml +apiVersion: argoproj.io/v1alpha1 +kind: Rollout +metadata: + name: guestbook + labels: + appType: demo-app + buildType: nginx-app + ... + env: dev + region: us-west-2 +spec: +... + strategy: + canary: + analysis: + templates: + - templateName: args-example + args: + ... + - name: canary-targetgroup-name valueFrom: fieldRef: - fieldPath: status.canary.weights.canary.podTemplateHash + fieldPath: status.alb.canaryTargetGroup.name ``` ## BlueGreen Pre Promotion Analysis