From c42fd894012ebc318ac3c4b96e3a18272b28489e Mon Sep 17 00:00:00 2001 From: Thomas Blarre Date: Mon, 11 Nov 2024 16:04:25 +0000 Subject: [PATCH] Added ingress and resource presets --- odoo-argocd-apps/templates/odoo-chart.yaml | 1 + .../templates/odoo-postinstall.yaml | 30 +++++++++++++++++++ odoo-argocd-apps/values.yaml | 10 ++++++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 odoo-argocd-apps/templates/odoo-postinstall.yaml diff --git a/odoo-argocd-apps/templates/odoo-chart.yaml b/odoo-argocd-apps/templates/odoo-chart.yaml index 79d8e29..527d4ef 100644 --- a/odoo-argocd-apps/templates/odoo-chart.yaml +++ b/odoo-argocd-apps/templates/odoo-chart.yaml @@ -17,6 +17,7 @@ spec: valuesObject: odooEmail: {{ .Values.odoo.odooEmail }} replicaCount: {{ .Values.odoo.replicaCount }} + resourcesPreset: "None" persistence: existingClaim: {{ .Values.odoo.dataPvc.name }} postgresql: diff --git a/odoo-argocd-apps/templates/odoo-postinstall.yaml b/odoo-argocd-apps/templates/odoo-postinstall.yaml new file mode 100644 index 0000000..983385e --- /dev/null +++ b/odoo-argocd-apps/templates/odoo-postinstall.yaml @@ -0,0 +1,30 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: odoo-postinstall + 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.postinstall.repoURL }} + targetRevision: {{ .Values.argocd.postinstall.targetRevision }} + path: {{ .Values.argocd.postinstall.path }} + helm: + releaseName: odoo-postinstall + valuesObject: + tailscaleIngresses: + odooHostname: {{ .Values.tailscaleIngresses.odooHostname }} + 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 diff --git a/odoo-argocd-apps/values.yaml b/odoo-argocd-apps/values.yaml index 1d2bec8..93dce8f 100644 --- a/odoo-argocd-apps/values.yaml +++ b/odoo-argocd-apps/values.yaml @@ -5,6 +5,10 @@ argocd: repoURL: "https://git.blarre.net/thomas/helm-charts.git" targetRevision: HEAD path: odoo-requirements + postinstall: + repoURL: "https://git.blarre.net/thomas/helm-charts.git" + targetRevision: HEAD + path: odoo-postinstall destination: server: "https://kubernetes.default.svc" @@ -19,4 +23,8 @@ odoo: storageClassName: '' size: 40Gi odooEmail: "admin@domain.net" - replicaCount: 1 \ No newline at end of file + resourcesPreset: "large" + replicaCount: 1 + +tailscaleIngresses: + odooHostname: odoo \ No newline at end of file