diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-12-22 16:06:30 -0500 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2025-01-05 21:27:06 -0500 |
| commit | d978c2e24aa0db6e4fca78e298b835bd72cea660 (patch) | |
| tree | 621da8063c26a6ff99bd3f5aa63c22cd11f5b34e | |
| parent | 7bf23c2d6d3e654a21f4e98c53115df4cfb06700 (diff) | |
| download | x-d978c2e24aa0db6e4fca78e298b835bd72cea660.tar.xz x-d978c2e24aa0db6e4fca78e298b835bd72cea660.zip | |
kube/alrest: add znc
Signed-off-by: Xe Iaso <me@xeiaso.net>
| -rw-r--r-- | kube/alrest/core/longhorn-specific.yaml | 44 | ||||
| -rw-r--r-- | kube/alrest/kustomization.yaml | 3 | ||||
| -rw-r--r-- | kube/alrest/znc/deployment.yaml | 37 | ||||
| -rw-r--r-- | kube/alrest/znc/kustomization.yaml | 4 | ||||
| -rw-r--r-- | kube/alrest/znc/pvc.yaml | 11 | ||||
| -rw-r--r-- | kube/alrest/znc/service.yaml | 15 | ||||
| -rw-r--r-- | kube/runner-ci/Dockerfile | 10 |
7 files changed, 123 insertions, 1 deletions
diff --git a/kube/alrest/core/longhorn-specific.yaml b/kube/alrest/core/longhorn-specific.yaml new file mode 100644 index 0000000..66735d1 --- /dev/null +++ b/kube/alrest/core/longhorn-specific.yaml @@ -0,0 +1,44 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: rotational +provisioner: driver.longhorn.io +parameters: + numberOfReplicas: "2" + staleReplicaTimeout: "480" # 8 hours in minutes + diskSelector: "rotational" + fromBackup: "" + fsType: "ext4" + dataLocality: "disabled" + unmapMarkSnapChainRemoved: "ignored" + disableRevisionCounter: "true" +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: ssd +provisioner: driver.longhorn.io +parameters: + numberOfReplicas: "2" + staleReplicaTimeout: "480" # 8 hours in minutes + diskSelector: "ssd" + fromBackup: "" + fsType: "ext4" + dataLocality: "disabled" + unmapMarkSnapChainRemoved: "ignored" + disableRevisionCounter: "true" +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: yolo +provisioner: driver.longhorn.io +parameters: + numberOfReplicas: "1" + staleReplicaTimeout: "480" # 8 hours in minutes + diskSelector: "rotational" + fromBackup: "" + fsType: "ext4" + dataLocality: "disabled" + unmapMarkSnapChainRemoved: "ignored" + disableRevisionCounter: "true"
\ No newline at end of file diff --git a/kube/alrest/kustomization.yaml b/kube/alrest/kustomization.yaml index 70ad775..8f5c343 100644 --- a/kube/alrest/kustomization.yaml +++ b/kube/alrest/kustomization.yaml @@ -6,4 +6,5 @@ resources: - registry - staticsites - vms - - x
\ No newline at end of file + - x + - znc
\ No newline at end of file diff --git a/kube/alrest/znc/deployment.yaml b/kube/alrest/znc/deployment.yaml new file mode 100644 index 0000000..6f25bd4 --- /dev/null +++ b/kube/alrest/znc/deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: znc + name: znc +spec: + replicas: 1 + selector: + matchLabels: + app: znc + template: + metadata: + labels: + app: znc + spec: + volumes: + - name: config + persistentVolumeClaim: + claimName: znc + initContainers: + - name: init-config + image: znc:latest + imagePullPolicy: Always + command: ['/bin/sh', '-c', "until [ -f /znc-data/configs/znc.conf ]; do echo waiting for znc.conf; sleep 2; done"] + volumeMounts: + - mountPath: /znc-data + name: config + containers: + - name: znc + image: znc:latest + ports: + - containerPort: 1337 + - containerPort: 6667 + volumeMounts: + - mountPath: /znc-data + name: config
\ No newline at end of file diff --git a/kube/alrest/znc/kustomization.yaml b/kube/alrest/znc/kustomization.yaml new file mode 100644 index 0000000..d34c74c --- /dev/null +++ b/kube/alrest/znc/kustomization.yaml @@ -0,0 +1,4 @@ +resources: + - deployment.yaml + - pvc.yaml + - service.yaml
\ No newline at end of file diff --git a/kube/alrest/znc/pvc.yaml b/kube/alrest/znc/pvc.yaml new file mode 100644 index 0000000..6242f6f --- /dev/null +++ b/kube/alrest/znc/pvc.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: znc +spec: + resources: + requests: + storage: 32Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce diff --git a/kube/alrest/znc/service.yaml b/kube/alrest/znc/service.yaml new file mode 100644 index 0000000..81f5f69 --- /dev/null +++ b/kube/alrest/znc/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: znc +spec: + selector: + app: znc + ports: + - port: 80 + targetPort: 1337 + name: http + - port: 6667 + targetPort: 6667 + name: irc + type: ClusterIP
\ No newline at end of file diff --git a/kube/runner-ci/Dockerfile b/kube/runner-ci/Dockerfile index b959fd8..95d5914 100644 --- a/kube/runner-ci/Dockerfile +++ b/kube/runner-ci/Dockerfile @@ -22,6 +22,16 @@ RUN \ build-essential \ && rm -rf /var/lib/apt/lists/* +# GitHub CLI +RUN (type -p wget >/dev/null || (apt-get update && apt-get install wget -y)) \ + && mkdir -p -m 755 /etc/apt/keyrings \ + && out=$(mktemp) && wget -nv -O$out https://cli.github.com/packages/githubcli-archive-keyring.gpg \ + && cat $out | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ + && chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ + && echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ + && apt update \ + && apt install gh -y + COPY daemon.json /etc/docker/daemon.json USER runner |
