diff --git a/amane-tanikaze/deploy.amane-backend.yaml b/amane-tanikaze/deploy.amane-backend.yaml new file mode 100644 index 0000000..bc81985 --- /dev/null +++ b/amane-tanikaze/deploy.amane-backend.yaml @@ -0,0 +1,56 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: amane-backend + labels: + app: amane-backend +spec: + replicas: 1 + selector: + matchLabels: + app: amane-backend + template: + metadata: + labels: + app: amane-backend + spec: + containers: + - name: backend + image: gitea.konchin.com/service/amane-tanikaze-backend:latest + ports: + - name: http + containerPort: 80 + env: + - name: MONGODB_HOST + valueFrom: + secretKeyRef: + name: amane-backend + key: MONGODB_HOST + - name: MONGODB_USER + valueFrom: + secretKeyRef: + name: amane-backend + key: MONGODB_USER + - name: MONGODB_PASS + valueFrom: + secretKeyRef: + name: amane-backend + key: MONGODB_PASS + - name: SECRET + valueFrom: + secretKeyRef: + name: amane-backend + key: SECRET + - name: MINIO_ACCESSKEY + valueFrom: + secretKeyRef: + name: amane-backend + key: MINIO_ACCESSKEY + - name: MINIO_SECRETKEY + valueFrom: + secretKeyRef: + name: amane-backend + key: MINIO_SECRETKEY + imagePullSecrets: + - name: regcred diff --git a/amane-tanikaze/deploy.amane-dcbot.yaml b/amane-tanikaze/deploy.amane-dcbot.yaml new file mode 100644 index 0000000..126bae3 --- /dev/null +++ b/amane-tanikaze/deploy.amane-dcbot.yaml @@ -0,0 +1,63 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: amane-dcbot + labels: + app: amane-dcbot +spec: + replicas: 1 + selector: + matchLabels: + app: amane-dcbot + template: + metadata: + labels: + app: amane-dcbot + spec: + containers: + - name: dcbot + image: gitea.konchin.com/service/amane-tanikaze-dcbot:latest + env: + - name: DC_TOKEN + valueFrom: + secretKeyRef: + name: amane-dcbot + key: DC_TOKEN + - name: DC_CLIENTID + valueFrom: + secretKeyRef: + name: amane-dcbot + key: DC_CLIENTID + - name: ADMIN_ID + valueFrom: + secretKeyRef: + name: amane-dcbot + key: ADMIN_ID + - name: MONGODB_HOST + valueFrom: + secretKeyRef: + name: amane-dcbot + key: MONGODB_HOST + - name: MONGODB_USER + valueFrom: + secretKeyRef: + name: amane-dcbot + key: MONGODB_USER + - name: MONGODB_PASS + valueFrom: + secretKeyRef: + name: amane-dcbot + key: MONGODB_PASS + - name: MINIO_ACCESSKEY + valueFrom: + secretKeyRef: + name: amane-dcbot + key: MINIO_ACCESSKEY + - name: MINIO_SECRETKEY + valueFrom: + secretKeyRef: + name: amane-dcbot + key: MINIO_SECRETKEY + imagePullSecrets: + - name: regcred diff --git a/amane-tanikaze/deploy.amane-frontend.yaml b/amane-tanikaze/deploy.amane-frontend.yaml new file mode 100644 index 0000000..da35e19 --- /dev/null +++ b/amane-tanikaze/deploy.amane-frontend.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: amane-frontend + labels: + app: amane-frontend +spec: + replicas: 1 + selector: + matchLabels: + app: amane-frontend + template: + metadata: + labels: + app: amane-frontend + spec: + containers: + - name: frontend + image: gitea.konchin.com/service/amane-tanikaze-frontend:latest + ports: + - name: http + containerPort: 3000 + env: + - name: WDS_SOCKET_PORT + value: '0' + imagePullSecrets: + - name: regcred diff --git a/amane-tanikaze/ing.amane-tanikaze.yaml b/amane-tanikaze/ing.amane-tanikaze.yaml new file mode 100644 index 0000000..c957caa --- /dev/null +++ b/amane-tanikaze/ing.amane-tanikaze.yaml @@ -0,0 +1,39 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + namespace: amane-tanikaze + name: amane-ingress +spec: + rules: + - host: "amane.konchin.com" + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: amane-frontend + port: + number: 80 + - path: /api + pathType: Prefix + backend: + service: + name: amane-backend + port: + number: 80 + - path: /auth + pathType: Prefix + backend: + service: + name: amane-backend + port: + number: 80 + - path: /img + pathType: Prefix + backend: + service: + name: amane-backend + port: + number: 80 diff --git a/amane-tanikaze/kustomization.yaml b/amane-tanikaze/kustomization.yaml new file mode 100644 index 0000000..19c7e8a --- /dev/null +++ b/amane-tanikaze/kustomization.yaml @@ -0,0 +1,16 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: amane-tanikaze +generatorOptions: + disableNameSuffixHash: true + +resources: + - ns.amane-tanikaze.yaml + - deploy.amane-dcbot.yaml + - deploy.amane-frontend.yaml + - svc.amane-frontend.yaml + - deploy.amane-backend.yaml + - svc.amane-backend.yaml + - ing.amane-tanikaze.yaml diff --git a/amane-tanikaze/ns.amane-tanikaze.yaml b/amane-tanikaze/ns.amane-tanikaze.yaml new file mode 100644 index 0000000..c267cc2 --- /dev/null +++ b/amane-tanikaze/ns.amane-tanikaze.yaml @@ -0,0 +1,5 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: amane-tanikaze diff --git a/amane-tanikaze/svc.amane-backend.yaml b/amane-tanikaze/svc.amane-backend.yaml new file mode 100644 index 0000000..31d7100 --- /dev/null +++ b/amane-tanikaze/svc.amane-backend.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: amane-backend + labels: + app: amane-backend +spec: + type: ClusterIP + selector: + app: amane-backend + ports: + - name: http + port: 80 + targetPort: 80 diff --git a/amane-tanikaze/svc.amane-frontend.yaml b/amane-tanikaze/svc.amane-frontend.yaml new file mode 100644 index 0000000..d2afac4 --- /dev/null +++ b/amane-tanikaze/svc.amane-frontend.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: amane-frontend + labels: + app: amane-frontend +spec: + type: ClusterIP + selector: + app: amane-frontend + ports: + - name: http + port: 80 + targetPort: 3000 diff --git a/archrepo/kustomization.yaml b/archrepo/kustomization.yaml index 2e7dcc4..949797c 100644 --- a/archrepo/kustomization.yaml +++ b/archrepo/kustomization.yaml @@ -1,9 +1,11 @@ --- apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + namespace: archrepo generatorOptions: disableNameSuffixHash: true + resources: - ns.archrepo.yaml - deploy.archrepo.yaml diff --git a/flux-applications/amane-tanikaze.yaml b/flux-applications/amane-tanikaze.yaml new file mode 100644 index 0000000..f5b3560 --- /dev/null +++ b/flux-applications/amane-tanikaze.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: amane-tanikaze + namespace: flux-system +spec: + interval: 10m0s + path: ./amane-tanikaze/ + prune: true + force: false + sourceRef: + kind: GitRepository + name: applications