Added odoo
This commit is contained in:
62
odoo-argocd-apps/templates/_helpers.tpl
Normal file
62
odoo-argocd-apps/templates/_helpers.tpl
Normal file
@@ -0,0 +1,62 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "odoo-argocd-apps.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "odoo-argocd-apps.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 }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "odoo-argocd-apps.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "odoo-argocd-apps.labels" -}}
|
||||
helm.sh/chart: {{ include "odoo-argocd-apps.chart" . }}
|
||||
{{ include "odoo-argocd-apps.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "odoo-argocd-apps.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "odoo-argocd-apps.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "odoo-argocd-apps.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "odoo-argocd-apps.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
41
odoo-argocd-apps/templates/odoo-chart.yaml
Normal file
41
odoo-argocd-apps/templates/odoo-chart.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: odoo-chart
|
||||
namespace: {{ .Values.argocd.namespace }}
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "0"
|
||||
notifications.argoproj.io/subscribe.on-sync-succeeded.telegram: "-1002270587578"
|
||||
spec:
|
||||
project: {{ .Values.argocd.project }}
|
||||
source:
|
||||
repoURL: registry-1.docker.io/bitnamicharts
|
||||
chart: odoo
|
||||
targetRevision: 28.x
|
||||
helm:
|
||||
releaseName: odoo
|
||||
valuesObject:
|
||||
odooEmail: {{ .Values.odoo.odooEmail }}
|
||||
replicaCount: {{ .Values.odoo.replicaCount }}
|
||||
persistence:
|
||||
existingClaim: {{ .Values.odoo.dataPvc.name }}
|
||||
postgresql:
|
||||
enabled: false
|
||||
externalDatabase:
|
||||
host: odoo-db-rw
|
||||
port: 5432
|
||||
postgresqlPostgresUser: app
|
||||
existingSecret: odoo-db-app
|
||||
existingSecretPostgresPasswordKey: password
|
||||
|
||||
destination:
|
||||
server: {{ .Values.destination.server }}
|
||||
namespace: {{ .Values.destination.namespace }}
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true # Automatically remove resources no longer in the repo
|
||||
selfHeal: true # Automatically self-heal when drift is detected
|
||||
syncOptions:
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
- CreateNamespace=true
|
||||
36
odoo-argocd-apps/templates/odoo-requirements-app.yaml
Normal file
36
odoo-argocd-apps/templates/odoo-requirements-app.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: odoo-requirements
|
||||
namespace: {{ .Values.argocd.namespace }}
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "-1"
|
||||
notifications.argoproj.io/subscribe.on-sync-succeeded.telegram: "-1002270587578"
|
||||
spec:
|
||||
project: {{ .Values.argocd.project }}
|
||||
source:
|
||||
repoURL: {{ .Values.argocd.requirements.repoURL }}
|
||||
targetRevision: {{ .Values.requirements.targetRevision }}
|
||||
path: {{ .Values.requirements.path }}
|
||||
helm:
|
||||
releaseName: odoo-requirements
|
||||
valuesObject:
|
||||
odoo:
|
||||
dbCluster:
|
||||
numInstances: {{ .Values.odoo.dbCluster.numInstances }}
|
||||
size: {{ .Values.odoo.dbCluster.size }}
|
||||
dataPvc:
|
||||
name: {{ .Values.odoo.dataPvc.name }}
|
||||
storageClassName: {{ .Values.odoo.dataPvc.storageClassName }}
|
||||
size: {{ .Values.odoo.dataPvc.size }}
|
||||
destination:
|
||||
server: {{ .Values.destination.server }}
|
||||
namespace: {{ .Values.destination.namespace }}
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true # Automatically remove resources no longer in the repo
|
||||
selfHeal: true # Automatically self-heal when drift is detected
|
||||
syncOptions:
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
- CreateNamespace=true
|
||||
Reference in New Issue
Block a user