From e85c396715e73318735096da830e0c781a639e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atakan=20=C3=96zceviz?= Date: Thu, 7 Feb 2019 15:25:56 +0100 Subject: [PATCH] Created kubernetes yaml files --- .../k8s/auth-server-deployment.yaml | 35 +++++++++++++ .../k8s/auth-server-service.yaml | 15 ++++++ .../k8s/backend-admin-app-deployment.yaml | 34 +++++++++++++ .../backend-admin-app-gateway-deployment.yaml | 47 ++++++++++++++++++ .../backend-admin-app-gateway-service.yaml | 15 ++++++ .../k8s/backend-admin-app-service.yaml | 15 ++++++ .../k8s/blogging-service-deployment.yaml | 39 +++++++++++++++ .../k8s/blogging-service-service.yaml | 15 ++++++ .../k8s/console-client-demo-deployment.yaml | 32 ++++++++++++ .../k8s/console-client-demo-service.yaml | 15 ++++++ .../k8s/dbdata-persistentvolumeclaim.yaml | 13 +++++ .../k8s/identity-service-deployment.yaml | 37 ++++++++++++++ .../k8s/identity-service-service.yaml | 15 ++++++ .../k8s/internal-gateway-deployment.yaml | 49 +++++++++++++++++++ .../k8s/internal-gateway-service.yaml | 15 ++++++ .../k8s/migrations-deployment.yaml | 21 ++++++++ .../MicroserviceDemo/k8s/migrations-job.yaml | 12 +++++ .../k8s/mongodb-deployment.yaml | 23 +++++++++ .../MicroserviceDemo/k8s/mongodb-service.yaml | 15 ++++++ .../k8s/product-service-deployment.yaml | 40 +++++++++++++++ .../k8s/product-service-service.yaml | 15 ++++++ .../k8s/public-website-deployment.yaml | 34 +++++++++++++ .../public-website-gateway-deployment.yaml | 45 +++++++++++++++++ .../k8s/public-website-gateway-service.yaml | 15 ++++++ .../k8s/public-website-service.yaml | 15 ++++++ .../k8s/rabbitmq-deployment.yaml | 24 +++++++++ .../k8s/rabbitmq-service.yaml | 18 +++++++ .../k8s/redis-deployment.yaml | 23 +++++++++ .../MicroserviceDemo/k8s/redis-service.yaml | 15 ++++++ .../k8s/sqlserver-deployment.yaml | 36 ++++++++++++++ .../k8s/sqlserver-service.yaml | 15 ++++++ 31 files changed, 757 insertions(+) create mode 100644 samples/MicroserviceDemo/k8s/auth-server-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/auth-server-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/blogging-service-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/console-client-demo-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/console-client-demo-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml create mode 100644 samples/MicroserviceDemo/k8s/identity-service-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/identity-service-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/internal-gateway-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/migrations-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/migrations-job.yaml create mode 100644 samples/MicroserviceDemo/k8s/mongodb-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/mongodb-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/product-service-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/product-service-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/public-website-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/public-website-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/rabbitmq-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/redis-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/redis-service.yaml create mode 100644 samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml create mode 100644 samples/MicroserviceDemo/k8s/sqlserver-service.yaml diff --git a/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml b/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml new file mode 100644 index 0000000000..b2307834d2 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: auth-server + name: auth-server +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: auth-server + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:64999 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated + Security=false + - name: RabbitMQ__Connections__Default__HostName + value: rabbitmq + - name: Redis__Configuration + value: redis + image: microservice-demo/auth-server:latest + name: auth-server + ports: + - containerPort: 64999 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/auth-server-service.yaml b/samples/MicroserviceDemo/k8s/auth-server-service.yaml new file mode 100644 index 0000000000..c96e9c3e3d --- /dev/null +++ b/samples/MicroserviceDemo/k8s/auth-server-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: auth-server + name: auth-server +spec: + ports: + - name: "64999" + port: 64999 + targetPort: 64999 + selector: + io.kompose.service: auth-server +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml new file mode 100644 index 0000000000..ce6c238f7c --- /dev/null +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: backend-admin-app + name: backend-admin-app +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: backend-admin-app + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:64999 + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://backend-admin-app-gateway/ + image: microservice-demo/backend-admin-app:latest + name: backend-admin-app + ports: + - containerPort: 80 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml new file mode 100644 index 0000000000..10490961e5 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml @@ -0,0 +1,47 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: backend-admin-app-gateway + name: backend-admin-app-gateway +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: backend-admin-app-gateway + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:64999 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated + Security=false + - name: GlobalConfiguration__BaseUrl + value: http://backend-admin-app-gateway + - name: ReRoutes__0__DownstreamHostAndPorts__Host + value: identity-service + - name: ReRoutes__0__DownstreamHostAndPorts__Port + value: "80" + - name: ReRoutes__1__DownstreamHostAndPorts__Host + value: product-service + - name: ReRoutes__1__DownstreamHostAndPorts__Port + value: "80" + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://backend-admin-app-gateway/ + image: microservice-demo/backend-admin-app-gateway:latest + name: backend-admin-app-gateway + ports: + - containerPort: 80 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml new file mode 100644 index 0000000000..ca3faee62c --- /dev/null +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: backend-admin-app-gateway + name: backend-admin-app-gateway +spec: + ports: + - name: "65115" + port: 65115 + targetPort: 80 + selector: + io.kompose.service: backend-admin-app-gateway +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml new file mode 100644 index 0000000000..f735fdae1c --- /dev/null +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: backend-admin-app + name: backend-admin-app +spec: + ports: + - name: "3000" + port: 3000 + targetPort: 80 + selector: + io.kompose.service: backend-admin-app +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml b/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml new file mode 100644 index 0000000000..a5b801106b --- /dev/null +++ b/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml @@ -0,0 +1,39 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: blogging-service + name: blogging-service +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: blogging-service + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:64999 + - name: ConnectionStrings__Blogging + value: mongodb://mongodb|MsDemo_Blogging + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated + Security=false + - name: RabbitMQ__Connections__Default__HostName + value: rabbitmq + - name: Redis__Configuration + value: redis + image: microservice-demo/blogging-service:latest + name: blogging-service + ports: + - containerPort: 80 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/blogging-service-service.yaml b/samples/MicroserviceDemo/k8s/blogging-service-service.yaml new file mode 100644 index 0000000000..d0ab95528e --- /dev/null +++ b/samples/MicroserviceDemo/k8s/blogging-service-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: blogging-service + name: blogging-service +spec: + ports: + - name: "62157" + port: 62157 + targetPort: 80 + selector: + io.kompose.service: blogging-service +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/console-client-demo-deployment.yaml b/samples/MicroserviceDemo/k8s/console-client-demo-deployment.yaml new file mode 100644 index 0000000000..4ccfd788be --- /dev/null +++ b/samples/MicroserviceDemo/k8s/console-client-demo-deployment.yaml @@ -0,0 +1,32 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: console-client-demo + name: console-client-demo +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: console-client-demo + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: IdentityClients__Default__Authority + value: http://auth-server:64999 + - name: RemoteServices__Default__BaseUrl + value: http://internal-gateway/ + image: microservice-demo/console-client-demo:latest + name: console-client-demo + ports: + - containerPort: 80 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/console-client-demo-service.yaml b/samples/MicroserviceDemo/k8s/console-client-demo-service.yaml new file mode 100644 index 0000000000..5146110356 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/console-client-demo-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: console-client-demo + name: console-client-demo +spec: + ports: + - name: "3001" + port: 3001 + targetPort: 80 + selector: + io.kompose.service: console-client-demo +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml b/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml new file mode 100644 index 0000000000..c8d0dd1f0f --- /dev/null +++ b/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + io.kompose.service: dbdata + name: dbdata +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi +status: {} diff --git a/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml b/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml new file mode 100644 index 0000000000..4df2099e49 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: identity-service + name: identity-service +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: identity-service + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:64999 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated + Security=false + - name: RabbitMQ__Connections__Default__HostName + value: rabbitmq + - name: Redis__Configuration + value: redis + image: microservice-demo/identity-service:latest + name: identity-service + ports: + - containerPort: 80 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/identity-service-service.yaml b/samples/MicroserviceDemo/k8s/identity-service-service.yaml new file mode 100644 index 0000000000..8c601852a3 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/identity-service-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: identity-service + name: identity-service +spec: + ports: + - name: "63568" + port: 63568 + targetPort: 80 + selector: + io.kompose.service: identity-service +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml b/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml new file mode 100644 index 0000000000..4abd77f1df --- /dev/null +++ b/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml @@ -0,0 +1,49 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: internal-gateway + name: internal-gateway +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: internal-gateway + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:64999 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated + Security=false + - name: GlobalConfiguration__BaseUrl + value: http://internal-gateway + - name: ReRoutes__0__DownstreamHostAndPorts__Host + value: identity-service + - name: ReRoutes__0__DownstreamHostAndPorts__Port + value: "80" + - name: ReRoutes__1__DownstreamHostAndPorts__Host + value: product-service + - name: ReRoutes__1__DownstreamHostAndPorts__Port + value: "80" + - name: ReRoutes__2__DownstreamHostAndPorts__Host + value: blogging-service + - name: ReRoutes__2__DownstreamHostAndPorts__Port + value: "80" + - name: Redis__Configuration + value: redis + image: microservice-demo/internal-gateway:latest + name: internal-gateway + ports: + - containerPort: 80 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml b/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml new file mode 100644 index 0000000000..5b392f5619 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: internal-gateway + name: internal-gateway +spec: + ports: + - name: "65129" + port: 65129 + targetPort: 80 + selector: + io.kompose.service: internal-gateway +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/migrations-deployment.yaml b/samples/MicroserviceDemo/k8s/migrations-deployment.yaml new file mode 100644 index 0000000000..bae8d1388b --- /dev/null +++ b/samples/MicroserviceDemo/k8s/migrations-deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: migrations + name: migrations +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: migrations + spec: + containers: + - image: microservice-demo/migrations:latest + name: migrations + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/migrations-job.yaml b/samples/MicroserviceDemo/k8s/migrations-job.yaml new file mode 100644 index 0000000000..257393379e --- /dev/null +++ b/samples/MicroserviceDemo/k8s/migrations-job.yaml @@ -0,0 +1,12 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: migrations +spec: + template: + spec: + containers: + - image: microservice-demo/migrations:latest + name: migrations + imagePullPolicy: Never + restartPolicy: Never diff --git a/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml b/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml new file mode 100644 index 0000000000..48617c488c --- /dev/null +++ b/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml @@ -0,0 +1,23 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: mongodb + name: mongodb +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: mongodb + spec: + containers: + - image: mongo + name: mongodb + ports: + - containerPort: 27017 + resources: {} + imagePullPolicy: IfNotPresent + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/mongodb-service.yaml b/samples/MicroserviceDemo/k8s/mongodb-service.yaml new file mode 100644 index 0000000000..59480974ff --- /dev/null +++ b/samples/MicroserviceDemo/k8s/mongodb-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: mongodb + name: mongodb +spec: + ports: + - name: "27017" + port: 27017 + targetPort: 27017 + selector: + io.kompose.service: mongodb +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/product-service-deployment.yaml b/samples/MicroserviceDemo/k8s/product-service-deployment.yaml new file mode 100644 index 0000000000..5418a8abc7 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/product-service-deployment.yaml @@ -0,0 +1,40 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: product-service + name: product-service +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: product-service + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:64999 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated + Security=false + - name: ConnectionStrings__ProductManagement + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated + Security=false + - name: RabbitMQ__Connections__Default__HostName + value: rabbitmq + - name: Redis__Configuration + value: redis + image: microservice-demo/product-service:latest + name: product-service + ports: + - containerPort: 80 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/product-service-service.yaml b/samples/MicroserviceDemo/k8s/product-service-service.yaml new file mode 100644 index 0000000000..25b52f9d7c --- /dev/null +++ b/samples/MicroserviceDemo/k8s/product-service-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: product-service + name: product-service +spec: + ports: + - name: "60244" + port: 60244 + targetPort: 80 + selector: + io.kompose.service: product-service +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/public-website-deployment.yaml b/samples/MicroserviceDemo/k8s/public-website-deployment.yaml new file mode 100644 index 0000000000..3c8955a99b --- /dev/null +++ b/samples/MicroserviceDemo/k8s/public-website-deployment.yaml @@ -0,0 +1,34 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: public-website + name: public-website +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: public-website + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:64999 + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://public-website-gateway/ + image: microservice-demo/public-website:latest + name: public-website + ports: + - containerPort: 80 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml b/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml new file mode 100644 index 0000000000..9532d9334f --- /dev/null +++ b/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml @@ -0,0 +1,45 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: public-website-gateway + name: public-website-gateway +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: public-website-gateway + spec: + containers: + - env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:64999 + - name: ConnectionStrings__Default + value: Server=sqlserver;Database=MsDemo_Identity;Trusted_Connection=True;MultipleActiveResultSets=true;User=sa;Password=yourStrong(!)Password;Integrated + Security=false + - name: GlobalConfiguration__BaseUrl + value: http://public-website-gateway + - name: ReRoutes__0__DownstreamHostAndPorts__Host + value: product-service + - name: ReRoutes__0__DownstreamHostAndPorts__Port + value: "80" + - name: ReRoutes__1__DownstreamHostAndPorts__Host + value: blogging-service + - name: ReRoutes__1__DownstreamHostAndPorts__Port + value: "80" + - name: Redis__Configuration + value: redis + image: microservice-demo/public-website-gateway:latest + name: public-website-gateway + ports: + - containerPort: 80 + resources: {} + imagePullPolicy: Never + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml b/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml new file mode 100644 index 0000000000..4c007686b7 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: public-website-gateway + name: public-website-gateway +spec: + ports: + - name: "64897" + port: 64897 + targetPort: 80 + selector: + io.kompose.service: public-website-gateway +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/public-website-service.yaml b/samples/MicroserviceDemo/k8s/public-website-service.yaml new file mode 100644 index 0000000000..77fac13ac3 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/public-website-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: public-website + name: public-website +spec: + ports: + - name: "3002" + port: 3002 + targetPort: 80 + selector: + io.kompose.service: public-website +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml b/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml new file mode 100644 index 0000000000..5f32e398c1 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml @@ -0,0 +1,24 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: rabbitmq + name: rabbitmq +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: rabbitmq + spec: + containers: + - image: rabbitmq:3-management-alpine + name: rabbitmq + ports: + - containerPort: 5672 + - containerPort: 15672 + resources: {} + imagePullPolicy: IfNotPresent + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml b/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml new file mode 100644 index 0000000000..b8595193e8 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: rabbitmq + name: rabbitmq +spec: + ports: + - name: "5672" + port: 5672 + targetPort: 5672 + - name: "15672" + port: 15672 + targetPort: 15672 + selector: + io.kompose.service: rabbitmq +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/redis-deployment.yaml b/samples/MicroserviceDemo/k8s/redis-deployment.yaml new file mode 100644 index 0000000000..b4389df699 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/redis-deployment.yaml @@ -0,0 +1,23 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: redis + name: redis +spec: + replicas: 1 + strategy: {} + template: + metadata: + labels: + io.kompose.service: redis + spec: + containers: + - image: redis + name: redis + ports: + - containerPort: 6379 + resources: {} + imagePullPolicy: IfNotPresent + restartPolicy: Always +status: {} diff --git a/samples/MicroserviceDemo/k8s/redis-service.yaml b/samples/MicroserviceDemo/k8s/redis-service.yaml new file mode 100644 index 0000000000..702eaab08c --- /dev/null +++ b/samples/MicroserviceDemo/k8s/redis-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: redis + name: redis +spec: + ports: + - name: "6379" + port: 6379 + targetPort: 6379 + selector: + io.kompose.service: redis +status: + loadBalancer: {} diff --git a/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml b/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml new file mode 100644 index 0000000000..568f29ab4d --- /dev/null +++ b/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + labels: + io.kompose.service: sqlserver + name: sqlserver +spec: + replicas: 1 + strategy: + type: Recreate + template: + metadata: + labels: + io.kompose.service: sqlserver + spec: + containers: + - env: + - name: ACCEPT_EULA + value: "Y" + - name: SA_PASSWORD + value: yourStrong(!)Password + image: mcr.microsoft.com/mssql/server + name: sqlserver + ports: + - containerPort: 1433 + resources: {} + imagePullPolicy: IfNotPresent + volumeMounts: + - mountPath: /var/opt/mssql + name: dbdata + restartPolicy: Always + volumes: + - name: dbdata + persistentVolumeClaim: + claimName: dbdata +status: {} diff --git a/samples/MicroserviceDemo/k8s/sqlserver-service.yaml b/samples/MicroserviceDemo/k8s/sqlserver-service.yaml new file mode 100644 index 0000000000..57e77a1b42 --- /dev/null +++ b/samples/MicroserviceDemo/k8s/sqlserver-service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: sqlserver + name: sqlserver +spec: + ports: + - name: "1433" + port: 1433 + targetPort: 1433 + selector: + io.kompose.service: sqlserver +status: + loadBalancer: {}