Merge branch 'master' of https://git.dvirlabs.com/dvirlabs/my-apps
This commit is contained in:
commit
a5eb096f33
21
argocd-apps/omegabasms.yaml
Normal file
21
argocd-apps/omegabasms.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: omegabasms
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: my-apps
|
||||
source:
|
||||
repoURL: ssh://git@gitea-ssh.dev-tools.svc.cluster.local:2222/dvirlabs/my-apps.git
|
||||
targetRevision: HEAD
|
||||
path: charts/omegabasms-chart
|
||||
helm:
|
||||
valueFiles:
|
||||
- ../../manifests/omegabasms/values.yaml
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: my-apps
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
6
charts/omegabasms-chart/Chart.yaml
Normal file
6
charts/omegabasms-chart/Chart.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: omegabasms
|
||||
description: A Helm chart for OmegaBaSMS - WhatsApp to SMS relay with dashboard
|
||||
type: application
|
||||
version: 1.0.0
|
||||
appVersion: "1.0.0"
|
||||
47
charts/omegabasms-chart/templates/_helpers.tpl
Normal file
47
charts/omegabasms-chart/templates/_helpers.tpl
Normal file
@ -0,0 +1,47 @@
|
||||
{{- define "omegabasms.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "omegabasms.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "omegabasms.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "omegabasms.labels" -}}
|
||||
helm.sh/chart: {{ include "omegabasms.chart" . }}
|
||||
{{ include "omegabasms.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- with .Values.commonLabels }}
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "omegabasms.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "omegabasms.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "omegabasms.backend.labels" -}}
|
||||
{{ include "omegabasms.labels" . }}
|
||||
app.kubernetes.io/component: backend
|
||||
{{- end }}
|
||||
|
||||
{{- define "omegabasms.backend.selectorLabels" -}}
|
||||
{{ include "omegabasms.selectorLabels" . }}
|
||||
app.kubernetes.io/component: backend
|
||||
{{- end }}
|
||||
89
charts/omegabasms-chart/templates/deployment.yaml
Normal file
89
charts/omegabasms-chart/templates/deployment.yaml
Normal file
@ -0,0 +1,89 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "omegabasms.fullname" . }}-backend
|
||||
labels:
|
||||
{{- include "omegabasms.backend.labels" . | nindent 4 }}
|
||||
{{- with .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.backend.replicas }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "omegabasms.backend.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "omegabasms.backend.selectorLabels" . | nindent 8 }}
|
||||
{{- with .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: omegabasms
|
||||
image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
|
||||
command: ["sh", "-c", "find /app/.wwebjs_auth -name 'Singleton*' -delete 2>/dev/null; node index.js"]
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.backend.service.port }}
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: GROUP_NAMES
|
||||
value: {{ .Values.backend.env.groupNames | quote }}
|
||||
- name: TEXTBEE_DEVICE_ID
|
||||
value: {{ .Values.backend.env.textbeeDeviceId | quote }}
|
||||
- name: TEXTBEE_API_KEY
|
||||
value: {{ .Values.backend.env.textbeeApiKey | quote }}
|
||||
- name: SMS_RECIPIENT
|
||||
value: {{ .Values.backend.env.smsRecipient | quote }}
|
||||
- name: TELEGRAM_BOT_TOKEN
|
||||
value: {{ .Values.backend.env.telegramBotToken | quote }}
|
||||
- name: TELEGRAM_CHAT_ID
|
||||
value: {{ .Values.backend.env.telegramChatId | quote }}
|
||||
- name: APPS_SCRIPT_URL
|
||||
value: {{ .Values.backend.env.appsScriptUrl | quote }}
|
||||
- name: SMS_WEBHOOK_TOKEN
|
||||
value: {{ .Values.backend.env.smsWebhookToken | quote }}
|
||||
- name: TEST_GROUP_NAMES
|
||||
value: {{ .Values.backend.env.testGroupNames | quote }}
|
||||
- name: TEST_SMS_RECIPIENT
|
||||
value: {{ .Values.backend.env.testSmsRecipient | quote }}
|
||||
- name: TEST_SMS_FROM
|
||||
value: {{ .Values.backend.env.testSmsFrom | quote }}
|
||||
- name: BATCH_INTERVAL_MS
|
||||
value: {{ .Values.backend.env.batchIntervalMs | quote }}
|
||||
- name: BATCH_MAX_CHARS
|
||||
value: {{ .Values.backend.env.batchMaxChars | quote }}
|
||||
- name: INCLUDE_OWN_MESSAGES
|
||||
value: {{ .Values.backend.env.includeOwnMessages | quote }}
|
||||
- name: OWN_NAME
|
||||
value: {{ .Values.backend.env.ownName | quote }}
|
||||
- name: OWN_LAST_NAME
|
||||
value: {{ .Values.backend.env.ownLastName | quote }}
|
||||
- name: KEEP_ALIVE_URL
|
||||
value: {{ .Values.backend.env.keepAliveUrl | quote }}
|
||||
- name: KEEP_ALIVE_INTERVAL_MS
|
||||
value: {{ .Values.backend.env.keepAliveIntervalMs | quote }}
|
||||
- name: PORT
|
||||
value: {{ .Values.backend.service.port | quote }}
|
||||
volumeMounts:
|
||||
- name: wwebjs-auth
|
||||
mountPath: /app/.wwebjs_auth
|
||||
- name: wwebjs-cache
|
||||
mountPath: /app/.wwebjs_cache
|
||||
resources:
|
||||
{{- toYaml .Values.backend.resources | nindent 12 }}
|
||||
volumes:
|
||||
- name: wwebjs-auth
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ include "omegabasms.fullname" . }}-backend-auth
|
||||
- name: wwebjs-cache
|
||||
emptyDir: {}
|
||||
45
charts/omegabasms-chart/templates/ingress.yaml
Normal file
45
charts/omegabasms-chart/templates/ingress.yaml
Normal file
@ -0,0 +1,45 @@
|
||||
{{- if .Values.backend.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "omegabasms.fullname" . }}-backend
|
||||
labels:
|
||||
{{- include "omegabasms.labels" . | nindent 4 }}
|
||||
component: backend
|
||||
{{- with .Values.backend.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.commonAnnotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.backend.ingress.className }}
|
||||
ingressClassName: {{ .Values.backend.ingress.className }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.backend.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
pathType: {{ .pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "omegabasms.fullname" $ }}-backend
|
||||
port:
|
||||
number: {{ $.Values.backend.service.port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.backend.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.backend.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
23
charts/omegabasms-chart/templates/pvc.yaml
Normal file
23
charts/omegabasms-chart/templates/pvc.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
{{- if .Values.backend.persistence.enabled }}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "omegabasms.fullname" . }}-backend-auth
|
||||
labels:
|
||||
{{- include "omegabasms.backend.labels" . | nindent 4 }}
|
||||
{{- with .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- range .Values.backend.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.backend.persistence.storageClass }}
|
||||
storageClassName: {{ .Values.backend.persistence.storageClass }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.backend.persistence.size }}
|
||||
{{- end }}
|
||||
19
charts/omegabasms-chart/templates/service.yaml
Normal file
19
charts/omegabasms-chart/templates/service.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "omegabasms.fullname" . }}-backend
|
||||
labels:
|
||||
{{- include "omegabasms.backend.labels" . | nindent 4 }}
|
||||
{{- with .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.backend.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.backend.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "omegabasms.backend.selectorLabels" . | nindent 4 }}
|
||||
70
charts/omegabasms-chart/values.yaml
Normal file
70
charts/omegabasms-chart/values.yaml
Normal file
@ -0,0 +1,70 @@
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
imagePullSecrets: []
|
||||
|
||||
commonLabels: {}
|
||||
commonAnnotations: {}
|
||||
|
||||
backend:
|
||||
image:
|
||||
repository: omegabasms
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
replicas: 0
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
|
||||
env:
|
||||
groupNames: "Group1,Group2"
|
||||
textbeeDeviceId: ""
|
||||
textbeeApiKey: ""
|
||||
smsRecipient: ""
|
||||
telegramBotToken: ""
|
||||
telegramChatId: ""
|
||||
batchIntervalMs: "900000"
|
||||
batchMaxChars: "700"
|
||||
includeOwnMessages: "true"
|
||||
ownName: ""
|
||||
ownLastName: ""
|
||||
keepAliveUrl: ""
|
||||
keepAliveIntervalMs: "300000"
|
||||
appsScriptUrl: ""
|
||||
smsWebhookToken: ""
|
||||
testGroupNames: ""
|
||||
testSmsRecipient: ""
|
||||
testSmsFrom: ""
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClass: ""
|
||||
size: 1Gi
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 3000
|
||||
|
||||
healthCheck:
|
||||
path: /liveness
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
hosts:
|
||||
- host: omegabasms.example.com
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls: []
|
||||
@ -9,7 +9,7 @@ backend:
|
||||
image:
|
||||
repository: harbor.dvirlabs.com/my-apps/brand-master-backend
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "master-f02f810"
|
||||
tag: "master-dac10f2"
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8000
|
||||
@ -70,7 +70,7 @@ frontend:
|
||||
image:
|
||||
repository: harbor.dvirlabs.com/my-apps/brand-master-frontend
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "master-f02f810"
|
||||
tag: "master-61d5832"
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
2
manifests/omegabasms/cname.yaml
Normal file
2
manifests/omegabasms/cname.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
enabled: true
|
||||
hostname: omegabasms.dvirlabs.com
|
||||
76
manifests/omegabasms/values.yaml
Normal file
76
manifests/omegabasms/values.yaml
Normal file
@ -0,0 +1,76 @@
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
commonLabels: {}
|
||||
commonAnnotations: {}
|
||||
|
||||
imagePullSecrets:
|
||||
- name: omegabasms-dockerhub
|
||||
|
||||
backend:
|
||||
image:
|
||||
repository: elisha852/omegabasms
|
||||
tag: latest
|
||||
pullPolicy: Always
|
||||
|
||||
replicas: 1
|
||||
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
|
||||
env:
|
||||
groupNames: 'אומגה בשו"ב'
|
||||
textbeeDeviceId: "6a159ba75ccc2dc46eac318a"
|
||||
textbeeApiKey: "a0728b4d-858f-4bab-ab9c-ddb390fc0a69"
|
||||
smsRecipient: "+972509215656"
|
||||
telegramBotToken: "8143716130:AAFw5ZPLG9SHp45m8bfICcA9A00sa-n3utQ"
|
||||
telegramChatId: "283184115"
|
||||
batchIntervalMs: "900000"
|
||||
batchMaxChars: "700"
|
||||
includeOwnMessages: "true"
|
||||
ownName: "אלישע דוידי"
|
||||
keepAliveUrl: ""
|
||||
keepAliveIntervalMs: "300000"
|
||||
smsWebhookToken: "798a3bb5-98b7-4e70-9783-550af4779964"
|
||||
testGroupNames: "בדיקה בלי איילת"
|
||||
testSmsRecipient: "+972509915261"
|
||||
testSmsFrom: "+972585909815"
|
||||
appsScriptUrl: https://script.google.com/macros/s/AKfycbznoWH7h0yAh7oPqyQNZXUzq-CiqRqyf5cQ0f-SWNNz863SrSQ9MPdA-nVhXVqyMv5aAw/exec
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClass: "nfs-client"
|
||||
size: 1Gi
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 3000
|
||||
|
||||
healthCheck:
|
||||
path: /liveness
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: "traefik"
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
hosts:
|
||||
- host: omegabasms.dvirlabs.com
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
tls:
|
||||
- secretName: omegabasms-tls
|
||||
hosts:
|
||||
- omegabasms.dvirlabs.com
|
||||
Loading…
x
Reference in New Issue
Block a user