Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Feature request: Add support for extra Labels on PODs #281

Open
Eneuman opened this issue Feb 7, 2020 · 2 comments
Open

Feature request: Add support for extra Labels on PODs #281

Eneuman opened this issue Feb 7, 2020 · 2 comments

Comments

@Eneuman
Copy link

Eneuman commented Feb 7, 2020

Use case:

AKS is a requirement for using Dev Spaces.
Alot of services developed for AKS are using other resources on Azure. The prefered way of securly accessing theese resources are by using Managed Identities.

To access Azure resources from from a POD (using Managed Identities), MS has developed "AAD Pod Identity".

To use AAD Pod Identity, the POD need to have a extra label with the name "aadpodidbinding" on it.

Today, adding a extra label to a POD requires you to hard code it into deployment.yaml

It would be great if you could add extra labels in the "values.yaml" file instead.

@philon-msft
Copy link
Contributor

@Eneuman, thank you for the suggestion! We'll look into this and let you know what we find.

@DrEsteban
Copy link
Contributor

@Eneuman If you'd prefer a values.yaml-based strategy for customizing the labels on your Pod, you can make updates to your Helm chart to support this. (Dev Spaces shouldn't get in the way.)

For example:
values.yaml

deployment:
  podLabels:
    aadpodidbinding: foo

deployment.yaml (truncated)

spec:
  template:
    metadata:
      labels:
        app: {{ template "$CHART_NAME$.name" . }}
        draft: {{ .Values.draft | default "draft-app" }}
        release: {{ .Release.Name }}
        {{- range $key, $value := .Values.deployment.podLabels }}
        {{ $key }}: {{ $value }}
        {{- end }}

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

3 participants