Skip to content

Commit

Permalink
APT-1632: Moving zq2 stake to z app #23
Browse files Browse the repository at this point in the history
* remove z dev render files

* z app config added

* env fix

* global-static-ip-name fix

---------

Co-authored-by: Lukasz Kosiak <[email protected]>
  • Loading branch information
lukozill and uHappyLogic authored Jan 22, 2025
1 parent 9b559b0 commit e63036d
Show file tree
Hide file tree
Showing 23 changed files with 336 additions and 150 deletions.
24 changes: 24 additions & 0 deletions cd/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: zq2-stake-frontend
namespace: zq2-stake
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: zq2-stake-frontend
strategy:
type: RollingUpdate
template:
metadata:
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
containers:
- image: zq2-staking-frontend
name: zq2-staking-frontend
ports:
- containerPort: 3000
19 changes: 19 additions & 0 deletions cd/base/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: zq2-stake-frontend
namespace: zq2-stake
labels:
app.kubernetes.io/name: zq2-stake
spec:
rules:
- host: localhost
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: zq2-stake-frontend
port:
number: 3000
7 changes: 7 additions & 0 deletions cd/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- deployment.yaml
- svc.yaml
- ingress.yaml
6 changes: 6 additions & 0 deletions cd/base/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: Namespace
metadata:
name: zq2-stake
labels:
app.kubernetes.io/name: zq2-stake
16 changes: 16 additions & 0 deletions cd/base/svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: zq2-stake-frontend
namespace: zq2-stake
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
protocol: TCP
name: http
selector:
app.kubernetes.io/name: zq2-stake-frontend
11 changes: 11 additions & 0 deletions cd/overlays/production_protomainnet/backend-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-prd-protomainnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
timeoutSec: 120
healthCheck:
requestPath: /api/health
10 changes: 10 additions & 0 deletions cd/overlays/production_protomainnet/certificates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-prd-protomainnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
domains:
- stake.zq2-protomainnet.zilliqa.com
11 changes: 11 additions & 0 deletions cd/overlays/production_protomainnet/frontend-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-prd-protomainnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
redirectToHttps:
enabled: true
responseCodeName: RESPONSE_CODE
44 changes: 44 additions & 0 deletions cd/overlays/production_protomainnet/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: zq2-stake-prd-protomainnet

resources:
- ../../base
- certificates.yaml
- backend-config.yaml
- frontend-config.yaml
- secrets.yaml

patches:
- target:
kind: Ingress
name: zq2-stake-frontend
patch: |-
- op: replace
path: "/spec/rules/0/host"
value: stake.zq2-protomainnet.zilliqa.com
- op: replace
path: /metadata/annotations
value:
kubernetes.io/ingress.class: gce
kubernetes.io/ingress.global-static-ip-name: stake-zq2-protomainnet-zilliqa-com
networking.gke.io/managed-certificates: zq2-stake-frontend
networking.gke.io/v1beta1.FrontendConfig: zq2-stake-frontend
- target:
kind: Service
name: zq2-stake-frontend
patch: |-
- op: add
path: /metadata/annotations
value:
beta.cloud.google.com/backend-config: '{"default": "zq2-stake-frontend"}'
- target:
kind: Deployment
name: zq2-stake-frontend
patch: |-
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: ZQ2_STAKING_CHAIN_ID
value: 32770
12 changes: 12 additions & 0 deletions cd/overlays/production_protomainnet/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-prd-protomainnet
labels:
app.kubernetes.io/name: "zq2-stake-frontend"
annotations:
zilliqa.com/autofill: prj-p-prod-apps
type: Opaque
data:
ZQ2_STAKING_WALLET_CONNECT_API_KEY: "zq2-staking-protomainnet/WALLET_CONNECT_API_KEY"
11 changes: 11 additions & 0 deletions cd/overlays/staging_devnet/backend-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-devnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
timeoutSec: 120
healthCheck:
requestPath: /api/health
10 changes: 10 additions & 0 deletions cd/overlays/staging_devnet/certificates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-devnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
domains:
- stake.zq2-devnet.zilliqa.com
11 changes: 11 additions & 0 deletions cd/overlays/staging_devnet/frontend-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-devnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
redirectToHttps:
enabled: true
responseCodeName: RESPONSE_CODE
44 changes: 44 additions & 0 deletions cd/overlays/staging_devnet/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: zq2-stake-stg-devnet

