Skip to content

cluster-components/scraping: Fix incorrect new line on loop

Vincent Sellier requested to merge service-monitor into production

The --- was inserted on the comment so only the last yaml section is handled by the deployment

Related to swh/infra/sysadm-environment#5252 (closed)

helm-diff
./helm-diff.sh cluster-components
[cluster-components] Comparing changes between branches production and service-monitor...
Your branch is ahead of 'origin/production' by 1 commit.
  (use "git push" to publish your local commits)
[cluster-components] Generate config in production branch for cluster-components/values/admin-rke2.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/archive-production-rke2.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/archive-staging-rke2.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/gitlab-production.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/gitlab-staging.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/minikube.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/rancher.yaml...
[cluster-components] Generate config in production branch for cluster-components/values/test-staging-rke2.yaml...
[cluster-components] Generate config in service-monitor branch for cluster-components/values/admin-rke2.yaml...
[cluster-components] Generate config in service-monitor branch for cluster-components/values/archive-production-rke2.yaml...
[cluster-components] Generate config in service-monitor branch for cluster-components/values/archive-staging-rke2.yaml...
[cluster-components] Generate config in service-monitor branch for cluster-components/values/gitlab-production.yaml...
[cluster-components] Generate config in service-monitor branch for cluster-components/values/gitlab-staging.yaml...
[cluster-components] Generate config in service-monitor branch for cluster-components/values/minikube.yaml...
[cluster-components] Generate config in service-monitor branch for cluster-components/values/rancher.yaml...
[cluster-components] Generate config in service-monitor branch for cluster-components/values/test-staging-rke2.yaml...


------------- diff for cluster-components/values/admin-rke2.yaml -------------

No differences


------------- diff for cluster-components/values/archive-production-rke2.yaml -------------

--- /tmp/swh-chart.cluster-components.ncUYZMcF/archive-production-rke2.yaml.before	2024-02-20 10:49:23.703723431 +0100
+++ /tmp/swh-chart.cluster-components.ncUYZMcF/archive-production-rke2.yaml.after	2024-02-20 10:49:44.275807829 +0100
@@ -43025,36 +43025,37 @@
   - name: http-web
     port: 9090
     targetPort: 8081
   publishNotReadyAddresses: false
   selector:
     app.kubernetes.io/name: prometheus
     prometheus: test-rancher-monitoring-prometheus
   type: "ClusterIP"
 ---
 # Source: cluster-config/templates/scrape-external-metrics/service.yaml
-# This defines a service to be monitored by the service monitor---
 apiVersion: v1
 kind: Service
 metadata:
   namespace: cassandra
   name: cassandra-servers-svc
   labels:
     app: cassandra
 spec:
   type: ExternalName
   externalName: "fake-url"
   ports:
     - name: jmx-exporter
       port: 7070
       targetPort: 7070
-      protocol: TCP---
+      protocol: TCP
+---
+# Source: cluster-config/templates/scrape-external-metrics/service.yaml
 apiVersion: v1
 kind: Service
 metadata:
   namespace: rabbitmq
   name: rabbitmq-servers-svc
   labels:
     app: rabbitmq
 spec:
   type: ExternalName
   externalName: "fake-url"
@@ -43687,20 +43688,30 @@
   insecureSkipTLSVerify: true
   groupPriorityMinimum: 100
   versionPriority: 100
 ---
 # Source: cluster-config/charts/rancher-monitoring/templates/validate-install-crd.yaml
 #
 ---
 # Source: cluster-config/charts/rancher-monitoring/templates/validate-psp-install.yaml
 #
 ---
+# Source: cluster-config/templates/scrape-external-metrics/endpoints.yaml
+# This defines the external endpoints ips to connect to scrape metrics
+---
+# Source: cluster-config/templates/scrape-external-metrics/service-monitor.yaml
+# This defines the service-monitor to monitor the service which scrapes external metrics
+# This may redefine some metrics, see the relabeling configuration dict key
+---
+# Source: cluster-config/templates/scrape-external-metrics/service.yaml
+# This defines a service to be monitored by the service monitor
+---
 # Source: cluster-config/charts/rancher-monitoring/templates/alertmanager/alertmanager.yaml
 apiVersion: monitoring.coreos.com/v1
 kind: Alertmanager
 metadata:
   name: test-rancher-monitoring-alertmanager
   namespace: cattle-monitoring-system
   labels:
     app: rancher-monitoring-alertmanager
     
     app.kubernetes.io/managed-by: Helm
