Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Use .Release.Namespace instead of .Release.Name as a prefix for cluster-scoped objects #1257

Open
@jandubois

Description

@jandubois

Right now cf-operator.fullname prefixes the chart name with the release name and not the namespace:

https://github.com/cloudfoundry-incubator/quarks-operator/blob/master/deploy/helm/quarks/templates/_helpers.tpl#L14-L25

This is used to create names for e.g. cluster roles and cluster rolebindings. The problem is that with helm 3 the release name is no longer unique (and it wasn't with helm 2 either if you had more than one tiller instance).

So you can have a cf-operator release in both ns1 and ns2. Both will try to create a cluster role called cf-operator-quarks-cluster (among others for job, secret, and statefulset), creating a collision.

If you prefix with the namespace, the role and rolebinding will be ns1-quarks-cluster and ns2-quarks-cluster, which can be removed independently when their corresponding release is removed from ns1 or ns2.

Given that the namespace-scoped objects don't include the release name in their object names, it isn't supported to install multiple releases of the same quarks chart into the same namespace anyways, so dropping the release name from the objects should not be an issue.

The kubecf cluster-scoped objects have the same problem, but I thought I would raise it here first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions