From fd0f8de4f96d81df38643e9081c007b19bc9f716 Mon Sep 17 00:00:00 2001 From: Pablo Vigo <pvigo@collabora.com> Date: Wed, 13 Mar 2024 10:17:07 +0100 Subject: [PATCH 1/2] Change traefik API group We need to deploy an instance of `aptly` in the `core` cluster, but there is an incompatibility on the CRDs API Group of Traefik. Currently, the Traefik Kubernetes CRDs API Group used in the Core cluster is older than what the latest `aptly helm chart` requires, so a modification of the `aptly Helm Chart` to make it compatible with the current CRD API version is required. The ultimate solution is to upgrade Traefik. However, since this upgrade involves a longer execution time, it has been decided to temporarily modify the Helm Chart to enable faster deployment while planning the upgrade. --- chart/templates/middleware.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chart/templates/middleware.yaml b/chart/templates/middleware.yaml index 74387ed2..ccebb7f3 100644 --- a/chart/templates/middleware.yaml +++ b/chart/templates/middleware.yaml @@ -1,4 +1,4 @@ -apiVersion: traefik.io/v1alpha1 +apiVersion: traefik.containo.us/v1alpha1 kind: Middleware metadata: name: {{ include "aptly.name" . }}-auth -- GitLab From a8c2451c3a7490874af201dbccc7edc48fd955b7 Mon Sep 17 00:00:00 2001 From: Pablo Vigo Mas <pvigo@collabora.com> Date: Thu, 28 Mar 2024 15:08:10 +0000 Subject: [PATCH 2/2] chart: Add extra arguments in aptly-api container Sometimes it is necessary to run the service with additional arguments, for example to use opportunistic locking on the database to allow for for maintenance tasks via the CLI. Currently, the Helm Chart is not configured to allow the addition of new arguments. With this modification, it is now possible to add arguments to the aptly-api container from the values file using the `extraArgs` value. Signed-off-by: Pablo Vigo <pvigo@collabora.com> --- chart/templates/statefulset.yaml | 3 +++ chart/values.yaml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/chart/templates/statefulset.yaml b/chart/templates/statefulset.yaml index b258434e..edd84b89 100644 --- a/chart/templates/statefulset.yaml +++ b/chart/templates/statefulset.yaml @@ -41,6 +41,9 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} args: - -config=/aptly/config/aptly.conf + {{- if .Values.extraArgs }} + {{- toYaml .Values.extraArgs | nindent 12 }} + {{- end }} ports: - name: api containerPort: 8080 diff --git a/chart/values.yaml b/chart/values.yaml index de4dc94e..66dfae24 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -38,6 +38,10 @@ fullnameOverride: "" config: rootDir: /aptly/data +# Add extra argument to the aptly-api container +extraArgs: [] +# - -no-lock + persistence: accessModes: [ReadWriteOnce] annotations: {} -- GitLab