diff --git a/apps/app01/k8s/overlays/canary-sol2/kustomization.yaml b/apps/app01/k8s/overlays/canary-sol2/kustomization.yaml new file mode 100644 index 0000000..b184e54 --- /dev/null +++ b/apps/app01/k8s/overlays/canary-sol2/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../canary + - service.yaml +components: + - ../../../../../components/common/canary \ No newline at end of file diff --git a/apps/app01/k8s/overlays/canary-sol2/service.yaml b/apps/app01/k8s/overlays/canary-sol2/service.yaml new file mode 100644 index 0000000..153a71a --- /dev/null +++ b/apps/app01/k8s/overlays/canary-sol2/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: app01-sol2-svc-canary + annotations: + networking.gke.io/max-rate-per-endpoint: "10" + cloud.google.com/neg: '{"exposed_ports": {"8080":{"name": "app01-sol2-svc-canary-neg"}}}' +spec: + selector: + app: app01-kupython + ricc-env: canary + ports: + - port: 8080 + targetPort: 8080 diff --git a/apps/app01/k8s/overlays/production-sol2/kustomization.yaml b/apps/app01/k8s/overlays/production-sol2/kustomization.yaml new file mode 100644 index 0000000..946114c --- /dev/null +++ b/apps/app01/k8s/overlays/production-sol2/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../production + - service.yaml +components: + - ../../../../../components/common/prod \ No newline at end of file diff --git a/apps/app01/k8s/overlays/production-sol2/service.yaml b/apps/app01/k8s/overlays/production-sol2/service.yaml new file mode 100644 index 0000000..2f5f3ac --- /dev/null +++ b/apps/app01/k8s/overlays/production-sol2/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: app01-sol2-svc-prod + annotations: + networking.gke.io/max-rate-per-endpoint: "10" + cloud.google.com/neg: '{"exposed_ports": {"8080":{"name": "app01-sol2-svc-prod-neg"}}}' +spec: + selector: + app: app01-kupython + ricc-env: prod + ports: + - port: 8080 + targetPort: 8080 diff --git a/apps/app01/skaffold.yaml b/apps/app01/skaffold.yaml index 3a3b7fd..34c4908 100644 --- a/apps/app01/skaffold.yaml +++ b/apps/app01/skaffold.yaml @@ -49,6 +49,14 @@ profiles: deploy: kustomize: # uses kustomize paths: [./k8s/overlays/production] + - name: canary-sol2 + deploy: + kustomize: + paths: [./k8s/overlays/canary-sol2] + - name: production-sol2 + deploy: + kustomize: + paths: [./k8s/overlays/production-sol2] # TODO skaffold profile for solutions. then use with skaffold render or CD release CLI. # - name: canary-solution1 diff --git a/apps/app02/k8s/overlays/canary-sol2/kustomization.yaml b/apps/app02/k8s/overlays/canary-sol2/kustomization.yaml new file mode 100644 index 0000000..b184e54 --- /dev/null +++ b/apps/app02/k8s/overlays/canary-sol2/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../canary + - service.yaml +components: + - ../../../../../components/common/canary \ No newline at end of file diff --git a/apps/app02/k8s/overlays/canary-sol2/service.yaml b/apps/app02/k8s/overlays/canary-sol2/service.yaml new file mode 100644 index 0000000..58ccb9e --- /dev/null +++ b/apps/app02/k8s/overlays/canary-sol2/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: app02-sol2-svc-canary + annotations: + networking.gke.io/max-rate-per-endpoint: "10" + cloud.google.com/neg: '{"exposed_ports": {"8080":{"name": "app02-sol2-svc-canary-neg"}}}' +spec: + selector: + app: app02-kuruby + ricc-env: canary + ports: + - port: 8080 + targetPort: 8080 diff --git a/apps/app02/k8s/overlays/production-sol2/kustomization.yaml b/apps/app02/k8s/overlays/production-sol2/kustomization.yaml new file mode 100644 index 0000000..946114c --- /dev/null +++ b/apps/app02/k8s/overlays/production-sol2/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ../production + - service.yaml +components: + - ../../../../../components/common/prod \ No newline at end of file diff --git a/apps/app02/k8s/overlays/production-sol2/service.yaml b/apps/app02/k8s/overlays/production-sol2/service.yaml new file mode 100644 index 0000000..508a28b --- /dev/null +++ b/apps/app02/k8s/overlays/production-sol2/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: app02-sol2-svc-prod + annotations: + networking.gke.io/max-rate-per-endpoint: "10" + cloud.google.com/neg: '{"exposed_ports": {"8080":{"name": "app02-sol2-svc-prod-neg"}}}' +spec: + selector: + app: app02-kuruby + ricc-env: prod + ports: + - port: 8080 + targetPort: 8080 diff --git a/apps/app02/skaffold.yaml b/apps/app02/skaffold.yaml index 299fcdf..fe44be9 100644 --- a/apps/app02/skaffold.yaml +++ b/apps/app02/skaffold.yaml @@ -36,3 +36,11 @@ profiles: deploy: kustomize: paths: ["k8s/overlays/production"] + - name: canary-sol2 + deploy: + kustomize: + paths: [./k8s/overlays/canary-sol2] + - name: production-sol2 + deploy: + kustomize: + paths: [./k8s/overlays/production-sol2] \ No newline at end of file diff --git a/clouddeploy.template.yaml b/clouddeploy.template.yaml index d35b0da..ab25cb8 100644 --- a/clouddeploy.template.yaml +++ b/clouddeploy.template.yaml @@ -34,9 +34,9 @@ serialPipeline: - targetId: staging profiles: [staging] - targetId: canary - profiles: [canary] + profiles: [canary-sol2] - targetId: production - profiles: [production] + profiles: [production-sol2] --- apiVersion: deploy.cloud.google.com/v1 kind: DeliveryPipeline