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

Process multiple kube objects in one conditional func #457

Open
ShiMing-Q opened this issue Jan 6, 2023 · 1 comment
Open

Process multiple kube objects in one conditional func #457

ShiMing-Q opened this issue Jan 6, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@ShiMing-Q
Copy link

Using below mtp I got error

razee-logs:
    error:
      b29ae44205e1e519cfa03479fc1a3a967bf60f95: expected a single document in the
        stream, but found more'
apiVersion: deploy.razee.io/v1alpha2
kind: MustacheTemplate
metadata:
  name: mtp1
spec:
  templateEngine: handlebars
  env:
    - name: version
      optional: true
      valueFrom:
        genericKeyRef:
          apiVersion: deploy.razee.io/v1alpha1
          key: version
  strTemplates:
    - |
      {{#unless version}}
      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: cm1
      data: {}
      ---
      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: cm2
      data: {}
      {{/unless}}
@carrolp carrolp added the enhancement New feature or request label May 24, 2023
@carrolp
Copy link
Contributor

carrolp commented May 24, 2023

Can probably be worked around by defining multiple elements in the strTemplates, rather than one element with multiple documents separated by ---

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants