Skip to content

Commit

Permalink
DEVOPS-1128: stg and xcad isolated server envs (#305)
Browse files Browse the repository at this point in the history
* feat: DEVOPS-1128 stg and xcad isolated server envs

* feat: DEVOPS-1128 stg and xcad isolated server envs

* feat: DEVOPS-1128 stg and xcad isolated server envs
  • Loading branch information
pavlops authored Nov 30, 2023
1 parent 05f842f commit f9544f9
Show file tree
Hide file tree
Showing 15 changed files with 210 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd-prd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
governance-api,
governance-snapshot,
neo-savant,
zilliqa-isolated-server,
zillion,
zilliqa-isolated-server,
]
include:
- application: bluebell-playground
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/cicd-stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
governance-snapshot,
neo-savant,
zillion,
zilliqa-isolated-server,
]
include:
- application: developer-portal
Expand Down Expand Up @@ -72,6 +73,11 @@ jobs:
path: products/zillion
tag_length: 8
tag_latest: false
- application: zilliqa-isolated-server
image_name: zilliqa-isolated-server
path: products/zilliqa-isolated-server
tag_length: 8
tag_latest: true
env:
DOCKER_DOMAIN: asia-docker.pkg.dev
REGISTRY: asia-docker.pkg.dev/prj-d-devops-services-4dgwlsse/zilliqa-public
Expand Down
1 change: 0 additions & 1 deletion products/zilliqa-isolated-server/cd/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: zilliqa-isolated-server
namespace: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
spec:
Expand Down
2 changes: 2 additions & 0 deletions products/zilliqa-isolated-server/cd/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ resources:
- deployment.yaml
- svc.yaml
- ingress.yaml

namespace: zilliqa-isolated-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: zilliqa-isolated-server
namespace: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
annotations:
zilliqa.com/autofill: prj-d-staging
type: Opaque
data:
UUID: "zilliqa-isolated-server/UUID"
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: zilliqa-isolated-server
namespace: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
spec:
timeoutSec: 30
healthCheck:
requestPath: /
port: 80
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
name: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
spec:
domains:
- stg-zilliqa-isolated-server.zilliqa.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: zilliqa-isolated-server
namespace: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
data:
AWS_INFRA_MODE: "false"
VALIDATOR_MODE: "false"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
metadata:
name: zilliqa-isolated-server
namespace: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
spec:
redirectToHttps:
enabled: true
responseCodeName: RESPONSE_CODE
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: zilliqa-isolated-server-stg

resources:
- ../../base
- configmap.yaml
- app-secret.yaml
- certificate.yaml
- backend-config.yaml
- frontend-config.yaml

patches:
- target:
kind: Ingress
name: zilliqa-isolated-server
patch: |-
- op: replace
path: "/spec/rules/0/host"
value: stg-zilliqa-isolated-server.zilliqa.com
- op: replace
path: /metadata/annotations
value:
kubernetes.io/ingress.class: gce
kubernetes.io/ingress.global-static-ip-name: stg-zilliqa-isolated-server-zilliqa-com
networking.gke.io/managed-certificates: zilliqa-isolated-server
networking.gke.io/v1beta1.FrontendConfig: zilliqa-isolated-server
- target:
kind: Service
name: zilliqa-isolated-server
patch: |-
- op: add
path: /metadata/annotations
value:
beta.cloud.google.com/backend-config: '{"default": "zilliqa-isolated-server"}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: zilliqa-isolated-server
namespace: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
spec:
timeoutSec: 30
healthCheck:
requestPath: /
port: 80
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
name: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
spec:
domains:
- xcad-isolated-server.zilliqa.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: zilliqa-isolated-server
namespace: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
spec:
progressDeadlineSeconds: 600
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: zilliqa-isolated-server
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/name: zilliqa-isolated-server
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- emptyDir: {}
name: persistence-volume-ephemeral
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
- image: zilliqa-isolated-server
name: zilliqa-isolated-server
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /zilliqa/persistence
name: persistence-volume-ephemeral
ports:
- containerPort: 5555
env:
- name: MANUAL_MODE
value: "true"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
metadata:
name: zilliqa-isolated-server
namespace: zilliqa-isolated-server
labels:
app.kubernetes.io/name: zilliqa-isolated-server
spec:
redirectToHttps:
enabled: true
responseCodeName: RESPONSE_CODE
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: xcad-isolated-server-prd

resources:
- ../../base
- certificate.yaml
- backend-config.yaml
- frontend-config.yaml

patches:
- target:
kind: Ingress
name: zilliqa-isolated-server
patch: |-
- op: replace
path: "/spec/rules/0/host"
value: xcad-isolated-server.zilliqa.com
- op: replace
path: /metadata/annotations
value:
kubernetes.io/ingress.class: gce
kubernetes.io/ingress.global-static-ip-name: xcad-isolated-server-zilliqa-com
networking.gke.io/managed-certificates: zilliqa-isolated-server
networking.gke.io/v1beta1.FrontendConfig: zilliqa-isolated-server
- target:
kind: Service
name: zilliqa-isolated-server
patch: |-
- op: add
path: /metadata/annotations
value:
beta.cloud.google.com/backend-config: '{"default": "zilliqa-isolated-server"}'
patchesStrategicMerge:
- deployment.yaml

0 comments on commit f9544f9

Please sign in to comment.