Skip to content

Commit

Permalink
deploy rooch-faucet to k8s (#2705)
Browse files Browse the repository at this point in the history
* deploy rooch-faucet to k8s

* switch to testnet
  • Loading branch information
yourmoonlight authored Sep 28, 2024
1 parent 3628788 commit 8e09fb8
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
57 changes: 57 additions & 0 deletions kube/rooch-faucet/rooch-faucet-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: rooch-faucet
spec:
replicas: 1
selector:
matchLabels:
app: rooch-faucet
template:
metadata:
labels:
app: rooch-faucet
spec:
initContainers:
- name: init-rooch
image: ghcr.io/rooch-network/rooch:v0.7.0
command: ["/bin/sh", "-c"]
args:
- |
if [ ! -f /root/.rooch/initialized ]; then
/rooch/rooch init -m "${INIT_SECRET}" --skip-password
/rooch/rooch env switch --alias test
ls -la /root/.rooch/rooch_config/
touch /root/.rooch/initialized
fi
env:
- name: INIT_SECRET
valueFrom:
secretKeyRef:
name: rooch-faucet-secrets
key: init-phrase
volumeMounts:
- name: rooch-data
mountPath: /root
containers:
- name: rooch-faucet
image: ghcr.io/rooch-network/rooch:v0.7.0
command: ["/rooch-faucet/rooch-faucet"]
args:
- "--discord-token"
- "$(DISCORD_TOKEN)"
- "--faucet-grant-amount"
- "1000000000"
env:
- name: DISCORD_TOKEN
valueFrom:
secretKeyRef:
name: rooch-faucet-secrets
key: discord-token
volumeMounts:
- name: rooch-data
mountPath: /root
volumes:
- name: rooch-data
persistentVolumeClaim:
claimName: rooch-faucet-data
10 changes: 10 additions & 0 deletions kube/rooch-faucet/rooch-faucet-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rooch-faucet-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

0 comments on commit 8e09fb8

Please sign in to comment.