Skip to content

Commit

Permalink
Merge pull request #36 from JacekZubielik/mktxp-exporter
Browse files Browse the repository at this point in the history
chore(bump): bump version, add test connection
  • Loading branch information
JacekZubielik authored May 23, 2024
2 parents 4401210 + 618e8de commit 0f10d42
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 34 deletions.
2 changes: 1 addition & 1 deletion charts/mktxp-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
appVersion: gha-7614306238
description: Mikrotik MKTXP Prometheus exporter
name: mktxp-exporter
version: 0.0.3
version: 0.0.4
keywords:
- mikrotik-exporter
- mktxp-exporter
Expand Down
18 changes: 13 additions & 5 deletions charts/mktxp-exporter/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
apiVersion: v1
{{- if and .Values.persistence.pvc.enabled (not .Values.persistence.configstorage.hostPath) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "app.fullname" . }}
name: {{ template "app.fullname" . }}
labels:
{{- include "app.labels" . | nindent 4 }}
spec:
storageClassName: {{ .Values.persistence.storageClassName }}
accessModes:
- ReadWriteOnce
- {{ .Values.persistence.pvc.accessMode }}
resources:
requests:
storage: {{ .Values.persistence.size }}
storage: {{ .Values.persistence.pvc.size }}
{{- if .Values.persistence.pvc.storageClass }}
{{- if (eq "-" .Values.persistence.pvc.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.pvc.storageClass }}"
{{- end }}
{{- end }}
{{- end }}
14 changes: 9 additions & 5 deletions charts/mktxp-exporter/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "app.fullname" . }}
labels:
{{- include "app.labels" . | nindent 4 }}
{{- if .Values.service.annotations }}
annotations:
prometheus.io/port: {{ .Values.service.port }}
prometheus.io/scrape: "true"
{{- toYaml .Values.service.annotations | nindent 4 }}
{{- end }}
name: {{ template "app.fullname" . }}
labels:
{{- include "app.labels" . | nindent 4 }}
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
spec:
ports:
- port: {{ .Values.service.port }}
Expand Down
15 changes: 15 additions & 0 deletions charts/mktxp-exporter/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Pod
metadata:
name: "{{ include "app.fullname" . }}-test-connection"
labels:
{{- include "app.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
spec:
containers:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "app.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never
45 changes: 22 additions & 23 deletions charts/mktxp-exporter/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
image:
repository: ghcr.io/akpw/mktxp
pullPolicy: IfNotPresent
tag: ""
pullPolicy: IfNotPresent

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -29,36 +29,35 @@ securityContext:
fsGroup: 101

service:
annotations: {}
# prometheus.io/port: 49090
# prometheus.io/scrape: "true"
port: 49090

resources: {}
# requests:
# cpu: "1"
# memory: "256Mi"
# limits:
# cpu: "1"
# memory: "512Mi"

nodeSelector: {}
tolerations: []
affinity: {}
tolerations: []

persistence:
storageClassName: local-path
size: 1Gi

ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
labels: {}
path: /
hosts:
- chart-example.local
## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
extraPaths: []
# - path: /*
# backend:
# serviceName: ssl-redirect
# servicePort: use-annotation
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
configstorage:
hostPath: {}
pvc:
enabled: false
# accessModes:
# - {}
# resources:
# requests:
# storage: 2Gi
# storageClassName: ""

monitoring:
enabled: false
Expand Down

0 comments on commit 0f10d42

Please sign in to comment.