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/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 9defe0d1..0063db0a 100644 --- a/infra/manifests/app/kustomization.yaml +++ b/infra/manifests/app/kustomization.yaml @@ -1,2 +1,5 @@ resources: - - ./emqx \ No newline at end of file + - './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