Skip to content

Commit

Permalink
fix: use var dir
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce McMath <bryce.j.mcmath@gmail.com>
  • Loading branch information
bryce-mcmath committed Jul 20, 2024
1 parent b2e9cfd commit abc85cd
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/dist
/node_modules
/build
/credo
/var

# Logs
logs
Expand Down
7 changes: 7 additions & 0 deletions devops/charts/server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
volumes:
- name: cache-volume
emptyDir:
sizeLimit: {{ .Values.cacheVolumeSize }}
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
containers:
Expand All @@ -49,6 +53,9 @@ spec:
initialDelaySeconds: 20
timeoutSeconds: 5
periodSeconds: 10
volumeMounts:
- name: cache-volume
mountPath: /var/credo
env:
- name: PORT
value: {{.Values.env.PORT | quote}}
Expand Down
2 changes: 2 additions & 0 deletions devops/charts/server/values_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ autoscaling:
podAnnotations: {}
podLabels: {}

cacheVolumeSize: "1Gi"

image:
pullPolicy: Always
registry: artifacts.developer.gov.bc.ca/github-docker-remote
Expand Down
2 changes: 2 additions & 0 deletions devops/charts/server/values_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ autoscaling:
podAnnotations: {}
podLabels: {}

cacheVolumeSize: "1Gi"

image:
pullPolicy: IfNotPresent
registry: artifacts.developer.gov.bc.ca/github-docker-remote
Expand Down
2 changes: 2 additions & 0 deletions devops/charts/server/values_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ autoscaling:
podAnnotations: {}
podLabels: {}

cacheVolumeSize: "1Gi"

image:
pullPolicy: IfNotPresent
registry: artifacts.developer.gov.bc.ca/github-docker-remote
Expand Down
6 changes: 3 additions & 3 deletions src/helpers/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import { WebSocket } from 'ws'
class CustomFileSystem extends NodeFileSystem {
public constructor() {
super({
baseDataPath: `/credo/data`,
baseCachePath: `/credo/cache`,
baseTempPath: `/credo/tmp`,
baseDataPath: `/var/credo/data`,
baseCachePath: `/var/credo/cache`,
baseTempPath: `/var/credo/tmp`,
})
}
}
Expand Down

0 comments on commit abc85cd

Please sign in to comment.