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

KUDO trying to expand a configmap file's variables, causing it to not install the operator #1792

Open
ChristianKlass opened this issue Apr 28, 2021 · 0 comments
Labels

Comments

@ChristianKlass
Copy link

What happened: I was trying to create/install an Alertmanager operator (among others, but they are irrelevant). Alertmanager's rules file has some stuff that they will expand as well, and unfortunately, they follow the same format as Kudo's variables. For example, the configmap looks something like this:

apiVersion: v1
data:
  rules.yaml: |
    groups:
      - name: server_nic_status
        rules:
        - alert: NicDown
          expr: nic_status == 0
          for: 30s
          annotations:
            title: 'Interface {{ $labels.nic }} down'
            ...
kind: ConfigMap
metadata: 
  name: alertmanager-config
  namespace: {{ .Namespace }}

When I try to install the configmap, Kudo will complain about an undefined variable $labels. $labels is used by Alertmanager.

What you expected to happen: I expected that Kudo would ignore any expansions which are part of a file in the configmap. I guess it's possible that people would want to put Kudo variables in the configmap files as well, so maybe some escape character or something for within files? I'm not sure hahaha.

How to reproduce it (as minimally and precisely as possible): Use Kudo to apply the above configmap.

Anything else we need to know?:

Environment:

  • Kudo version (use kubectl kudo version): v0.19.2
  • Cloud provider or hardware configuration: On Prem k0s
  • OS (e.g. from /etc/os-release): Red Hat 8
  • Kernel (e.g. uname -a): Linux k0s 4.18.0-240-el8.x86_64
  • Install tools:
  • Others:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant