From be5312668c308290b3eb3dc2537d05fc4b4f6025 Mon Sep 17 00:00:00 2001 From: ytshih Date: Thu, 10 Jul 2025 15:38:29 +0800 Subject: [PATCH] Refactor(archrepo): migrate to nestjs --- archrepo/configmap.env | 4 ++++ archrepo/deploy.archrepo.yaml | 24 ++++++++++++++++++++++-- archrepo/kustomization.yaml | 5 +++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 archrepo/configmap.env diff --git a/archrepo/configmap.env b/archrepo/configmap.env new file mode 100644 index 0000000..58d5875 --- /dev/null +++ b/archrepo/configmap.env @@ -0,0 +1,4 @@ +REPO_NAME=custom +ARCH_NAME=x86_64 +MINIO_ENDPOINT=http://minio.konchin.com +MINIO_BUCKET=archrepo diff --git a/archrepo/deploy.archrepo.yaml b/archrepo/deploy.archrepo.yaml index 23cee67..4843182 100644 --- a/archrepo/deploy.archrepo.yaml +++ b/archrepo/deploy.archrepo.yaml @@ -22,15 +22,35 @@ spec: - name: http containerPort: 80 env: + - name: REPO_NAME + valueFrom: + configMapKeyRef: + name: archrepo-config + key: REPO_NAME + - name: ARCH_NAME + valueFrom: + configMapKeyRef: + name: archrepo-config + key: ARCH_NAME + - name: MINIO_ENDPOINT + valueFrom: + configMapKeyRef: + name: archrepo-config + key: MINIO_ENDPOINT + - name: MINIO_BUCKET + valueFrom: + configMapKeyRef: + name: archrepo-config + key: MINIO_BUCKET - name: MINIO_ACCESSKEY valueFrom: secretKeyRef: - name: archrepo + name: archrepo-secret key: MINIO_ACCESSKEY - name: MINIO_SECRETKEY valueFrom: secretKeyRef: - name: archrepo + name: archrepo-secret key: MINIO_SECRETKEY imagePullSecrets: - name: regcred diff --git a/archrepo/kustomization.yaml b/archrepo/kustomization.yaml index 949797c..9ff41cf 100644 --- a/archrepo/kustomization.yaml +++ b/archrepo/kustomization.yaml @@ -11,3 +11,8 @@ resources: - deploy.archrepo.yaml - svc.archrepo.yaml - ing.archrepo.yaml + +configMapGenerator: + - name: archrepo-config + envs: + - configmap.env