Skip to content

resource template: set ConfigMap using JSON string #13636

Closed Locked Answered by Nephdz
Nephdz asked this question in Q&A
Discussion options

You must be logged in to vote

I've fixed this. A combination of the correct workflowtemplate and sensor definition:

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: test
spec:
  entrypoint: create-configmap
  arguments:
    parameters:
      - name: configmap-name
      - name: configs
  templates:
    - name: create-configmap
      resource:
        action: patch
        manifest: |
          apiVersion: v1
          kind: ConfigMap
          metadata:
            name: {{workflow.parameters.configmap-name}}
          data:
            {{ workflow.parameters.configs }}
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
  name: test
spec:
  template:
    serviceAccountName: sa
  dependencies

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Nephdz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area/templates/resource area/templating Templating with `{{...}}` type/support User support issue - likely not a bug
1 participant