-
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
97 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 |
46 changes: 46 additions & 0 deletions
46
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,46 @@ | ||
{{- range $cfgName := .Values.scanConfigurations }} | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ $name := print "cache-manager-" $cfgName }}{{ $name }} | ||
spec: | ||
schedule: {{ default "0 * * * *" $.Values.schedule | quote }} # schedule contains asterisks, quote to avoid yaml parser errors | ||
concurrencyPolicy: Forbid | ||
successfulJobsHistoryLimit: {{ default 1 $.Values.successfulJobsHistoryLimit }} | ||
failedJobsHistoryLimit: {{ default 1 $.Values.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: | ||
- name: CFG_NAME | ||
value: {{ $cfgName }} | ||
{{- if default dict $.Values.envVars }} | ||
{{- range $key, $value := $.Values.envVars }} | ||
- name: {{ $key }} | ||
value: {{ $value }} | ||
{{- end }} | ||
{{- 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