From 55db3208da2911c6fa29991a15a7eb8e2677dbd5 Mon Sep 17 00:00:00 2001
From: karancode <karan.thanvi@paypay-corp.co.jp>
Date: Tue, 22 Oct 2019 02:33:55 +0900
Subject: [PATCH] fix names for service

---
 examples/kustomize.jsonnet                                    | 1 +
 jsonnet/kube-prometheus/kube-prometheus-aws-eks-cni.libsonnet | 4 ++--
 jsonnet/kube-prometheus/prometheus/prometheus.libsonnet       | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/examples/kustomize.jsonnet b/examples/kustomize.jsonnet
index 438e69b1..2bd3c532 100644
--- a/examples/kustomize.jsonnet
+++ b/examples/kustomize.jsonnet
@@ -1,4 +1,5 @@
 local kp =
+  (import 'kube-prometheus/kube-prometheus.libsonnet') + 
   (import 'kube-prometheus/kube-prometheus-aws-eks-cni.libsonnet') + {
     _config+:: {
       namespace: 'monitoring',
diff --git a/jsonnet/kube-prometheus/kube-prometheus-aws-eks-cni.libsonnet b/jsonnet/kube-prometheus/kube-prometheus-aws-eks-cni.libsonnet
index e6dce38b..1fd3b9a3 100644
--- a/jsonnet/kube-prometheus/kube-prometheus-aws-eks-cni.libsonnet
+++ b/jsonnet/kube-prometheus/kube-prometheus-aws-eks-cni.libsonnet
@@ -5,9 +5,9 @@ local servicePort = k.core.v1.service.mixin.spec.portsType;
 {
   prometheus+: {
     kubePrometheusAwsEksCniMetricService:
-        service.new('aws-eks-cni', { 'k8s-app' : 'eks-cni' } , servicePort.newNamed('cni-metrics-port', 61678, 61678)) +
+        service.new('aws-aws-node', { 'k8s-app' : 'aws-node' } , servicePort.newNamed('cni-metrics-port', 61678, 61678)) +
         service.mixin.metadata.withNamespace('kube-system') +
-        service.mixin.metadata.withLabels({ 'k8s-app': 'eks-cni' }) +
+        service.mixin.metadata.withLabels({ 'k8s-app': 'aws-node' }) +
         service.mixin.spec.withClusterIp('None'),
   },
 }
diff --git a/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet b/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet
index 860623bc..a2e311b1 100644
--- a/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet
+++ b/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet
@@ -455,7 +455,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
           jobLabel: 'k8s-app',
           selector: {
             matchLabels: {
-              'k8s-app': 'eks-cni',
+              'k8s-app': 'aws-node',
             },
           },
           namespaceSelector: {
-- 
GitLab