Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow PRS location layer name to be defined, update Kustomize resources #387

Merged
merged 6 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ spec:
value: "Australia/Perth"
resources:
requests:
memory: "128Mi"
cpu: "10m"
memory: "100Mi"
cpu: "5m"
limits:
memory: "4096Mi"
memory: "2Gi"
cpu: "1000m"
startupProbe:
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions kustomize/base/deployment_hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ kind: HorizontalPodAutoscaler
metadata:
name: prs-deployment-hpa
spec:
minReplicas: 1
maxReplicas: 3
minReplicas: 2
maxReplicas: 10
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ resources:
nameSuffix: -harvest-email-referrals
patches:
- path: patch.yaml
# Patch the CronJob container name
- target:
kind: CronJob
name: prs-cronjob
options:
allowNameChange: true
patch: |-
- op: replace
path: /spec/jobTemplate/spec/template/spec/containers/0/name
value: prs-cronjob-harvest-email-referrals
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ resources:
nameSuffix: -overdue-task-email
patches:
- path: patch.yaml
# Patch the CronJob container name
- target:
kind: CronJob
name: prs-cronjob
options:
allowNameChange: true
patch: |-
- op: replace
path: /spec/jobTemplate/spec/template/spec/containers/0/name
value: prs-cronjob-overdue-task-email
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ patches:
- path: geoserver_service_patch.yaml
images:
- name: ghcr.io/dbca-wa/prs
newTag: 2.5.52
newTag: 2.5.53
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ resources:
nameSuffix: -harvest-email-referrals
patches:
- path: patch.yaml
# Patch the CronJob container name
- target:
kind: CronJob
name: prs-cronjob
options:
allowNameChange: true
patch: |-
- op: replace
path: /spec/jobTemplate/spec/template/spec/containers/0/name
value: prs-cronjob-harvest-email-referrals
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@ resources:
nameSuffix: -overdue-task-email
patches:
- path: patch.yaml
# Patch the CronJob container name
- target:
kind: CronJob
name: prs-cronjob
options:
allowNameChange: true
patch: |-
- op: replace
path: /spec/jobTemplate/spec/template/spec/containers/0/name
value: prs-cronjob-overdue-task-email
95 changes: 45 additions & 50 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions prs2/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ def template_context(request):
'site_acronym': settings.APPLICATION_ACRONYM,
'version_no': settings.APPLICATION_VERSION_NO,
'prs_geoserver_url': settings.PRS_GEOSERVER_URL,
'prs_layer_name': settings.PRS_LAYER_NAME,
'mapproxy_url': settings.MAPPROXY_URL,
'geocoder_url': settings.GEOCODER_URL,
'geoserver_url': settings.GEOSERVER_URL,
Expand Down
5 changes: 2 additions & 3 deletions prs2/referral/static/js/referral_map.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use strict";
// NOTE: some global variables are set in the base template.

// NOTE: some global constants are set in the base template.
// Define baselayer tile layers.
const landgateOrthomosaic = L.tileLayer.wms(mapproxy_url, {
layers: 'virtual-mosaic',
Expand Down Expand Up @@ -31,7 +30,7 @@ const cadastre = L.tileLayer.wms(mapproxy_url, {
minZoom: 13,
});
const prsLocations = L.tileLayer.wms(prs_geoserver_url, {
layers: 'prs:prs_locations_view',
layers: prs_layer_name,
format: 'image/png',
transparent: true,
opacity: 0.75,
Expand Down
1 change: 1 addition & 0 deletions prs2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

# PRS may deploy its own instance of Geoserver.
PRS_GEOSERVER_URL = env('PRS_GEOSERVER_URL', '')
PRS_LAYER_NAME = env('PRS_LAYER_NAME', '')
MAPPROXY_URL = env('MAPPROXY_URL', '')
GEOCODER_URL = env('GEOCODER_URL', '')
GEOSERVER_URL = env('GEOSERVER_URL', '')
Expand Down
1 change: 1 addition & 0 deletions prs2/templates/base_prs.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
<script>
// Set global variables, used by multiple views..
const prs_geoserver_url = '{{ prs_geoserver_url }}';
const prs_layer_name = '{{ prs_layer_name }}';
const mapproxy_url = '{{ mapproxy_url }}';
const geoserver_url = '{{ geoserver_url }}';
const geocoder_url = '{% url "geocode_query" %}';
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "prs"
version = "2.5.52"
version = "2.5.53"
description = "Planning Referral System corporate application"
authors = ["Ashley Felton <[email protected]>"]
license = "Apache-2.0"
Expand Down Expand Up @@ -35,11 +35,11 @@ django-celery-results = "2.5.1"
pygeopkg = "0.1.3"
whitenoise = {version = "6.7.0", extras = ["brotli"]}
django-crum = "0.7.9"
django-storages = {version = "1.14.3", extras = ["azure"]}
sentry-sdk = {version = "2.8.0", extras = ["django"]}
sentry-sdk = {version = "2.10.0", extras = ["django"]}
crispy-bootstrap5 = "2024.2"
redis = "5.0.7"
xlsxwriter = "3.2.0"
django-storages = {version = "1.14.4", extras = ["azure"]}

[tool.poetry.group.dev.dependencies]
ipython = "^8.26.0"
Expand Down