diff --git a/manifests/01-deployments/flask-htmx-dev.yaml b/manifests/01-deployments/flask-htmx-dev.yaml new file mode 100644 index 0000000..82a01f3 --- /dev/null +++ b/manifests/01-deployments/flask-htmx-dev.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flask-htmx-dev + namespace: vdk2ch +spec: + replicas: 0 + selector: + matchLabels: + app: ngflask-htmx-dev + template: + metadata: + labels: + app: flask-htmx-dev + spec: + containers: + - name: flask-htmx-dev + image: flask-htmx-board1:dev + ports: + - containerPort: 5000 diff --git a/manifests/01-deployments/flask-htmx-master.yaml b/manifests/01-deployments/flask-htmx-master.yaml new file mode 100644 index 0000000..668ed42 --- /dev/null +++ b/manifests/01-deployments/flask-htmx-master.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: flask-htmx-master + namespace: vdk2ch +spec: + replicas: 2 + selector: + matchLabels: + app: flask-htmx-master + template: + metadata: + labels: + app: flask-htmx-master + spec: + containers: + - name: flask-htmx-master + image: flask-htmx-board1:master-of-slaves + ports: + - containerPort: 5000 diff --git a/manifests/02-services/flask-htmx-dev-service.yaml b/manifests/02-services/flask-htmx-dev-service.yaml new file mode 100644 index 0000000..abda8fa --- /dev/null +++ b/manifests/02-services/flask-htmx-dev-service.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: flask-htmx-dev-service-service + namespace: vdk2ch +spec: + selector: + app: flask-htmx-dev + ports: + - protocol: TCP + name: board + port: 5000 + targetPort: 5000 diff --git a/manifests/02-services/flask-htmx-master-service.yaml b/manifests/02-services/flask-htmx-master-service.yaml new file mode 100644 index 0000000..9f73bc0 --- /dev/null +++ b/manifests/02-services/flask-htmx-master-service.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: flask-htmx-dev-service-service + namespace: vdk2ch +spec: + selector: + app: flask-htmx-master + ports: + - protocol: TCP + name: board + port: 5000 + targetPort: 5000 diff --git a/manifests/03-ingress/flask-htmx-ingress.yaml b/manifests/03-ingress/flask-htmx-ingress.yaml new file mode 100644 index 0000000..69467d9 --- /dev/null +++ b/manifests/03-ingress/flask-htmx-ingress.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: flask-htmx-ingress + namespace: vdk2ch + annotations: + nginx.ingress.kubernetes.io/rewrite-target: /$1 +spec: + rules: + - host: master.board.vdk2ch.ru + http: + paths: + - path: /v1 + pathType: Prefix + backend: + service: + name: flask-htmx-master-service + port: + number: 80 + - host: dev.board.vdk2ch.ru + http: + paths: + - path: /v1 + pathType: Prefix + backend: + service: + name: flask-htmx-dev-service + port: + number: 80 \ No newline at end of file