From 2dfe1af11e624667b279ed58c29700c18c351fc2 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 4 Jun 2022 14:37:58 +0200 Subject: [PATCH] Add nginx release --- apps/base/nginx/kustomization.yaml | 6 ++++++ apps/base/nginx/namespace.yaml | 4 ++++ apps/base/nginx/release.yaml | 18 ++++++++++++++++++ apps/production/kustomization.yaml | 4 ++++ clusters/production/apps.yaml | 16 ++++++++++++++++ 5 files changed, 48 insertions(+) create mode 100644 apps/base/nginx/kustomization.yaml create mode 100644 apps/base/nginx/namespace.yaml create mode 100644 apps/base/nginx/release.yaml create mode 100644 apps/production/kustomization.yaml create mode 100644 clusters/production/apps.yaml diff --git a/apps/base/nginx/kustomization.yaml b/apps/base/nginx/kustomization.yaml new file mode 100644 index 0000000..cbe3bc5 --- /dev/null +++ b/apps/base/nginx/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: nginx +resources: + - namespace.yaml + - release.yaml diff --git a/apps/base/nginx/namespace.yaml b/apps/base/nginx/namespace.yaml new file mode 100644 index 0000000..625789d --- /dev/null +++ b/apps/base/nginx/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: nginx diff --git a/apps/base/nginx/release.yaml b/apps/base/nginx/release.yaml new file mode 100644 index 0000000..ecd9912 --- /dev/null +++ b/apps/base/nginx/release.yaml @@ -0,0 +1,18 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: nginx + namespace: nginx +spec: + releaseName: nginx + chart: + spec: + chart: nginx + sourceRef: + kind: HelmRepository + name: bitnami + namespace: flux-system + interval: 5m + install: + remediation: + retries: 3 diff --git a/apps/production/kustomization.yaml b/apps/production/kustomization.yaml new file mode 100644 index 0000000..79c10c4 --- /dev/null +++ b/apps/production/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../base/nginx diff --git a/clusters/production/apps.yaml b/clusters/production/apps.yaml new file mode 100644 index 0000000..91131c0 --- /dev/null +++ b/clusters/production/apps.yaml @@ -0,0 +1,16 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: apps + namespace: flux-system +spec: + interval: 10m0s + dependsOn: + - name: infrastructure + sourceRef: + kind: GitRepository + name: flux-system + path: ./apps/production + prune: true + wait: true + timeout: 5m0s