Skip to content

Commit

Permalink
Update kubernetes deployment to handle certs
Browse files Browse the repository at this point in the history
  • Loading branch information
zquestz committed Dec 20, 2024
1 parent fb19ae0 commit 317f853
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 22 deletions.
65 changes: 43 additions & 22 deletions kube/bchd-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
namespace: default
labels:
service: bchd
version: 0.18.0
version: 0.20.0
name: bchd
spec:
strategy:
Expand All @@ -19,31 +19,52 @@ spec:
service: bchd
spec:
containers:
- env:
- name: BCHD_RPC_USER
valueFrom:
secretKeyRef:
name: bchd
key: rpcuser
- name: BCHD_RPC_PASSWORD
valueFrom:
secretKeyRef:
name: bchd
key: rpcpass
image: zquestz/bchd:latest
command: ["bchd"]
args: ["-u", "$(BCHD_RPC_USER)", "-P", "$(BCHD_RPC_PASSWORD)", "--addrindex", "--txindex", "-b", "/data", "-C", "/data/bchd.conf"]
name: bchd
volumeMounts:
- mountPath: /data
name: bchd-data
resources:
requests:
memory: "3Gi"
- env:
- name: BCHD_RPC_USER
valueFrom:
secretKeyRef:
name: bchd
key: rpcuser
- name: BCHD_RPC_PASSWORD
valueFrom:
secretKeyRef:
name: bchd
key: rpcpass
image: zquestz/bchd:latest
command: ["bchd"]
args:
[
"-u",
"$(BCHD_RPC_USER)",
"-P",
"$(BCHD_RPC_PASSWORD)",
"--addrindex",
"--txindex",
"-b",
"/data",
"-C",
"/data/bchd.conf",
]
name: bchd
volumeMounts:
- mountPath: /data
name: bchd-data
- name: bchd-config
mountPath: /data/rpc.cert
subPath: cert
- name: bchd-config
mountPath: /data/rpc.key
subPath: key
resources:
requests:
memory: "3Gi"
restartPolicy: Always
terminationGracePeriodSeconds: 600
volumes:
- name: bchd-data
gcePersistentDisk:
pdName: bchd-data
fsType: ext4
- name: bchd-config
secret:
secretName: "bchd"
2 changes: 2 additions & 0 deletions kube/bchd-secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ type: Opaque
data:
rpcuser: YWRtaW4=
rpcpass: aXRvbGR5b3V0b2NoYW5nZXRoaXM=
cert: YOUR_CERT
key: YOUR_KEY

0 comments on commit 317f853

Please sign in to comment.