Skip to content

Commit

Permalink
setup basic env & vault fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Nov 5, 2023
1 parent 43e7a08 commit f982719
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 23 additions & 1 deletion k8s/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,29 @@ spec:
image: osuakatsuki/new-cron:latest
imagePullPolicy: IfNotPresent
command:
- ./scripts/bootstrap.sh
- ./scripts/bootstrap.sh
env:
- name: KUBERNETES
value: 'true'
- name: PULL_SECRETS_FROM_VAULT
value: '1'
- name: VAULT_ADDR
valueFrom:
secretKeyRef:
name: vault
key: address
- name: VAULT_TOKEN
valueFrom:
secretKeyRef:
name: vault
key: token
- name: PYPI_INDEX_URL
valueFrom:
secretKeyRef:
name: pypi
key: address
- name: APP_ENV
value: production # TODO
restartPolicy: OnFailure
imagePullSecrets:
- name: osuakatsuki-registry-secret
2 changes: 1 addition & 1 deletion scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
if [[ $PULL_SECRETS_FROM_VAULT -eq 1 ]]; then
pip install -i $PYPI_INDEX_URL akatsuki-cli
# TODO: revert to $APP_ENV
akatsuki vault get bancho-service production-k8s -o .env
akatsuki vault get new-cron production-k8s -o .env
source .env
fi

Expand Down

0 comments on commit f982719

Please sign in to comment.