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

chore: update schema-compatibility job to send quit signal to istio-p… #54

Merged
merged 1 commit into from
Oct 8, 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
10 changes: 9 additions & 1 deletion helm/templates/schema-compatibility/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,17 @@ spec:
- command: [ "/bin/sh", "-c" ]
args:
- |
finish() {
code=$?
curl -s -XPOST http://127.0.0.1:15020/quitquitquit || true
exit $code
}
trap finish EXIT

echo "Running python script: compatibility changer"
source /opt/venv/bin/activate
cd /opt/schema-compatibility
/opt/venv/bin/python cron-job.py
python cron-job.py
image: "{{ .Values.schemaCompatibility.image.repository }}:{{ default $.Chart.AppVersion .Values.schemaCompatibility.image.tagOverride }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ .Values.schemaCompatibility.name }}
Expand Down
4 changes: 2 additions & 2 deletions schema-compatibility/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.12.4-slim

# update packages
RUN apt update && apt upgrade -y
RUN apt update && apt upgrade -y && apt install -y curl && rm -rf /var/lib/apt/lists/*

# setup virtual environment
RUN python -m venv /opt/venv
Expand All @@ -16,4 +16,4 @@ RUN /opt/venv/bin/pip install -r /opt/schema-compatibility/requirements.txt

# run the application
WORKDIR "/opt/schema-compatibility"
CMD ["/opt/venv/bin/python"]
CMD ["/opt/venv/bin/python"]
Loading