-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
template substitution for configMapKeyRef
#8106
Comments
This might not be possible unfortunately. The security model of the workflow controller means it typcially cannot read configmap in the user's namespace. We would not want to change this. However, I think there is a similar issue for config maps in parameters. Did you check for that feature? |
@alexec sorry but what do you mean by config maps in parameters...basically I was trying to retrieve value from configMap as one of the input parameters, but also want to "template-ize" the configMap name from another input parameter |
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: arguments-parameters-from-configmap-
labels:
workflows.argoproj.io/test: "true"
annotations:
workflows.argoproj.io/description: |
This example demonstrates loading parameter values from configmap.
Note that the "simple-parameters" ConfigMap (defined in examples/configmaps/simple-parameters-configmap.yaml)
needs to be created first before submitting this workflow.
spec:
entrypoint: whalesay
templates:
- name: whalesay
inputs:
parameters:
# Parameters can also be passed via configmap reference.
- name: message
valueFrom:
configMapKeyRef:
name: simple-parameters
key: msg
container:
image: argoproj/argosay:v2
args: ["echo", "{{inputs.parameters.message}}"] |
@alexec that's what I'm using for now, and I want to do further template substitution like parameters:
# Parameters can also be passed via configmap reference.
- name: config-map-name
- name: message
valueFrom:
configMapKeyRef:
name: {{inputs.parameters.config-map-name}}
key: msg but I guess that's not easy to do......I'll try to find some other workaround |
configMapKeyRef
Summary
want to support template substitution for configMap
something like:
I've tried the example above but it's not working, I suppose this feature is not supported yet. But if my usage is wrong pls let me know.
Use Cases
I might have several parallel configMap (or something like branching) and I would like to indicate the workflow which configMap to pick from
Message from the maintainers:
Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.
The text was updated successfully, but these errors were encountered: