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: List the resource created by this flux repo:
```sh ```sh
kubectl -n example-basic get gitrepositories kubectl -n stackspout get gitrepositories
kubectl -n example-basic get kustomizations kubectl -n stackspout get kustomizations
kubectl -n example-basic get helmreleases kubectl -n stackspout get helmreleases
kubectl -n example-basic get pods kubectl -n stackspout get pods
``` ```
Show output of the single app applied, [podinfo](https://github.com/stefanprodan/podinfo) 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 kind: HelmRelease
metadata: metadata:
name: podinfo name: podinfo
namespace: example-basic namespace: stackspout
spec: spec:
releaseName: podinfo releaseName: podinfo
chart: chart:
@ -13,7 +13,7 @@ spec:
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
name: podinfo name: podinfo
namespace: example-basic namespace: stackspout
interval: 60m interval: 60m
# Default values # Default values
# https://github.com/stefanprodan/podinfo/blob/master/charts/podinfo/values.yaml # 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 kind: Kustomization
metadata: metadata:
name: examle-apps name: examle-apps
namespace: example-basic namespace: stackspout
spec: spec:
interval: 24h interval: 24h
sourceRef: sourceRef:
kind: GitRepository kind: GitRepository
name: stackspin-flux-example name: stackspout
path: ./basic/apps path: ./basic/apps
prune: true prune: true
validation: client validation: client

View File

@ -2,12 +2,12 @@ apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization kind: Kustomization
metadata: metadata:
name: example-infrastructure name: example-infrastructure
namespace: example-basic namespace: stackspout
spec: spec:
interval: 24h interval: 24h
sourceRef: sourceRef:
kind: GitRepository kind: GitRepository
name: stackspin-flux-example name: stackspout
path: ./basic/infrastructure path: ./basic/infrastructure
prune: true prune: true
validation: client 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 apiVersion: v1
kind: Namespace kind: Namespace
metadata: 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 kind: HelmRepository
metadata: metadata:
name: podinfo name: podinfo
namespace: example-basic namespace: stackspout
spec: spec:
interval: 1h interval: 1h
url: https://stefanprodan.github.io/podinfo url: https://stefanprodan.github.io/podinfo

View File

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