resources:
- ../../base
- certificates.yaml
- backend-config.yaml
- frontend-config.yaml
- secrets.yaml

patches:
- target:
kind: Ingress
name: zq2-stake-frontend
patch: |-
- op: replace
path: "/spec/rules/0/host"
value: stake.zq2-devnet.zilliqa.com
- op: replace
path: /metadata/annotations
value:
kubernetes.io/ingress.class: gce
kubernetes.io/ingress.global-static-ip-name: stake-zq2-devnet-zilliqa-com
networking.gke.io/managed-certificates: zq2-stake-frontend
networking.gke.io/v1beta1.FrontendConfig: zq2-stake-frontend
- target:
kind: Service
name: zq2-stake-frontend
patch: |-
- op: add
path: /metadata/annotations
value:
beta.cloud.google.com/backend-config: '{"default": "zq2-stake-frontend"}'
- target:
kind: Deployment
name: zq2-stake-frontend
patch: |-
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: ZQ2_STAKING_CHAIN_ID
value: 33469
12 changes: 12 additions & 0 deletions cd/overlays/staging_devnet/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-devnet
labels:
app.kubernetes.io/name: "zq2-stake-frontend"
annotations:
zilliqa.com/autofill: prj-d-staging
type: Opaque
data:
ZQ2_STAKING_WALLET_CONNECT_API_KEY: "zq2-staking-devnet/WALLET_CONNECT_API_KEY"
11 changes: 11 additions & 0 deletions cd/overlays/staging_prototestnet/backend-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-prototestnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
timeoutSec: 120
healthCheck:
requestPath: /api/health
10 changes: 10 additions & 0 deletions cd/overlays/staging_prototestnet/certificates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-prototestnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
domains:
- stake.zq2-prototestnet.zilliqa.com
11 changes: 11 additions & 0 deletions cd/overlays/staging_prototestnet/frontend-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: networking.gke.io/v1beta1
kind: FrontendConfig
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-prototestnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
spec:
redirectToHttps:
enabled: true
responseCodeName: RESPONSE_CODE
44 changes: 44 additions & 0 deletions cd/overlays/staging_prototestnet/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: zq2-stake-stg-prototestnet

resources:
- ../../base
- certificates.yaml
- backend-config.yaml
- frontend-config.yaml
- secrets.yaml

patches:
- target:
kind: Ingress
name: zq2-stake-frontend
patch: |-
- op: replace
path: "/spec/rules/0/host"
value: stake.zq2-prototestnet.zilliqa.com
- op: replace
path: /metadata/annotations
value:
kubernetes.io/ingress.class: gce
kubernetes.io/ingress.global-static-ip-name: stake-zq2-prototestnet-zilliqa-com
networking.gke.io/managed-certificates: zq2-stake-frontend
networking.gke.io/v1beta1.FrontendConfig: zq2-stake-frontend
- target:
kind: Service
name: zq2-stake-frontend
patch: |-
- op: add
path: /metadata/annotations
value:
beta.cloud.google.com/backend-config: '{"default": "zq2-stake-frontend"}'
- target:
kind: Deployment
name: zq2-stake-frontend
patch: |-
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: ZQ2_STAKING_CHAIN_ID
value: 33103
12 changes: 12 additions & 0 deletions cd/overlays/staging_prototestnet/secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-prototestnet
labels:
app.kubernetes.io/name: "zq2-stake-frontend"
annotations:
zilliqa.com/autofill: prj-d-staging
type: Opaque
data:
ZQ2_STAKING_WALLET_CONNECT_API_KEY: "zq2-staking-prototestnet/WALLET_CONNECT_API_KEY"
Loading

0 comments on commit e63036d

Please sign in to comment.