From f29a8445439dcffdabe99ccece39c1b3bb829076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atakan=20=C3=96zceviz?= Date: Wed, 20 Mar 2019 13:32:32 +0100 Subject: [PATCH] Cleanup k8s yml files. --- .../k8s/auth-server-deployment.yaml | 44 ++++++------ .../k8s/auth-server-service.yaml | 15 ++-- .../k8s/backend-admin-app-deployment.yaml | 44 ++++++------ .../backend-admin-app-gateway-deployment.yaml | 68 +++++++++--------- .../backend-admin-app-gateway-service.yaml | 15 ++-- .../k8s/backend-admin-app-service.yaml | 15 ++-- .../k8s/blogging-service-deployment.yaml | 56 +++++++-------- .../k8s/blogging-service-service.yaml | 15 ++-- .../k8s/dbdata-persistentvolumeclaim.yaml | 3 - .../MicroserviceDemo/k8s/expose-service.yaml | 12 +--- .../k8s/identity-service-deployment.yaml | 48 ++++++------- .../k8s/identity-service-service.yaml | 15 ++-- .../k8s/internal-gateway-deployment.yaml | 72 +++++++++---------- .../k8s/internal-gateway-service.yaml | 15 ++-- .../k8s/mongodb-deployment.yaml | 21 +++--- .../MicroserviceDemo/k8s/mongodb-service.yaml | 12 ++-- .../k8s/product-service-deployment.yaml | 54 +++++++------- .../k8s/product-service-service.yaml | 15 ++-- .../k8s/public-website-deployment.yaml | 44 ++++++------ .../public-website-gateway-deployment.yaml | 64 ++++++++--------- .../k8s/public-website-gateway-service.yaml | 15 ++-- .../k8s/public-website-service.yaml | 15 ++-- .../k8s/rabbitmq-deployment.yaml | 23 +++--- .../k8s/rabbitmq-service.yaml | 12 ++-- .../k8s/redis-deployment.yaml | 21 +++--- .../MicroserviceDemo/k8s/redis-service.yaml | 14 ++-- .../k8s/restore-database-job.yaml | 2 +- .../k8s/sqlserver-deployment.yaml | 34 ++++----- .../k8s/sqlserver-service.yaml | 15 ++-- 29 files changed, 360 insertions(+), 438 deletions(-) diff --git a/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml b/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml index 7ddbc30309..81a4b5c64d 100644 --- a/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/auth-server-deployment.yaml @@ -1,33 +1,31 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: auth-server name: auth-server spec: + selector: + matchLabels: + app: auth-server replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: auth-server + app: auth-server spec: containers: - - env: - - name: ASPNETCORE_ENVIRONMENT - value: Development - - name: ASPNETCORE_URLS - value: http://0.0.0.0:51511 - - 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: volosoft/microservice-demo-auth-server - name: auth-server - ports: - - containerPort: 51511 - resources: {} - restartPolicy: Always -status: {} + - name: auth-server + image: "volosoft/microservice-demo-auth-server" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:51511 + - 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 + ports: + - name: http + containerPort: 51511 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/auth-server-service.yaml b/samples/MicroserviceDemo/k8s/auth-server-service.yaml index d317ba1fae..1ff487ac16 100644 --- a/samples/MicroserviceDemo/k8s/auth-server-service.yaml +++ b/samples/MicroserviceDemo/k8s/auth-server-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: auth-server name: auth-server spec: - ports: - - port: 51511 - targetPort: 51511 selector: - io.kompose.service: auth-server -status: - loadBalancer: {} + app: auth-server + ports: + - protocol: TCP + port: 51511 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml index f26cb02806..4f0f3d4602 100644 --- a/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-deployment.yaml @@ -1,33 +1,31 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: backend-admin-app name: backend-admin-app spec: + selector: + matchLabels: + app: backend-admin-app replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: backend-admin-app + app: 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:51511 - - name: Redis__Configuration - value: redis - - name: RemoteServices__Default__BaseUrl - value: http://backend-admin-app-gateway/ - image: volosoft/microservice-demo-backend-admin-app - name: backend-admin-app - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: backend-admin-app + image: "volosoft/microservice-demo-backend-admin-app" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://backend-admin-app-gateway/ + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml index c2f28623b2..21d4260a98 100644 --- a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-deployment.yaml @@ -1,45 +1,43 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: backend-admin-app-gateway name: backend-admin-app-gateway spec: + selector: + matchLabels: + app: backend-admin-app-gateway replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: backend-admin-app-gateway + app: 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:51511 - - 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__0__Host - value: identity-service - - name: ReRoutes__0__DownstreamHostAndPorts__0__Port - value: "80" - - name: ReRoutes__1__DownstreamHostAndPorts__0__Host - value: product-service - - name: ReRoutes__1__DownstreamHostAndPorts__0__Port - value: "80" - - name: Redis__Configuration - value: redis - - name: RemoteServices__Default__BaseUrl - value: http://backend-admin-app-gateway/ - image: volosoft/microservice-demo-backend-admin-app-gateway - name: backend-admin-app-gateway - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: backend-admin-app-gateway + image: "volosoft/microservice-demo-backend-admin-app-gateway" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - 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__0__Host + value: identity-service + - name: ReRoutes__0__DownstreamHostAndPorts__0__Port + value: "80" + - name: ReRoutes__1__DownstreamHostAndPorts__0__Host + value: product-service + - name: ReRoutes__1__DownstreamHostAndPorts__0__Port + value: "80" + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://backend-admin-app-gateway/ + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml index 4864ee547a..d773c940d2 100644 --- a/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-gateway-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: backend-admin-app-gateway name: backend-admin-app-gateway spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: backend-admin-app-gateway -status: - loadBalancer: {} + app: backend-admin-app-gateway + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml b/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml index f8df4e57de..36a28cb7a1 100644 --- a/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml +++ b/samples/MicroserviceDemo/k8s/backend-admin-app-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: backend-admin-app name: backend-admin-app spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: backend-admin-app -status: - loadBalancer: {} + app: backend-admin-app + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml b/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml index 6bf8d33a8c..5fa5c5542d 100644 --- a/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/blogging-service-deployment.yaml @@ -1,39 +1,37 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: blogging-service name: blogging-service spec: + selector: + matchLabels: + app: blogging-service replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: blogging-service + app: 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:51511 - - 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 - - name: RemoteServices__Default__BaseUrl - value: http://internal-gateway/ - image: volosoft/microservice-demo-blogging-service - name: blogging-service - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: blogging-service + image: "volosoft/microservice-demo-blogging-service" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - 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 + - name: RemoteServices__Default__BaseUrl + value: http://internal-gateway/ + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/blogging-service-service.yaml b/samples/MicroserviceDemo/k8s/blogging-service-service.yaml index c2b359580a..4e756c01d7 100644 --- a/samples/MicroserviceDemo/k8s/blogging-service-service.yaml +++ b/samples/MicroserviceDemo/k8s/blogging-service-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: blogging-service name: blogging-service spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: blogging-service -status: - loadBalancer: {} + app: blogging-service + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml b/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml index cfed8b93e2..6ba0609fb4 100644 --- a/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml +++ b/samples/MicroserviceDemo/k8s/dbdata-persistentvolumeclaim.yaml @@ -1,8 +1,6 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - labels: - io.kompose.service: dbdata name: dbdata spec: accessModes: @@ -10,4 +8,3 @@ spec: resources: requests: storage: 500Mi -status: {} diff --git a/samples/MicroserviceDemo/k8s/expose-service.yaml b/samples/MicroserviceDemo/k8s/expose-service.yaml index f7a7e7dfe5..b1b668a533 100644 --- a/samples/MicroserviceDemo/k8s/expose-service.yaml +++ b/samples/MicroserviceDemo/k8s/expose-service.yaml @@ -1,13 +1,11 @@ apiVersion: v1 kind: Service metadata: - labels: - io.kompose.service: auth-server name: auth-server-expose spec: type: LoadBalancer selector: - io.kompose.service: auth-server + app: auth-server ports: - protocol: TCP port: 51511 @@ -17,13 +15,11 @@ spec: apiVersion: v1 kind: Service metadata: - labels: - io.kompose.service: backend-admin-app name: backend-admin-app-expose spec: type: LoadBalancer selector: - io.kompose.service: backend-admin-app + app: backend-admin-app ports: - protocol: TCP port: 80 @@ -33,13 +29,11 @@ spec: apiVersion: v1 kind: Service metadata: - labels: - io.kompose.service: public-website name: public-website-expose spec: type: LoadBalancer selector: - io.kompose.service: public-website + app: public-website ports: - protocol: TCP port: 80 diff --git a/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml b/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml index 6179f57e44..add7d662c3 100644 --- a/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/identity-service-deployment.yaml @@ -1,35 +1,33 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: identity-service name: identity-service spec: + selector: + matchLabels: + app: identity-service replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: identity-service + app: 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:51511 - - 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: volosoft/microservice-demo-identity-service - name: identity-service - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: identity-service + image: "volosoft/microservice-demo-identity-service" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - 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 + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/identity-service-service.yaml b/samples/MicroserviceDemo/k8s/identity-service-service.yaml index 994f120b0b..6157e27437 100644 --- a/samples/MicroserviceDemo/k8s/identity-service-service.yaml +++ b/samples/MicroserviceDemo/k8s/identity-service-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: identity-service name: identity-service spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: identity-service -status: - loadBalancer: {} + app: identity-service + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml b/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml index 9c7edf6cdb..e748456a64 100644 --- a/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/internal-gateway-deployment.yaml @@ -1,47 +1,45 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: internal-gateway name: internal-gateway spec: + selector: + matchLabels: + app: internal-gateway replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: internal-gateway + app: 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:51511 - - 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__0__Host - value: identity-service - - name: ReRoutes__0__DownstreamHostAndPorts__0__Port - value: "80" - - name: ReRoutes__1__DownstreamHostAndPorts__0__Host - value: product-service - - name: ReRoutes__1__DownstreamHostAndPorts__0__Port - value: "80" - - name: ReRoutes__2__DownstreamHostAndPorts__0__Host - value: blogging-service - - name: ReRoutes__2__DownstreamHostAndPorts__0__Port - value: "80" - - name: Redis__Configuration - value: redis - image: volosoft/microservice-demo-internal-gateway - name: internal-gateway - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: internal-gateway + image: "volosoft/microservice-demo-internal-gateway" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - 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__0__Host + value: identity-service + - name: ReRoutes__0__DownstreamHostAndPorts__0__Port + value: "80" + - name: ReRoutes__1__DownstreamHostAndPorts__0__Host + value: product-service + - name: ReRoutes__1__DownstreamHostAndPorts__0__Port + value: "80" + - name: ReRoutes__2__DownstreamHostAndPorts__0__Host + value: blogging-service + - name: ReRoutes__2__DownstreamHostAndPorts__0__Port + value: "80" + - name: Redis__Configuration + value: redis + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml b/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml index e2766c3c3a..b0d80b34a1 100644 --- a/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml +++ b/samples/MicroserviceDemo/k8s/internal-gateway-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: internal-gateway name: internal-gateway spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: internal-gateway -status: - loadBalancer: {} + app: internal-gateway + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml b/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml index 938af49960..dbe3b9bde2 100644 --- a/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/mongodb-deployment.yaml @@ -1,22 +1,19 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: mongodb name: mongodb spec: + selector: + matchLabels: + app: mongodb replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: mongodb + app: mongodb spec: containers: - - image: mongo - name: mongodb - ports: - - containerPort: 27017 - resources: {} - restartPolicy: Always -status: {} + - name: mongodb + image: "mongo" + ports: + - containerPort: 27017 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/mongodb-service.yaml b/samples/MicroserviceDemo/k8s/mongodb-service.yaml index 34958fb121..0752ee87ca 100644 --- a/samples/MicroserviceDemo/k8s/mongodb-service.yaml +++ b/samples/MicroserviceDemo/k8s/mongodb-service.yaml @@ -1,14 +1,10 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: mongodb name: mongodb spec: + selector: + app: mongodb ports: - port: 27017 - targetPort: 27017 - selector: - io.kompose.service: mongodb -status: - loadBalancer: {} + targetPort: 27017 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/product-service-deployment.yaml b/samples/MicroserviceDemo/k8s/product-service-deployment.yaml index 669de15ae1..238c7ea45f 100644 --- a/samples/MicroserviceDemo/k8s/product-service-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/product-service-deployment.yaml @@ -1,38 +1,36 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: product-service name: product-service spec: + selector: + matchLabels: + app: product-service replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: product-service + app: 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:51511 - - 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_ProductManagement;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: volosoft/microservice-demo-product-service - name: product-service - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: product-service + image: "volosoft/microservice-demo-product-service" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - 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_ProductManagement;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 + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/product-service-service.yaml b/samples/MicroserviceDemo/k8s/product-service-service.yaml index 3c5d1f333b..b420f35361 100644 --- a/samples/MicroserviceDemo/k8s/product-service-service.yaml +++ b/samples/MicroserviceDemo/k8s/product-service-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: product-service name: product-service spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: product-service -status: - loadBalancer: {} + app: product-service + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/public-website-deployment.yaml b/samples/MicroserviceDemo/k8s/public-website-deployment.yaml index c643f68b99..321ad14565 100644 --- a/samples/MicroserviceDemo/k8s/public-website-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/public-website-deployment.yaml @@ -1,33 +1,31 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: public-website name: public-website spec: + selector: + matchLabels: + app: public-website replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: public-website + app: 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:51511 - - name: Redis__Configuration - value: redis - - name: RemoteServices__Default__BaseUrl - value: http://public-website-gateway/ - image: volosoft/microservice-demo-public-website - name: public-website - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: public-website + image: "volosoft/microservice-demo-public-website" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - name: Redis__Configuration + value: redis + - name: RemoteServices__Default__BaseUrl + value: http://public-website-gateway/ + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml b/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml index 802f12a7e3..43804ea78a 100644 --- a/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/public-website-gateway-deployment.yaml @@ -1,43 +1,41 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: public-website-gateway name: public-website-gateway spec: + selector: + matchLabels: + app: public-website-gateway replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: public-website-gateway + app: 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:51511 - - 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__0__Host - value: product-service - - name: ReRoutes__0__DownstreamHostAndPorts__0__Port - value: "80" - - name: ReRoutes__1__DownstreamHostAndPorts__0__Host - value: blogging-service - - name: ReRoutes__1__DownstreamHostAndPorts__0__Port - value: "80" - - name: Redis__Configuration - value: redis - image: volosoft/microservice-demo-public-website-gateway - name: public-website-gateway - ports: - - containerPort: 80 - resources: {} - restartPolicy: Always -status: {} + - name: public-website-gateway + image: "volosoft/microservice-demo-public-website-gateway" + env: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: AuthServer__Authority + value: http://auth-server:51511 + - 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__0__Host + value: product-service + - name: ReRoutes__0__DownstreamHostAndPorts__0__Port + value: "80" + - name: ReRoutes__1__DownstreamHostAndPorts__0__Host + value: blogging-service + - name: ReRoutes__1__DownstreamHostAndPorts__0__Port + value: "80" + - name: Redis__Configuration + value: redis + ports: + - name: http + containerPort: 80 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml b/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml index 5ab4e428b9..d04c680685 100644 --- a/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml +++ b/samples/MicroserviceDemo/k8s/public-website-gateway-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: public-website-gateway name: public-website-gateway spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: public-website-gateway -status: - loadBalancer: {} + app: public-website-gateway + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/public-website-service.yaml b/samples/MicroserviceDemo/k8s/public-website-service.yaml index 5f5c4f56d9..5ac586cb19 100644 --- a/samples/MicroserviceDemo/k8s/public-website-service.yaml +++ b/samples/MicroserviceDemo/k8s/public-website-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: public-website name: public-website spec: - ports: - - port: 80 - targetPort: 80 selector: - io.kompose.service: public-website -status: - loadBalancer: {} + app: public-website + ports: + - protocol: TCP + port: 80 + targetPort: http \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml b/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml index e455bebac6..283b1601a9 100644 --- a/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/rabbitmq-deployment.yaml @@ -1,23 +1,20 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: rabbitmq name: rabbitmq spec: + selector: + matchLabels: + app: rabbitmq replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: rabbitmq + app: rabbitmq spec: containers: - - image: rabbitmq:3-management-alpine - name: rabbitmq - ports: - - containerPort: 5672 - - containerPort: 15672 - resources: {} - restartPolicy: Always -status: {} + - name: rabbitmq + image: "rabbitmq:3-management-alpine" + ports: + - containerPort: 5672 + - containerPort: 15672 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml b/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml index b8595193e8..07e7b2a618 100644 --- a/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml +++ b/samples/MicroserviceDemo/k8s/rabbitmq-service.yaml @@ -1,18 +1,14 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: rabbitmq name: rabbitmq spec: + selector: + app: rabbitmq ports: - name: "5672" port: 5672 targetPort: 5672 - name: "15672" port: 15672 - targetPort: 15672 - selector: - io.kompose.service: rabbitmq -status: - loadBalancer: {} + targetPort: 15672 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/redis-deployment.yaml b/samples/MicroserviceDemo/k8s/redis-deployment.yaml index 35d9973110..5f0c6e50e4 100644 --- a/samples/MicroserviceDemo/k8s/redis-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/redis-deployment.yaml @@ -1,22 +1,19 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: redis name: redis spec: + selector: + matchLabels: + app: redis replicas: 1 - strategy: {} template: metadata: labels: - io.kompose.service: redis + app: redis spec: containers: - - image: redis - name: redis - ports: - - containerPort: 6379 - resources: {} - restartPolicy: Always -status: {} + - name: redis + image: "redis" + ports: + - containerPort: 6379 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/redis-service.yaml b/samples/MicroserviceDemo/k8s/redis-service.yaml index 8ef5014d20..8fef057052 100644 --- a/samples/MicroserviceDemo/k8s/redis-service.yaml +++ b/samples/MicroserviceDemo/k8s/redis-service.yaml @@ -1,14 +1,10 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: redis name: redis spec: - ports: - - port: 6379 - targetPort: 6379 selector: - io.kompose.service: redis -status: - loadBalancer: {} + app: redis + ports: + - port: 6379 + targetPort: 6379 \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/restore-database-job.yaml b/samples/MicroserviceDemo/k8s/restore-database-job.yaml index b35b67844f..fa403e95d8 100644 --- a/samples/MicroserviceDemo/k8s/restore-database-job.yaml +++ b/samples/MicroserviceDemo/k8s/restore-database-job.yaml @@ -12,7 +12,7 @@ spec: - name: SA_PASSWORD value: yourStrong(!)Password name: restore-database - image: volosoft/microservice-demo-restore-database + image: "volosoft/microservice-demo-restore-database" volumeMounts: - mountPath: /var/opt/mssql name: dbdata diff --git a/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml b/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml index 1de273530e..e95ce99ee7 100644 --- a/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml +++ b/samples/MicroserviceDemo/k8s/sqlserver-deployment.yaml @@ -1,35 +1,35 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: - labels: - io.kompose.service: sqlserver name: sqlserver spec: + selector: + matchLabels: + app: sqlserver replicas: 1 - strategy: - type: Recreate template: metadata: labels: - io.kompose.service: sqlserver + app: sqlserver spec: containers: - - env: + - name: sqlserver + image: mcr.microsoft.com/mssql/server + ports: + - containerPort: 1433 + env: + - name: MSSQL_PID + value: "Developer" - name: ACCEPT_EULA value: "Y" - name: SA_PASSWORD value: yourStrong(!)Password - image: mcr.microsoft.com/mssql/server - name: sqlserver - ports: - - containerPort: 1433 - resources: {} + - name: MSSQL_SA_PASSWORD + value: yourStrong(!)Password volumeMounts: - - mountPath: /var/opt/mssql - name: dbdata - restartPolicy: Always + - name: dbdata + mountPath: /var/opt/mssql volumes: - name: dbdata persistentVolumeClaim: - claimName: dbdata -status: {} + claimName: dbdata \ No newline at end of file diff --git a/samples/MicroserviceDemo/k8s/sqlserver-service.yaml b/samples/MicroserviceDemo/k8s/sqlserver-service.yaml index da4a98c85a..a72adb2567 100644 --- a/samples/MicroserviceDemo/k8s/sqlserver-service.yaml +++ b/samples/MicroserviceDemo/k8s/sqlserver-service.yaml @@ -1,14 +1,11 @@ -apiVersion: v1 kind: Service +apiVersion: v1 metadata: - labels: - io.kompose.service: sqlserver name: sqlserver spec: - ports: - - port: 1433 - targetPort: 1433 selector: - io.kompose.service: sqlserver -status: - loadBalancer: {} + app: sqlserver + ports: + - protocol: TCP + port: 1433 + targetPort: 1433 \ No newline at end of file