Skip to content

Commit

Permalink
feat: Update backend deployment and add sealed secrets for access tok…
Browse files Browse the repository at this point in the history
…en and refresh token
  • Loading branch information
Mehmet Sayin authored and Mehmet Sayin committed Apr 6, 2024
1 parent 9234a39 commit 13ef16f
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 2 deletions.
16 changes: 14 additions & 2 deletions infra/k8s/backend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,25 @@ spec:
image: sayinmehmet47/backend-kitapkurdu-1:latest
env:
- name: MONGO_URI
## value: ${{ secrets.MONGO_URI_VALUE }}
valueFrom:
secretKeyRef:
name: mongo-uri
key: MONGO_URI
- name: JWT_SECRET
value: 'fsafdafdasfdk'
valueFrom:
secretKeyRef:
name: jwt-secret
key: JWT_SECRET
- name: REFRESH_TOKEN_SECRET_KEY
valueFrom:
secretKeyRef:
name: refresh-token-secret
key: REFRESH_TOKEN_SECRET_KEY
- name: ACCESS_TOKEN_SECRET_KEY
valueFrom:
secretKeyRef:
name: access-token-secret
key: ACCESS_TOKEN_SECRET_KEY
- name: PORT
value: '5000'
ports:
Expand Down
35 changes: 35 additions & 0 deletions infra/secrets/sealed-access-token.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
annotations:
sealedsecrets.bitnami.com/cluster-wide: 'true'
name: access-token-secret
namespace: kitapkurdu
spec:
encryptedData:
ACCESS_TOKEN_SECRET_KEY: AgCQm+/aeqaxV9fgL5QDm6z5EV5OeHXjaDietsoyyGhRl8b8D9UsZJN/EIK7dNlcnFRY6noJfANC8ljoDROIdsB/cwqYPVo3XTOa6kNzo7Kc+R8hxoU/uiq9khwvlqWtKiAQqIVMXmNVNAzK+csvr7ZboliZTPjtwjLAT1eQpg+wuVmiCVD/z2LOqfpAbn7o/JD9+1p0lFR58DWi7ogFmacyYyvZd7LwXIeMCEar8MFk1PuOB/c+TI0urT1g8jYvXzetBdk4ugFhdm9LjsfZTzkIqGl86UYEiHqxue86grL2jyj+Um5LDiTBzb0x5wCDzdkFzS3ZP+YQFtub8Ma+q+yH8P6h34xJH98ZEfuro3+BgnYwwDcON1G5u/eRjQ02SMx83mIKuhoc0Gk3Hv6JFHp5XtbNthy37uqcaI+nOHtqIcK41xCTouA1xxE1f+VIosrtifd1Nax0uGXzhkydSqX2A07BOcaWovGfs8WXsGN3mbWqwqUWeaR7L77ZzTFew+GOEGJ4quZsjM9aoQc25gYHB+9qObsX2q0F67c6r14ScSn9YAmheLS0CLIcIY7yIa347Ip8PcA+pdI3nd2D3I1ossfZVIsHu32TJ9uPDGYSUP63WYzRCxIxahKsb7wb0HMrJcpdyCRhEI+YmAx5KEcplCyGekgiwqWngyKc+guQ0AhKk5w0HWxmQ+/aBjkBF1trrMGVnocY
template:
metadata:
annotations:
sealedsecrets.bitnami.com/cluster-wide: 'true'
creationTimestamp: null
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data: {}
f:type: {}
manager: kubectl-create
operation: Update
time: '2024-04-06T10:45:26Z'
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data:
f:ACCESS_TOKEN_SECRET_KEY: {}
manager: agent
operation: Update
time: '2024-04-06T10:50:29Z'
name: access-token-secret
namespace: kitapkurdu
35 changes: 35 additions & 0 deletions infra/secrets/sealed-refresh-token-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
annotations:
sealedsecrets.bitnami.com/cluster-wide: 'true'
name: refresh-token-secret
namespace: kitapkurdu
spec:
encryptedData:
REFRESH_TOKEN_SECRET_KEY: AgC2CtKoaS6b+lzuWYa0HpT7IWDYdStOIcmByD239uz7b3rTEKE8h4ELqwt+M0npQV+Cfhzg2I4QVNEetvr4S9H4OJaoTDZQBDFFmvt8qn09p45dk1stk8CovTgd0PdX7NHi0ns1L/5t1xVODBzn1jjf7gk8uo3s1XKruvCIRLruOR38L/c+puDcGDu1rtYAtRwU8y300vo1NB6Q4vtZDjvjfQTDQguoXL9pNRr4NQ7MpgyrPzHdwdUFsN2Sb5bOC0gGAHWBvK0ZbqcsJLQUJ3+K45ahO9awE25mCAZPLlwmHRYASrI4K9xtuz2P5ixC9P4a303QssmKchBEJJehFzsmOTkd0fw4AAmBam8sNrYB9DhBN2rFPKPUVW59Z2S2A+DCNe19TLXsiB2EBO8McKlQ5ZyWr6j+qnkei9eK6YZ6RwA+XEHvgKz/Ugk434DavFaity+Cbjx++pUxMvrF8VR8iAZJc9+Nt78bjM50EucPHHMEXLDdEPyKa1cFVHeaEe9IEJ8BrzFSJdthVi/V9+bFJ660d7HwdRFSrmmc53F1Ug+vZnDtZ34RBvCSlkyiwvir88tV5tI6V51p4ZeOtOcTY3MwObvo5398HgDWgWWH0HxUT8ogku+GDmzA1nZ/vnPLE5b/AzlPawBO2924HTrNSM9lCjDhY9i0DBtH5bpiaa4yQYdkYnJG8afQfzuDvHs8PJxpfix/
template:
metadata:
annotations:
sealedsecrets.bitnami.com/cluster-wide: 'true'
creationTimestamp: null
managedFields:
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data: {}
f:type: {}
manager: kubectl-create
operation: Update
time: '2024-04-06T10:45:43Z'
- apiVersion: v1
fieldsType: FieldsV1
fieldsV1:
f:data:
f:REFRESH_TOKEN_SECRET_KEY: {}
manager: agent
operation: Update
time: '2024-04-06T10:50:48Z'
name: refresh-token-secret
namespace: kitapkurdu

0 comments on commit 13ef16f

Please sign in to comment.