From e5eeafa223b420619ccd0bc72e09fce6b64d54ef Mon Sep 17 00:00:00 2001 From: syui Date: Wed, 21 Feb 2024 22:32:36 +0900 Subject: [PATCH] add k8s --- k8s/aios-deployment.yaml | 57 ++++++++++++++++++++++++++++++++++++++++ k8s/env-configmap.yaml | 11 ++++++++ 2 files changed, 68 insertions(+) create mode 100644 k8s/aios-deployment.yaml create mode 100644 k8s/env-configmap.yaml diff --git a/k8s/aios-deployment.yaml b/k8s/aios-deployment.yaml new file mode 100644 index 0000000..e2cdf38 --- /dev/null +++ b/k8s/aios-deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert -f ../compose.yml --volumes hostPath + kompose.version: 1.32.0 (HEAD) + labels: + io.kompose.service: aios + name: aios +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: aios + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert -f ../compose.yml --volumes hostPath + kompose.version: 1.32.0 (HEAD) + labels: + io.kompose.network/bot-default: "true" + io.kompose.service: aios + spec: + containers: + - env: + - name: ADMIN + valueFrom: + configMapKeyRef: + key: ADMIN + name: env + - name: HANDLE + valueFrom: + configMapKeyRef: + key: HANDLE + name: env + - name: HOST + valueFrom: + configMapKeyRef: + key: HOST + name: env + - name: PASSWORD + valueFrom: + configMapKeyRef: + key: PASSWORD + name: env + image: aios + name: aios + volumeMounts: + - mountPath: /root/.config + name: aios-hostpath0 + restartPolicy: Always + volumes: + - hostPath: + path: /Users/syui/ai/bot/.config + name: aios-hostpath0 diff --git a/k8s/env-configmap.yaml b/k8s/env-configmap.yaml new file mode 100644 index 0000000..521649b --- /dev/null +++ b/k8s/env-configmap.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +data: + ADMIN: $ADMIN + HANDLE: $HANDLE + HOST: $HOST + PASSWORD: $PASSWORD +kind: ConfigMap +metadata: + labels: + io.kompose.service: aios-env + name: env