Skip to content

Commit

Permalink
Update Kustomize resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
ropable committed Dec 12, 2024
1 parent c605245 commit bd5b538
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 129 deletions.
114 changes: 61 additions & 53 deletions kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,74 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: fleetcare-data-harvest
labels:
app: fleetcare-data-harvest
spec:
selector:
matchLabels:
app: fleetcare-data-harvest
strategy:
type: RollingUpdate
replicas: 2
template:
metadata:
labels:
app: fleetcare-data-harvest
spec:
containers:
- name: fleetcare-data-harvest
image: ghcr.io/dbca-wa/fleetcare-data-harvest
env:
- name: TZ
value: "Australia/Perth"
resources:
requests:
memory: "64Mi"
cpu: "5m"
limits:
memory: "2048Mi"
cpu: "1000m"
startupProbe:
httpGet:
path: /livez
port: 8080
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 15
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /livez
port: 8080
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 15
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 10
readinessProbe:
httpGet:
path: /readyz
port: 8080
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 15
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 10
securityContext:
runAsNonRoot: true
privileged: false
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /tmp
name: tmpfs-ram
- name: fleetcare-data-harvest
image: ghcr.io/dbca-wa/fleetcare-data-harvest
env:
- name: TZ
value: "Australia/Perth"
resources:
requests:
memory: "64Mi"
cpu: "5m"
limits:
memory: "2048Mi"
cpu: "1000m"
startupProbe:
httpGet:
path: /livez
port: 8080
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 15
timeoutSeconds: 10
successThreshold: 1
failureThreshold: 3
livenessProbe:
httpGet:
path: /livez
port: 8080
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 15
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 10
readinessProbe:
httpGet:
path: /readyz
port: 8080
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 15
successThreshold: 1
failureThreshold: 3
timeoutSeconds: 10
securityContext:
runAsNonRoot: true
privileged: false
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /tmp
name: tmpfs-ram
volumes:
- name: tmpfs-ram
emptyDir:
Expand Down
8 changes: 4 additions & 4 deletions kustomize/base/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
type: ClusterIP
ports:
- name: wsgi
port: 8080
protocol: TCP
targetPort: 8080
- name: wsgi
port: 8080
protocol: TCP
targetPort: 8080
44 changes: 18 additions & 26 deletions kustomize/overlays/prod/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,25 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: fleetcare-data-harvest
labels:
app: fleetcare-data-harvest-prod
spec:
selector:
matchLabels:
app: fleetcare-data-harvest-prod
template:
metadata:
labels:
app: fleetcare-data-harvest-prod
spec:
containers:
- name: fleetcare-data-harvest
imagePullPolicy: Always
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-prod
key: DATABASE_URL
- name: AZURE_STORAGE_CONNECTION_STRING
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-prod
key: AZURE_STORAGE_CONNECTION_STRING
- name: AZURE_CONTAINER
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-prod
key: AZURE_CONTAINER
- name: fleetcare-data-harvest
imagePullPolicy: Always
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-prod
key: DATABASE_URL
- name: AZURE_STORAGE_CONNECTION_STRING
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-prod
key: AZURE_STORAGE_CONNECTION_STRING
- name: AZURE_CONTAINER
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-prod
key: AZURE_CONTAINER
20 changes: 10 additions & 10 deletions kustomize/overlays/prod/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
spec:
ingressClassName: nginx
rules:
- host: fleetcare-data-harvest.dbca.wa.gov.au
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: fleetcare-data-harvest-clusterip-prod
port:
number: 8080
- host: fleetcare-data-harvest.dbca.wa.gov.au
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: fleetcare-data-harvest-clusterip-prod
port:
number: 8080
44 changes: 18 additions & 26 deletions kustomize/overlays/uat/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,25 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: fleetcare-data-harvest
labels:
app: fleetcare-data-harvest-uat
spec:
selector:
matchLabels:
app: fleetcare-data-harvest-uat
template:
metadata:
labels:
app: fleetcare-data-harvest-uat
spec:
containers:
- name: fleetcare-data-harvest
imagePullPolicy: Always
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-uat
key: DATABASE_URL
- name: AZURE_STORAGE_CONNECTION_STRING
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-uat
key: AZURE_STORAGE_CONNECTION_STRING
- name: AZURE_CONTAINER
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-uat
key: AZURE_CONTAINER
- name: fleetcare-data-harvest
imagePullPolicy: Always
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-uat
key: DATABASE_URL
- name: AZURE_STORAGE_CONNECTION_STRING
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-uat
key: AZURE_STORAGE_CONNECTION_STRING
- name: AZURE_CONTAINER
valueFrom:
secretKeyRef:
name: fleetcare-data-harvest-env-uat
key: AZURE_CONTAINER
20 changes: 10 additions & 10 deletions kustomize/overlays/uat/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
spec:
ingressClassName: nginx
rules:
- host: fleetcare-data-harvest-uat.dbca.wa.gov.au
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: fleetcare-data-harvest-clusterip-uat
port:
number: 8080
- host: fleetcare-data-harvest-uat.dbca.wa.gov.au
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: fleetcare-data-harvest-clusterip-uat
port:
number: 8080

0 comments on commit bd5b538

Please sign in to comment.