Compare commits

...

6 Commits

Author SHA1 Message Date
e6085cda82 add fm fe 2026-07-29 00:16:17 +07:00
eb9eb9a375 change steven nginx name to another app name 2026-07-28 23:36:58 +07:00
b972752d7f add steven nginx 2026-07-25 13:45:53 +07:00
fdf9fc7e9c add port in scuderia dev 2026-07-19 22:51:35 +07:00
cb16731fa0 little fix fe to be scuderia argocd app name 2026-07-19 22:40:19 +07:00
50179f234a add scuderia fe+be (path-based routing) 2026-07-19 22:20:57 +07:00
11 changed files with 180 additions and 12 deletions

View File

@@ -13,7 +13,7 @@
apiVersion: argoproj.io/v1alpha1 apiVersion: argoproj.io/v1alpha1
kind: Application kind: Application
metadata: metadata:
name: scuderia name: fm-fe
namespace: argocd namespace: argocd
spec: spec:
project: default project: default
@@ -26,7 +26,7 @@ spec:
path: charts/app path: charts/app
helm: helm:
valueFiles: valueFiles:
- $values/scuderia/dev/values.yaml - $values/fm-fe/dev/values.yaml
destination: destination:
server: https://kubernetes.default.svc server: https://kubernetes.default.svc
namespace: dev namespace: dev

38
apps/scuderia-be.yaml Normal file
View File

@@ -0,0 +1,38 @@
# gitops-demo child Application — now Helm-based, using the shared chart.
#
# MULTI-SOURCE explained: ArgoCD lets an Application pull from more than one
# source. We use two, BOTH pointing at this same manifest repo:
# 1. ref: values — exposes the repo as "$values" so we can reference a file
# from it (the per-service values.yaml).
# 2. path: charts/app — the generic chart, rendered with that values file.
# This keeps the chart shared and each service's values in its own clean file,
# instead of duplicating manifests or inlining values here.
#
# NOTE: replace REPLACE_WITH_MANIFEST_REPO_URL in BOTH sources with the real
# repo URL (same as before — ArgoCD reads these straight from git).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: scuderia-be
namespace: argocd
spec:
project: default
sources:
- repoURL: https://gitea.lgkentang.com/darren.maverick/k3s-manifests.git
targetRevision: HEAD
ref: values
- repoURL: https://gitea.lgkentang.com/darren.maverick/k3s-manifests.git
targetRevision: HEAD
path: charts/app
helm:
valueFiles:
- $values/scuderia-be/dev/values.yaml
destination:
server: https://kubernetes.default.svc
namespace: dev
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

38
apps/scuderia-fe.yaml Normal file
View File

@@ -0,0 +1,38 @@
# gitops-demo child Application — now Helm-based, using the shared chart.
#
# MULTI-SOURCE explained: ArgoCD lets an Application pull from more than one
# source. We use two, BOTH pointing at this same manifest repo:
# 1. ref: values — exposes the repo as "$values" so we can reference a file
# from it (the per-service values.yaml).
# 2. path: charts/app — the generic chart, rendered with that values file.
# This keeps the chart shared and each service's values in its own clean file,
# instead of duplicating manifests or inlining values here.
#
# NOTE: replace REPLACE_WITH_MANIFEST_REPO_URL in BOTH sources with the real
# repo URL (same as before — ArgoCD reads these straight from git).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: scuderia-fe
namespace: argocd
spec:
project: default
sources:
- repoURL: https://gitea.lgkentang.com/darren.maverick/k3s-manifests.git
targetRevision: HEAD
ref: values
- repoURL: https://gitea.lgkentang.com/darren.maverick/k3s-manifests.git
targetRevision: HEAD
path: charts/app
helm:
valueFiles:
- $values/scuderia-fe/dev/values.yaml
destination:
server: https://kubernetes.default.svc
namespace: dev
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

38
apps/steven.yaml.yaml Normal file
View File

@@ -0,0 +1,38 @@
# gitops-demo child Application — now Helm-based, using the shared chart.
#
# MULTI-SOURCE explained: ArgoCD lets an Application pull from more than one
# source. We use two, BOTH pointing at this same manifest repo:
# 1. ref: values — exposes the repo as "$values" so we can reference a file
# from it (the per-service values.yaml).
# 2. path: charts/app — the generic chart, rendered with that values file.
# This keeps the chart shared and each service's values in its own clean file,
# instead of duplicating manifests or inlining values here.
#
# NOTE: replace REPLACE_WITH_MANIFEST_REPO_URL in BOTH sources with the real
# repo URL (same as before — ArgoCD reads these straight from git).
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: steven-nginx
namespace: argocd
spec:
project: default
sources:
- repoURL: https://gitea.lgkentang.com/darren.maverick/k3s-manifests.git
targetRevision: HEAD
ref: values
- repoURL: https://gitea.lgkentang.com/darren.maverick/k3s-manifests.git
targetRevision: HEAD
path: charts/app
helm:
valueFiles:
- $values/steven/dev/values.yaml
destination:
server: https://kubernetes.default.svc
namespace: dev
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

