Skip to content

Commit

Permalink
Merge pull request #573 from ropable/master
Browse files Browse the repository at this point in the history
Updates related to Surveys, register TissueSampleObservation in admin, Kustomize HPAs, present/absent -> yes/no, additional ODK import
  • Loading branch information
ropable authored May 3, 2024
2 parents 1228888 + 2803d3b commit 9aade5a
Show file tree
Hide file tree
Showing 60 changed files with 2,296 additions and 822 deletions.
1 change: 0 additions & 1 deletion kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ spec:
selector:
matchLabels:
app: turtles-deployment
replicas: 2
strategy:
type: RollingUpdate
template:
Expand Down
17 changes: 17 additions & 0 deletions kustomize/base/deployment_hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: turtles-deployment-hpa
spec:
minReplicas: 1
maxReplicas: 3
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
metrics:
- resource:
name: cpu
target:
type: Utilization
averageUtilization: 250
type: Resource
1 change: 1 addition & 0 deletions kustomize/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- deployment_hpa.yaml
- service.yaml
1 change: 1 addition & 0 deletions kustomize/overlays/prod/cronjobs/automated-qa/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ spec:
schedule: "30 4 * * *"
jobTemplate:
spec:
activeDeadlineSeconds: 300
template:
spec:
containers:
Expand Down
2 changes: 0 additions & 2 deletions kustomize/overlays/prod/cronjobs/download-odk/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ spec:
schedule: "0 4 * * *"
jobTemplate:
spec:
# Allow up to 15 minutes for completion.
activeDeadlineSeconds: 900
template:
spec:
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ spec:
schedule: "0 14 * * *"
jobTemplate:
spec:
activeDeadlineSeconds: 300
template:
spec:
containers:
Expand Down
7 changes: 7 additions & 0 deletions kustomize/overlays/prod/deployment_hpa_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: turtles-deployment-hpa
spec:
scaleTargetRef:
name: turtles-deployment-prod
17 changes: 15 additions & 2 deletions kustomize/overlays/prod/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ spec:
containers:
- name: turtles
env:
- name: MAPPROXY_URL
value: "https://mapproxy.dbca.wa.gov.au"
- name: SITE_CODE
value: "Turtles"
- name: SITE_NAME
Expand All @@ -31,6 +29,16 @@ spec:
secretKeyRef:
name: turtles-env-prod
key: SECRET_KEY
- name: MAPPROXY_URL
valueFrom:
secretKeyRef:
name: turtles-env-prod
key: MAPPROXY_URL
- name: MAPBOX_TOKEN
valueFrom:
secretKeyRef:
name: turtles-env-prod
key: MAPBOX_TOKEN
- name: AZURE_ACCOUNT_NAME
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -116,5 +124,10 @@ spec:
secretKeyRef:
name: turtles-env-prod
key: SENTRY_TRANSACTION_SAMPLE_RATE
- name: SENTRY_PROFILES_SAMPLE_RATE
valueFrom:
secretKeyRef:
name: turtles-env-prod
key: SENTRY_PROFILES_SAMPLE_RATE
- name: SENTRY_ENVIRONMENT
value: "prod"
3 changes: 2 additions & 1 deletion kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ labels:
includeSelectors: true
patches:
- path: deployment_patch.yaml
- path: deployment_hpa_patch.yaml
- path: service_patch.yaml
images:
- name: ghcr.io/dbca-wa/wastd
newTag: 2.0.1
newTag: 2.0.2
1 change: 1 addition & 0 deletions kustomize/overlays/uat/cronjobs/automated-qa/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ spec:
schedule: "30 4 * * *"
jobTemplate:
spec:
activeDeadlineSeconds: 300
template:
spec:
containers:
Expand Down
2 changes: 0 additions & 2 deletions kustomize/overlays/uat/cronjobs/download-odk/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ spec:
schedule: "0 4 * * *"
jobTemplate:
spec:
# Allow up to 15 minutes for completion.
activeDeadlineSeconds: 900
template:
spec:
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ spec:
schedule: "0 14 * * *"
jobTemplate:
spec:
activeDeadlineSeconds: 300
template:
spec:
containers:
Expand Down
7 changes: 7 additions & 0 deletions kustomize/overlays/uat/deployment_hpa_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: turtles-deployment-hpa
spec:
scaleTargetRef:
name: turtles-deployment-uat
17 changes: 15 additions & 2 deletions kustomize/overlays/uat/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ spec:
containers:
- name: turtles
env:
- name: MAPPROXY_URL
value: "https://mapproxy.dbca.wa.gov.au/service"
- name: SITE_CODE
value: "Turtles UAT"
- name: SITE_NAME
Expand All @@ -31,6 +29,16 @@ spec:
secretKeyRef:
name: turtles-env-uat
key: SECRET_KEY
- name: MAPPROXY_URL
valueFrom:
secretKeyRef:
name: turtles-env-uat
key: MAPPROXY_URL
- name: MAPBOX_TOKEN
valueFrom:
secretKeyRef:
name: turtles-env-uat
key: MAPBOX_TOKEN
- name: AZURE_ACCOUNT_NAME
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -116,5 +124,10 @@ spec:
secretKeyRef:
name: turtles-env-uat
key: SENTRY_TRANSACTION_SAMPLE_RATE
- name: SENTRY_PROFILES_SAMPLE_RATE
valueFrom:
secretKeyRef:
name: turtles-env-uat
key: SENTRY_PROFILES_SAMPLE_RATE
- name: SENTRY_ENVIRONMENT
value: "uat"
1 change: 1 addition & 0 deletions kustomize/overlays/uat/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ labels:
includeSelectors: true
patches:
- path: deployment_patch.yaml
- path: deployment_hpa_patch.yaml
- path: service_patch.yaml
1 change: 0 additions & 1 deletion kustomize/template/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ spec:
jobTemplate:
spec:
parallelism: 1
activeDeadlineSeconds: 300
template:
spec:
restartPolicy: Never
Expand Down
1 change: 1 addition & 0 deletions marine_mammal_incidents/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
class MarineMammalIncidentsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'marine_mammal_incidents'
verbose_name = 'Marine mammal incidents'
Loading

0 comments on commit 9aade5a

Please sign in to comment.