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

Configure flux pre-deployment for webhook-handler #894

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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/custom_docker_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- docker-image: ./images/cache-indexer
image-tags: ghcr.io/spack/cache-indexer:0.0.3
- docker-image: ./analytics
image-tags: ghcr.io/spack/django:0.3.1
image-tags: ghcr.io/spack/django:0.3.2
- docker-image: ./images/ci-prune-buildcache
image-tags: ghcr.io/spack/ci-prune-buildcache:0.0.3
- docker-image: ./images/protected-publish
Expand Down
2 changes: 0 additions & 2 deletions analytics/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,4 @@ RUN pip install -r requirements.txt

COPY . .

RUN chmod +x ./entrypoint.sh
ENTRYPOINT [ "./entrypoint.sh" ]
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--access-logfile", "-", "analytics.wsgi"]
8 changes: 0 additions & 8 deletions analytics/entrypoint.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
serviceAccountName: webhook-handler
containers:
- name: webhook-handler
image: ghcr.io/spack/django:0.3.1
image: ghcr.io/spack/django:0.3.2
imagePullPolicy: Always
resources:
requests:
Expand Down Expand Up @@ -146,8 +146,18 @@ spec:
serviceAccountName: webhook-handler
containers:
- name: webhook-handler-worker
image: ghcr.io/spack/django:0.3.1
command: ["celery", "-A", "analytics.celery", "worker", "-l", "info", "-Q", "celery"]
image: ghcr.io/spack/django:0.3.2
command:
[
"celery",
"-A",
"analytics.celery",
"worker",
"-l",
"info",
"-Q",
"celery",
]
imagePullPolicy: Always
resources:
requests:
Expand Down
15 changes: 15 additions & 0 deletions k8s/production/custom/webhook-handler/flux/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: webhook-handler-deploy
spec:
dependsOn:
- name: webhook-handler-pre-deploy
sourceRef:
kind: GitRepository
name: flux-system
path: "./deploy/"
interval: 5m
timeout: 5m
prune: true
wait: true
14 changes: 14 additions & 0 deletions k8s/production/custom/webhook-handler/flux/pre-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: webhook-handler-pre-deploy
spec:
sourceRef:
kind: GitRepository
name: flux-system
path: "./pre-deploy/"
interval: 5m
timeout: 5m
prune: true
wait: true
force: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: batch/v1
kind: Job
metadata:
name: webhook-handler-db-migration
spec:
template:
spec:
restartPolicy: Never
containers:
- name: migration
image: ghcr.io/spack/django:0.3.2
command:
- python
- manage.py
- migrate