Skip to content

Commit

Permalink
fix(k8s): add preprod volume
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Bouquillon committed Jul 26, 2021
1 parent 05ce08b commit 1125a93
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 3 deletions.
61 changes: 59 additions & 2 deletions .k8s/__tests__/__snapshots__/preprod.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ spec:
- name: DATABASE_SSL
value: 'true'
volumes:
- name: uploads
emptyDir: {}
- persistentVolumeClaim:
claimName: uploads
name: uploads
initContainers:
- env:
- name: WAIT_FOR_RETRIES
Expand Down Expand Up @@ -268,6 +269,62 @@ spec:
namespace: tumeplay
type: Opaque
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: uploads
annotations:
app.github.com/job: '5678'
app.github.com/ref: refs/tags/v1.2.3
app.github.com/repo: socialgouv/tumeplay
app.github.com/run: '1234'
app.github.com/sha: '0123456'
labels:
application: tumeplay
owner: tumeplay
team: tumeplay
cert: wildcard
namespace: tumeplay-preprod
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
selector:
matchLabels:
usage: tumeplay-uploads
storageClassName: ''
---
apiVersion: v1
kind: PersistentVolume
metadata:
labels:
usage: tumeplay-uploads
application: tumeplay
owner: tumeplay
team: tumeplay
cert: wildcard
name: tumeplay-uploads
annotations:
app.github.com/job: '5678'
app.github.com/ref: refs/tags/v1.2.3
app.github.com/repo: socialgouv/tumeplay
app.github.com/run: '1234'
app.github.com/sha: '0123456'
namespace: tumeplay-preprod
spec:
accessModes:
- ReadWriteMany
azureFile:
secretName: azure-tumeplay-volume
secretNamespace: tumeplay-preprod
shareName: uploads
capacity:
storage: 5Gi
persistentVolumeReclaimPolicy: Delete
storageClassName: ''
---
apiVersion: bitnami.com/v1alpha1
kind: SealedSecret
metadata:
Expand Down
2 changes: 1 addition & 1 deletion .k8s/components/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const resources = new ResourceRequirements({

export default async () => {
const volumeName = "uploads";
const ephemeralVolume = env.env !== "prod"; // dont use fixed storage except in prod. theres no dev storage srv atm
const ephemeralVolume = env.env !== "prod" && env.env !== "preprod"; // dont use fixed storage except in prod. theres no dev storage srv atm

const tag = getGithubRef(process.env);

Expand Down

0 comments on commit 1125a93

Please sign in to comment.