Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Release name lacks sufficient uniqueness #49

Closed
joelanford opened this issue Oct 11, 2018 · 1 comment
Closed

Release name lacks sufficient uniqueness #49

joelanford opened this issue Oct 11, 2018 · 1 comment
Assignees

Comments

@joelanford
Copy link
Member

This issue manifests itself only after #48 is merged, once multiple resource types are supported.

The release name lookup for an object returns a value that is not sufficiently unique:

func releaseName(r *v1alpha1.HelmApp) string {
return fmt.Sprintf("%s-%s", operatorName, r.GetName())
}

Kubernetes allows different resource types to be named the same, even within the same namespace. If the operator is watching multiple resource types and there is an instance of each resource type with the same name, they will resolve to the same release name, which tiller does not support.

An obvious option is to include the resource type in the release name, but that is problematic due to a 53-character limit on the release name imposed by helm.

A better solution may be something like:

func releaseName(r *v1alpha1.HelmApp) string {
	if r.Status.Release != nil {
		return r.Status.Release.GetName()
	}
	return ""
}

This would pull the release name from the object's actual release, and if that doesn't exist, an empty string would result in Tiller generating a unique release name during release installation. This approach would require the use of a finalizer (provided by #48) to be able to lookup the release name during uninstallation.

We could also consider supporting an annotation or two that allows a user to override the default provided by tiller. For example:

  • <resource_string>/resource-name-as-helm-release-name: "true"|"false"
  • <resource_string>/helm-release-name: <release_name>

Thoughts?

@joelanford
Copy link
Member Author

Closed by #57

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

No branches or pull requests

1 participant