diff --git a/templates/resources/k8s/deployment.yml b/templates/resources/k8s/deployment.yml index 167f8da9..59c9a82a 100644 --- a/templates/resources/k8s/deployment.yml +++ b/templates/resources/k8s/deployment.yml @@ -1,16 +1,20 @@ apiVersion : apps/v1beta1 kind: Deployment metadata: - name: {{ imageRepository }} + name: {{ imageRepository }} + labels: + app.kubernetes.io/name: {{ imageRepository }} + app.kubernetes.io/managed-by: azure-pipelines spec: replicas: 1 template: metadata: labels: - app: {{ imageRepository }} + app.kubernetes.io/name: {{ imageRepository }} + app.kubernetes.io/managed-by: azure-pipelines spec: containers: - - name: {{ imageRepository }} - image: {{ containerRegistryConnection.Authorization.Parameters.loginServer }}/{{ imageRepository }} - ports: - - containerPort: {{ servicePort }} \ No newline at end of file + - name: {{ imageRepository }} + image: {{ containerRegistryConnection.Authorization.Parameters.loginServer }}/{{ imageRepository }} + ports: + - containerPort: {{ servicePort }} \ No newline at end of file diff --git a/templates/resources/k8s/service.yml b/templates/resources/k8s/service.yml index de84c182..8cf06a8b 100644 --- a/templates/resources/k8s/service.yml +++ b/templates/resources/k8s/service.yml @@ -1,10 +1,13 @@ apiVersion: v1 kind: Service metadata: - name: {{ imageRepository }} + name: {{ imageRepository }} + labels: + app.kubernetes.io/name: {{ imageRepository }} + app.kubernetes.io/managed-by: azure-pipelines spec: - type: LoadBalancer - ports: - - port: {{ servicePort }} - selector: - app: {{ imageRepository }} \ No newline at end of file + type: LoadBalancer + ports: + - port: {{ servicePort }} + selector: + app.kubernetes.io/name: {{ imageRepository }} \ No newline at end of file