From 1c6c639c916e762bf7c38600d82aa604dee7470c Mon Sep 17 00:00:00 2001 From: ytshih Date: Wed, 6 Nov 2024 09:29:27 +0000 Subject: [PATCH] Add: archrepo --- archrepo/deploy.archrepo.yaml | 36 +++++++++++++++++++++++++++++++++ archrepo/ing.archrepo.yaml | 17 ++++++++++++++++ archrepo/kustomization.yaml | 13 ++++++++++++ archrepo/ns.archrepo.yaml | 5 +++++ archrepo/svc.archrepo.yaml | 15 ++++++++++++++ flux-applications/archrepo.yaml | 14 +++++++++++++ 6 files changed, 100 insertions(+) create mode 100644 archrepo/deploy.archrepo.yaml create mode 100644 archrepo/ing.archrepo.yaml create mode 100644 archrepo/kustomization.yaml create mode 100644 archrepo/ns.archrepo.yaml create mode 100644 archrepo/svc.archrepo.yaml create mode 100644 flux-applications/archrepo.yaml diff --git a/archrepo/deploy.archrepo.yaml b/archrepo/deploy.archrepo.yaml new file mode 100644 index 0000000..df0871f --- /dev/null +++ b/archrepo/deploy.archrepo.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: archrepo + labels: + app: archrepo +spec: + replicas: 1 + selector: + matchLabels: + app: archrepo + template: + metadata: + labels: + app: archrepo + spec: + containers: + - name: repo + image: gitea.konchin.com/service/archrepo:latest + ports: + - name: http + containerPort: 80 + env: + - name: MINIO_ACCESSKEY + valueFrom: + secretKeyRef: + name: archrepo + key: MINIO_ACCESSKEY + - name: MINIO_SECRETKEY + valueFrom: + secretKeyRef: + name: archrepo + key: MINIO_SECRETKEY + imagePullSecrets: + - name: regcred diff --git a/archrepo/ing.archrepo.yaml b/archrepo/ing.archrepo.yaml new file mode 100644 index 0000000..c0b22c7 --- /dev/null +++ b/archrepo/ing.archrepo.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: archrepo +spec: + rules: + - host: "repo.konchin.com" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: archrepo + port: + number: 80 diff --git a/archrepo/kustomization.yaml b/archrepo/kustomization.yaml new file mode 100644 index 0000000..949797c --- /dev/null +++ b/archrepo/kustomization.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: archrepo +generatorOptions: + disableNameSuffixHash: true + +resources: + - ns.archrepo.yaml + - deploy.archrepo.yaml + - svc.archrepo.yaml + - ing.archrepo.yaml diff --git a/archrepo/ns.archrepo.yaml b/archrepo/ns.archrepo.yaml new file mode 100644 index 0000000..c1c44cb --- /dev/null +++ b/archrepo/ns.archrepo.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: archrepo diff --git a/archrepo/svc.archrepo.yaml b/archrepo/svc.archrepo.yaml new file mode 100644 index 0000000..44b3f33 --- /dev/null +++ b/archrepo/svc.archrepo.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: archrepo + labels: + app: archrepo +spec: + type: ClusterIP + selector: + app: archrepo + ports: + - name: http + port: 80 + targetPort: 80 diff --git a/flux-applications/archrepo.yaml b/flux-applications/archrepo.yaml new file mode 100644 index 0000000..64830ef --- /dev/null +++ b/flux-applications/archrepo.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: archrepo + namespace: flux-system +spec: + interval: 10m0s + path: ./archrepo/ + prune: true + force: false + sourceRef: + kind: GitRepository + name: applications