From 8a9c10d635eebca29bcbb5db03013316727418b8 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Wed, 14 Jun 2023 13:24:31 -0400 Subject: [PATCH] add vscode server --- cluster/apps/dev/code/helm-release.yaml | 73 ++++++++++++++++++++++++ cluster/apps/dev/code/kustomization.yaml | 4 ++ cluster/apps/dev/kustomization.yaml | 5 ++ cluster/apps/dev/namespace.yaml | 6 ++ cluster/apps/kustomization.yaml | 5 +- 5 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 cluster/apps/dev/code/helm-release.yaml create mode 100644 cluster/apps/dev/code/kustomization.yaml create mode 100644 cluster/apps/dev/kustomization.yaml create mode 100644 cluster/apps/dev/namespace.yaml diff --git a/cluster/apps/dev/code/helm-release.yaml b/cluster/apps/dev/code/helm-release.yaml new file mode 100644 index 0000000..1114ed9 --- /dev/null +++ b/cluster/apps/dev/code/helm-release.yaml @@ -0,0 +1,73 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: code + namespace: dev +spec: + interval: 5m + chart: + spec: + chart: app-template + version: 1.3.x + sourceRef: + kind: HelmRepository + name: bjws-charts + namespace: flux-system + + values: + # Add init container for pulling znc modules and putting them into the modules directory +# initContainers: +# pull-module-source: +# image: alpine:latest +# command: +# - "sh" +# - "-c" +# - "sed -i -e's/ main/ main contrib non-free/g' /etc/apt/sources.list &&" +# volumeMounts: +# - mountPath: /znc-data +# name: config + + image: + repository: codercom/code-server + tag: latest + + service: + main: + ports: + http: + port: 8080 + + probes: + liveness: + enabled: false + + ingress: + main: + enabled: true + annotations: + cert-manager.io/cluster-issuer: letsencrypt-production + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/router.middlewares: traefik-authentik@kubernetescrd + hosts: + - host: &host "code.${SECRET_NEW_DOMAIN}" + paths: + - path: / + pathType: Prefix + tls: + - hosts: + - *host + secretName: wildcard-main-tls + +# persistence: +# config: +# enabled: true +# type: hostPath +# hostPath: /mnt/MainPool/Kubernetes/znc +# mountPath: /znc-data + + resources: + requests: + cpu: 1m + memory: 4Mi +# limits: +# memory: 200Mi diff --git a/cluster/apps/dev/code/kustomization.yaml b/cluster/apps/dev/code/kustomization.yaml new file mode 100644 index 0000000..ea3145d --- /dev/null +++ b/cluster/apps/dev/code/kustomization.yaml @@ -0,0 +1,4 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./helm-release.yaml \ No newline at end of file diff --git a/cluster/apps/dev/kustomization.yaml b/cluster/apps/dev/kustomization.yaml new file mode 100644 index 0000000..e504180 --- /dev/null +++ b/cluster/apps/dev/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- ./namespace.yaml +- ./code diff --git a/cluster/apps/dev/namespace.yaml b/cluster/apps/dev/namespace.yaml new file mode 100644 index 0000000..c7012b4 --- /dev/null +++ b/cluster/apps/dev/namespace.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: dev + labels: + name: dev diff --git a/cluster/apps/kustomization.yaml b/cluster/apps/kustomization.yaml index 8ddaf85..664b9c5 100644 --- a/cluster/apps/kustomization.yaml +++ b/cluster/apps/kustomization.yaml @@ -10,5 +10,6 @@ resources: - ./irc - ./monitoring - ./default -- ./game-servers -#- ./harbor \ No newline at end of file +#- ./game-servers +- ./code +#- ./harbor