Skip to content

Kubernetes publisher generates invalid metadata.name #9897

Closed
@hewe-saxo

Description

@hewe-saxo

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The Kubernetes publisher from #830 can generate invalid Kubernetes object names.

Aspire resources names can be upper case, lower case and contain dashes. When generating Helm and Kubernetes objects, this must be taken into consideration, as the Aspire resource is taken as a base name.

Kubernetes objects can't contain upper case characters: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/

Helm values sections can not contain dashes ("-"). When trying to helm install such a template, it will generate the following error: "bad character U+002D '-'". This is also backed up by the helm documentation here: https://helm.sh/docs/chart_best_practices/values/

Expected Behavior

The publisher should never generate invalid Kubernetes and Helm resource names.

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions