fix(prometheus): add init containers to download plugins
Some checks failed
Generate README / generate-parameters (push) Failing after 15s
Helm / helm-lint (push) Successful in 15s
Helm / helm-unittest (push) Successful in 7s
Markdown linter / markdown-lint (push) Successful in 8s
Release / publish-chart (push) Successful in 8s
Markdown linter / markdown-link-checker (push) Successful in 43s

The following patch extends the helm chart of additional init containers for
each plugin.
This commit is contained in:
2025-09-20 16:19:49 +02:00
parent de8ef2b201
commit 413fe95b86
14 changed files with 315 additions and 68 deletions

View File

@@ -0,0 +1,42 @@
chart:
appVersion: 0.1.0
version: 0.1.0
suite: Test reposilite plugins
release:
name: reposilite-unittest
namespace: testing
templates:
- templates/deployment.yaml
- templates/secretPrometheusBasicAuth.yaml
tests:
- it: Test init containers for prometheus
set:
config.plugins.prometheus.enabled: true
config.plugins.prometheus.url: "https://reposilite.com/plugins/prometheus.jar"
deployment.pluginContainer.image.tag: 0.1.0
asserts:
- contains:
path: spec.template.spec.initContainers
content:
args:
- --location
- --fail
- --max-time
- "60"
- --output-dir
- /app/data/plugins
- --output
- prometheus.jar
- https://reposilite.com/plugins/prometheus.jar
name: download-prometheus-plugin
image: docker.io/curlimages/curl:0.1.0
volumeMounts:
- mountPath: /app/data/plugins
name: plugins
template: templates/deployment.yaml
- contains:
path: spec.template.spec.volumes
content:
name: plugins
emptyDir: {}
template: templates/deployment.yaml

View File

@@ -390,6 +390,19 @@ tests:
- name: my-special-secret
template: templates/deployment.yaml
- it: Test initContainers
set:
deployment.initContainers:
- name: busybox
image: docker.io/library/busybox:latest
asserts:
- contains:
path: spec.template.spec.initContainers
content:
name: busybox
image: docker.io/library/busybox:latest
template: templates/deployment.yaml
- it: Test nodeSelector
set:
deployment.nodeSelector: