From 78c89ae0864df7bedb7fa74f831f079aa49e36c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20M=C3=BCller?= Date: Fri, 16 Feb 2024 21:00:17 +0100 Subject: [PATCH] feat(gimlet): impemented gimlet --- .../flux-system/gimlet/app/helm-release.yaml | 91 +++++++++++++++++++ .../flux-system/gimlet/app/kustomization.yaml | 11 +++ .../gimlet/app/persistent-volume-claim.yaml | 14 +++ .../apps/flux-system/gimlet/flux-sync.yaml | 16 ++++ .../apps/flux-system/kustomization.yaml | 1 + 5 files changed, 133 insertions(+) create mode 100644 kubernetes/talos-flux/apps/flux-system/gimlet/app/helm-release.yaml create mode 100644 kubernetes/talos-flux/apps/flux-system/gimlet/app/kustomization.yaml create mode 100644 kubernetes/talos-flux/apps/flux-system/gimlet/app/persistent-volume-claim.yaml create mode 100644 kubernetes/talos-flux/apps/flux-system/gimlet/flux-sync.yaml diff --git a/kubernetes/talos-flux/apps/flux-system/gimlet/app/helm-release.yaml b/kubernetes/talos-flux/apps/flux-system/gimlet/app/helm-release.yaml new file mode 100644 index 000000000..d0aa0e032 --- /dev/null +++ b/kubernetes/talos-flux/apps/flux-system/gimlet/app/helm-release.yaml @@ -0,0 +1,91 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta2.json +apiVersion: helm.toolkit.fluxcd.io/v2beta2 +kind: HelmRelease +metadata: + name: &app gimlet +spec: + interval: 15m + chart: + spec: + chart: app-template + version: 2.6.0 + sourceRef: + kind: HelmRepository + name: bjw-s-charts + namespace: flux-system + install: + createNamespace: true + remediation: + retries: 3 + upgrade: + remediation: + retries: 3 + values: + controllers: + main: + replicas: 1 + pod: + securityContext: + fsGroup: 999 + # runAsGroup: 3000 + # runAsNonRoot: true + # runAsUser: 1000 + # seccompProfile: + # type: RuntimeDefault + containers: + main: + nameOverride: minecraft-bedrock + env: + API_HOST: "http://gimlet.flux-system.svc.cluster.local:9000" + HOST: "http://127.0.0.1:9000" + TZ: ${SETTING_TZ} + + image: + repository: ghcr.io/gimlet-io/gimlet + tag: v0.25.0 + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + + probes: + startup: + enabled: false + liveness: &probes + enabled: true + custom: true + spec: + httpGet: + path: / + port: &port 9000 + scheme: HTTP + initialDelaySeconds: 0 + periodSeconds: 10 + timeoutSeconds: 1 + failureThreshold: 3 + resources: + requests: + cpu: 200m + memory: 200Mi + + service: + main: + ports: + http: + enabled: true + port: 9000 + protocol: TCP + + persistence: + data: + type: persistentVolumeClaim + existingClaim: gimlet-data + globalMounts: + - path: /var/lib/gimlet-dashboard + + ingress: + main: + enabled: false diff --git a/kubernetes/talos-flux/apps/flux-system/gimlet/app/kustomization.yaml b/kubernetes/talos-flux/apps/flux-system/gimlet/app/kustomization.yaml new file mode 100644 index 000000000..3058b154b --- /dev/null +++ b/kubernetes/talos-flux/apps/flux-system/gimlet/app/kustomization.yaml @@ -0,0 +1,11 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: flux-system +resources: + - ./persistent-volume-claim.yaml + - ./helm-release.yaml +commonLabels: + app.kubernetes.io/name: gimlet + app.kubernetes.io/instance: gimlet diff --git a/kubernetes/talos-flux/apps/flux-system/gimlet/app/persistent-volume-claim.yaml b/kubernetes/talos-flux/apps/flux-system/gimlet/app/persistent-volume-claim.yaml new file mode 100644 index 000000000..b3d7979d1 --- /dev/null +++ b/kubernetes/talos-flux/apps/flux-system/gimlet/app/persistent-volume-claim.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: gimlet-data + labels: + kustomize.toolkit.fluxcd.io/prune: disabled +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: ceph-block diff --git a/kubernetes/talos-flux/apps/flux-system/gimlet/flux-sync.yaml b/kubernetes/talos-flux/apps/flux-system/gimlet/flux-sync.yaml new file mode 100644 index 000000000..23f990d71 --- /dev/null +++ b/kubernetes/talos-flux/apps/flux-system/gimlet/flux-sync.yaml @@ -0,0 +1,16 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1beta2.json +apiVersion: kustomize.toolkit.fluxcd.io/v1beta2 +kind: Kustomization +metadata: + name: apps-gimlet + namespace: flux-system +spec: + interval: 30m + path: ./kubernetes/talos-flux/apps/flux-system/gimlet/app + prune: true + sourceRef: + kind: GitRepository + name: home-ops + wait: true + timeout: 3m diff --git a/kubernetes/talos-flux/apps/flux-system/kustomization.yaml b/kubernetes/talos-flux/apps/flux-system/kustomization.yaml index 4509acd00..334469b5c 100644 --- a/kubernetes/talos-flux/apps/flux-system/kustomization.yaml +++ b/kubernetes/talos-flux/apps/flux-system/kustomization.yaml @@ -6,3 +6,4 @@ resources: # - ./namespace.yaml namespace is part of gotk manifests and will switch reconcile - ./weave-gitops/flux-sync.yaml - ./gotk/flux-sync.yaml + - ./gimlet/flux-sync.yaml