From b8a039ed2d271411b2ef785f16f218f1acef71a1 Mon Sep 17 00:00:00 2001 From: sova-ci Date: Thu, 28 May 2026 01:03:38 +0300 Subject: [PATCH] feat(test): gitea registry pull secret and imagePullSecrets --- apps/adminpanel/templates/all.yaml | 4 +++ apps/adminpanel/values-test.yaml | 4 +++ apps/adminpanel/values.yaml | 2 ++ apps/backend/templates/all.yaml | 4 +++ apps/backend/values-test.yaml | 4 +++ apps/backend/values.yaml | 2 ++ argocd/app-of-apps.yaml | 2 +- argocd/apps/test-contour.yaml | 8 ++--- platform/gitea-actions/values-test.yaml | 43 +++++++++++++++++++++++++ 9 files changed, 68 insertions(+), 5 deletions(-) create mode 100644 platform/gitea-actions/values-test.yaml diff --git a/apps/adminpanel/templates/all.yaml b/apps/adminpanel/templates/all.yaml index 97fc556..f850816 100644 --- a/apps/adminpanel/templates/all.yaml +++ b/apps/adminpanel/templates/all.yaml @@ -26,6 +26,10 @@ spec: labels: app: adminpanel spec: +{{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} containers: - name: adminpanel image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/apps/adminpanel/values-test.yaml b/apps/adminpanel/values-test.yaml index b474ab4..c1e4341 100644 --- a/apps/adminpanel/values-test.yaml +++ b/apps/adminpanel/values-test.yaml @@ -6,3 +6,7 @@ runtimeEnv: image: tag: local-test + pullPolicy: IfNotPresent + +imagePullSecrets: + - name: gitea-registry diff --git a/apps/adminpanel/values.yaml b/apps/adminpanel/values.yaml index 2fbe64f..1afde8f 100644 --- a/apps/adminpanel/values.yaml +++ b/apps/adminpanel/values.yaml @@ -5,6 +5,8 @@ image: tag: local-test pullPolicy: IfNotPresent +imagePullSecrets: [] + replicaCount: 1 ingress: diff --git a/apps/backend/templates/all.yaml b/apps/backend/templates/all.yaml index f140ba7..52849cd 100644 --- a/apps/backend/templates/all.yaml +++ b/apps/backend/templates/all.yaml @@ -80,6 +80,10 @@ spec: app: backend env: test spec: +{{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} +{{- end }} containers: - name: php-fpm image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/apps/backend/values-test.yaml b/apps/backend/values-test.yaml index fd20720..847f1af 100644 --- a/apps/backend/values-test.yaml +++ b/apps/backend/values-test.yaml @@ -3,6 +3,10 @@ ingress: image: tag: local-test + pullPolicy: IfNotPresent + +imagePullSecrets: + - name: gitea-registry env: API_PUBLIC_URL: http://api.test.sova.local diff --git a/apps/backend/values.yaml b/apps/backend/values.yaml index 25ed80d..a1f5cbd 100644 --- a/apps/backend/values.yaml +++ b/apps/backend/values.yaml @@ -5,6 +5,8 @@ image: tag: local-test pullPolicy: IfNotPresent +imagePullSecrets: [] + nginx: image: nginx:1.27-alpine diff --git a/argocd/app-of-apps.yaml b/argocd/app-of-apps.yaml index 8ca0186..42b0a85 100644 --- a/argocd/app-of-apps.yaml +++ b/argocd/app-of-apps.yaml @@ -6,7 +6,7 @@ metadata: spec: project: default source: - repoURL: http://git.sova.local/sova/sova-deploy.git + repoURL: ${GITEA_REPO_URL}/sova/sova-deploy.git targetRevision: main path: argocd/apps destination: diff --git a/argocd/apps/test-contour.yaml b/argocd/apps/test-contour.yaml index 20162a0..bdd34d6 100644 --- a/argocd/apps/test-contour.yaml +++ b/argocd/apps/test-contour.yaml @@ -6,7 +6,7 @@ metadata: spec: project: sova source: - repoURL: http://git.sova.local/sova/sova-deploy.git + repoURL: ${GITEA_REPO_URL}/sova/sova-deploy.git targetRevision: main path: data/test helm: @@ -30,7 +30,7 @@ metadata: spec: project: sova source: - repoURL: http://git.sova.local/sova/sova-mocks.git + repoURL: ${GITEA_REPO_URL}/sova/sova-mocks.git targetRevision: main path: charts/mocks destination: @@ -51,7 +51,7 @@ metadata: spec: project: sova source: - repoURL: http://git.sova.local/sova/sova-deploy.git + repoURL: ${GITEA_REPO_URL}/sova/sova-deploy.git targetRevision: main path: apps/backend helm: @@ -76,7 +76,7 @@ metadata: spec: project: sova source: - repoURL: http://git.sova.local/sova/sova-deploy.git + repoURL: ${GITEA_REPO_URL}/sova/sova-deploy.git targetRevision: main path: apps/adminpanel helm: diff --git a/platform/gitea-actions/values-test.yaml b/platform/gitea-actions/values-test.yaml new file mode 100644 index 0000000..e7a7a3f --- /dev/null +++ b/platform/gitea-actions/values-test.yaml @@ -0,0 +1,43 @@ +# Gitea Actions runner for test contour (gitea-charts/actions) +enabled: true + +giteaRootURL: http://gitea-http.gitea.svc.cluster.local:3000 + +existingSecret: gitea-runner-registration +existingSecretKey: runner-token + +statefulset: + replicas: 1 + persistence: + size: 2Gi + resources: + requests: + cpu: 100m + memory: 256Mi + limits: + cpu: "2" + memory: 2Gi + runner: + tag: "1.0.4" + config: | + log: + level: info + cache: + enabled: true + container: + require_docker: true + docker_timeout: 600s + valid_volumes: + - /var/run/docker.sock + extraEnvs: + - name: GITEA_RUNNER_NAME + value: sova-test-k8s + - name: GITEA_RUNNER_LABELS + value: "ubuntu-latest:docker://catthehacker/ubuntu:act-22.04,ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04" + dind: + tag: 27-dind + extraEnvs: + - name: DOCKER_IPTABLES_LEGACY + value: "1" + extraArgs: + - --insecure-registry=gitea-http.gitea.svc.cluster.local:3000