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

[kots cli] Templating function not effective in additionalNamespace field during admin-console upgrade #4063

Open
namgk opened this issue Oct 12, 2023 · 1 comment

Comments

@namgk
Copy link

namgk commented Oct 12, 2023

When running the upgrade or deploy with the kots cli (e.g. kubectl kots admin-console upgrade), it go over the manifests and from this procedure, it doesn't handle the template function.

log.ChildActionWithSpinner("Creating namespace %s", additionalNamespace)
namespace := &corev1.Namespace{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "Namespace",
},
ObjectMeta: metav1.ObjectMeta{
Name: additionalNamespace,
},
}

We have an application.yaml that has this part:

additionalNamespaces:
    - aaa
    - '{{repl if XX}}bb{{repl end}}'

It the admin-console upgrade command failed with

• Upgrading Admin Console
• Creating namespace {{repl if XX}}bb{{repl end}} ✗
Error: failed to upgrade: failed to upgrade admin console: failed to ensure additional namespaces: failed to create namespace: Namespace "{{repl if XX}}bb{{repl end}}" is invalid: [metadata.name: Invalid value: ...

@cbodonnell
Copy link
Member

@namgk the additionalNamespaces field does not support go templating at this time (docs). Would you be able to share a little bit more about your use-case? We may be able to help find a way to accomplish what you are looking to do.

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

No branches or pull requests

2 participants