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

Update Kustomize resource definitions, project dependencies #81

Merged
merged 6 commits into from
Jul 18, 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
2 changes: 1 addition & 1 deletion .github/workflows/image-build-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
# Build and push Docker image (not on PR)
#----------------------------------------------
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# syntax=docker/dockerfile:1
# Prepare the base environment.
FROM python:3.10.13-slim as builder_base_csw
MAINTAINER [email protected]
LABEL org.opencontainers.image.source https://github.com/dbca-wa/csw
FROM python:3.10.13-slim AS builder_base_csw
LABEL org.opencontainers.image.authors=[email protected]
LABEL org.opencontainers.image.source=https://github.com/dbca-wa/csw

RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y libmagic-dev gcc binutils gdal-bin proj-bin python3-dev libpq-dev gzip curl \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --upgrade pip
&& pip install --root-user-action=ignore --upgrade pip

# Install Python libs using Poetry.
FROM builder_base_csw as python_libs_csw
FROM builder_base_csw AS python_libs_csw
WORKDIR /app
ARG POETRY_VERSION=1.7.1
RUN pip install poetry=="${POETRY_VERSION}"
ARG POETRY_VERSION=1.8.3
RUN pip install --root-user-action=ignore poetry=="${POETRY_VERSION}"
COPY poetry.lock pyproject.toml ./
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi --only main
Expand Down
4 changes: 2 additions & 2 deletions kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ spec:
value: "Australia/Perth"
resources:
requests:
memory: "128Mi"
cpu: "10m"
memory: "100Mi"
cpu: "5m"
limits:
memory: "2048Mi"
cpu: "1000m"
Expand Down
6 changes: 3 additions & 3 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: csw-deployment-hpa
spec:
minReplicas: 1
maxReplicas: 3
minReplicas: 2
maxReplicas: 10
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
Expand All @@ -13,5 +13,5 @@ spec:
name: cpu
target:
type: Utilization
averageUtilization: 250
averageUtilization: 500
type: Resource
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ patches:
- path: service_patch.yaml
images:
- name: ghcr.io/dbca-wa/csw
newTag: 1.3.10
newTag: 1.3.11
901 changes: 496 additions & 405 deletions poetry.lock

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
[tool.poetry]
name = "csw"
version = "1.3.10"
version = "1.3.11"
description = "Catalogue service for spatial records over HTTP in the Department of Biodiversity, Conservation and Attractions."
authors = ["ASU <[email protected]>"]
license = "Apache-2.0"
package-mode = false

[tool.poetry.dependencies]
python = "^3.10"
django = "3.2.25"
psycopg2 = "2.9.9"
psycopg = {version = "3.2.1", extras = ["binary", "pool"]}
django-extensions = "3.2.3"
python-dotenv = "1.0.1"
dbca-utils = "2.0.2"
dj-database-url = "2.1.0"
dj-database-url = "2.2.0"
gunicorn = "22.0.0"
django-reversion = "5.0.12"
whitenoise = {version = "6.6.0", extras = ["brotli"]}
lxml = "5.2.1"
whitenoise = {version = "6.7.0", extras = ["brotli"]}
lxml = "5.2.2"
pycsw = "2.6.1"
pyproj = "3.6.1"
sqlalchemy = "2.0.29"
sqlalchemy = "2.0.31"
djangorestframework = "3.15.1"
django-filter = "23.5"
mixer = "7.2.2"
requests = "2.31.0"
requests = "2.32.3"
# Note that click is required, but isn't declared as a dependency by pycsw.
click = "8.1.7"
django-storages = {version = "1.14.2", extras = ["azure"]}
django-storages = {version = "1.14.4", extras = ["azure"]}

[tool.poetry.group.dev.dependencies]
ipython = "^8.23.0"
ipython = "^8.26.0"
ipdb = "^0.13.13"

[build-system]
Expand Down