Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix doc for valueFrom fields for analysis args #1763

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 33 additions & 5 deletions docs/features/analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down