Skip to content

Instantly share code, notes, and snippets.

@sandromello
Last active September 18, 2023 19:13
Show Gist options
  • Save sandromello/6308bc697eab7617733442f961db92d5 to your computer and use it in GitHub Desktop.
Save sandromello/6308bc697eab7617733442f961db92d5 to your computer and use it in GitHub Desktop.
Hoop Gateway Helm Template
# Source: hoop-chart/templates/secret-configs.yaml
apiVersion: v1
kind: Secret
metadata:
name: hoop-config
type: Opaque
stringData:
XTDB_ADDRESS: "http://127.0.0.1:3001"
POSTGRES_DB_URI: "postgresql://[PG_USER]:[PG_PASSWORD]@[PG_HOST]:[PG_PORT]/[PG_DB]"
API_URL: "[HOOP_GATEWAY_DNS_NAME]"
GIN_MODE: "release"
LOG_ENCODING: "json"
LOG_LEVEL: "info"
LOG_GRPC: "0"
GODEBUG: "http2debug=0"
IDP_CLIENT_ID: "[HOOP_CLIENT_ID]"
IDP_CLIENT_SECRET: "[HOOP_CLIENT_SECRET]"
IDP_ISSUER: "[HOOP_IDP_ISSUER]"
IDP_AUDIENCE: ""
IDP_CUSTOM_SCOPES: "[HOOP_CUSTOM_SCOPES]"
TLS_KEY: ""
TLS_CERT: ""
TLS_CA: ""
GOOGLE_APPLICATION_CREDENTIALS_JSON: ''
PYROSCOPE_AUTH_TOKEN: ""
PYROSCOPE_INGEST_URL: ""
SEGMENT_KEY: ""
AGENT_SENTRY_DSN: ""
SENTRY_DSN: ""
ADMIN_USERNAME: "admin"
PLUGIN_AUDIT_PATH: "/opt/hoop/sessions"
PLUGIN_INDEX_PATH: "/opt/hoop/sessions/indexes"
MAGIC_BELL_API_KEY: ""
MAGIC_BELL_API_SECRET: ""
PLUGIN_REGISTRY_URL: ""
SMTP_HOST: ""
SMTP_PORT: ""
SMTP_USER: ""
SMTP_PASS: ""
---
# Source: hoop-chart/templates/secret-configs.yaml
apiVersion: v1
kind: Secret
metadata:
name: xtdb-config
type: Opaque
stringData:
PG_HOST: "[PG_HOST]"
PG_PORT: "[PG_PORT]"
PG_USER: "[PG_USER]"
PG_PASSWORD: "[PG_PASSWORD]"
PG_DB: "[PG_DB]"
LISTEN_ADDR: "127.0.0.1"
ROCKS_DB_CACHE_SIZE: "536870912"
ROCKS_DB_DIR: "/opt/hoop/sessions/rocksdb"
---
# Source: hoop-chart/templates/secret-configs.yaml
apiVersion: v1
kind: Secret
metadata:
name: defaultagent-config
type: Opaque
stringData:
AUTO_REGISTER: "1"
LOG_ENCODING: "json"
LOG_LEVEL: "info"
LOG_GRPC: "0"
GODEBUG: "http2debug=0"
---
# Source: hoop-chart/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: hoopgateway
spec:
selector:
app: hoopgateway
ports:
- port: 8010
name: grpc
protocol: TCP
targetPort: 8010
- port: 8009
name: http
protocol: TCP
targetPort: 8009
---
# Source: hoop-chart/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: hoopdb
spec:
externalName: "[PG_HOST]"
sessionAffinity: None
type: ExternalName
---
# Source: hoop-chart/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: hoopgateway
spec:
selector:
matchLabels:
app: hoopgateway
strategy:
type: Recreate
template:
metadata:
annotations:
checksum/config: ff43338c1fb5593ede63f21f9400faf5cd8750b9df4461dbcf04e38968dc415b
labels:
app: hoopgateway
spec:
containers:
- image: "hoophq/hoop:latest"
name: hoopgateway
imagePullPolicy: Always
args:
- hoop
- start
- gateway
envFrom:
- secretRef:
name: hoop-config
resources:
null
ports:
- containerPort: 8010
name: grpc
- containerPort: 8009
name: api
- image: "hoophq/xtdb:latest"
name: xtdb
imagePullPolicy: Always
envFrom:
- secretRef:
name: xtdb-config
resources:
limits:
cpu: 1024m
memory: 1Gi
requests:
cpu: 1024m
memory: 1Gi
ports:
- containerPort: 3001
name: api
lifecycle:
preStop:
exec:
command: ["/bin/sh","-c","until stat /tmp/xtdb-shutdown.placeholder 2>/dev/null; do sleep 1; done"]
- image: "hoophq/hoopdev:latest"
name: defaultagent
imagePullPolicy: Always
envFrom:
- secretRef:
name: defaultagent-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment