diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-10-06 13:54:06 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-10-06 13:54:06 -0400 |
| commit | 92d4a67245d99d7a514d94764a85f090eac2782c (patch) | |
| tree | 4e45dbcba1464f75767a0aba2fe8a9befc097304 | |
| parent | d5e1d0730e885633c81884da6590950d9a3388b5 (diff) | |
| download | x-92d4a67245d99d7a514d94764a85f090eac2782c.tar.xz x-92d4a67245d99d7a514d94764a85f090eac2782c.zip | |
slonk autoscaling
Signed-off-by: Xe Iaso <me@xeiaso.net>
| -rw-r--r-- | kube/alrest/core/external-dns/deployment-crd.yaml | 4 | ||||
| -rw-r--r-- | kube/alrest/core/external-dns/deployment-ingress.yaml | 4 | ||||
| -rw-r--r-- | kube/alrest/gitea/deployment.yaml | 9 | ||||
| -rw-r--r-- | kube/alrest/gitea/pvc.yaml | 15 | ||||
| -rw-r--r-- | kube/alrest/gitea/runner.yaml | 1 | ||||
| -rw-r--r-- | kube/alrest/vms/arona/arona.yaml | 7 | ||||
| -rw-r--r-- | kube/alrest/vms/feixiao/feixiao.yaml | 21 | ||||
| -rw-r--r-- | kube/alrest/vms/kustomization.yaml | 1 | ||||
| -rw-r--r-- | kube/alrest/x/hlang/autoscale.yaml | 24 | ||||
| -rw-r--r-- | kube/alrest/x/hlang/ingress-christine-website.yaml | 4 | ||||
| -rw-r--r-- | kube/alrest/x/hlang/ingress-within-lgbt.yaml | 4 | ||||
| -rw-r--r-- | kube/alrest/x/hlang/kustomization.yaml | 1 | ||||
| -rw-r--r-- | kube/alrest/x/todayinmarch2020/autoscale.yaml | 23 | ||||
| -rw-r--r-- | kube/alrest/x/todayinmarch2020/ingress.yaml | 4 | ||||
| -rw-r--r-- | kube/alrest/x/todayinmarch2020/kustomization.yaml | 1 |
15 files changed, 108 insertions, 15 deletions
diff --git a/kube/alrest/core/external-dns/deployment-crd.yaml b/kube/alrest/core/external-dns/deployment-crd.yaml index 4a5d2a7..96e80a7 100644 --- a/kube/alrest/core/external-dns/deployment-crd.yaml +++ b/kube/alrest/core/external-dns/deployment-crd.yaml @@ -8,11 +8,11 @@ spec: type: Recreate selector: matchLabels: - app: external-dns + app: external-dns-crd template: metadata: labels: - app: external-dns + app: external-dns-crd spec: serviceAccountName: external-dns containers: diff --git a/kube/alrest/core/external-dns/deployment-ingress.yaml b/kube/alrest/core/external-dns/deployment-ingress.yaml index ff4b5fa..62d2521 100644 --- a/kube/alrest/core/external-dns/deployment-ingress.yaml +++ b/kube/alrest/core/external-dns/deployment-ingress.yaml @@ -8,11 +8,11 @@ spec: type: Recreate selector: matchLabels: - app: external-dns + app: external-dns-ingress template: metadata: labels: - app: external-dns + app: external-dns-ingress spec: serviceAccountName: external-dns containers: diff --git a/kube/alrest/gitea/deployment.yaml b/kube/alrest/gitea/deployment.yaml index 5ab685b..0aee0d0 100644 --- a/kube/alrest/gitea/deployment.yaml +++ b/kube/alrest/gitea/deployment.yaml @@ -41,6 +41,9 @@ spec: - name: data persistentVolumeClaim: claimName: gitea + - name: tigris + persistentVolumeClaim: + claimName: gitea-tigris containers: - name: main image: gitea/gitea:1-rootless @@ -74,6 +77,12 @@ spec: - name: data mountPath: /etc/gitea subPath: conf + - name: tigris + mountPath: /var/lib/gitea/data/attachments + subPath: attachments + - name: tigris + mountPath: /var/lib/gitea/git/lfs + subPath: lfs livenessProbe: httpGet: path: /api/healthz diff --git a/kube/alrest/gitea/pvc.yaml b/kube/alrest/gitea/pvc.yaml index 7c7515e..e000fd8 100644 --- a/kube/alrest/gitea/pvc.yaml +++ b/kube/alrest/gitea/pvc.yaml @@ -9,4 +9,17 @@ spec: storageClassName: longhorn resources: requests: - storage: 64Gi
\ No newline at end of file + storage: 64Gi +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: gitea-tigris +spec: + accessModes: + - ReadWriteOnce + - ReadWriteMany + storageClassName: tigris + resources: + requests: + storage: 64Ti
\ No newline at end of file diff --git a/kube/alrest/gitea/runner.yaml b/kube/alrest/gitea/runner.yaml index a4f9285..c8a54d3 100644 --- a/kube/alrest/gitea/runner.yaml +++ b/kube/alrest/gitea/runner.yaml @@ -36,6 +36,7 @@ spec: containers: - name: runner image: gitea/act_runner:nightly-dind-rootless + imagePullPolicy: Always env: - name: GITEA_INSTANCE_URL value: http://git.gitea.svc.alrest.xeserv.us diff --git a/kube/alrest/vms/arona/arona.yaml b/kube/alrest/vms/arona/arona.yaml index 570ccab..5258d4b 100644 --- a/kube/alrest/vms/arona/arona.yaml +++ b/kube/alrest/vms/arona/arona.yaml @@ -85,6 +85,13 @@ spec: ssh_pwauth: True disable_root: false + write_files: + - encoding: b64 + content: bmV0d29yazoKICB2ZXJzaW9uOiAyCiAgZXRoZXJuZXRzOgogICAgaWQwOgogICAgICBkaGNwNDogdHJ1ZQogICAgICBtYXRjaDoKICAgICAgICBuYW1lOiBlbnAqCg== + owner: root:root + path: /etc/netplan/99-net-fix.yaml + permissions: '0644' + users: - name: xe groups: [ wheel ] diff --git a/kube/alrest/vms/feixiao/feixiao.yaml b/kube/alrest/vms/feixiao/feixiao.yaml index 422f779..1657ef8 100644 --- a/kube/alrest/vms/feixiao/feixiao.yaml +++ b/kube/alrest/vms/feixiao/feixiao.yaml @@ -22,6 +22,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: feixiao-storage + namespace: waifud spec: accessModes: - ReadWriteOnce @@ -32,6 +33,21 @@ spec: storage: 128Gi --- apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: feixiao-tigris + namespace: waifud +spec: + accessModes: + - ReadWriteOnce + - ReadWriteMany + volumeMode: Filesystem + storageClassName: tigris + resources: + requests: + storage: 128Gi +--- +apiVersion: v1 kind: Service metadata: name: feixiao @@ -82,14 +98,11 @@ spec: type: q35 resources: requests: - memory: 2048M + memory: 8192M volumes: - name: disk0 persistentVolumeClaim: claimName: "feixiao" - - name: storage - persistentVolumeClaim: - claimName: "feixiao-storage" - cloudInitNoCloud: userData: | #cloud-config diff --git a/kube/alrest/vms/kustomization.yaml b/kube/alrest/vms/kustomization.yaml index 2f8e1c5..207cafa 100644 --- a/kube/alrest/vms/kustomization.yaml +++ b/kube/alrest/vms/kustomization.yaml @@ -1,5 +1,6 @@ resources: - ./namespace.yaml - arona/arona.yaml + - feixiao/feixiao.yaml - sena/sena.yaml - xesite-ci/vm.yaml
\ No newline at end of file diff --git a/kube/alrest/x/hlang/autoscale.yaml b/kube/alrest/x/hlang/autoscale.yaml new file mode 100644 index 0000000..8f86e26 --- /dev/null +++ b/kube/alrest/x/hlang/autoscale.yaml @@ -0,0 +1,24 @@ +kind: HTTPScaledObject +apiVersion: http.keda.sh/v1alpha1 +metadata: + name: hlang +spec: + hosts: + - h.christine.website + - h.within.lgbt + targetPendingRequests: 100 + scaleTargetRef: + name: hlang + kind: Deployment + apiVersion: apps/v1 + service: hlang + port: 80 + replicas: + min: 0 + max: 10 + scaledownPeriod: 300 + scalingMetric: + requestRate: + granularity: 1s + targetValue: 100 + window: 1m
\ No newline at end of file diff --git a/kube/alrest/x/hlang/ingress-christine-website.yaml b/kube/alrest/x/hlang/ingress-christine-website.yaml index 6a808c3..747b386 100644 --- a/kube/alrest/x/hlang/ingress-christine-website.yaml +++ b/kube/alrest/x/hlang/ingress-christine-website.yaml @@ -20,6 +20,6 @@ spec: path: "/" backend: service: - name: hlang + name: keda-add-ons-http-interceptor-proxy port: - name: http
\ No newline at end of file + number: 8080
\ No newline at end of file diff --git a/kube/alrest/x/hlang/ingress-within-lgbt.yaml b/kube/alrest/x/hlang/ingress-within-lgbt.yaml index 40a26cf..26e5213 100644 --- a/kube/alrest/x/hlang/ingress-within-lgbt.yaml +++ b/kube/alrest/x/hlang/ingress-within-lgbt.yaml @@ -20,6 +20,6 @@ spec: path: "/" backend: service: - name: hlang + name: keda-add-ons-http-interceptor-proxy port: - name: http
\ No newline at end of file + number: 8080
\ No newline at end of file diff --git a/kube/alrest/x/hlang/kustomization.yaml b/kube/alrest/x/hlang/kustomization.yaml index f473637..5db24ef 100644 --- a/kube/alrest/x/hlang/kustomization.yaml +++ b/kube/alrest/x/hlang/kustomization.yaml @@ -1,4 +1,5 @@ resources: + - autoscale.yaml - deployment.yaml - service.yaml - ingress-within-lgbt.yaml diff --git a/kube/alrest/x/todayinmarch2020/autoscale.yaml b/kube/alrest/x/todayinmarch2020/autoscale.yaml new file mode 100644 index 0000000..f882058 --- /dev/null +++ b/kube/alrest/x/todayinmarch2020/autoscale.yaml @@ -0,0 +1,23 @@ +kind: HTTPScaledObject +apiVersion: http.keda.sh/v1alpha1 +metadata: + name: todayinmarch2020 +spec: + hosts: + - todayinmarch2020.xn--sz8hf6d.ws + targetPendingRequests: 100 + scaleTargetRef: + name: todayinmarch2020 + kind: Deployment + apiVersion: apps/v1 + service: todayinmarch2020 + port: 80 + replicas: + min: 0 + max: 3 + scaledownPeriod: 300 + scalingMetric: + requestRate: + granularity: 1s + targetValue: 100 + window: 1m
\ No newline at end of file diff --git a/kube/alrest/x/todayinmarch2020/ingress.yaml b/kube/alrest/x/todayinmarch2020/ingress.yaml index 1592f0a..6b49c6b 100644 --- a/kube/alrest/x/todayinmarch2020/ingress.yaml +++ b/kube/alrest/x/todayinmarch2020/ingress.yaml @@ -20,6 +20,6 @@ spec: path: "/" backend: service: - name: todayinmarch2020 + name: keda-add-ons-http-interceptor-proxy port: - name: http + number: 8080 diff --git a/kube/alrest/x/todayinmarch2020/kustomization.yaml b/kube/alrest/x/todayinmarch2020/kustomization.yaml index 6b1764d..9016792 100644 --- a/kube/alrest/x/todayinmarch2020/kustomization.yaml +++ b/kube/alrest/x/todayinmarch2020/kustomization.yaml @@ -1,4 +1,5 @@ resources: + - autoscale.yaml - deployment.yaml - service.yaml - ingress.yaml
\ No newline at end of file |
