From 965d3abf534b5f867deb4ddde29cb52769bbc743 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Wed, 19 Jul 2023 21:29:43 +0200 Subject: [PATCH] fix: hccm and skooner --- k8s/configure_cluster.yaml | 22 +++++++++---------- k8s/roles/coder/templates/values.coder.yml.j2 | 4 ++-- .../codimd/templates/values.codimd.yml.j2 | 3 ++- .../values.drone-runner-docker.arm64.yml.j2 | 2 ++ k8s/roles/hcloud/templates/values.hccm.yml.j2 | 6 ++++- k8s/roles/skooner/files/kustomization.yaml | 4 +++- .../skooner/files/resources/ingress.yaml | 17 ++++++++++++++ .../resources/rbac/cluster_role_binding.yaml | 13 +++++++++++ 8 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 k8s/roles/skooner/files/resources/ingress.yaml create mode 100644 k8s/roles/skooner/files/resources/rbac/cluster_role_binding.yaml diff --git a/k8s/configure_cluster.yaml b/k8s/configure_cluster.yaml index 7b57275..26a82fe 100644 --- a/k8s/configure_cluster.yaml +++ b/k8s/configure_cluster.yaml @@ -1,15 +1,15 @@ - name: Configure cluster hosts: localhost roles: - # - role: cifs-csi - # - role: skooner - # - role: coder - # - role: codimd - # - role: prometheus - # - role: postgres + - role: cifs-csi + - role: skooner + - role: coder + - role: codimd + - role: prometheus + - role: postgres - role: hcloud - # - role: minio - # - role: gitea - # - role: drone - # - role: fider - # - role: nextcloud + - role: minio + - role: gitea + - role: drone + - role: fider + - role: nextcloud diff --git a/k8s/roles/coder/templates/values.coder.yml.j2 b/k8s/roles/coder/templates/values.coder.yml.j2 index 5c64922..d02ae76 100644 --- a/k8s/roles/coder/templates/values.coder.yml.j2 +++ b/k8s/roles/coder/templates/values.coder.yml.j2 @@ -53,5 +53,5 @@ coder: name: coder-secrets key: OIDC_CLIENT_SECRET -service: - type: ClusterIP \ No newline at end of file + service: + type: ClusterIP \ No newline at end of file diff --git a/k8s/roles/codimd/templates/values.codimd.yml.j2 b/k8s/roles/codimd/templates/values.codimd.yml.j2 index a4fcb22..10b738e 100644 --- a/k8s/roles/codimd/templates/values.codimd.yml.j2 +++ b/k8s/roles/codimd/templates/values.codimd.yml.j2 @@ -46,7 +46,8 @@ codimd: username: preferred_username displayName: name email: email - + nodeSelector: + kubernetes.io/arch: amd64 postgresql: diff --git a/k8s/roles/drone/templates/values.drone-runner-docker.arm64.yml.j2 b/k8s/roles/drone/templates/values.drone-runner-docker.arm64.yml.j2 index 8250c5c..fe7db1a 100644 --- a/k8s/roles/drone/templates/values.drone-runner-docker.arm64.yml.j2 +++ b/k8s/roles/drone/templates/values.drone-runner-docker.arm64.yml.j2 @@ -1,6 +1,8 @@ image: tag: 1.8.3 +replicaCount: 4 + extraSecretNamesForEnvFrom: - drone-runner-secrets diff --git a/k8s/roles/hcloud/templates/values.hccm.yml.j2 b/k8s/roles/hcloud/templates/values.hccm.yml.j2 index 8040477..b07e63d 100644 --- a/k8s/roles/hcloud/templates/values.hccm.yml.j2 +++ b/k8s/roles/hcloud/templates/values.hccm.yml.j2 @@ -1,3 +1,7 @@ monitoring: podMonitor: - enabled: true \ No newline at end of file + enabled: true + +networking: + enabled: true + clusterCIDR: 10.42.0.0/24 \ No newline at end of file diff --git a/k8s/roles/skooner/files/kustomization.yaml b/k8s/roles/skooner/files/kustomization.yaml index b2b9df6..552ad3a 100644 --- a/k8s/roles/skooner/files/kustomization.yaml +++ b/k8s/roles/skooner/files/kustomization.yaml @@ -10,5 +10,7 @@ commonLabels: resources: - "resources/deployment.yaml" - "resources/service.yaml" + - "resources/ingress.yaml" - "resources/rbac/service_account.yaml" - - "resources/rbac/sa_token_secret.yaml" \ No newline at end of file + - "resources/rbac/sa_token_secret.yaml" + - "resources/rbac/cluster_role_binding.yaml" \ No newline at end of file diff --git a/k8s/roles/skooner/files/resources/ingress.yaml b/k8s/roles/skooner/files/resources/ingress.yaml new file mode 100644 index 0000000..6665093 --- /dev/null +++ b/k8s/roles/skooner/files/resources/ingress.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: skooner +spec: + rules: + - host: skooner.icb4dc0.de + http: + paths: + - path: / + backend: + service: + name: skooner + port: + number: 8000 + pathType: Prefix \ No newline at end of file diff --git a/k8s/roles/skooner/files/resources/rbac/cluster_role_binding.yaml b/k8s/roles/skooner/files/resources/rbac/cluster_role_binding.yaml new file mode 100644 index 0000000..06bdfa2 --- /dev/null +++ b/k8s/roles/skooner/files/resources/rbac/cluster_role_binding.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: prskr-cluster-admin +subjects: +- kind: ServiceAccount + name: prskr + namespace: kube-system +roleRef: + kind: ClusterRole + name: cluster-admin + apiGroup: rbac.authorization.k8s.io \ No newline at end of file