Skip to content

Commit

Permalink
Merge pull request #224 from ropable/master
Browse files Browse the repository at this point in the history
Update liveness/readiness endpoints, refactor Kustomize labels, bump package versions
  • Loading branch information
ropable authored Feb 20, 2024
2 parents 08b94b7 + 178a855 commit c7d0c60
Show file tree
Hide file tree
Showing 19 changed files with 249 additions and 273 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
Expand Down
16 changes: 13 additions & 3 deletions kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,23 @@ spec:
resources:
requests:
memory: "128Mi"
cpu: "25m"
cpu: "10m"
limits:
memory: "4096Mi"
cpu: "1000m"
startupProbe:
httpGet:
path: /livez
port: 8080
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 3
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /liveness
path: /livez
port: 8080
scheme: HTTP
periodSeconds: 10
Expand All @@ -38,7 +48,7 @@ spec:
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /readiness
path: /readyz
port: 8080
scheme: HTTP
periodSeconds: 10
Expand Down
11 changes: 3 additions & 8 deletions kustomize/overlays/prod/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: Deployment
metadata:
name: resourcetracking-deployment
labels:
app: resourcetracking-prod
app: resourcetracking-deployment
spec:
selector:
matchLabels:
app: resourcetracking-prod
app: resourcetracking-deployment
template:
metadata:
labels:
app: resourcetracking-prod
app: resourcetracking-deployment
spec:
containers:
- name: resourcetracking
Expand Down Expand Up @@ -67,11 +67,6 @@ spec:
secretKeyRef:
name: resourcetracking-env-prod
key: FLEETCARE_CONTAINER
- name: KMI_VEHICLE_BASE_URL
valueFrom:
secretKeyRef:
name: resourcetracking-env-prod
key: KMI_VEHICLE_BASE_URL
- name: TRACPLUS_URL
valueFrom:
secretKeyRef:
Expand Down
6 changes: 3 additions & 3 deletions kustomize/overlays/prod/geoserver_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: Deployment
metadata:
name: resourcetracking-geoserver
labels:
app: resourcetracking-geoserver-prod
app: resourcetracking-geoserver
spec:
selector:
matchLabels:
app: resourcetracking-geoserver-prod
app: resourcetracking-geoserver
template:
metadata:
labels:
app: resourcetracking-geoserver-prod
app: resourcetracking-geoserver
spec:
initContainers:
- name: chown-pvc
Expand Down
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/geoserver_service_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: resourcetracking-geoserver-clusterip
spec:
selector:
app: resourcetracking-geoserver-prod
app: resourcetracking-geoserver
variant: prod
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ patches:
- path: geoserver_service_patch.yaml
images:
- name: ghcr.io/dbca-wa/resource_tracking
newTag: 1.4.4
newTag: 1.4.5
4 changes: 2 additions & 2 deletions kustomize/overlays/prod/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
minAvailable: 1
selector:
matchLabels:
app: resourcetracking-prod
app: resourcetracking-deployment
variant: prod
---
apiVersion: policy/v1
Expand All @@ -17,5 +17,5 @@ spec:
minAvailable: 0
selector:
matchLabels:
app: resourcetracking-geoserver-prod
app: resourcetracking-geoserver
variant: prod
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/service_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
spec:
type: ClusterIP
selector:
app: resourcetracking-prod
app: resourcetracking-deployment
variant: prod
11 changes: 3 additions & 8 deletions kustomize/overlays/uat/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: Deployment
metadata:
name: resourcetracking-deployment
labels:
app: resourcetracking-uat
app: resourcetracking-deployment
spec:
selector:
matchLabels:
app: resourcetracking-uat
app: resourcetracking-deployment
template:
metadata:
labels:
app: resourcetracking-uat
app: resourcetracking-deployment
spec:
containers:
- name: resourcetracking
Expand Down Expand Up @@ -57,11 +57,6 @@ spec:
secretKeyRef:
name: resourcetracking-env-uat
key: DFES_PASS
- name: KMI_VEHICLE_BASE_URL
valueFrom:
secretKeyRef:
name: resourcetracking-env-uat
key: KMI_VEHICLE_BASE_URL
- name: TRACPLUS_URL
valueFrom:
secretKeyRef:
Expand Down
6 changes: 3 additions & 3 deletions kustomize/overlays/uat/geoserver_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: Deployment
metadata:
name: resourcetracking-geoserver
labels:
app: resourcetracking-geoserver-uat
app: resourcetracking-geoserver
spec:
selector:
matchLabels:
app: resourcetracking-geoserver-uat
app: resourcetracking-geoserver
template:
metadata:
labels:
app: resourcetracking-geoserver-uat
app: resourcetracking-geoserver
spec:
initContainers:
- name: chown-pvc
Expand Down
2 changes: 1 addition & 1 deletion kustomize/overlays/uat/geoserver_service_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: resourcetracking-geoserver-clusterip
spec:
selector:
app: resourcetracking-geoserver-uat
app: resourcetracking-geoserver
variant: uat
4 changes: 2 additions & 2 deletions kustomize/overlays/uat/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
minAvailable: 1
selector:
matchLabels:
app: resourcetracking-uat
app: resourcetracking-deployment
variant: uat
---
apiVersion: policy/v1
Expand All @@ -17,5 +17,5 @@ spec:
minAvailable: 0
selector:
matchLabels:
app: resourcetracking-geoserver-uat
app: resourcetracking-geoserver
variant: uat
2 changes: 1 addition & 1 deletion kustomize/overlays/uat/service_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
spec:
type: ClusterIP
selector:
app: resourcetracking-uat
app: resourcetracking-deployment
variant: uat
2 changes: 2 additions & 0 deletions kustomize/template/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: batch/v1
kind: CronJob
metadata:
name: resourcetracking-cronjob
labels:
app: resourcetracking-cronjob
spec:
schedule: ""
concurrencyPolicy: Forbid
Expand Down
Loading

0 comments on commit c7d0c60

Please sign in to comment.