Use stackspout with gitea chart and nextcloud overrides

This commit is contained in:
xeruf 2022-04-13 07:46:20 +01:00
parent b5e363b71b
commit 9fe8e2963e
10 changed files with 61 additions and 23 deletions

View File

@ -28,10 +28,10 @@ basic/install.sh
List the resource created by this flux repo:
```sh
kubectl -n example-basic get gitrepositories
kubectl -n example-basic get kustomizations
kubectl -n example-basic get helmreleases
kubectl -n example-basic get pods
kubectl -n stackspout get gitrepositories
kubectl -n stackspout get kustomizations
kubectl -n stackspout get helmreleases
kubectl -n stackspout get pods
```
Show output of the single app applied, [podinfo](https://github.com/stefanprodan/podinfo)

View File

@ -2,7 +2,7 @@ apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: podinfo
namespace: example-basic
namespace: stackspout
spec:
releaseName: podinfo
chart:
@ -13,7 +13,7 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
namespace: example-basic
namespace: stackspout
interval: 60m
# Default values
# https://github.com/stefanprodan/podinfo/blob/master/charts/podinfo/values.yaml

View File

@ -2,12 +2,12 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: examle-apps
namespace: example-basic
namespace: stackspout
spec:
interval: 24h
sourceRef:
kind: GitRepository
name: stackspin-flux-example
name: stackspout
path: ./basic/apps
prune: true
validation: client

View File

@ -2,12 +2,12 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: example-infrastructure
namespace: example-basic
namespace: stackspout
spec:
interval: 24h
sourceRef:
kind: GitRepository
name: stackspin-flux-example
name: stackspout
path: ./basic/infrastructure
prune: true
validation: client

View File

@ -0,0 +1,13 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: overrides
namespace: stackspout
spec:
interval: 5m
sourceRef:
kind: GitRepository
name: stackspout
path: ./basic/overrides
prune: true
validation: client

View File

@ -1,4 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: example-basic
name: stackspout

View File

@ -0,0 +1,8 @@
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: gitea
namespace: stackspout
spec:
interval: 1h
url: https://dl.gitea.io/charts/

View File

@ -2,7 +2,7 @@ apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
name: podinfo
namespace: example-basic
namespace: stackspout
spec:
interval: 1h
url: https://stefanprodan.github.io/podinfo

View File

@ -1,16 +1,18 @@
#!/usr/bin/env bash
echo "Creating / updating gitRepository stackspin-flux-example-basic in namespace example-basic"
flux create source git stackspin-flux-example \
--namespace=example-basic \
--url=https://open.greenhost.net/stackspin/stackspin-flux-example.git \
--branch=main \
--interval=1h
kubectl get namespace stackspout 2>/dev/null || kubectl create namespace stackspout
echo "Creating / updating kustomization stackspin-flux-example in namespace example-basic"
flux create kustomization stackspin-flux-example \
--namespace=example-basic \
--source=GitRepository/stackspin-flux-example \
echo "Creating / updating gitRepository stackspout in namespace stackspout"
flux create source git stackspout \
--namespace=stackspout \
--url=https://open.greenhost.net/xeruf/stackspout.git \
--branch=main \
--interval=10m
echo "Creating / updating kustomization stackspout in namespace stackspout"
flux create kustomization stackspout \
--namespace=stackspout \
--source=GitRepository/stackspout \
--path="./basic/clusters/production/" \
--prune=true \
--interval=1h
--interval=10m

View File

@ -0,0 +1,15 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: stackspin-apps
name: stackspin-nextcloud-override
data:
values.yaml: |
apps:
- name: groupfolders
enabled: true
- name: contacts
enabled: true
- name: bruteforcesettings
enabled: false