@@ -43775,21 +43786,20 @@
           httpConfig:
             basicAuth:
               username:
                 key: user
                 name: alertmanager-irc-relay-config
               password:
                 key: password
                 name: alertmanager-irc-relay-config
 ---
 # Source: cluster-config/templates/scrape-external-metrics/endpoints.yaml
-# This defines the external endpoints ips to connect to scrape metrics---
 apiVersion: v1
 kind: Endpoints
 metadata:
   namespace: cassandra
   name: cassandra-servers-svc
   labels:
     app: cassandra
 subsets:
   - addresses:
     - ip: 192.168.100.181
@@ -43798,21 +43808,23 @@
     - ip: 192.168.100.184
     - ip: 192.168.100.185
     - ip: 192.168.100.186
     - ip: 192.168.100.187
     - ip: 192.168.100.188
     - ip: 192.168.100.189
     - ip: 192.168.100.190
     ports:
       - name: jmx-exporter
         port: 7070
-        protocol: TCP---
+        protocol: TCP
+---
+# Source: cluster-config/templates/scrape-external-metrics/endpoints.yaml
 apiVersion: v1
 kind: Endpoints
 metadata:
   namespace: rabbitmq
   name: rabbitmq-servers-svc
   labels:
     app: rabbitmq
 subsets:
   - addresses:
     - ip: 192.168.100.104
@@ -46979,22 +46991,20 @@
       self-monitor: "true"
   namespaceSelector:
     matchNames:
       - "cattle-monitoring-system"
   endpoints:
   - port: http-web
     path: "/metrics"
     metricRelabelings:
 ---
 # Source: cluster-config/templates/scrape-external-metrics/service-monitor.yaml
-# This defines the service-monitor to monitor the service which scrapes external metrics
-# This may redefine some metrics, see the relabeling configuration dict key---
 apiVersion: monitoring.coreos.com/v1
 kind: ServiceMonitor
 metadata:
   namespace: cassandra
   name: cassandra-servers-svc
   labels:
     app: cassandra
 spec:
   selector:
     matchLabels:
@@ -47010,21 +47020,23 @@
           regex: 192.168.100.18(\d)(.*)
           replacement: cassandra0$1.internal.softwareheritage.org$2
           sourceLabels:
           - __address__
           targetLabel: __address__
         - action: replace
           regex: 192.168.100.19(\d)(.*)
           replacement: cassandra1$1.internal.softwareheritage.org$2
           sourceLabels:
           - __address__
-          targetLabel: __address__---
+          targetLabel: __address__
+---
+# Source: cluster-config/templates/scrape-external-metrics/service-monitor.yaml
 apiVersion: monitoring.coreos.com/v1
 kind: ServiceMonitor
 metadata:
   namespace: rabbitmq
   name: rabbitmq-servers-svc
   labels:
     app: rabbitmq
 spec:
   selector:
     matchLabels:


------------- diff for cluster-components/values/archive-staging-rke2.yaml -------------

--- /tmp/swh-chart.cluster-components.ncUYZMcF/archive-staging-rke2.yaml.before	2024-02-20 10:49:26.999736968 +0100
+++ /tmp/swh-chart.cluster-components.ncUYZMcF/archive-staging-rke2.yaml.after	2024-02-20 10:49:46.679817679 +0100
@@ -43081,36 +43081,37 @@
   - name: http-web
     port: 9090
     targetPort: 8081
   publishNotReadyAddresses: false
   selector:
     app.kubernetes.io/name: prometheus
     prometheus: test-rancher-monitoring-prometheus
   type: "ClusterIP"
 ---
 # Source: cluster-config/templates/scrape-external-metrics/service.yaml
-# This defines a service to be monitored by the service monitor---
 apiVersion: v1
 kind: Service
 metadata:
   namespace: cassandra
   name: cassandra-servers-svc
   labels:
     app: cassandra
 spec:
   type: ExternalName
   externalName: "fake-url"
   ports:
     - name: jmx-exporter
       port: 7070
       targetPort: 7070
-      protocol: TCP---
+      protocol: TCP
+---
+# Source: cluster-config/templates/scrape-external-metrics/service.yaml
 apiVersion: v1
 kind: Service
 metadata:
   namespace: rabbitmq
   name: rabbitmq-servers-svc
   labels:
     app: rabbitmq
 spec:
   type: ExternalName
   externalName: "fake-url"
