-
Notifications
You must be signed in to change notification settings - Fork 906
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
feat: adding support for valueFrom in analysis arguments. #797
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix linting issues by running make lint
and add documentation for the feature
Codecov Report
@@ Coverage Diff @@
## master #797 +/- ##
==========================================
+ Coverage 82.37% 82.40% +0.03%
==========================================
Files 97 97
Lines 8279 8294 +15
==========================================
+ Hits 6820 6835 +15
Misses 1045 1045
Partials 414 414
Continue to review full report at Codecov.
|
EDIT: nevermind, i messed up my rollout labels. kind: AnalysisTemplate
apiVersion: argoproj.io/v1alpha1
metadata:
name: sleep-job
spec:
args:
- name: duration
value: 0s
- name: exit-code
value: "0"
metrics:
- name: sleep-job
provider:
job:
spec:
template:
spec:
containers:
- name: sleep-job
image: nginx:1.19-alpine
command: [sh, -c, -x]
args: ["sleep {{args.duration}} && exit {{args.exit-code}}"]
restartPolicy: Never
backoffLimit: 0 apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: rollout-inline-analysis
metadata:
labels:
duration: 600s
spec:
strategy:
canary:
steps:
- setWeight: 10
- analysis:
templates:
- templateName: sleep-job
args:
- name: duration
valueFrom:
fieldRef:
fieldPath: metadata.labels['duration']
selector:
matchLabels:
app: rollout-inline-analysis
template:
metadata:
labels:
app: rollout-inline-analysis
spec:
containers:
- name: rollouts-demo
image: nginx:1.19-alpine
resources:
requests:
memory: 16Mi
cpu: 5m The resulting job did not have the value substituted: spec:
containers:
- args:
- sleep && exit 0
command:
- sh
- -c
- -x |
Great work! |
Checklist: