Skip to content

Commit

Permalink
Added cache data PVC to UAT overlays.
Browse files Browse the repository at this point in the history
  • Loading branch information
ropable committed Jan 11, 2024
1 parent 21dcff3 commit acf1deb
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ config.yaml
mapproxy.yaml
.python-version
__pycache__/
cache_data/
24 changes: 17 additions & 7 deletions kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: mapproxy-deployment
spec:
replicas: 2
replicas: 1
strategy:
type: RollingUpdate
template:
Expand All @@ -17,18 +17,28 @@ spec:
value: "Australia/Perth"
resources:
requests:
memory: "64Mi"
memory: "128Mi"
cpu: "10m"
limits:
memory: "4096Mi"
memory: "2Gi"
cpu: "1000m"
livenessProbe:
startupProbe:
httpGet:
path: /demo/
port: 8080
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 3
periodSeconds: 5
failureThreshold: 3
successThreshold: 1
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /demo/
port: 8080
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 15
failureThreshold: 3
successThreshold: 1
timeoutSeconds: 3
Expand All @@ -37,8 +47,8 @@ spec:
path: /demo/
port: 8080
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 3
initialDelaySeconds: 0
periodSeconds: 15
failureThreshold: 3
successThreshold: 1
timeoutSeconds: 3
Expand Down
2 changes: 2 additions & 0 deletions kustomize/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
30 changes: 23 additions & 7 deletions kustomize/overlays/uat/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,30 @@ spec:
labels:
app: mapproxy-uat
spec:
initContainers:
- name: chown-pvc
image: busybox
command:
- /bin/chown
- -R
- "10001:10001"
- /cache_data
volumeMounts:
- mountPath: /cache_data
name: mapproxy-cache
containers:
- name: mapproxy
volumeMounts:
- mountPath: /app/config
name: mapproxy-configmap
- mountPath: /app/config
name: mapproxy-configmap
- mountPath: /cache_data
name: mapproxy-cache
volumes:
- configMap:
name: mapproxy-configmap-uat
defaultMode: 292
optional: false
name: mapproxy-configmap
- name: mapproxy-configmap
configMap:
name: mapproxy-configmap-uat
defaultMode: 292
optional: false
- name: mapproxy-cache
persistentVolumeClaim:
claimName: mapproxy-cache-uat
1 change: 1 addition & 0 deletions kustomize/overlays/uat/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- ../../base
- ingress.yaml
- pdb.yaml
- pvc.yaml
labels:
- includeSelectors: true
pairs:
Expand Down
12 changes: 12 additions & 0 deletions kustomize/overlays/uat/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mapproxy-cache
spec:
storageClassName: managed-csi-retain
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi

0 comments on commit acf1deb

Please sign in to comment.