@@ -43867,20 +43868,30 @@
   insecureSkipTLSVerify: true
   groupPriorityMinimum: 100
   versionPriority: 100
 ---
 # Source: cluster-config/charts/rancher-monitoring/templates/validate-install-crd.yaml
 #
 ---
 # Source: cluster-config/charts/rancher-monitoring/templates/validate-psp-install.yaml
 #
 ---
+# Source: cluster-config/templates/scrape-external-metrics/endpoints.yaml
+# This defines the external endpoints ips to connect to scrape metrics
+---
+# Source: cluster-config/templates/scrape-external-metrics/service-monitor.yaml
+# This defines the service-monitor to monitor the service which scrapes external metrics
+# This may redefine some metrics, see the relabeling configuration dict key
+---
+# Source: cluster-config/templates/scrape-external-metrics/service.yaml
+# This defines a service to be monitored by the service monitor
+---
 # Source: cluster-config/charts/rancher-monitoring/templates/alertmanager/alertmanager.yaml
 apiVersion: monitoring.coreos.com/v1
 kind: Alertmanager
 metadata:
   name: test-rancher-monitoring-alertmanager
   namespace: cattle-monitoring-system
   labels:
     app: rancher-monitoring-alertmanager
     
     app.kubernetes.io/managed-by: Helm
@@ -43955,37 +43966,38 @@
           httpConfig:
             basicAuth:
               username:
                 key: user
                 name: alertmanager-irc-relay-config
               password:
                 key: password
                 name: alertmanager-irc-relay-config
 ---
 # Source: cluster-config/templates/scrape-external-metrics/endpoints.yaml
-# This defines the external endpoints ips to connect to scrape metrics---
 apiVersion: v1
 kind: Endpoints
 metadata:
   namespace: cassandra
   name: cassandra-servers-svc
   labels:
     app: cassandra
 subsets:
   - addresses:
     - ip: 192.168.130.181
     - ip: 192.168.130.182
     - ip: 192.168.130.183
     ports:
       - name: jmx-exporter
         port: 7070
-        protocol: TCP---
+        protocol: TCP
+---
+# Source: cluster-config/templates/scrape-external-metrics/endpoints.yaml
 apiVersion: v1
 kind: Endpoints
 metadata:
   namespace: rabbitmq
   name: rabbitmq-servers-svc
   labels:
     app: rabbitmq
 subsets:
   - addresses:
     - ip: 192.168.130.50
@@ -47152,22 +47164,20 @@
       self-monitor: "true"
   namespaceSelector:
     matchNames:
       - "cattle-monitoring-system"
   endpoints:
   - port: http-web
     path: "/metrics"
     metricRelabelings:
 ---
 # Source: cluster-config/templates/scrape-external-metrics/service-monitor.yaml
-# This defines the service-monitor to monitor the service which scrapes external metrics
-# This may redefine some metrics, see the relabeling configuration dict key---
 apiVersion: monitoring.coreos.com/v1
 kind: ServiceMonitor
 metadata:
   namespace: cassandra
   name: cassandra-servers-svc
   labels:
     app: cassandra
 spec:
   selector:
     matchLabels:
@@ -47177,21 +47187,23 @@
   endpoints:
     - port: jmx-exporter
       interval: 30s
       honorLabels: true
       relabelings:
         - action: replace
           regex: 192.168.130.18(\d)(.*)
           replacement: cassandra$1.internal.staging.swh.network$2
           sourceLabels:
           - __address__
-          targetLabel: __address__---
+          targetLabel: __address__
+---
+# Source: cluster-config/templates/scrape-external-metrics/service-monitor.yaml
 apiVersion: monitoring.coreos.com/v1
 kind: ServiceMonitor
 metadata:
   namespace: rabbitmq
   name: rabbitmq-servers-svc
   labels:
     app: rabbitmq
 spec:
   selector:
     matchLabels:


------------- diff for cluster-components/values/gitlab-production.yaml -------------

No differences


------------- diff for cluster-components/values/gitlab-staging.yaml -------------

No differences


------------- diff for cluster-components/values/minikube.yaml -------------

No differences


------------- diff for cluster-components/values/rancher.yaml -------------

No differences


------------- diff for cluster-components/values/test-staging-rke2.yaml -------------

No differences

Merge request reports