Skip to content

Commit

Permalink
feat: convert to deployment from sts
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Jun 7, 2024
1 parent 459fc6c commit a5e89a9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ jobs:
- name: Helm Upgrade
run: |
helm upgrade --install ${COMPONENT} helm/package/${COMPONENT}-0.0.0.tgz \
--values helm/source-telegram/values-demo-0.yaml \
--values helm/source-telegram/values-awakari-com.yaml \
--set podAnnotations.commit=$(git rev-parse --short HEAD),db.password.secret.enabled=false,db.protocol=mongodb+srv,db.tls.enabled=true,db.tls.insecure=true,db.hostname=${{ secrets.DB_HOST_DEMO }},db.username=${{ secrets.DB_USERNAME_DEMO }},db.password.raw=${{ secrets.DB_PASSWORD_DEMO }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Before deploying:
```shell
kubectl create secret generic source-telegram-tokens \
kubectl create secret generic source-telegram-tokens-<NUM> \
--from-literal=id=<TG_APP_ID> \
--from-literal=hash=<TG_APP_HASH> \
--from-literal=phone=<TG_PHONE_NUM>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: Deployment
kind: StatefulSet
metadata:
name: {{ include "source-telegram.fullname" . }}
labels:
Expand Down Expand Up @@ -30,23 +30,27 @@ spec:
containers:
- name: {{ .Chart.Name }}
env:
- name: API_PORT
value: "{{ .Values.service.portGrpc }}"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: API_TELEGRAM_ID
valueFrom:
secretKeyRef:
name: "{{ include "source-telegram.fullname" . }}-tokens"
name: "{{ include "source-telegram.fullname" . }}-tokens-{{`{{ index (split "-" (env "POD_NAME")) 1 }}`}}"
key: id
- name: API_TELEGRAM_HASH
valueFrom:
secretKeyRef:
name: "{{ include "source-telegram.fullname" . }}-tokens"
name: "{{ include "source-telegram.fullname" . }}-tokens-{{.Values.sim.label}}"
key: hash
- name: API_TELEGRAM_PHONE
valueFrom:
secretKeyRef:
name: "{{ include "source-telegram.fullname" . }}-tokens"
name: "{{ include "source-telegram.fullname" . }}-tokens-{{.Values.sim.label}}"
key: phone
- name: API_PORT
value: "{{ .Values.service.portGrpc }}"
- name: API_WRITER_URI
value: "{{ .Values.api.writer.uri }}"
- name: DB_URI
Expand Down
File renamed without changes.

0 comments on commit a5e89a9

Please sign in to comment.