diff --git a/example/ymh-webapp/backend-deployment.yaml b/example/ymh-webapp/backend-deployment.yaml new file mode 100644 index 0000000..16c8d87 --- /dev/null +++ b/example/ymh-webapp/backend-deployment.yaml @@ -0,0 +1,25 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ymh-backend + namespace: ymh-webapp +spec: + replicas: 1 + template: + metadata: + labels: + app: ymh-backend + spec: + initContainers: + - name: ymh-initcontainer + image: ymh636/ymh-backend + command: ['sh', '-c', 'alembic upgrade head && python3 addUser.py'] + containers: + - name: ymh-backend + image: ymh636/ymh-backend + ports: + - containerPort: 8000 + selector: + matchLabels: + app: ymh-backend + diff --git a/example/ymh-webapp/backend-service.yaml b/example/ymh-webapp/backend-service.yaml new file mode 100644 index 0000000..2068447 --- /dev/null +++ b/example/ymh-webapp/backend-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: ymh-backend + namespace: ymh-webapp +spec: + selector: + app: ymh-backend + type: NodePort + ports: + - protocol: TCP + port: 8000 + targetPort: 8000 + nodePort: 31426 + diff --git a/example/ymh-webapp/frontend_deployment.yaml b/example/ymh-webapp/frontend_deployment.yaml new file mode 100644 index 0000000..428d5f4 --- /dev/null +++ b/example/ymh-webapp/frontend_deployment.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ymh-frontend + namespace: ymh-webapp +spec: + replicas: 1 + template: + metadata: + labels: + app: ymh-frontend + spec: + containers: + - name: ymh-frontend + image: ymh636/ymh-frontend + ports: + - containerPort: 3000 + selector: + matchLabels: + app: ymh-frontend diff --git a/example/ymh-webapp/frontend_service.yaml b/example/ymh-webapp/frontend_service.yaml new file mode 100644 index 0000000..9377449 --- /dev/null +++ b/example/ymh-webapp/frontend_service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: ymh-frontend + namespace: ymh-webapp +spec: + selector: + app: ymh-frontend + type: NodePort + ports: + - protocol: TCP + port: 3000 + targetPort: 3000 + nodePort: 31425