From e621e6164be7b645fe76342fe38efa0c0c495093 Mon Sep 17 00:00:00 2001 From: Azuki-bar <42642269+Azuki-bar@users.noreply.github.com> Date: Fri, 24 Nov 2023 18:26:04 +0900 Subject: [PATCH 1/3] =?UTF-8?q?auto-operation=E3=81=AE=E3=83=9E=E3=83=8B?= =?UTF-8?q?=E3=83=95=E3=82=A7=E3=82=B9=E3=83=88=E6=9B=B8=E3=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/auto-operation/deployment.yaml | 22 +++++++++++++++++++ .../app/auto-operation/kustomization.yaml | 2 ++ infra/manifests/app/kustomization.yaml | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 infra/manifests/app/auto-operation/deployment.yaml create mode 100644 infra/manifests/app/auto-operation/kustomization.yaml diff --git a/infra/manifests/app/auto-operation/deployment.yaml b/infra/manifests/app/auto-operation/deployment.yaml new file mode 100644 index 00000000..2ec1a9da --- /dev/null +++ b/infra/manifests/app/auto-operation/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: auto-operation + namespace: plarail2023 +spec: + selector: + matchLabels: + app: auto-operation + template: + metadata: + labels: + app: auto-operation + spec: + containers: + - name: auto-operation + image: ghcr.io/ueckoken/plarail2023-autooperation:deployment-d17e785-1700807874 # {"$imagepolicy": "plarail2021:auto-operation"} + imagePullPolicy: Always + env: + - name: SERVER_ADDR + value: 'http://state-manager:8080' + \ No newline at end of file diff --git a/infra/manifests/app/auto-operation/kustomization.yaml b/infra/manifests/app/auto-operation/kustomization.yaml new file mode 100644 index 00000000..bb8f0130 --- /dev/null +++ b/infra/manifests/app/auto-operation/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - 'deployment.yaml' \ No newline at end of file diff --git a/infra/manifests/app/kustomization.yaml b/infra/manifests/app/kustomization.yaml index 9defe0d1..0df2a023 100644 --- a/infra/manifests/app/kustomization.yaml +++ b/infra/manifests/app/kustomization.yaml @@ -1,2 +1,3 @@ resources: - - ./emqx \ No newline at end of file + - './auto-operation' + # - ./emqx From 62f2ded6a47e05aa12783982979a29262b5ebad6 Mon Sep 17 00:00:00 2001 From: Azuki-bar <42642269+Azuki-bar@users.noreply.github.com> Date: Fri, 24 Nov 2023 18:55:21 +0900 Subject: [PATCH 2/3] =?UTF-8?q?k8s=E3=83=9E=E3=83=8B=E3=83=95=E3=82=A7?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=82=B3=E3=83=94=E3=83=9A=E8=81=B7=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- infra/manifests/app/dashboard/deployment.yaml | 22 ++++++++++++ .../app/dashboard/kustomization.yaml | 3 ++ infra/manifests/app/dashboard/service.yaml | 16 +++++++++ infra/manifests/app/kustomization.yaml | 2 ++ .../app/state-manager/deployment.yaml | 35 +++++++++++++++++++ .../app/state-manager/kustomization.yaml | 3 ++ .../manifests/app/state-manager/service.yaml | 16 +++++++++ 7 files changed, 97 insertions(+) create mode 100644 infra/manifests/app/dashboard/deployment.yaml create mode 100644 infra/manifests/app/dashboard/kustomization.yaml create mode 100644 infra/manifests/app/dashboard/service.yaml create mode 100644 infra/manifests/app/state-manager/deployment.yaml create mode 100644 infra/manifests/app/state-manager/kustomization.yaml create mode 100644 infra/manifests/app/state-manager/service.yaml diff --git a/infra/manifests/app/dashboard/deployment.yaml b/infra/manifests/app/dashboard/deployment.yaml new file mode 100644 index 00000000..726e6906 --- /dev/null +++ b/infra/manifests/app/dashboard/deployment.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: dashboard + namespace: plarail2023 +spec: + selector: + matchLabels: + app: dashboard + template: + metadata: + labels: + app: dashboard + spec: + containers: + - name: dashboard + image: ghcr.io/ueckoken/plarail2023-dashboard:deployment-d17e785-1700807874 # {"$imagepolicy": "plarail2021:auto-operation"} + imagePullPolicy: Always + env: + - name: SERVER_ADDR + value: 'http://state-manager:8080' + \ No newline at end of file diff --git a/infra/manifests/app/dashboard/kustomization.yaml b/infra/manifests/app/dashboard/kustomization.yaml new file mode 100644 index 00000000..6d3da283 --- /dev/null +++ b/infra/manifests/app/dashboard/kustomization.yaml @@ -0,0 +1,3 @@ +resources: + - 'deployment.yaml' + - service.yaml \ No newline at end of file diff --git a/infra/manifests/app/dashboard/service.yaml b/infra/manifests/app/dashboard/service.yaml new file mode 100644 index 00000000..476c2f5b --- /dev/null +++ b/infra/manifests/app/dashboard/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: dashboard + namespace: plarail2023 + labels: + app: dashboard +spec: + type: ClusterIP + selector: + app: dashboard + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 3000 \ No newline at end of file diff --git a/infra/manifests/app/kustomization.yaml b/infra/manifests/app/kustomization.yaml index 0df2a023..525d1e43 100644 --- a/infra/manifests/app/kustomization.yaml +++ b/infra/manifests/app/kustomization.yaml @@ -1,3 +1,5 @@ resources: - './auto-operation' + - 'dashboard' + - 'state=manager' # - ./emqx diff --git a/infra/manifests/app/state-manager/deployment.yaml b/infra/manifests/app/state-manager/deployment.yaml new file mode 100644 index 00000000..c9255fc9 --- /dev/null +++ b/infra/manifests/app/state-manager/deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: state-manager + namespace: plarail2023 +spec: + selector: + matchLabels: + app: state-manager + template: + metadata: + labels: + app: state-manager + spec: + containers: + - name: state-manager + image: ghcr.io/ueckoken/plarail2023-state-manager/deployment-d17e785-1700807874 # {"$imagepolicy": "plarail2023:state-manager"} + imagePullPolicy: Always + env: + - name: MQTT_BROKER_ADDR + value: tls://p390e24a.ala.us-east-1.emqxsl.com:8883 + - name: MQTT_USERNAME + value: test + - name: MQTT_PASSWORD + valueFrom: + secretKeyRef: + key: password + name: mqtt_secret + - name: MQTT_CLIENT_ID + value: emqx_cloudd1e033 + - name: MONGODB_URI + valueFrom: + secretKeyRef: + key: MONGODB_URI + name: mongodb_secret diff --git a/infra/manifests/app/state-manager/kustomization.yaml b/infra/manifests/app/state-manager/kustomization.yaml new file mode 100644 index 00000000..6d3da283 --- /dev/null +++ b/infra/manifests/app/state-manager/kustomization.yaml @@ -0,0 +1,3 @@ +resources: + - 'deployment.yaml' + - service.yaml \ No newline at end of file diff --git a/infra/manifests/app/state-manager/service.yaml b/infra/manifests/app/state-manager/service.yaml new file mode 100644 index 00000000..2bd60e5e --- /dev/null +++ b/infra/manifests/app/state-manager/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: state-manager + namespace: plarail2023 + labels: + app: state-manager +spec: + type: ClusterIP + selector: + app: state-manager + ports: + - name: http + port: 8080 + protocol: TCP + targetPort: 8080 From 340555a7046b9c4ebf95ab0f248931b72cc0f43a Mon Sep 17 00:00:00 2001 From: Azuki-bar <42642269+Azuki-bar@users.noreply.github.com> Date: Fri, 24 Nov 2023 18:59:09 +0900 Subject: [PATCH 3/3] kustomiza --- infra/manifests/app/kustomization.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/manifests/app/kustomization.yaml b/infra/manifests/app/kustomization.yaml index 525d1e43..0063db0a 100644 --- a/infra/manifests/app/kustomization.yaml +++ b/infra/manifests/app/kustomization.yaml @@ -1,5 +1,5 @@ resources: - './auto-operation' - 'dashboard' - - 'state=manager' + - 'state-manager' # - ./emqx