Skip to content

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

@namgk

Description

@namgk

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: ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions