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

cannot use environment variable for release namespace #574

Closed
2 tasks done
ivanfetch-wt opened this issue Apr 20, 2022 · 2 comments
Closed
2 tasks done

cannot use environment variable for release namespace #574

ivanfetch-wt opened this issue Apr 20, 2022 · 2 comments
Labels
bug Something isn't working triage This bug needs triage

Comments

@ivanfetch-wt
Copy link

What happened?

I receive the following error when attempting to use an environment variable for a Helm release namespace.

Namespace "${rbacmanager_namespace}" is invalid: [metadata.name: Invalid value: "${rbacmanager_namespace}": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?'), metadata.labels: Invalid value: "${rbacmanager_namespace}": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')]

The above used this course file:

schema: v2
namespace: test
repositories:
  fairwinds-stable:
    url: https://charts.fairwinds.com/stable
namespace_management:
  default:
    settings:
      overwrite: false
releases:
  - name: rbac-manager
    namespace: ${rbacmanager_namespace}
    namespace_management:
      settings:
        overwrite: false
    chart: rbac-manager
    version: 1.11.0
    repository: fairwinds-stable

What did you expect to happen?

I expected the value for the rbac-manager release namespace to be dynamically set from the RBACMANAGER_NAMESPACE environment variable. This has worked with previous Reckoner Course schemas, also using the Python build.

How can we reproduce this?

schema: v2
namespace: test
repositories:
  fairwinds-stable:
    url: https://charts.fairwinds.com/stable
namespace_management:
  default:
    settings:
      overwrite: false
releases:
  - name: rbac-manager
    namespace: ${rbacmanager_namespace}
    namespace_management:
      settings:
        overwrite: false
    chart: rbac-manager
    version: 1.11.0
    repository: fairwinds-stable

reckoner plot -a the_above_file.yaml

Version

Go build, Version:6.0.0-rc.4 Commit:a163b28e538952188d12186b4f8a8562cc365708

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

Andy mentioned this should work and may be related to ordering of env var processing vs. namespace management, related to the Go rewrite. Here is an internal Slack thread.

@ivanfetch-wt ivanfetch-wt added bug Something isn't working triage This bug needs triage labels Apr 20, 2022
@sudermanjr
Copy link
Member

Once we merge the fix for #575, I can take a look and see if this is still an issue.

@sudermanjr
Copy link
Member

Fixed by #576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This bug needs triage
Projects
None yet
Development

No branches or pull requests

2 participants