Skip to content

Commit

Permalink
APT-1532: fix for ZQ2_STAKING_WALLET_CONNECT_API_KEY (#26)
Browse files Browse the repository at this point in the history
* new configmap based approach

* feat: DEVOPS-1840 implement zq2-staking k8s templates (#28)

---------

Co-authored-by: Lukasz Kosiak <[email protected]>
Co-authored-by: Francesco Medas <[email protected]>
  • Loading branch information
3 people authored Jan 28, 2025
1 parent 34ea0f1 commit 108627f
Show file tree
Hide file tree
Showing 15 changed files with 89 additions and 30 deletions.
9 changes: 9 additions & 0 deletions cd/base/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: zq2-stake-frontend
namespace: zq2-stake
labels:
app.kubernetes.io/name: zq2-stake-frontend
data:
ZQ2_STAKING_CHAIN_ID: "33469"
17 changes: 16 additions & 1 deletion cd/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,19 @@ spec:
name: zq2-staking-frontend
ports:
- containerPort: 3000
env: []
resources:
limits:
memory: 200Mi
requests:
memory: 100Mi
env:
- name: ZQ2_STAKING_CHAIN_ID
valueFrom:
configMapKeyRef:
name: zq2-stake-frontend
key: ZQ2_STAKING_CHAIN_ID
- name: ZQ2_STAKING_WALLET_CONNECT_API_KEY
valueFrom:
secretKeyRef:
name: zq2-stake-frontend
key: ZQ2_STAKING_WALLET_CONNECT_API_KEY
2 changes: 1 addition & 1 deletion cd/base/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: zq2-stake-frontend
namespace: zq2-stake
labels:
app.kubernetes.io/name: zq2-stake
app.kubernetes.io/name: zq2-stake-frontend
spec:
rules:
- host: localhost
Expand Down
2 changes: 2 additions & 0 deletions cd/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- secrets.yaml
- configmap.yaml
- deployment.yaml
- svc.yaml
- ingress.yaml
2 changes: 1 addition & 1 deletion cd/base/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ kind: Namespace
metadata:
name: zq2-stake
labels:
app.kubernetes.io/name: zq2-stake
app.kubernetes.io/name: zq2-stake-frontend
12 changes: 12 additions & 0 deletions cd/base/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
labels:
app.kubernetes.io/name: zq2-stake-frontend
annotations:
zilliqa.com/autofill: "zq2-stake-frontend"
type: Opaque
data:
ZQ2_STAKING_WALLET_CONNECT_API_KEY: ""
9 changes: 9 additions & 0 deletions cd/overlays/production_protomainnet/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-prd-protomainnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
data:
ZQ2_STAKING_CHAIN_ID: "32770"
14 changes: 6 additions & 8 deletions cd/overlays/production_protomainnet/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ resources:
- certificates.yaml
- backend-config.yaml
- frontend-config.yaml
- secrets.yaml

patches:
- target:
Expand All @@ -34,11 +33,10 @@ patches:
value:
beta.cloud.google.com/backend-config: '{"default": "zq2-stake-frontend"}'
- target:
kind: Deployment
kind: ConfigMap
name: zq2-stake-frontend
patch: |-
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: ZQ2_STAKING_CHAIN_ID
value: "32770"
path: configmap.yaml
- target:
kind: Secret
name: zq2-stake-frontend
path: secrets.yaml
2 changes: 1 addition & 1 deletion cd/overlays/production_protomainnet/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: zq2-stake-frontend
namespace: zq2-stake-prd-protomainnet
labels:
app.kubernetes.io/name: "zq2-stake-frontend"
app.kubernetes.io/name: zq2-stake-frontend
annotations:
zilliqa.com/autofill: prj-p-prod-apps
type: Opaque
Expand Down
9 changes: 9 additions & 0 deletions cd/overlays/staging_devnet/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-devnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
data:
ZQ2_STAKING_CHAIN_ID: "33469"
14 changes: 6 additions & 8 deletions cd/overlays/staging_devnet/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ resources:
- certificates.yaml
- backend-config.yaml
- frontend-config.yaml
- secrets.yaml

patches:
- target:
Expand All @@ -34,11 +33,10 @@ patches:
value:
beta.cloud.google.com/backend-config: '{"default": "zq2-stake-frontend"}'
- target:
kind: Deployment
kind: ConfigMap
name: zq2-stake-frontend
patch: |-
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: ZQ2_STAKING_CHAIN_ID
value: "33469"
path: configmap.yaml
- target:
kind: Secret
name: zq2-stake-frontend
path: secrets.yaml
2 changes: 1 addition & 1 deletion cd/overlays/staging_devnet/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-devnet
labels:
app.kubernetes.io/name: "zq2-stake-frontend"
app.kubernetes.io/name: zq2-stake-frontend
annotations:
zilliqa.com/autofill: prj-d-staging
type: Opaque
Expand Down
9 changes: 9 additions & 0 deletions cd/overlays/staging_prototestnet/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-prototestnet
labels:
app.kubernetes.io/name: zq2-stake-frontend
data:
ZQ2_STAKING_CHAIN_ID: "33103"
14 changes: 6 additions & 8 deletions cd/overlays/staging_prototestnet/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ resources:
- certificates.yaml
- backend-config.yaml
- frontend-config.yaml
- secrets.yaml

patches:
- target:
Expand All @@ -34,11 +33,10 @@ patches:
value:
beta.cloud.google.com/backend-config: '{"default": "zq2-stake-frontend"}'
- target:
kind: Deployment
kind: ConfigMap
name: zq2-stake-frontend
patch: |-
- op: add
path: "/spec/template/spec/containers/0/env/-"
value:
name: ZQ2_STAKING_CHAIN_ID
value: "33103"
path: configmap.yaml
- target:
kind: Secret
name: zq2-stake-frontend
path: secrets.yaml
2 changes: 1 addition & 1 deletion cd/overlays/staging_prototestnet/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: zq2-stake-frontend
namespace: zq2-stake-stg-prototestnet
labels:
app.kubernetes.io/name: "zq2-stake-frontend"
app.kubernetes.io/name: zq2-stake-frontend
annotations:
zilliqa.com/autofill: prj-d-staging
type: Opaque
Expand Down

0 comments on commit 108627f

Please sign in to comment.