Skip to content

Commit

Permalink
fix: more secrets in k8
Browse files Browse the repository at this point in the history
  • Loading branch information
cdirks4 committed Feb 11, 2025
1 parent 60a1284 commit cd9af41
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
20 changes: 18 additions & 2 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,25 @@ spec:
- name: NODE_ENV
value: 'production'
- name: NEXT_PUBLIC_API_URL
value: 'http://172.234.2.105:8000'
value: 'http://openbooklm-backend.openbooklm.svc.cluster.local:8000/python/api'
- name: NEXT_PUBLIC_BASE_URL
value: 'http://143.42.127.58'
# Google API credentials
- name: NEXT_PUBLIC_GOOGLE_CLIENT_ID
valueFrom:
secretKeyRef:
name: google-credentials
key: NEXT_PUBLIC_GOOGLE_CLIENT_ID
- name: GOOGLE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: google-credentials
key: GOOGLE_CLIENT_SECRET
- name: NEXT_PUBLIC_GOOGLE_API_KEY
valueFrom:
secretKeyRef:
name: google-credentials
key: NEXT_PUBLIC_GOOGLE_API_KEY
resources:
requests:
cpu: '500m'
Expand All @@ -56,7 +72,7 @@ spec:
apt-get update
apt-get install -y git openssl libssl-dev ca-certificates
npm install -g pnpm
git clone -b main https://github.com/open-biz/openbooklm.git
git clone -b feat/connor/tmp-host https://github.com/open-biz/openbooklm.git
cd openbooklm
pnpm install
npx prisma generate
Expand Down
7 changes: 7 additions & 0 deletions scripts/setup-k8s-secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ set +a
# Create namespace if it doesn't exist
kubectl create namespace openbooklm --dry-run=client -o yaml | kubectl apply -f -

# Create secret for Google credentials
kubectl create secret generic google-credentials \
--from-literal=NEXT_PUBLIC_GOOGLE_CLIENT_ID="$NEXT_PUBLIC_GOOGLE_CLIENT_ID" \
--from-literal=GOOGLE_CLIENT_SECRET="$GOOGLE_CLIENT_SECRET" \
--namespace openbooklm \
--dry-run=client -o yaml | kubectl apply -f -

# Create secret for Clerk credentials
kubectl create secret generic clerk-credentials \
--from-literal=NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY="$NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY" \
Expand Down

0 comments on commit cd9af41

Please sign in to comment.