From cf7aee598fbcadd6c521ee09f42b90e011ac076f Mon Sep 17 00:00:00 2001 From: friedrich goerz Date: Thu, 16 Jun 2022 21:16:32 +0200 Subject: [PATCH] DEV-490: refactor kustomize objects - bugfix --- kustomize/dev/kustomization.yaml | 3 ++ kustomize/dev/patches.yaml | 42 ------------------------- kustomize/prodnso/kustomization.yaml | 3 ++ kustomize/prodnso/patches.yaml | 40 ----------------------- kustomize/prodwork01/kustomization.yaml | 3 ++ kustomize/prodwork01/patches.yaml | 40 ----------------------- kustomize/qa/kustomization.yaml | 3 ++ kustomize/qa/patches.yaml | 42 ------------------------- 8 files changed, 12 insertions(+), 164 deletions(-) diff --git a/kustomize/dev/kustomization.yaml b/kustomize/dev/kustomization.yaml index 14c966b..559ed2d 100644 --- a/kustomize/dev/kustomization.yaml +++ b/kustomize/dev/kustomization.yaml @@ -14,3 +14,6 @@ configMapGenerator: - name: prometheus-es-exporter-escluster literals: - es_cluster=https://dev-elastic-stack-elastic-01:9200,https://dev-elastic-stack-elastic-02:9200,https://dev-elastic-stack-elastic-03:9200 + +patchesStrategicMerge: +- patches.yaml diff --git a/kustomize/dev/patches.yaml b/kustomize/dev/patches.yaml index 52ec4c7..d78ddf2 100644 --- a/kustomize/dev/patches.yaml +++ b/kustomize/dev/patches.yaml @@ -8,48 +8,6 @@ metadata: spec: template: spec: - containers: - - args: - - --es-cluster=https://dev-elastic-stack-elastic-01:9200,https://dev-elastic-stack-elastic-02:9200,https://dev-elastic-stack-elastic-03:9200 - - --port=9206 - - --config-file=/mnt/config/exporter.cfg - - --ca-certs=/mnt/certs/es_ca.crt - env: - - name: ES_EXPORTER_BASIC_USER - valueFrom: - secretKeyRef: - name: prometheus-es-exporter-es-creds - key: username - - name: ES_EXPORTER_BASIC_PASSWORD - valueFrom: - secretKeyRef: - name: prometheus-es-exporter-es-creds - key: password - image: braedon/prometheus-es-exporter:0.14.0 - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: prometheus - timeoutSeconds: 1 - name: prometheus-es-exporter - ports: - - containerPort: 9206 - name: prometheus - protocol: TCP - readinessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: prometheus - timeoutSeconds: 1 - volumeMounts: - - mountPath: /mnt/config - name: config-volume - - mountPath: /mnt/certs - name: cert-volume hostAliases: - hostnames: - dev-elastic-stack-elastic-01 diff --git a/kustomize/prodnso/kustomization.yaml b/kustomize/prodnso/kustomization.yaml index a9f303b..e568dc4 100644 --- a/kustomize/prodnso/kustomization.yaml +++ b/kustomize/prodnso/kustomization.yaml @@ -14,3 +14,6 @@ configMapGenerator: - name: prometheus-es-exporter-escluster literals: - es_cluster=https://prodnso-elastic-stack-elastic-01:9200,https://prodnso-elastic-stack-elastic-02:9200,https://prodnso-elastic-stack-elastic-03:9200 + +patchesStrategicMerge: +- patches.yaml diff --git a/kustomize/prodnso/patches.yaml b/kustomize/prodnso/patches.yaml index 272b58a..e160eda 100644 --- a/kustomize/prodnso/patches.yaml +++ b/kustomize/prodnso/patches.yaml @@ -8,46 +8,6 @@ metadata: spec: template: spec: - containers: - - args: - - --es-cluster=https://prodnso-elastic-stack-elastic-01:9200,https://prodnso-elastic-stack-elastic-02:9200,https://prodnso-elastic-stack-elastic-03:9200 - - --port=9206 - - --config-file=/mnt/config/exporter.cfg - - --ca-certs=/mnt/certs/es_ca.crt - env: - - name: ES_EXPORTER_BASIC_USER - valueFrom: - secretKeyRef: - name: prometheus-es-exporter-es-creds - key: username - - name: ES_EXPORTER_BASIC_PASSWORD - valueFrom: - secretKeyRef: - name: prometheus-es-exporter-es-creds - key: password - image: braedon/prometheus-es-exporter:0.14.0 - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: prometheus - timeoutSeconds: 1 - name: prometheus-es-exporter - ports: - - containerPort: 9206 - name: prometheus - protocol: TCP - readinessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: prometheus - timeoutSeconds: 1 - volumeMounts: - - mountPath: /mnt/config - name: config-volume hostAliases: - hostnames: - prodnso-elastic-stack-elastic-01 diff --git a/kustomize/prodwork01/kustomization.yaml b/kustomize/prodwork01/kustomization.yaml index a9f303b..e568dc4 100644 --- a/kustomize/prodwork01/kustomization.yaml +++ b/kustomize/prodwork01/kustomization.yaml @@ -14,3 +14,6 @@ configMapGenerator: - name: prometheus-es-exporter-escluster literals: - es_cluster=https://prodnso-elastic-stack-elastic-01:9200,https://prodnso-elastic-stack-elastic-02:9200,https://prodnso-elastic-stack-elastic-03:9200 + +patchesStrategicMerge: +- patches.yaml diff --git a/kustomize/prodwork01/patches.yaml b/kustomize/prodwork01/patches.yaml index 4247cda..ee464bc 100644 --- a/kustomize/prodwork01/patches.yaml +++ b/kustomize/prodwork01/patches.yaml @@ -8,46 +8,6 @@ metadata: spec: template: spec: - containers: - - args: - - --es-cluster=https://prodwork01-elastic-stack-elastic-01:9200,https://prodwork01-elastic-stack-elastic-02:9200,https://prodwork01-elastic-stack-elastic-03:9200 - - --port=9206 - - --config-file=/mnt/config/exporter.cfg - - --ca-certs=/mnt/certs/es_ca.crt - env: - - name: ES_EXPORTER_BASIC_USER - valueFrom: - secretKeyRef: - name: prometheus-es-exporter-es-creds - key: username - - name: ES_EXPORTER_BASIC_PASSWORD - valueFrom: - secretKeyRef: - name: prometheus-es-exporter-es-creds - key: password - image: braedon/prometheus-es-exporter:0.14.0 - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: prometheus - timeoutSeconds: 1 - name: prometheus-es-exporter - ports: - - containerPort: 9206 - name: prometheus - protocol: TCP - readinessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: prometheus - timeoutSeconds: 1 - volumeMounts: - - mountPath: /mnt/config - name: config-volume hostAliases: - hostnames: - prodwork01-elastic-stack-elastic-01 diff --git a/kustomize/qa/kustomization.yaml b/kustomize/qa/kustomization.yaml index 6cdc85d..98d6fa4 100644 --- a/kustomize/qa/kustomization.yaml +++ b/kustomize/qa/kustomization.yaml @@ -14,3 +14,6 @@ configMapGenerator: - name: prometheus-es-exporter-escluster literals: - es_cluster=https://qa-elastic-stack-elastic-01:9200,https://qa-elastic-stack-elastic-02:9200,https://qa-elastic-stack-elastic-03:9200 + +patchesStrategicMerge: +- patches.yaml diff --git a/kustomize/qa/patches.yaml b/kustomize/qa/patches.yaml index 284b4c8..6feef4b 100644 --- a/kustomize/qa/patches.yaml +++ b/kustomize/qa/patches.yaml @@ -8,48 +8,6 @@ metadata: spec: template: spec: - containers: - - args: - - --es-cluster=https://qa-elastic-stack-elastic-01:9200,https://qa-elastic-stack-elastic-02:9200,https://qa-elastic-stack-elastic-03:9200 - - --port=9206 - - --config-file=/mnt/config/exporter.cfg - - --ca-certs=/mnt/certs/es_ca.crt - env: - - name: ES_EXPORTER_BASIC_USER - valueFrom: - secretKeyRef: - name: prometheus-es-exporter-es-creds - key: username - - name: ES_EXPORTER_BASIC_PASSWORD - valueFrom: - secretKeyRef: - name: prometheus-es-exporter-es-creds - key: password - image: braedon/prometheus-es-exporter:0.14.0 - livenessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: prometheus - timeoutSeconds: 1 - name: prometheus-es-exporter - ports: - - containerPort: 9206 - name: prometheus - protocol: TCP - readinessProbe: - failureThreshold: 3 - periodSeconds: 10 - successThreshold: 1 - tcpSocket: - port: prometheus - timeoutSeconds: 1 - volumeMounts: - - mountPath: /mnt/config - name: config-volume - - mountPath: /mnt/certs - name: cert-volume hostAliases: - hostnames: - qa-elastic-stack-elastic-01