Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy rooch-faucet to k8s #2705

Merged
merged 2 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading