From fbf9269cc7983f20e0f96bf5b2440ac8b9937836 Mon Sep 17 00:00:00 2001 From: Michael Thomson Date: Thu, 30 May 2024 14:27:13 -0400 Subject: [PATCH] onedev --- .../helmrepository-onedev.yaml | 9 +++++ .../kustomizations/kustomization-onedev.yaml | 18 +++++++++ bootstrap/namespaces/namespace-onedev.yaml | 4 ++ onedev/dns-endpoint.yaml | 15 +++++++ onedev/helmrelease-onedev.yaml | 40 +++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 bootstrap/helmrepositories/helmrepository-onedev.yaml create mode 100644 bootstrap/kustomizations/kustomization-onedev.yaml create mode 100644 bootstrap/namespaces/namespace-onedev.yaml create mode 100644 onedev/dns-endpoint.yaml create mode 100644 onedev/helmrelease-onedev.yaml diff --git a/bootstrap/helmrepositories/helmrepository-onedev.yaml b/bootstrap/helmrepositories/helmrepository-onedev.yaml new file mode 100644 index 0000000..d2626da --- /dev/null +++ b/bootstrap/helmrepositories/helmrepository-onedev.yaml @@ -0,0 +1,9 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: onedev + namespace: flux-system +spec: + interval: 15m + url: https://dl.cloudsmith.io/public/onedev/onedev/helm/charts/ + diff --git a/bootstrap/kustomizations/kustomization-onedev.yaml b/bootstrap/kustomizations/kustomization-onedev.yaml new file mode 100644 index 0000000..e2c19b3 --- /dev/null +++ b/bootstrap/kustomizations/kustomization-onedev.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: onedev + namespace: flux-system +spec: + interval: 15m + path: ./onedev + prune: true # remove any elements later removed from the above path + timeout: 2m # if not set, this defaults to interval duration, which is 1h + sourceRef: + kind: GitRepository + name: flux-system + healthChecks: + - apiVersion: helm.toolkit.fluxcd.io/v2beta1 + kind: HelmRelease + name: onedev + namespace: onedev diff --git a/bootstrap/namespaces/namespace-onedev.yaml b/bootstrap/namespaces/namespace-onedev.yaml new file mode 100644 index 0000000..bb550c4 --- /dev/null +++ b/bootstrap/namespaces/namespace-onedev.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: onedev diff --git a/onedev/dns-endpoint.yaml b/onedev/dns-endpoint.yaml new file mode 100644 index 0000000..d57522a --- /dev/null +++ b/onedev/dns-endpoint.yaml @@ -0,0 +1,15 @@ +apiVersion: externaldns.k8s.io/v1alpha1 +kind: DNSEndpoint +metadata: + name: onedev.michaelthomson.dev + namespace: onedev +spec: + endpoints: + - dnsName: onedev.michaelthomson.dev + recordTTL: 180 + recordType: CNAME + targets: + - michaelthomson.ddns.net + providerSpecific: + - name: external-dns.alpha.kubernetes.io/cloudflare-proxied + value: "true" diff --git a/onedev/helmrelease-onedev.yaml b/onedev/helmrelease-onedev.yaml new file mode 100644 index 0000000..477f0ce --- /dev/null +++ b/onedev/helmrelease-onedev.yaml @@ -0,0 +1,40 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: onedev + namespace: onedev +spec: + chart: + spec: + chart: onedev + version: 10.x + sourceRef: + kind: HelmRepository + name: onedev + namespace: flux-system + interval: 15m + timeout: 5m + releaseName: onedev + values: + # Configure Ingress resource + ingress: + enabled: true + className: "traefik" + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/router.tls: "true" + host: onedev.michaelthomson.dev + + # ingress.tls -- Configure TLS for the Ingress. + tls: + enabled: true + secretName: letsencrypt-wildcard-cert-michaelthomson.dev + persistence: + # persistence.storageClassName -- (string) Specify the storageClassName for PersistentVolumeClaims. + storageClassName: "nfs-client" + # persistence.accessModes -- Specify the accessModes for PersistentVolumeClaims. + accessModes: "ReadWriteOnce" + # persistence.size -- Specify the size of PersistentVolumeClaims. + size: 100Gi + # persistence.selector -- Specify the selectors for PersistentVolumeClaims. + selector: {}