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

Feature Request: Add namespace label to bundle instance #444

Open
datapedd opened this issue Nov 17, 2024 · 1 comment
Open

Feature Request: Add namespace label to bundle instance #444

datapedd opened this issue Nov 17, 2024 · 1 comment

Comments

@datapedd
Copy link

datapedd commented Nov 17, 2024

Timoni is awesome, but when I use Talos and want to create a local-storage-bundle, I need a namespace that has a label:

"pod-security.kubernetes.io/enforce": "privileged"

How is it possible to maybe add that as an option to the namespace parameter in the instance?
I would expect it to be:

namespace: {
    name:   "local-path-storage"
    labels: {
        "pod-security.kubernetes.io/enforce": "privileged"
    }
}

Below is the complete bundle definition for local-path-storage and provisioner, which includes the creation of a namespace with the required label if it does not already exist:

// Bundle definition for local-path-storage and provisioner
bundle: {
    apiVersion: "v1alpha1"
    name:       "local-storage-bundle"
    instances: {
        // Helm release for local-path-provisioner
        "local-path-provisioner": {
            module: {
                url:     "oci://ghcr.io/stefanprodan/modules/flux-helm-release"
                version: "latest"
            }
            namespace: {
                name: "local-path-storage"
                labels: {
                    "pod-security.kubernetes.io/enforce": "privileged"
                }
            }
            values: {
                repository: {
                    url: "https://charts.containeroo.ch"
                }
                chart: {
                    name:    "local-path-provisioner"
                    version: "0.0.31"
                }
                helmValues: {
                    nodePathMap: [
                        {
                            node:  "DEFAULT_PATH_FOR_NON_LISTED_NODES"
                            paths: ["/var/local-path-provisioner"]
                        }
                    ]
                    storageClass: {
                        name:         "local-path"
                        defaultClass: true
                    }
                }
            }
        }
    }
}
@stefanprodan
Copy link
Owner

stefanprodan commented Dec 15, 2024

This would be a breaking change to the bundle API. I'm considering adding namespaceMetadata as an optional field that would allow setting both labels and annotations.

PS. The current workaround is to have your own module that provisions the namespaces in your cluster.

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