diff --git a/clusters/pi_cluster/ingress.yaml b/clusters/pi_cluster/ingress.yaml new file mode 100644 index 0000000..cdf4438 --- /dev/null +++ b/clusters/pi_cluster/ingress.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: ingress + namespace: flux-system +spec: + interval: 60s + sourceRef: + kind: GitRepository + name: flux-system + path: ./infrastructure/ingress + prune: true + wait: true diff --git a/infrastructure/ingress/cert-manager.yaml b/infrastructure/ingress/cert-manager.yaml new file mode 100644 index 0000000..f5b07af --- /dev/null +++ b/infrastructure/ingress/cert-manager.yaml @@ -0,0 +1,34 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: cert-manager + labels: + toolkit.fluxcd.io/tenant: sre-team +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: cert-manager + namespace: cert-manager +spec: + interval: 24h + url: https://charts.jetstack.io +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: cert-manager + namespace: cert-manager +spec: + interval: 30m + chart: + spec: + chart: cert-manager + version: "1.x" + sourceRef: + kind: HelmRepository + name: cert-manager + namespace: cert-manager + interval: 12h + values: + installCRDs: true diff --git a/infrastructure/ingress/ingress-controller.yaml b/infrastructure/ingress/ingress-controller.yaml new file mode 100644 index 0000000..45dc00e --- /dev/null +++ b/infrastructure/ingress/ingress-controller.yaml @@ -0,0 +1,38 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: ingress-nginx + labels: + toolkit.fluxcd.io/tenant: sre-team +--- +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: ingress-nginx + namespace: ingress-nginx +spec: + interval: 24h + url: https://kubernetes.github.io/ingress-nginx +--- +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: ingress-nginx + namespace: ingress-nginx +spec: + interval: 30m + chart: + spec: + chart: ingress-nginx + version: "*" + sourceRef: + kind: HelmRepository + name: ingress-nginx + namespace: ingress-nginx + interval: 12h + values: + controller: + service: + type: "NodePort" + admissionWebhooks: + enabled: false diff --git a/infrastructure/ingress/kustomization.yaml b/infrastructure/ingress/kustomization.yaml new file mode 100644 index 0000000..e2c08fa --- /dev/null +++ b/infrastructure/ingress/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- cert-manager.yaml +- ingress-nginx.yaml