Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Oct 9, 2019

Conversation

stefanprodan
Copy link
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