Added odoo
This commit is contained in:
23
odoo-argocd-apps/.helmignore
Normal file
23
odoo-argocd-apps/.helmignore
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
||||||
5
odoo-argocd-apps/Chart.yaml
Normal file
5
odoo-argocd-apps/Chart.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: odoo-argocd-apps
|
||||||
|
description: A Helm chart for deploying the requirements, main charts and postinstall as ArgoCD apps for Odoo
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
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
|
||||||
22
odoo-argocd-apps/values.yaml
Normal file
22
odoo-argocd-apps/values.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
argocd:
|
||||||
|
namespace: argocd
|
||||||
|
project: default
|
||||||
|
requirements:
|
||||||
|
repoURL: "https://git.blarre.net/thomas/helm-charts.git"
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: odoo-requirements
|
||||||
|
|
||||||
|
destination:
|
||||||
|
server: "https://kubernetes.default.svc"
|
||||||
|
namespace: odoo
|
||||||
|
|
||||||
|
odoo:
|
||||||
|
dbCluster:
|
||||||
|
numInstances: 3
|
||||||
|
size: 10Gi
|
||||||
|
dataPvc:
|
||||||
|
name: odoo-data
|
||||||
|
storageClassName: ''
|
||||||
|
size: 40Gi
|
||||||
|
odooEmail: "admin@domain.net"
|
||||||
|
replicaCount: 1
|
||||||
23
odoo-postinstall/.helmignore
Normal file
23
odoo-postinstall/.helmignore
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
||||||
5
odoo-postinstall/Chart.yaml
Normal file
5
odoo-postinstall/Chart.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: odoo-postinstall
|
||||||
|
description: A Helm chart for deploying the postinall stuff for odoo, mainly the ingress
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
62
odoo-postinstall/templates/_helpers.tpl
Normal file
62
odoo-postinstall/templates/_helpers.tpl
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "odoo-postinstall.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-postinstall.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-postinstall.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "odoo-postinstall.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "odoo-postinstall.chart" . }}
|
||||||
|
{{ include "odoo-postinstall.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "odoo-postinstall.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "odoo-postinstall.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "odoo-postinstall.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "odoo-postinstall.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
16
odoo-postinstall/templates/odoo-ingress.yaml
Normal file
16
odoo-postinstall/templates/odoo-ingress.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: ts-odoo
|
||||||
|
annotations:
|
||||||
|
tailscale.com/funnel: "true"
|
||||||
|
spec:
|
||||||
|
defaultBackend:
|
||||||
|
service:
|
||||||
|
name: odoo
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
ingressClassName: tailscale
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .Values.tailscaleIngresses.odooHostname }}
|
||||||
2
odoo-postinstall/values.yaml
Normal file
2
odoo-postinstall/values.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
tailcaleIngresses:
|
||||||
|
odooHostname: odoo
|
||||||
23
odoo-requirements/.helmignore
Normal file
23
odoo-requirements/.helmignore
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*.orig
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
||||||
5
odoo-requirements/Chart.yaml
Normal file
5
odoo-requirements/Chart.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: odoo-requirements
|
||||||
|
description: A Helm chart for the requirements for Odoo
|
||||||
|
type: application
|
||||||
|
version: 0.1.0
|
||||||
62
odoo-requirements/templates/_helpers.tpl
Normal file
62
odoo-requirements/templates/_helpers.tpl
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "odoo-requirements.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-requirements.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-requirements.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "odoo-requirements.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "odoo-requirements.chart" . }}
|
||||||
|
{{ include "odoo-requirements.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "odoo-requirements.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "odoo-requirements.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "odoo-requirements.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "odoo-requirements.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
8
odoo-requirements/templates/db-cluster.yaml
Normal file
8
odoo-requirements/templates/db-cluster.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: odoo-db
|
||||||
|
spec:
|
||||||
|
instances: {{ .Values.odoo.dbCluster.numInstances }}
|
||||||
|
storage:
|
||||||
|
size: {{ .Values.odoo.dbCluster.size }}
|
||||||
11
odoo-requirements/templates/odoo-data.yaml
Normal file
11
odoo-requirements/templates/odoo-data.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.odoo.dataPvc.name }}
|
||||||
|
spec:
|
||||||
|
storageClassName: {{ .Values.odoo.dataPvc.storageClassName }}
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.odoo.dataPvc.size }}
|
||||||
8
odoo-requirements/values.yaml
Normal file
8
odoo-requirements/values.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
odoo:
|
||||||
|
dbCluster:
|
||||||
|
numInstances: 3
|
||||||
|
size: 10Gi
|
||||||
|
dataPvc:
|
||||||
|
name: odoo-data
|
||||||
|
storageClassName: ''
|
||||||
|
size: 40Gi
|
||||||
Reference in New Issue
Block a user