From c943e81b7bbec1707df5e2a9f02ae859e95631d4 Mon Sep 17 00:00:00 2001 From: gwg313 Date: Thu, 20 Nov 2025 10:12:47 -0500 Subject: [PATCH] first commit --- A3/base/deployment.yaml | 19 +++++++++++++++++++ A3/base/kustomization.yaml | 9 +++++++++ A3/base/service.yaml | 13 +++++++++++++ A3/overlays/dev/certificate.yaml | 13 +++++++++++++ A3/overlays/dev/kustomization.yaml | 12 ++++++++++++ A3/overlays/dev/virtualservice.yaml | 20 ++++++++++++++++++++ A3/overlays/prod/certificate.yaml | 13 +++++++++++++ A3/overlays/prod/deployment-patch.yaml | 5 +++++ A3/overlays/prod/gateway.yaml | 19 +++++++++++++++++++ A3/overlays/prod/kustomization.yaml | 16 ++++++++++++++++ A3/overlays/prod/virtualservice.yaml | 20 ++++++++++++++++++++ A3/overlays/qa/certificate.yaml | 13 +++++++++++++ A3/overlays/qa/kustomization.yaml | 15 +++++++++++++++ A3/overlays/qa/virtualservice.yaml | 20 ++++++++++++++++++++ 14 files changed, 207 insertions(+) create mode 100644 A3/base/deployment.yaml create mode 100644 A3/base/kustomization.yaml create mode 100644 A3/base/service.yaml create mode 100644 A3/overlays/dev/certificate.yaml create mode 100644 A3/overlays/dev/kustomization.yaml create mode 100644 A3/overlays/dev/virtualservice.yaml create mode 100644 A3/overlays/prod/certificate.yaml create mode 100644 A3/overlays/prod/deployment-patch.yaml create mode 100644 A3/overlays/prod/gateway.yaml create mode 100644 A3/overlays/prod/kustomization.yaml create mode 100644 A3/overlays/prod/virtualservice.yaml create mode 100644 A3/overlays/qa/certificate.yaml create mode 100644 A3/overlays/qa/kustomization.yaml create mode 100644 A3/overlays/qa/virtualservice.yaml diff --git a/A3/base/deployment.yaml b/A3/base/deployment.yaml new file mode 100644 index 0000000..d896618 --- /dev/null +++ b/A3/base/deployment.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: A3 +spec: + replicas: 1 + selector: + matchLabels: + app: A3 + template: + metadata: + labels: + app: A3 + spec: + containers: + - name: A3 + image: harbor.example.com/simple-demo/simple-demo:dev-placeholder + ports: + - containerPort: 3000 diff --git a/A3/base/kustomization.yaml b/A3/base/kustomization.yaml new file mode 100644 index 0000000..94779dc --- /dev/null +++ b/A3/base/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - deployment.yaml + - service.yaml + +images: + - name: harbor.example.com/simple-demo/simple-demo + newTag: dev-placeholder diff --git a/A3/base/service.yaml b/A3/base/service.yaml new file mode 100644 index 0000000..0f75a96 --- /dev/null +++ b/A3/base/service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: A3 +spec: + selector: + app: A3 + ports: + - port: 80 + targetPort: 3000 + protocol: TCP + name: http + type: ClusterIP diff --git a/A3/overlays/dev/certificate.yaml b/A3/overlays/dev/certificate.yaml new file mode 100644 index 0000000..4e6309d --- /dev/null +++ b/A3/overlays/dev/certificate.yaml @@ -0,0 +1,13 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: a3-dev-cert + namespace: istio-system +spec: + secretName: a3-dev-cert + issuerRef: + name: letsencrypt-dns + kind: ClusterIssuer + dnsNames: + - a3-dev.local.gwg313.xyz + - a3-dev.gwg313.xyz diff --git a/A3/overlays/dev/kustomization.yaml b/A3/overlays/dev/kustomization.yaml new file mode 100644 index 0000000..da5ba3d --- /dev/null +++ b/A3/overlays/dev/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: A3-dev +bases: + - ../../base +resources: + - gateway.yaml + - virtualservice.yaml + - certificate.yaml +images: + - name: registry.gwg313.xyz/private/a3-dev + newTag: dev-placeholder diff --git a/A3/overlays/dev/virtualservice.yaml b/A3/overlays/dev/virtualservice.yaml new file mode 100644 index 0000000..1b04e3f --- /dev/null +++ b/A3/overlays/dev/virtualservice.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: A3-dev + namespace: a3 +spec: + hosts: + - a3-dev.gwg313.xyz + - a3-dev.local.gwg313.xyz + gateways: + - a3-dev-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: a3-dev + port: + number: 80 diff --git a/A3/overlays/prod/certificate.yaml b/A3/overlays/prod/certificate.yaml new file mode 100644 index 0000000..b37160f --- /dev/null +++ b/A3/overlays/prod/certificate.yaml @@ -0,0 +1,13 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: a3-prod-cert + namespace: istio-system +spec: + secretName: a3-prod-cert + issuerRef: + name: letsencrypt-dns + kind: ClusterIssuer + dnsNames: + - a3-prod.local.gwg313.xyz + - a3-prod.gwg313.xyz diff --git a/A3/overlays/prod/deployment-patch.yaml b/A3/overlays/prod/deployment-patch.yaml new file mode 100644 index 0000000..a035a6a --- /dev/null +++ b/A3/overlays/prod/deployment-patch.yaml @@ -0,0 +1,5 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: a3 + namespace: a3-prod diff --git a/A3/overlays/prod/gateway.yaml b/A3/overlays/prod/gateway.yaml new file mode 100644 index 0000000..9502c09 --- /dev/null +++ b/A3/overlays/prod/gateway.yaml @@ -0,0 +1,19 @@ +apiVersion: networking.istio.io/v1beta1 +kind: Gateway +metadata: + name: prod-gateway + namespace: a3-prod +spec: + selector: + istio: gateway + servers: + - port: + number: 443 + name: https + protocol: HTTPS + tls: + mode: SIMPLE + credentialName: a3-prod-tls-cert + hosts: + - a3-prod.gwg313.xyz + - a3-prod.local.gwg313.xyz diff --git a/A3/overlays/prod/kustomization.yaml b/A3/overlays/prod/kustomization.yaml new file mode 100644 index 0000000..0b60510 --- /dev/null +++ b/A3/overlays/prod/kustomization.yaml @@ -0,0 +1,16 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: A3-prod + +bases: + - ../../base + +resources: + - gateway.yaml + - virtualservice.yaml + - certificate.yaml + +images: + - name: harbor.example.com/simple-demo/simple-demo + newTag: prod-placeholder + diff --git a/A3/overlays/prod/virtualservice.yaml b/A3/overlays/prod/virtualservice.yaml new file mode 100644 index 0000000..24e4896 --- /dev/null +++ b/A3/overlays/prod/virtualservice.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: A3-prod + namespace: a3 +spec: + hosts: + - a3-prod.gwg313.xyz + - a3-prod.local.gwg313.xyz + gateways: + - a3-prod-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: a3-prod + port: + number: 80 diff --git a/A3/overlays/qa/certificate.yaml b/A3/overlays/qa/certificate.yaml new file mode 100644 index 0000000..d2736f1 --- /dev/null +++ b/A3/overlays/qa/certificate.yaml @@ -0,0 +1,13 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: a3-qa-cert + namespace: istio-system +spec: + secretName: a3-qa-cert + issuerRef: + name: letsencrypt-dns + kind: ClusterIssuer + dnsNames: + - a3-qa.local.gwg313.xyz + - a3-qa.gwg313.xyz diff --git a/A3/overlays/qa/kustomization.yaml b/A3/overlays/qa/kustomization.yaml new file mode 100644 index 0000000..b965385 --- /dev/null +++ b/A3/overlays/qa/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: A3-qa + +bases: + - ../../base + +resources: + - gateway.yaml + - virtualservice.yaml + - certificate.yaml + +images: + - name: harbor.example.com/simple-demo/simple-demo + newTag: qa-placeholder diff --git a/A3/overlays/qa/virtualservice.yaml b/A3/overlays/qa/virtualservice.yaml new file mode 100644 index 0000000..8bc97c5 --- /dev/null +++ b/A3/overlays/qa/virtualservice.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.istio.io/v1beta1 +kind: VirtualService +metadata: + name: A3-qa + namespace: a3 +spec: + hosts: + - a3-qa.gwg313.xyz + - a3-qa.local.gwg313.xyz + gateways: + - a3-qa-gateway + http: + - match: + - uri: + prefix: / + route: + - destination: + host: a3-qa + port: + number: 80