try to use helm in kustomize

This commit is contained in:
Tobias Brunner 2023-01-08 17:54:01 +01:00
parent 4ad9c8a251
commit e240c44f72
Signed by: tobru
SSH key fingerprint: SHA256:kywVhvCA+MIxL6eBgoQa+BfC/ROJqcfD2bpy1PR6Ebk
6 changed files with 36 additions and 12 deletions

View file

@ -0,0 +1,20 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- service.yaml
generators:
- secret-generator.yaml
helmCharts:
- name: postgresql
releaseName: db
version: 12.1.7
repo: https://charts.bitnami.com/bitnami
valuesInline:
global:
storageClass: local-path
postgresql:
auth:
existingSecret: postgresql-creds
secretKeys:
adminPasswordKey: ADMIN_PASSWORD
userPasswordKey: USER_PASSWORD

View file

@ -0,0 +1,7 @@
apiVersion: v1
Kind: Secret
metadata:
name: postgresql-creds
stringData:
ADMIN_PASSWORD: iej0Eish4eir6maeYie9ookehee7Iaph
USER_PASSWORD: doiKuShaicee2AhXe1Ij3ahqueighei0

View file

@ -1,2 +0,0 @@
global:
storageClass: local-path

View file

@ -0,0 +1,6 @@
apiVersion: viaduct.ai/v1
kind: ksops
metadata:
name: secret-generator
files:
- postgresql-creds.sops.yaml

View file

@ -7,16 +7,9 @@ metadata:
- resources-finalizer.argocd.argoproj.io
spec:
project: apps
sources:
- repoURL: https://charts.bitnami.com/bitnami
chart: postgresql
targetRevision: 12.1.7
helm:
values: |
global:
storageClass: local-path
- repoURL: https://git.tbrnt.ch/tobru/gitops-zurrli.git
source:
path: apps/takahe
repoURL: https://git.tbrnt.ch/tobru/gitops-zurrli.git
targetRevision: HEAD
destination:
namespace: takahe

View file

@ -5,7 +5,7 @@ metadata:
data:
# For KSOPs versions < v2.5.0, use the old kustomize flag style
# kustomize.buildOptions: "--enable_alpha_plugins"
kustomize.buildOptions: "--enable-alpha-plugins"
kustomize.buildOptions: "--enable-alpha-plugins --enable-helm"
resource.exclusions: |
- apiGroups:
- cilium.io