Skip to content

Add the app/name label to services and primary deployment#333

Merged
stefanprodan merged 2 commits intomasterfrom
default-labels
Oct 9, 2019
Merged

Add the app/name label to services and primary deployment#333
stefanprodan merged 2 commits intomasterfrom
default-labels

Conversation

@stefanprodan
Copy link
Copy Markdown
Member

@stefanprodan stefanprodan commented Oct 9, 2019

This PR adds a label to the ClusterIP services and primary deployment metadata at bootstrap time. The label name is deduced from -selector-labels command flag, by default it will be app, name or app.kubernetes.io/name.

The label value is set to the object name, for example:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: podinfo-primary
  labels:
    app: podinfo-primary
---
apiVersion: v1
kind: Service
metadata:
  name: podinfo
  labels:
    app: podinfo
---
apiVersion: v1
kind: Service
metadata:
  name: podinfo-primary
  labels:
    app: podinfo-primary
---
apiVersion: v1
kind: Service
metadata:
  name: podinfo-canary
  labels:
    app: podinfo-canary

Ref: #329

@stefanprodan stefanprodan changed the title Add the name label to services and primary deployment Add the app/name label to services and primary deployment Oct 9, 2019
@stefanprodan stefanprodan merged commit d4250f3 into master Oct 9, 2019
@stefanprodan stefanprodan deleted the default-labels branch October 9, 2019 10:45
@stefanprodan stefanprodan mentioned this pull request Oct 21, 2019
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

Successfully merging this pull request may close these issues.

1 participant