View File

@@ -8,21 +8,26 @@ metadata:
name: {{ include "app.name" . }} name: {{ include "app.name" . }}
labels: labels:
{{- include "app.labels" . | nindent 4 }} {{- include "app.labels" . | nindent 4 }}
{{- if .Values.ingress.tls }}
annotations: annotations:
# Phase 1: cert-manager issues the cert. Phase 2: external-dns reads the # Phase 1: cert-manager issues the cert. Phase 2: external-dns reads the
# host below and creates the DNS record. Both driven off this one Ingress. # host below and creates the DNS record. When tls is false (a secondary
# path on a shared host), this Ingress owns neither — it just adds a route.
cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }}
{{- end }}
spec: spec:
ingressClassName: {{ .Values.ingress.className }} ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
tls: tls:
- hosts: - hosts:
- {{ .Values.ingress.host }} - {{ .Values.ingress.host }}
secretName: {{ .Values.ingress.tlsSecretName | default (printf "%s-tls" (include "app.name" .)) }} secretName: {{ .Values.ingress.tlsSecretName | default (printf "%s-tls" (include "app.name" .)) }}
{{- end }}
rules: rules:
- host: {{ .Values.ingress.host }} - host: {{ .Values.ingress.host }}
http: http:
paths: paths:
- path: / - path: {{ .Values.ingress.path }}
pathType: Prefix pathType: Prefix
backend: backend:
service: service:

View File

@@ -31,6 +31,17 @@ ingress:
# REQUIRED when enabled, e.g. myapp.dev.lgkentang.com. external-dns turns # REQUIRED when enabled, e.g. myapp.dev.lgkentang.com. external-dns turns
# this into a DNS record and cert-manager into a cert (Phases 1-2). # this into a DNS record and cert-manager into a cert (Phases 1-2).
host: "" host: ""
# URL path this Ingress routes. Default "/" (catch-all). For path-based
# routing where components share a host, give each a distinct path — e.g. the
# frontend keeps "/" and the backend uses "/api/v1". Traefik routes the
# longest-matching prefix, so "/api/v1/*" beats "/" automatically.
path: /
# Whether THIS Ingress requests a TLS cert for the host. Set false when
# another Ingress already owns the host's cert (path-based routing on a shared
# host: only ONE component — usually the frontend at "/" — should carry TLS +
# the cert-manager annotation; the others just add a path rule and are served
# over that same host cert). Avoids two Certificates fighting over one host.
tls: true
clusterIssuer: letsencrypt-prod clusterIssuer: letsencrypt-prod
# tlsSecretName defaults to "<name>-tls" if left unset. # tlsSecretName defaults to "<name>-tls" if left unset.
tlsSecretName: "" tlsSecretName: ""

11
fm-fe/dev/values.yaml Normal file
View File

@@ -0,0 +1,11 @@
name: fm-fe
image:
repository: mybitlab/wfm
tag: fe-dev
replicas: 2
containerPort: 3000 # whatever port your API listens on
ingress:
host: fm.dev.lgkentang.com
path: / # API traffic → backend
tls: true
clusterIssuer: letsencrypt-prod

View File

@@ -0,0 +1,10 @@
name: scuderia-be
image:
repository: mybitlab/scuderia
tag: be-dev
replicas: 1
containerPort: 3000 # whatever port your API listens on
ingress:
host: scuderia.dev.lgkentang.com
path: /api/v1 # API traffic → backend
tls: false # ← no second cert; served over FE's cert

View File

@@ -0,0 +1,14 @@
name: scuderia-fe
image:
repository: mybitlab/scuderia
tag: fe-dev
replicas: 1
containerPort: 3000
ingress:
host: scuderia.dev.lgkentang.com
path: / # catch-all → frontend
tls: true # ← FE issues the cert for this host
clusterIssuer: letsencrypt-prod
env:
# same-domain API, so a relative base path (no scheme/host needed)
API_BASE_URL: /api/v1

View File

@@ -1,8 +0,0 @@
name: myapp
image:
repository: mybitlab/scuderia
tag: fe-dev
replicas: 1
ingress:
host: scuderia.dev.lgkentang.com
clusterIssuer: letsencrypt-prod

11
steven/dev/values.yaml Normal file
View File

@@ -0,0 +1,11 @@
name: steven
image:
repository: nginx
tag: latest
replicas: 1
containerPort: 80
ingress:
host: steven-nginx.dev.lgkentang.com
path: / # catch-all → frontend
tls: true # ← FE issues the cert for this host
clusterIssuer: letsencrypt-prod