From 39dc1369228952164bcdde2350ebc91cf00e36b0 Mon Sep 17 00:00:00 2001 From: Naseem Date: Fri, 22 Feb 2019 03:57:27 -0500 Subject: [PATCH] Use recommended labels (#113) Use recommended labels Signed-off-by: Naseem Ullah --- README.md | 4 +- all-in-one/jaeger-all-in-one-template.yml | 32 ++++++++++------ jaeger-production-template.yml | 44 ++++++++++++++-------- production-elasticsearch/configmap.yml | 2 +- production-elasticsearch/elasticsearch.yml | 22 +++++++---- production/cassandra.yml | 27 ++++++++----- production/configmap.yml | 2 +- 7 files changed, 86 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 2b915bc..0a71a0b 100644 --- a/README.md +++ b/README.md @@ -100,11 +100,11 @@ Assuming that your application is named `myapp` and the image is for it is `myna spec: selector: matchLabels: - app: myapp + app.kubernetes.io/name: myapp template: metadata: labels: - app: myapp + app.kubernetes.io/name: myapp spec: containers: - image: mynamespace/hello-myimage diff --git a/all-in-one/jaeger-all-in-one-template.yml b/all-in-one/jaeger-all-in-one-template.yml index ce47ce7..d1f2ef0 100644 --- a/all-in-one/jaeger-all-in-one-template.yml +++ b/all-in-one/jaeger-all-in-one-template.yml @@ -18,10 +18,11 @@ items: - apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: jaeger-deployment + name: jaeger labels: app: jaeger - jaeger-infra: jaeger-deployment + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: all-in-one spec: replicas: 1 strategy: @@ -30,7 +31,8 @@ items: metadata: labels: app: jaeger - jaeger-infra: jaeger-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: all-in-one annotations: prometheus.io/scrape: "true" prometheus.io/port: "16686" @@ -65,7 +67,8 @@ items: name: jaeger-query labels: app: jaeger - jaeger-infra: jaeger-service + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: query spec: ports: - name: query-http @@ -73,7 +76,8 @@ items: protocol: TCP targetPort: 16686 selector: - jaeger-infra: jaeger-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: all-in-one type: LoadBalancer - apiVersion: v1 kind: Service @@ -81,7 +85,8 @@ items: name: jaeger-collector labels: app: jaeger - jaeger-infra: collector-service + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: collector spec: ports: - name: jaeger-collector-tchannel @@ -97,7 +102,8 @@ items: protocol: TCP targetPort: 9411 selector: - jaeger-infra: jaeger-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: all-in-one type: ClusterIP - apiVersion: v1 kind: Service @@ -105,7 +111,8 @@ items: name: jaeger-agent labels: app: jaeger - jaeger-infra: agent-service + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: agent spec: ports: - name: agent-zipkin-thrift @@ -126,14 +133,16 @@ items: targetPort: 5778 clusterIP: None selector: - jaeger-infra: jaeger-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: all-in-one - apiVersion: v1 kind: Service metadata: name: zipkin labels: app: jaeger - jaeger-infra: zipkin-service + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: zipkin spec: ports: - name: jaeger-collector-zipkin @@ -142,5 +151,6 @@ items: targetPort: 9411 clusterIP: None selector: - jaeger-infra: jaeger-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: all-in-one diff --git a/jaeger-production-template.yml b/jaeger-production-template.yml index 2fb0e32..921bb2f 100644 --- a/jaeger-production-template.yml +++ b/jaeger-production-template.yml @@ -21,7 +21,8 @@ items: name: jaeger-collector labels: app: jaeger - jaeger-infra: collector-deployment + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: collector spec: replicas: 1 strategy: @@ -30,13 +31,14 @@ items: metadata: labels: app: jaeger - jaeger-infra: collector-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: collector annotations: prometheus.io/scrape: "true" prometheus.io/port: "14268" spec: containers: - - image: jaegertracing/jaeger-collector:1.7.0 + - image: jaegertracing/jaeger-collector:1.9.0 name: jaeger-collector args: ["--config-file=/conf/collector.yaml"] ports: @@ -72,7 +74,8 @@ items: name: jaeger-collector labels: app: jaeger - jaeger-infra: collector-service + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: collector spec: ports: - name: jaeger-collector-tchannel @@ -88,7 +91,8 @@ items: protocol: TCP targetPort: 9411 selector: - jaeger-infra: collector-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: collector type: ClusterIP - apiVersion: v1 kind: Service @@ -96,7 +100,8 @@ items: name: zipkin labels: app: jaeger - jaeger-infra: zipkin-service + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: zipkin spec: ports: - name: jaeger-collector-zipkin @@ -104,7 +109,8 @@ items: protocol: TCP targetPort: 9411 selector: - jaeger-infra: collector-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: collector type: ClusterIP - apiVersion: extensions/v1beta1 kind: Deployment @@ -112,7 +118,8 @@ items: name: jaeger-query labels: app: jaeger - jaeger-infra: query-deployment + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: query spec: replicas: 1 strategy: @@ -121,13 +128,14 @@ items: metadata: labels: app: jaeger - jaeger-infra: query-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: query annotations: prometheus.io/scrape: "true" prometheus.io/port: "16686" spec: containers: - - image: jaegertracing/jaeger-query:1.7.0 + - image: jaegertracing/jaeger-query:1.9.0 name: jaeger-query args: ["--config-file=/conf/query.yaml"] ports: @@ -159,7 +167,8 @@ items: name: jaeger-query labels: app: jaeger - jaeger-infra: query-service + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: query spec: ports: - name: jaeger-query @@ -167,7 +176,8 @@ items: protocol: TCP targetPort: 16686 selector: - jaeger-infra: query-pod + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: query type: LoadBalancer - apiVersion: extensions/v1beta1 kind: DaemonSet @@ -175,20 +185,22 @@ items: name: jaeger-agent labels: app: jaeger - jaeger-infra: agent-daemonset + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: agent spec: template: metadata: labels: app: jaeger - jaeger-infra: agent-instance + app.kubernetes.io/name: jaeger + app.kubernetes.io/component: agent annotations: prometheus.io/scrape: "true" prometheus.io/port: "5778" spec: containers: - - name: agent-instance - image: jaegertracing/jaeger-agent:1.7.0 + - name: jaeger-agent + image: jaegertracing/jaeger-agent:1.9.0 args: ["--config-file=/conf/agent.yaml"] volumeMounts: - name: jaeger-configuration-volume diff --git a/production-elasticsearch/configmap.yml b/production-elasticsearch/configmap.yml index 01e0111..dee06be 100644 --- a/production-elasticsearch/configmap.yml +++ b/production-elasticsearch/configmap.yml @@ -18,7 +18,7 @@ metadata: name: jaeger-configuration labels: app: jaeger - jaeger-infra: configuration + app.kubernetes.io/name: jaeger data: span-storage-type: elasticsearch collector: | diff --git a/production-elasticsearch/elasticsearch.yml b/production-elasticsearch/elasticsearch.yml index 8b98772..94fdf1e 100644 --- a/production-elasticsearch/elasticsearch.yml +++ b/production-elasticsearch/elasticsearch.yml @@ -20,16 +20,20 @@ items: metadata: name: elasticsearch labels: - app: jaeger - jaeger-infra: elasticsearch-statefulset + app: elasticsearch + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/component: storage-backend + app.kubernetes.io/part-of: jaeger spec: serviceName: elasticsearch replicas: 1 template: metadata: labels: - app: jaeger-elasticsearch - jaeger-infra: elasticsearch-replica + app: elasticsearch + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/component: storage-backend + app.kubernetes.io/part-of: jaeger spec: containers: - name: elasticsearch @@ -65,12 +69,16 @@ items: metadata: name: elasticsearch labels: - app: jaeger - jaeger-infra: elasticsearch-service + app: elasticsearch + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/component: storage-backend + app.kubernetes.io/part-of: jaeger spec: clusterIP: None selector: - app: jaeger-elasticsearch + app.kubernetes.io/name: elasticsearch + app.kubernetes.io/component: storage-backend + app.kubernetes.io/part-of: jaeger ports: - port: 9200 name: elasticsearch diff --git a/production/cassandra.yml b/production/cassandra.yml index 0356e2b..bafdda6 100644 --- a/production/cassandra.yml +++ b/production/cassandra.yml @@ -20,9 +20,10 @@ items: metadata: name: cassandra labels: - app: jaeger - name: jaeger-cassandra-service - jaeger-infra: cassandra-service + app: cassandra + app.kubernetes.io/name: cassandra + app.kubernetes.io/component: storage-backend + app.kubernetes.io/part-of: jaeger spec: ports: - port: 7000 @@ -37,14 +38,18 @@ items: name: thrift clusterIP: None selector: - app: cassandra + app.kubernetes.io/name: cassandra + app.kubernetes.io/component: storage-backend + app.kubernetes.io/part-of: jaeger - apiVersion: "apps/v1beta1" kind: StatefulSet metadata: name: cassandra labels: - app: jaeger - jaeger-infra: cassandra-statefulset + app: cassandra + app.kubernetes.io/name: cassandra + app.kubernetes.io/component: storage-backend + app.kubernetes.io/part-of: jaeger spec: serviceName: cassandra replicas: 3 @@ -52,7 +57,9 @@ items: metadata: labels: app: cassandra - jaeger-infra: cassandra-replica + app.kubernetes.io/name: cassandra + app.kubernetes.io/component: storage-backend + app.kubernetes.io/part-of: jaeger spec: terminationGracePeriodSeconds: 1800 containers: @@ -110,8 +117,10 @@ items: metadata: name: jaeger-cassandra-schema-job labels: - app: jaeger - jaeger-infra: cassandra-schema-job + app: cassandra-schema + app.kubernetes.io/name: cassandra-schema + app.kubernetes.io/component: storage-backend + app.kubernetes.io/part-of: jaeger spec: activeDeadlineSeconds: 120 template: diff --git a/production/configmap.yml b/production/configmap.yml index aaa8cb5..b1b8ea4 100644 --- a/production/configmap.yml +++ b/production/configmap.yml @@ -18,7 +18,7 @@ metadata: name: jaeger-configuration labels: app: jaeger - jaeger-infra: configuration + app.kubernetes.io/name: jaeger data: span-storage-type: cassandra collector: |