-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cache manager image and helm chart
- Loading branch information
Showing
6 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM ghcr.io/gardener/cc-utils/alpine:3 | ||
|
||
RUN --mount=type=bind,source=VERSION,target=/VERSION \ | ||
--mount=type=bind,source=requirements.utils.txt,target=/requirements.utils.txt \ | ||
--mount=type=bind,source=requirements.service.txt,target=/requirements.service.txt \ | ||
--mount=type=bind,source=/dist,target=/dist \ | ||
apk add --no-cache \ | ||
bash \ | ||
gcc \ | ||
git \ | ||
libc-dev \ | ||
libffi-dev \ | ||
postgresql16-client \ | ||
python3 \ | ||
python3-dev \ | ||
py3-pip \ | ||
py3-numpy \ | ||
py3-scipy \ | ||
&& mkdir -p $HOME/.config/pip \ | ||
&& echo -e "[global]\nbreak-system-packages = true" >> $HOME/.config/pip/pip.conf \ | ||
&& pip3 install --upgrade --no-cache-dir --find-links ./dist ocm-gear-service \ | ||
&& apk del --no-cache \ | ||
libc-dev \ | ||
libffi-dev \ | ||
python3-dev | ||
|
||
ENTRYPOINT ["python3", "-m", "cache_manager"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
apiVersion: v2 | ||
name: cache-manager | ||
version: 0.1.0 |
42 changes: 42 additions & 0 deletions
42
charts/extensions/charts/cache-manager/templates/cache-manager.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{{- range $config := .Values.configurations }} | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ $name := print "cache-manager-" $config.envVars.CFG_NAME }}{{ $name }} | ||
spec: | ||
schedule: {{ default "0 * * * *" $config.schedule | quote }} # schedule contains asterisks, quote to avoid yaml parser errors | ||
concurrencyPolicy: Forbid | ||
successfulJobsHistoryLimit: {{ default 1 $config.successfulJobsHistoryLimit }} | ||
failedJobsHistoryLimit: {{ default 1 $config.failedJobsHistoryLimit }} | ||
jobTemplate: | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app: cache-manager | ||
spec: | ||
containers: | ||
- name: cache-manager | ||
image: {{ include "image" $.Values.image }} | ||
imagePullPolicy: IfNotPresent | ||
command: | ||
- python3 | ||
- -m | ||
- cache_manager | ||
env: | ||
{{- range $key, $value := $config.envVars }} | ||
- name: {{ $key }} | ||
value: {{ $value }} | ||
{{- end }} | ||
volumeMounts: | ||
- name: cfg-factory | ||
mountPath: "/cfg_factory" | ||
readOnly: true | ||
volumes: | ||
- name: cfg-factory | ||
secret: | ||
secretName: cfg-factory-secret | ||
optional: true | ||
restartPolicy: Never | ||
--- | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters