Last active
February 12, 2024 09:07
-
-
Save christopherwxyz/c18d5fad1cf3663f36600d2cfb7ad73f to your computer and use it in GitHub Desktop.
hubble k8s deployment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: gce-pd-retained | |
reclaimPolicy: Retain | |
provisioner: kubernetes.io/gce-pd | |
parameters: | |
type: pd-standard | |
replication-type: none | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: hubble-hub-disk | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
storageClassName: gce-pd-retained | |
resources: | |
requests: | |
storage: 20Gi | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: hubble-rocks-disk | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
storageClassName: gce-pd-retained | |
resources: | |
requests: | |
storage: 20Gi | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: hubble-deployment | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: hubble | |
template: | |
metadata: | |
labels: | |
app: hubble | |
spec: | |
containers: | |
- name: hubble | |
image: farcasterxyz/hubble:latest | |
command: ["yarn", "start", "--ip", "0.0.0.0", "--gossip-port", "2282", "--rpc-port", "2283", "--eth-rpc-url", "$(ETH_RPC_URL)", "--eth-mainnet-rpc-url", "$(ETH_MAINNET_RPC_URL)", "--network", "$(FC_NETWORK_ID)", "-b", "$(BOOTSTRAP_NODE)"] | |
ports: | |
- containerPort: 2282 | |
- containerPort: 2283 | |
env: | |
- name: ETH_RPC_URL | |
value: <YOUR_ETH_RPC_URL> | |
- name: ETH_MAINNET_RPC_URL | |
value: <YOUR_ETH_MAINNET_RPC_URL> | |
- name: FC_NETWORK_ID | |
value: "2" | |
- name: BOOTSTRAP_NODE | |
value: "/dns/testnet1.farcaster.xyz/tcp/2282" | |
- name: IDENTITY_B64 | |
value: <YOUR_IDENTITY_BASE64_ENCODED_FROM_PROTOBUF> | |
resources: | |
requests: | |
memory: "16Gi" | |
cpu: "4" | |
volumeMounts: | |
- name: hubble-hub-data | |
mountPath: /home/node/app/apps/hubble/.hub # Update this path to match the hub mount path | |
- name: hubble-rocks-data | |
mountPath: /home/node/app/apps/hubble/.rocks # Update this path to match the rocks mount path | |
volumes: | |
- name: hubble-hub-data | |
persistentVolumeClaim: | |
claimName: hubble-hub-disk # Use the name of the PVC you created for hubble-hub-data | |
- name: hubble-rocks-data | |
persistentVolumeClaim: | |
claimName: hubble-rocks-disk # Use the name of the PVC you created for hubble-rocks-data | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: hubble-service | |
spec: | |
selector: | |
app: hubble | |
ports: | |
- protocol: TCP | |
port: 80 | |
targetPort: 2282 | |
type: LoadBalancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment