mirror of
https://github.com/nikdoof/helm-charts.git
synced 2025-12-17 03:49:22 +00:00
Compare commits
3 Commits
aaisp-to-m
...
aaisp-to-m
| Author | SHA1 | Date | |
|---|---|---|---|
|
e6392a803f
|
|||
|
9984fc2666
|
|||
|
fa6e0d1134
|
@@ -2,4 +2,4 @@ apiVersion: v1
|
|||||||
appVersion: "0.2"
|
appVersion: "0.2"
|
||||||
description: Pulls data from the AAISP CHAOSv2 API into MQTT
|
description: Pulls data from the AAISP CHAOSv2 API into MQTT
|
||||||
name: aaisp-to-mqtt
|
name: aaisp-to-mqtt
|
||||||
version: 0.1.2
|
version: 0.2.2
|
||||||
|
|||||||
@@ -15,10 +15,16 @@ metadata:
|
|||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/managed-by: {{ include "aaisp-to-mqtt.name" . }}
|
app.kubernetes.io/managed-by: {{ include "aaisp-to-mqtt.name" . }}
|
||||||
spec:
|
spec:
|
||||||
concurrencyPolicy: {{ .Values.cronjob.concurrencyPolicy }}
|
schedule: {{ .Values.cronjob.schedule | quote }}
|
||||||
|
successfulJobsHistoryLimit: {{ .Values.cronjob.successfulJobsHistoryLimit }}
|
||||||
failedJobsHistoryLimit: {{ .Values.cronjob.failedJobsHistoryLimit }}
|
failedJobsHistoryLimit: {{ .Values.cronjob.failedJobsHistoryLimit }}
|
||||||
|
concurrencyPolicy: Forbid
|
||||||
|
{{- if .Values.cronjob.startingDeadlineSeconds }}
|
||||||
|
startingDeadlineSeconds: {{ .Values.cronjob.startingDeadlineSeconds }}
|
||||||
|
{{- end }}
|
||||||
jobTemplate:
|
jobTemplate:
|
||||||
spec:
|
spec:
|
||||||
|
backoffLimit: 0
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@@ -28,63 +34,56 @@ spec:
|
|||||||
app.kubernetes.io/managed-by: {{ include "aaisp-to-mqtt.name" . }}
|
app.kubernetes.io/managed-by: {{ include "aaisp-to-mqtt.name" . }}
|
||||||
spec:
|
spec:
|
||||||
restartPolicy: Never
|
restartPolicy: Never
|
||||||
{{- if (default .Values.image.pullSecrets .Values.cronjob.image.pullSecrets) }}
|
{{- if .Values.image.pullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- range (default .Values.image.pullSecrets .Values.cronjob.image.pullSecrets) }}
|
{{- range .Values.image.pullSecrets }}
|
||||||
- name: {{ . }}
|
- name: {{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ default .Values.image.repository .Values.cronjob.image.repository }}:{{ default .Values.image.tag .Values.cronjob.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.cronjob.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
env:
|
env:
|
||||||
- name: AAISP_USERNAME
|
- name: AAISP_USERNAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{- default "aaisp-to-mqtt-secret" .Values.existingSecretName }}
|
name: {{ default "aaisp-to-mqtt-secret" .Values.existingSecretName }}
|
||||||
key: aaisp.username
|
key: aaisp.username
|
||||||
- name: AAISP_PASSWORD
|
- name: AAISP_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{- default "aaisp-to-mqtt-secret" .Values.existingSecretName }}
|
name: {{ default "aaisp-to-mqtt-secret" .Values.existingSecretName }}
|
||||||
key: aaisp.password
|
key: aaisp.password
|
||||||
- name: MQTT_BROKER
|
- name: MQTT_BROKER
|
||||||
value: {{ .Values.mqtt.broker }}
|
value: {{ .Values.mqtt.broker }}
|
||||||
- name: MQTT_PORT
|
- name: MQTT_PORT
|
||||||
value: {{- default 1883 .Values.mqtt.port }}
|
value: "{{ default 1883 .Values.mqtt.port }}"
|
||||||
{{- if .Values.mqtt.authenticated }}
|
{{- if .Values.mqtt.authenticated }}
|
||||||
- name: MQTT_USERNAME
|
- name: MQTT_USERNAME
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{- default "aaisp-to-mqtt-secret" .Values.existingSecretName }}
|
name: {{ default "aaisp-to-mqtt-secret" .Values.existingSecretName }}
|
||||||
key: mqtt.username
|
key: mqtt.username
|
||||||
- name: MQTT_PASSWORD
|
- name: MQTT_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: {{- default "aaisp-to-mqtt-secret" .Values.existingSecretName }}
|
name: {{ default "aaisp-to-mqtt-secret" .Values.existingSecretName }}
|
||||||
key: mqtt.password
|
key: mqtt.password
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: MQTT_TOPIC_PREFIX
|
- name: MQTT_TOPIC_PREFIX
|
||||||
value: {{ default "aaisp" .Values.mqtt.topicPrefix }}
|
value: {{ default "aaisp" .Values.mqtt.topicPrefix }}
|
||||||
resources:
|
resources:
|
||||||
{{ toYaml (default .Values.resources .Values.cronjob.resources) | indent 16 }}
|
{{ toYaml .Values.resources | indent 16 }}
|
||||||
{{- with (default .Values.nodeSelector .Values.cronjob.nodeSelector) }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{ toYaml . | indent 12 }}
|
{{ toYaml . | indent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with (default .Values.affinity .Values.cronjob.affinity) }}
|
{{- with .Values.affinity }}
|
||||||
affinity:
|
affinity:
|
||||||
{{ toYaml . | indent 12 }}
|
{{ toYaml . | indent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with (default .Values.tolerations .Values.cronjob.tolerations) }}
|
{{- with .Values.tolerations }}
|
||||||
tolerations:
|
tolerations:
|
||||||
{{ toYaml . | indent 12 }}:
|
{{ toYaml . | indent 12 }}:
|
||||||
{{- end }}
|
{{- end }}
|
||||||
schedule: {{ .Values.schedule | quote }}
|
|
||||||
successfulJobsHistoryLimit: {{ .Values.cronjob.successfulJobsHistoryLimit }}
|
|
||||||
failedJobsHistoryLimit: {{ .Values.cronjob.failedJobsHistoryLimit }}
|
|
||||||
concurrencyPolicy: Forbid
|
|
||||||
{{- if .Values.cronjob.startingDeadlineSeconds }}
|
|
||||||
startingDeadlineSeconds: {{ .Values.cronjob.startingDeadlineSeconds }}
|
|
||||||
{{- end }}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- if not .Values.cronjob.existingSecretName }}
|
{{- if not (.Values.existingSecretName) }}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
@@ -11,10 +11,10 @@ metadata:
|
|||||||
app.kubernetes.io/managed-by: {{ include "aaisp-to-mqtt.name" . }}
|
app.kubernetes.io/managed-by: {{ include "aaisp-to-mqtt.name" . }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
data:
|
data:
|
||||||
aaisp.username: {{ .Values.aaisp.username }}
|
aaisp.username: {{ .Values.aaisp.username | b64enc }}
|
||||||
aaisp.password: {{ .Values.aaisp.password }}
|
aaisp.password: {{ .Values.aaisp.password | b64enc }}
|
||||||
{{- if .Values.mqtt.authenticated }}
|
{{- if .Values.mqtt.authenticated }}
|
||||||
mqtt.username: {{ .Values.mqtt.username }}
|
mqtt.username: {{ .Values.mqtt.username | b64enc }}
|
||||||
mqtt.password: {{ .Values.mqtt.password }}
|
mqtt.password: {{ .Values.mqtt.password | b64enc }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -6,10 +6,10 @@ replicaCount: 1
|
|||||||
|
|
||||||
image:
|
image:
|
||||||
repository: nikdoof/aaisp-to-mqtt
|
repository: nikdoof/aaisp-to-mqtt
|
||||||
tag: latest
|
tag: 0.2.2
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
# imagePullSecrets: []
|
||||||
|
|
||||||
imagePullSecrets: []
|
|
||||||
nameOverride: ""
|
nameOverride: ""
|
||||||
fullnameOverride: ""
|
fullnameOverride: ""
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ fullnameOverride: ""
|
|||||||
|
|
||||||
## Connection details
|
## Connection details
|
||||||
##
|
##
|
||||||
aaisp:
|
aaisp: {}
|
||||||
# username: user1@a
|
# username: user1@a
|
||||||
# password: password
|
# password: password
|
||||||
|
|
||||||
@@ -32,15 +32,10 @@ mqtt:
|
|||||||
# topicPrefix: aaisp
|
# topicPrefix: aaisp
|
||||||
|
|
||||||
cronjob:
|
cronjob:
|
||||||
schedule: "*/10 * * *"
|
schedule: "*/10 * * * *"
|
||||||
successfulJobsHistoryLimit: 3
|
successfulJobsHistoryLimit: 3
|
||||||
failedJobsHistoryLimit: 1
|
failedJobsHistoryLimit: 1
|
||||||
# startingDeadlineSeconds: 10
|
# startingDeadlineSeconds: 10
|
||||||
# imagePullSecrets: []
|
|
||||||
# resources: {}
|
|
||||||
# nodeSelector: {}
|
|
||||||
# tolerations: []
|
|
||||||
# affinity: {}
|
|
||||||
|
|
||||||
resources: {}
|
resources: {}
|
||||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
|||||||
Reference in New Issue
Block a user