From 334acb79ddb8568ca958141c5d2422aac973708d Mon Sep 17 00:00:00 2001 From: JacekZubielik Date: Wed, 22 May 2024 20:45:19 +0200 Subject: [PATCH 1/4] fix(code): fix code #27 --- charts/mktxp-exporter/Chart.yaml | 2 +- charts/mktxp-exporter/values.yaml | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/charts/mktxp-exporter/Chart.yaml b/charts/mktxp-exporter/Chart.yaml index c079b27..a8be485 100644 --- a/charts/mktxp-exporter/Chart.yaml +++ b/charts/mktxp-exporter/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 appVersion: gha-7614306238 description: Mikrotik MKTXP Prometheus exporter name: mktxp-exporter -version: 0.0.1 +version: 0.0.2 keywords: - mikrotik-exporter - mktxp-exporter diff --git a/charts/mktxp-exporter/values.yaml b/charts/mktxp-exporter/values.yaml index ee694d3..d691fa6 100644 --- a/charts/mktxp-exporter/values.yaml +++ b/charts/mktxp-exporter/values.yaml @@ -32,24 +32,14 @@ service: port: 49090 resources: {} - -nodeSelector: - kubernetes.io/hostname: {} - +nodeSelector: {} tolerations: [] - affinity: {} persistence: storageClassName: local-path size: 1Gi -# ingress: -# enabled: false -# ingressClassName: traefik -# domainName: {} -# secretName: cluster-tls - monitoring: enabled: false serviceMonitor: From f53640ebd22e77d9e26a596081c349343305bf44 Mon Sep 17 00:00:00 2001 From: JacekZubielik Date: Wed, 22 May 2024 21:40:52 +0200 Subject: [PATCH 2/4] fix(clean up): code clean up #27 --- .../templates/servicemonitor.yaml | 2 +- .../mktxp-exporter/templates/statefulset.yaml | 42 +++++++++---------- charts/mktxp-exporter/values.yaml | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/charts/mktxp-exporter/templates/servicemonitor.yaml b/charts/mktxp-exporter/templates/servicemonitor.yaml index b43ea0f..c879810 100644 --- a/charts/mktxp-exporter/templates/servicemonitor.yaml +++ b/charts/mktxp-exporter/templates/servicemonitor.yaml @@ -10,7 +10,7 @@ metadata: {{- end }} {{- with .Values.monitoring.serviceMonitor.annotations }} annotations: - {{- toYaml . | nindent 4 }} + {{- toYaml . | nindent 4 }} {{- end }} {{- if .Values.monitoring.serviceMonitor.namespace }} namespace: {{ .Values.monitoring.serviceMonitor.namespace }} diff --git a/charts/mktxp-exporter/templates/statefulset.yaml b/charts/mktxp-exporter/templates/statefulset.yaml index cd6a1d3..ae86ac1 100644 --- a/charts/mktxp-exporter/templates/statefulset.yaml +++ b/charts/mktxp-exporter/templates/statefulset.yaml @@ -17,7 +17,7 @@ spec: metadata: {{- with .Values.podAnnotations }} annotations: - {{- toYaml . | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "app.selectorLabels" . | nindent 8 }} @@ -40,10 +40,10 @@ spec: runAsNonRoot: false privileged: true volumeMounts: - - name: config + - name: config mountPath: /tmp/mktxp.conf - subPath: mktxp.conf - - name: data + subPath: mktxp.conf + - name: data mountPath: /home/mktxp/mktxp - name: setup-permissions image: busybox @@ -52,7 +52,7 @@ spec: runAsNonRoot: false privileged: true volumeMounts: - - name: data + - name: data mountPath: /home/mktxp/mktxp containers: - name: {{ .Chart.Name }} @@ -68,33 +68,33 @@ spec: {{- toYaml .Values.resources | nindent 12 }} livenessProbe: httpGet: - path: / - port: {{ .Values.service.port }} - scheme: HTTP - periodSeconds: 60 - timeoutSeconds: 10 - successThreshold: 1 - failureThreshold: 6 + path: / + port: {{ .Values.service.port }} + scheme: HTTP + periodSeconds: 60 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 6 initialDelaySeconds: 10 readinessProbe: httpGet: - path: / - port: {{ .Values.service.port }} - scheme: HTTP - periodSeconds: 60 - timeoutSeconds: 10 - successThreshold: 1 - failureThreshold: 2 + path: / + port: {{ .Values.service.port }} + scheme: HTTP + periodSeconds: 60 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 2 initialDelaySeconds: 10 volumeMounts: - - name: data + - name: data mountPath: /home/mktxp/mktxp volumes: - name: config configMap: name: {{ include "app.fullname" . }} items: - - key: mktxp.conf + - key: mktxp.conf path: mktxp.conf mode: 0644 - name: data diff --git a/charts/mktxp-exporter/values.yaml b/charts/mktxp-exporter/values.yaml index d691fa6..f552607 100644 --- a/charts/mktxp-exporter/values.yaml +++ b/charts/mktxp-exporter/values.yaml @@ -32,7 +32,7 @@ service: port: 49090 resources: {} -nodeSelector: {} +nodeSelector: {} tolerations: [] affinity: {} From efdb307cb78bb018e4101124fbc28b8052cbeb8a Mon Sep 17 00:00:00 2001 From: JacekZubielik Date: Wed, 22 May 2024 21:47:35 +0200 Subject: [PATCH 3/4] fix(fix): fix code #27 --- charts/mktxp-exporter/values.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/mktxp-exporter/values.yaml b/charts/mktxp-exporter/values.yaml index f552607..43c5ca8 100644 --- a/charts/mktxp-exporter/values.yaml +++ b/charts/mktxp-exporter/values.yaml @@ -15,9 +15,9 @@ updateStrategy: # maxUnavailable: 0 # maxSurge: 1 -# serviceAccount: -# create: false -# annotations: {} +serviceAccount: + create: false + annotations: {} # automountServiceAccountToken: false # podAnnotations: {} @@ -29,7 +29,7 @@ securityContext: fsGroup: 101 service: - port: 49090 + port: "49090" resources: {} nodeSelector: {} From 07ffe0aeac66cf51db9e36ee2cc25d8937fcfc05 Mon Sep 17 00:00:00 2001 From: JacekZubielik Date: Wed, 22 May 2024 21:58:34 +0200 Subject: [PATCH 4/4] fix(clean up): code clean up --- charts/mktxp-exporter/values.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/mktxp-exporter/values.yaml b/charts/mktxp-exporter/values.yaml index 43c5ca8..0d53a43 100644 --- a/charts/mktxp-exporter/values.yaml +++ b/charts/mktxp-exporter/values.yaml @@ -18,8 +18,8 @@ updateStrategy: serviceAccount: create: false annotations: {} -# automountServiceAccountToken: false -# podAnnotations: {} + automountServiceAccountToken: false +podAnnotations: {} podSecurityContext: runAsUser: 100 @@ -29,7 +29,7 @@ securityContext: fsGroup: 101 service: - port: "49090" + port: 49090 resources: {} nodeSelector: {} @@ -43,6 +43,7 @@ persistence: monitoring: enabled: false serviceMonitor: + annotations: {} enabled: false interval: 60s labels: {}