diff --git a/README.md b/README.md index b78f54cdd5cb35a8612d7dbf736559cd8caae0cd..43f9deef721149ccb35e313e86bf062679428226 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/basic/apps/example/podinfo-release.yaml b/basic/apps/example/podinfo-release.yaml index 3601a2e9b0ed9a6c1b11db6c26894dc4d592054c..dd74a21b25142b03b454d798a229aed633db4644 100644 --- a/basic/apps/example/podinfo-release.yaml +++ b/basic/apps/example/podinfo-release.yaml @@ -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 diff --git a/basic/clusters/production/apps-kustomization.yaml b/basic/clusters/production/apps-kustomization.yaml index 8d6cd128d6020384da0e5bf00e0249e47218dc4c..9ae18961515fa4679da5c94f390921ad7e73ecdd 100644 --- a/basic/clusters/production/apps-kustomization.yaml +++ b/basic/clusters/production/apps-kustomization.yaml @@ -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 diff --git a/basic/clusters/production/infrastructure-kustomization.yaml b/basic/clusters/production/infrastructure-kustomization.yaml index d3fe50101fe3c58d8acc97e9d6c5374eb99f9ee0..be8620585539aa92041f956ce9f9721433e5e003 100644 --- a/basic/clusters/production/infrastructure-kustomization.yaml +++ b/basic/clusters/production/infrastructure-kustomization.yaml @@ -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 diff --git a/basic/clusters/production/overrides-kustomization.yaml b/basic/clusters/production/overrides-kustomization.yaml new file mode 100644 index 0000000000000000000000000000000000000000..3fe8e6072038962eb5fe76a59c5dd1f61b768b26 --- /dev/null +++ b/basic/clusters/production/overrides-kustomization.yaml @@ -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 diff --git a/basic/infrastructure/namespaces/example-basic-namespace.yaml b/basic/infrastructure/namespaces/stackspout-namespace.yaml similarity index 65% rename from basic/infrastructure/namespaces/example-basic-namespace.yaml rename to basic/infrastructure/namespaces/stackspout-namespace.yaml index 4caf22613dbfb07af1155f2a183f989968e450d3..372426e12dabcf9689c57ab214c0478f76a0f40d 100644 --- a/basic/infrastructure/namespaces/example-basic-namespace.yaml +++ b/basic/infrastructure/namespaces/stackspout-namespace.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: example-basic + name: stackspout diff --git a/basic/infrastructure/sources/gitea.yaml b/basic/infrastructure/sources/gitea.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ae22ac9cb160141dfdc96799af29a178cd8ed3fb --- /dev/null +++ b/basic/infrastructure/sources/gitea.yaml @@ -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/ diff --git a/basic/infrastructure/sources/podinfo-hr.yaml b/basic/infrastructure/sources/podinfo-hr.yaml index 37f4a6688265b3b366add1fcab8b4804c29ba338..4176881c320c0e67c81623884680d496420cdbbd 100644 --- a/basic/infrastructure/sources/podinfo-hr.yaml +++ b/basic/infrastructure/sources/podinfo-hr.yaml @@ -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 diff --git a/basic/install.sh b/basic/install.sh index c3fa97ce2a1c68da434abd565654d529ccf0c57a..c2a73d00892fc367fc4fecaffd10fc5977980145 100755 --- a/basic/install.sh +++ b/basic/install.sh @@ -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 \ +kubectl get namespace stackspout 2>/dev/null || kubectl create namespace stackspout + +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=1h + --interval=10m -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 kustomization stackspout in namespace stackspout" +flux create kustomization stackspout \ + --namespace=stackspout \ + --source=GitRepository/stackspout \ --path="./basic/clusters/production/" \ --prune=true \ - --interval=1h + --interval=10m diff --git a/basic/overrides/stackspin-nextcloud-override.yaml b/basic/overrides/stackspin-nextcloud-override.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ca82d2a6f260c4100b2a295a58f42f609d7e95bb --- /dev/null +++ b/basic/overrides/stackspin-nextcloud-override.yaml @@ -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