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

Add Kustomize prod overlays, update GH workflows, remove LoggedPointResource #200

Merged
merged 28 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a3b6114
Add deviceid prefix to loggedpoint outputs.
ropable Nov 29, 2023
66a9826
Bump sentry-sdk version, update settings.
ropable Dec 1, 2023
4c0d0d9
Added Sentry env vars to deployment_patch.yaml
ropable Dec 1, 2023
b05cbae
Update settings to derive app version.
ropable Dec 1, 2023
7d8627e
Bugfix: devices.csv days parameter cast to int.
ropable Dec 1, 2023
510083a
Added dependabot.yml
ropable Dec 5, 2023
44915e8
Update dj-database-url.
ropable Dec 5, 2023
65db0a7
Bump docker/login-action from 2 to 3
dependabot[bot] Dec 5, 2023
9ee4ab9
Bump docker/setup-qemu-action from 2 to 3
dependabot[bot] Dec 5, 2023
b60bffe
Bump docker/setup-buildx-action from 2 to 3
dependabot[bot] Dec 5, 2023
c239574
Bump docker/build-push-action from 4 to 5
dependabot[bot] Dec 5, 2023
3b76853
Bump actions/checkout from 3 to 4
dependabot[bot] Dec 5, 2023
4344b46
Bump dependency versions.
ropable Dec 5, 2023
b6a6e09
Removed LoggedPointResource class from tracking API.
ropable Dec 5, 2023
dc7d248
Remove basic auth allowance for SpatialDataView.
ropable Dec 5, 2023
c0c0251
Merge pull request #1 from ropable/dependabot/github_actions/docker/l…
ropable Dec 5, 2023
1039057
Merge pull request #2 from ropable/dependabot/github_actions/docker/s…
ropable Dec 5, 2023
5377a7e
Merge pull request #3 from ropable/dependabot/github_actions/docker/s…
ropable Dec 5, 2023
cc76c36
Merge pull request #4 from ropable/dependabot/github_actions/docker/b…
ropable Dec 5, 2023
aa6b956
Merge pull request #5 from ropable/dependabot/github_actions/actions/…
ropable Dec 5, 2023
9d9b28a
Bump docker/metadata-action from 4 to 5
dependabot[bot] Dec 11, 2023
b875f7f
Bump actions/setup-python from 4 to 5
dependabot[bot] Dec 11, 2023
355cda5
Added Kustomize overlay for DPlus email harvest.
ropable Dec 12, 2023
8e9fa79
Increment image version in prod overlay.
ropable Dec 12, 2023
fd64ed7
Merge pull request #11 from ropable/dependabot/github_actions/docker/…
ropable Dec 12, 2023
798f9ce
Merge pull request #12 from ropable/dependabot/github_actions/actions…
ropable Dec 12, 2023
93eec65
Bump whitenoise minor version.
ropable Dec 12, 2023
b81bf8d
Merge branch 'master' of github.com:ropable/resource_tracking
ropable Dec 12, 2023
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
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "weekly"
12 changes: 6 additions & 6 deletions .github/workflows/image-build-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@ jobs:
security-events: write
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
id: checkout-repo
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=true
- name: Build and push Docker image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
# Checkout repo and set up Python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.10'
Expand Down
1 change: 1 addition & 0 deletions kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ spec:
emptyDir:
medium: "Memory"
restartPolicy: Always
terminationGracePeriodSeconds: 180
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../template
nameSuffix: -harvest-dplus
patches:
- path: patch.yaml
35 changes: 35 additions & 0 deletions kustomize/overlays/prod/cronjobs/harvest-email-dplus/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: resourcetracking-cronjob
spec:
schedule: "* * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: resourcetracking-cronjob
imagePullPolicy: IfNotPresent
args: ["manage.py", "harvest_tracking_email", "--device-type", "dplus", "--purge-email"]
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: resourcetracking-env-prod
key: DATABASE_URL
- name: EMAIL_HOST
valueFrom:
secretKeyRef:
name: resourcetracking-env-prod
key: EMAIL_HOST
- name: EMAIL_USER
valueFrom:
secretKeyRef:
name: resourcetracking-env-prod
key: EMAIL_USER
- name: EMAIL_PASSWORD
valueFrom:
secretKeyRef:
name: resourcetracking-env-prod
key: EMAIL_PASSWORD
12 changes: 12 additions & 0 deletions kustomize/overlays/prod/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,15 @@ spec:
secretKeyRef:
name: resourcetracking-env-prod
key: TRACPLUS_URL
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
name: resourcetracking-env-prod
key: SENTRY_DSN
- name: SENTRY_TRANSACTION_SAMPLE_RATE
valueFrom:
secretKeyRef:
name: resourcetracking-env-prod
key: SENTRY_TRANSACTION_SAMPLE_RATE
- name: SENTRY_ENVIRONMENT
value: "prod"
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ labels:
variant: prod
images:
- name: ghcr.io/dbca-wa/resource_tracking
newTag: 1.4.1
newTag: 1.4.3
patches:
- path: deployment_patch.yaml
- path: service_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../template
nameSuffix: -harvest-email-dplus
patches:
- path: patch.yaml
34 changes: 34 additions & 0 deletions kustomize/overlays/uat/cronjobs/harvest-email-dplus/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: resourcetracking-cronjob
spec:
schedule: "* * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: resourcetracking-cronjob
args: ["manage.py", "harvest_tracking_email", "--device-type", "dplus"]
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: resourcetracking-env-uat
key: DATABASE_URL
- name: EMAIL_HOST
valueFrom:
secretKeyRef:
name: resourcetracking-env-uat
key: EMAIL_HOST
- name: EMAIL_USER
valueFrom:
secretKeyRef:
name: resourcetracking-env-uat
key: EMAIL_USER
- name: EMAIL_PASSWORD
valueFrom:
secretKeyRef:
name: resourcetracking-env-uat
key: EMAIL_PASSWORD
12 changes: 12 additions & 0 deletions kustomize/overlays/uat/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,15 @@ spec:
secretKeyRef:
name: resourcetracking-env-uat
key: TRACPLUS_URL
- name: SENTRY_DSN
valueFrom:
secretKeyRef:
name: resourcetracking-env-uat
key: SENTRY_DSN
- name: SENTRY_TRANSACTION_SAMPLE_RATE
valueFrom:
secretKeyRef:
name: resourcetracking-env-uat
key: SENTRY_TRANSACTION_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 @@ -9,6 +9,7 @@ secretGenerator:
resources:
- ../../base
- cronjobs/harvest-dfes
- cronjobs/harvest-email-dplus
- cronjobs/harvest-email-iriditrak
- cronjobs/harvest-email-mp70
- cronjobs/harvest-tracplus
Expand Down
Loading