From 57e1309348c66feaec5bf41ff5e80317cd3f82d9 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:38:24 +0300 Subject: [PATCH 01/16] feat(clusters): add tst environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add test environment configuration: - kustomization.yaml with all platform resources - destination.yaml for tst-cluster - bootstrap.yaml for ArgoCD root app 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- clusters/tst/bootstrap.yaml | 27 +++++++++++++++++++++++++++ clusters/tst/destination.yaml | 9 +++++++++ clusters/tst/kustomization.yaml | 29 +++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 clusters/tst/bootstrap.yaml create mode 100644 clusters/tst/destination.yaml create mode 100644 clusters/tst/kustomization.yaml diff --git a/clusters/tst/bootstrap.yaml b/clusters/tst/bootstrap.yaml new file mode 100644 index 0000000..9ff4500 --- /dev/null +++ b/clusters/tst/bootstrap.yaml @@ -0,0 +1,27 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: root-app-tst + namespace: argocd + labels: + tier: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: argocd + name: tst-cluster + project: default + source: + repoURL: https://github.com/justgithubaccount/app-poly-gitops-k8s.git + path: clusters/tst + targetRevision: main + syncPolicy: + automated: + allowEmpty: true + selfHeal: true + prune: true + syncOptions: + - Validate=true + - CreateNamespace=true + - PruneLast=true diff --git a/clusters/tst/destination.yaml b/clusters/tst/destination.yaml new file mode 100644 index 0000000..cc20797 --- /dev/null +++ b/clusters/tst/destination.yaml @@ -0,0 +1,9 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: all + namespace: argocd +spec: + project: default + destination: + name: tst-cluster diff --git a/clusters/tst/kustomization.yaml b/clusters/tst/kustomization.yaml new file mode 100644 index 0000000..80888d2 --- /dev/null +++ b/clusters/tst/kustomization.yaml @@ -0,0 +1,29 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + # Security + - ../../platform/infrastructure/security/sealed-secrets/base + - ../../platform/infrastructure/security/reflector/base + - ../../platform/infrastructure/security/external-secrets/base + # Networking + - ../../platform/infrastructure/networking/nginx/base + - ../../platform/infrastructure/networking/cert-manager/base + - ../../platform/infrastructure/networking/external-dns/base + # Storage + - ../../platform/infrastructure/storage/longhorn/base + # AI Platform + - ../../platform/infrastructure/ai-platform/open-webui/base + # Observability + - ../../platform/observability/monitoring/loki + - ../../platform/observability/monitoring/grafana + - ../../platform/observability/opentelemetry/collector/otel-collector + # GitOps + - ../../platform/gitops/argocd-image-updater + # Tenants + - ../../tenants/product-team/apps/chat/base + +patches: + - path: destination.yaml + target: + kind: Application From 3e69a008c1c14d0be2c635e6ed7a8ce32404dd3e Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:39:22 +0300 Subject: [PATCH 02/16] feat(clusters): add stg environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add staging environment configuration: - kustomization.yaml with all platform resources - destination.yaml for stg-cluster - bootstrap.yaml for ArgoCD root app 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- clusters/stg/bootstrap.yaml | 27 +++++++++++++++++++++++++++ clusters/stg/destination.yaml | 9 +++++++++ clusters/stg/kustomization.yaml | 29 +++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 clusters/stg/bootstrap.yaml create mode 100644 clusters/stg/destination.yaml create mode 100644 clusters/stg/kustomization.yaml diff --git a/clusters/stg/bootstrap.yaml b/clusters/stg/bootstrap.yaml new file mode 100644 index 0000000..d4cf7b6 --- /dev/null +++ b/clusters/stg/bootstrap.yaml @@ -0,0 +1,27 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: root-app-stg + namespace: argocd + labels: + tier: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: argocd + name: stg-cluster + project: default + source: + repoURL: https://github.com/justgithubaccount/app-poly-gitops-k8s.git + path: clusters/stg + targetRevision: main + syncPolicy: + automated: + allowEmpty: true + selfHeal: true + prune: true + syncOptions: + - Validate=true + - CreateNamespace=true + - PruneLast=true diff --git a/clusters/stg/destination.yaml b/clusters/stg/destination.yaml new file mode 100644 index 0000000..b4bc56a --- /dev/null +++ b/clusters/stg/destination.yaml @@ -0,0 +1,9 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: all + namespace: argocd +spec: + project: default + destination: + name: stg-cluster diff --git a/clusters/stg/kustomization.yaml b/clusters/stg/kustomization.yaml new file mode 100644 index 0000000..80888d2 --- /dev/null +++ b/clusters/stg/kustomization.yaml @@ -0,0 +1,29 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + # Security + - ../../platform/infrastructure/security/sealed-secrets/base + - ../../platform/infrastructure/security/reflector/base + - ../../platform/infrastructure/security/external-secrets/base + # Networking + - ../../platform/infrastructure/networking/nginx/base + - ../../platform/infrastructure/networking/cert-manager/base + - ../../platform/infrastructure/networking/external-dns/base + # Storage + - ../../platform/infrastructure/storage/longhorn/base + # AI Platform + - ../../platform/infrastructure/ai-platform/open-webui/base + # Observability + - ../../platform/observability/monitoring/loki + - ../../platform/observability/monitoring/grafana + - ../../platform/observability/opentelemetry/collector/otel-collector + # GitOps + - ../../platform/gitops/argocd-image-updater + # Tenants + - ../../tenants/product-team/apps/chat/base + +patches: + - path: destination.yaml + target: + kind: Application From b51c6055feb7dcc59ffaa041be6bb339e95ec30b Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:40:39 +0300 Subject: [PATCH 03/16] feat(clusters): activate prd environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Activate production environment configuration: - Replace commented kustomization.yaml with working config - Update destination.yaml for prd-cluster - Update bootstrap.yaml with full ArgoCD Application spec - Tenant chat-api commented out (enable when ready for production) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- clusters/prd/bootstrap.yaml | 43 ++++++++++++++--------- clusters/prd/destination.yaml | 17 ++++----- clusters/prd/kustomization.yaml | 61 +++++++++++++++------------------ 3 files changed, 63 insertions(+), 58 deletions(-) diff --git a/clusters/prd/bootstrap.yaml b/clusters/prd/bootstrap.yaml index 3d48053..1728f86 100644 --- a/clusters/prd/bootstrap.yaml +++ b/clusters/prd/bootstrap.yaml @@ -1,16 +1,27 @@ -# clusters/prd/bootstrap.yaml -# Uncomment when prd cluster is ready - -# apiVersion: argoproj.io/v1alpha1 -# kind: Application -# metadata: -# name: root-app-prd -# namespace: argocd -# spec: -# source: -# repoURL: https://github.com/justgithubaccount/app-poly-gitops-k8s.git -# path: platform/core/cluster-bootstrap -# targetRevision: main -# destination: -# name: prd -# namespace: argocd +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: root-app-prd + namespace: argocd + labels: + tier: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + destination: + namespace: argocd + name: prd-cluster + project: default + source: + repoURL: https://github.com/justgithubaccount/app-poly-gitops-k8s.git + path: clusters/prd + targetRevision: main + syncPolicy: + automated: + allowEmpty: true + selfHeal: true + prune: true + syncOptions: + - Validate=true + - CreateNamespace=true + - PruneLast=true diff --git a/clusters/prd/destination.yaml b/clusters/prd/destination.yaml index 4319367..f4dd2b3 100644 --- a/clusters/prd/destination.yaml +++ b/clusters/prd/destination.yaml @@ -1,8 +1,9 @@ -# apiVersion: argoproj.io/v1alpha1 -# kind: Application -# metadata: -# name: all # имя здесь неважно – патч применится по kind -# spec: -# destination: -# name: prd # ТОЧНОЕ имя prod-кластера из `argocd cluster list` -# namespace: argocd # можно опустить, если в base уже указано +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: all + namespace: argocd +spec: + project: default + destination: + name: prd-cluster diff --git a/clusters/prd/kustomization.yaml b/clusters/prd/kustomization.yaml index ff30e8e..872ddd0 100644 --- a/clusters/prd/kustomization.yaml +++ b/clusters/prd/kustomization.yaml @@ -1,36 +1,29 @@ -# apiVersion: kustomize.config.k8s.io/v1beta1 -# kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization -# namePrefix: prd- +resources: + # Security + - ../../platform/infrastructure/security/sealed-secrets/base + - ../../platform/infrastructure/security/reflector/base + - ../../platform/infrastructure/security/external-secrets/base + # Networking + - ../../platform/infrastructure/networking/nginx/base + - ../../platform/infrastructure/networking/cert-manager/base + - ../../platform/infrastructure/networking/external-dns/base + # Storage + - ../../platform/infrastructure/storage/longhorn/base + # AI Platform + - ../../platform/infrastructure/ai-platform/open-webui/base + # Observability + - ../../platform/observability/monitoring/loki + - ../../platform/observability/monitoring/grafana + - ../../platform/observability/opentelemetry/collector/otel-collector + # GitOps + - ../../platform/gitops/argocd-image-updater + # Tenants (uncomment when ready for production) + # - ../../tenants/product-team/apps/chat/base -# resources: -# - ../../../base/addons/ingress-nginx -# - ../../../base/addons/cert-manager -# - ../../../base/addons/external-dns -# - ../../../base/addons/observability/loki -# - ../../../base/addons/observability/grafana -# - ../../../base/addons/longhorn -# - ../../../base/services/agent/chat -# - ../../../base/services/llm/gateway - -# # patches: -# # # Исправляем CLUSTER placeholder для всех Applications -# # - target: -# # kind: Application -# # patch: |- -# # - op: replace -# # path: /spec/destination/name -# # value: prd -# # - op: replace -# # path: /spec/destination/server -# # value: https://kubernetes.default.svc - -# patches: -# - target: -# kind: Application -# patch: |- -# - op: remove -# path: /spec/destination/name -# - op: replace -# path: /spec/destination/server -# value: https://kubernetes.default.svc \ No newline at end of file +patches: + - path: destination.yaml + target: + kind: Application From 51aec0e2230f69f352fa9083eb9d22d39fe52921 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:41:59 +0300 Subject: [PATCH 04/16] feat(tenants): add namespace isolation and resource quotas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add tenant infrastructure: - namespace.yaml for chat-api namespace with labels - resource-quota.yaml with CPU/memory/storage limits - base/kustomization.yaml to bundle tenant resources Fix chat app structure: - Remove secrets from base/kustomization.yaml - Create overlays/dev/kustomization.yaml with base + secrets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../apps/chat/base/kustomization.yaml | 6 +++--- .../apps/chat/overlays/dev/kustomization.yaml | 8 ++++++++ tenants/product-team/base/kustomization.yaml | 6 ++++++ tenants/product-team/namespace.yaml | 10 ++++++++++ tenants/product-team/resource-quota.yaml | 19 +++++++++++++++++++ 5 files changed, 46 insertions(+), 3 deletions(-) create mode 100644 tenants/product-team/apps/chat/overlays/dev/kustomization.yaml create mode 100644 tenants/product-team/base/kustomization.yaml create mode 100644 tenants/product-team/namespace.yaml create mode 100644 tenants/product-team/resource-quota.yaml diff --git a/tenants/product-team/apps/chat/base/kustomization.yaml b/tenants/product-team/apps/chat/base/kustomization.yaml index 607fd16..04b2ef6 100644 --- a/tenants/product-team/apps/chat/base/kustomization.yaml +++ b/tenants/product-team/apps/chat/base/kustomization.yaml @@ -1,5 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + resources: - application.yaml - - postgree-secrets.yaml - - openrouter-secrets.yaml - - github-secrets.yaml diff --git a/tenants/product-team/apps/chat/overlays/dev/kustomization.yaml b/tenants/product-team/apps/chat/overlays/dev/kustomization.yaml new file mode 100644 index 0000000..3329c99 --- /dev/null +++ b/tenants/product-team/apps/chat/overlays/dev/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + - postgree-secrets.yaml + - openrouter-secrets.yaml + - github-secrets.yaml diff --git a/tenants/product-team/base/kustomization.yaml b/tenants/product-team/base/kustomization.yaml new file mode 100644 index 0000000..70cd580 --- /dev/null +++ b/tenants/product-team/base/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../namespace.yaml + - ../resource-quota.yaml diff --git a/tenants/product-team/namespace.yaml b/tenants/product-team/namespace.yaml new file mode 100644 index 0000000..65755b6 --- /dev/null +++ b/tenants/product-team/namespace.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: chat-api + labels: + team: product-team + app.kubernetes.io/name: chat-api + app.kubernetes.io/managed-by: argocd + annotations: + argocd.argoproj.io/sync-wave: "-10" diff --git a/tenants/product-team/resource-quota.yaml b/tenants/product-team/resource-quota.yaml new file mode 100644 index 0000000..7deded6 --- /dev/null +++ b/tenants/product-team/resource-quota.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: ResourceQuota +metadata: + name: product-team-quota + namespace: chat-api + labels: + team: product-team + annotations: + argocd.argoproj.io/sync-wave: "-9" +spec: + hard: + requests.cpu: "4" + requests.memory: 8Gi + limits.cpu: "8" + limits.memory: 16Gi + pods: "20" + services: "10" + persistentvolumeclaims: "10" + requests.storage: 50Gi From 145426ea91fa61916756c05dbbebaafc24af89ec Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:43:02 +0300 Subject: [PATCH 05/16] chore(ai-platform): add Dify placeholder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add placeholder structure for future Dify deployment: - base/kustomization.yaml (commented out) - base/application.yaml template (commented out) - README.md with TODO tasks and links 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../infrastructure/ai-platform/dify/README.md | 28 ++++++++++++++ .../ai-platform/dify/base/application.yaml | 37 +++++++++++++++++++ .../ai-platform/dify/base/kustomization.yaml | 6 +++ 3 files changed, 71 insertions(+) create mode 100644 platform/infrastructure/ai-platform/dify/README.md create mode 100644 platform/infrastructure/ai-platform/dify/base/application.yaml create mode 100644 platform/infrastructure/ai-platform/dify/base/kustomization.yaml diff --git a/platform/infrastructure/ai-platform/dify/README.md b/platform/infrastructure/ai-platform/dify/README.md new file mode 100644 index 0000000..6b21711 --- /dev/null +++ b/platform/infrastructure/ai-platform/dify/README.md @@ -0,0 +1,28 @@ +# Dify AI Platform + +## Status: TODO + +Placeholder for Dify LLM application development platform. + +## Tasks + +- [ ] Research Dify Helm chart availability +- [ ] Define resource requirements (CPU, memory, storage) +- [ ] Configure persistent storage for Dify data +- [ ] Set up authentication integration +- [ ] Configure integration with existing AI platform (Open WebUI) +- [ ] Add to ApplicationSet or clusters kustomization + +## Links + +- [Dify GitHub](https://github.com/langgenius/dify) +- [Dify Documentation](https://docs.dify.ai) +- [Dify Helm Charts](https://github.com/langgenius/dify-helm) + +## Notes + +Dify is an open-source LLM app development platform with: +- Visual workflow builder +- RAG pipeline support +- Agent capabilities +- Multi-model support diff --git a/platform/infrastructure/ai-platform/dify/base/application.yaml b/platform/infrastructure/ai-platform/dify/base/application.yaml new file mode 100644 index 0000000..2b9e077 --- /dev/null +++ b/platform/infrastructure/ai-platform/dify/base/application.yaml @@ -0,0 +1,37 @@ +# TODO: Configure Dify deployment +# Reference: https://github.com/langgenius/dify + +# apiVersion: argoproj.io/v1alpha1 +# kind: Application +# metadata: +# name: dify +# namespace: argocd +# labels: +# app.kubernetes.io/name: dify +# app.kubernetes.io/part-of: ai-platform +# annotations: +# argocd.argoproj.io/sync-wave: "10" +# spec: +# project: default +# source: +# # Option 1: Official Helm chart (if available) +# # repoURL: https://charts.dify.ai +# # chart: dify +# # targetRevision: "0.x.x" +# +# # Option 2: Git-based deployment +# repoURL: https://github.com/langgenius/dify.git +# path: docker/kubernetes +# targetRevision: main +# destination: +# name: CLUSTER +# namespace: dify +# syncPolicy: +# automated: +# allowEmpty: true +# selfHeal: true +# prune: true +# syncOptions: +# - Validate=true +# - CreateNamespace=true +# - PruneLast=true diff --git a/platform/infrastructure/ai-platform/dify/base/kustomization.yaml b/platform/infrastructure/ai-platform/dify/base/kustomization.yaml new file mode 100644 index 0000000..8b7283e --- /dev/null +++ b/platform/infrastructure/ai-platform/dify/base/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +# TODO: Uncomment when Dify deployment is ready +# resources: +# - application.yaml From 7c939daa1ba3110ef79eed94b3490a2d7214d7a9 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:43:56 +0300 Subject: [PATCH 06/16] ci(workflows): add release workflow and update validate matrix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add release.yaml: - Semantic-release workflow for automated versioning - Triggers on push to main (excluding markdown and validate.yaml) - Uses .releaserc.json configuration Update validate.yaml: - Add tst, stg, prd environments to matrix - All 4 environments now validated on PRs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/release.yaml | 38 +++++++++++++++++++++++++++++++++ .github/workflows/validate.yaml | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..d1f9916 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,38 @@ +name: Release + +on: + push: + branches: + - main + paths-ignore: + - '**.md' + - '.github/workflows/validate.yaml' + +permissions: + contents: write + issues: write + pull-requests: write + +jobs: + release: + name: Semantic Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + + - name: Install dependencies + run: npm ci + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 65a03d9..7ccc2a0 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - env: [dev] + env: [dev, tst, stg, prd] steps: - uses: actions/checkout@v4 From f8def295acd4f63214477af5d0b923489e6d4d58 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:44:43 +0300 Subject: [PATCH 07/16] feat(rbac): add multi-cluster support for tenants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update tenants-project.yaml: - Add destinations for tst-cluster, stg-cluster, prd-cluster - Add namespaceResourceWhitelist for common K8s resources - Keep existing in-cluster destination for dev 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../core/rbac/projects/tenants-project.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/platform/core/rbac/projects/tenants-project.yaml b/platform/core/rbac/projects/tenants-project.yaml index c4cdcad..f08b17d 100644 --- a/platform/core/rbac/projects/tenants-project.yaml +++ b/platform/core/rbac/projects/tenants-project.yaml @@ -9,8 +9,29 @@ spec: - https://github.com/justgithubaccount/app-poly-gitops-k8s.git - https://github.com/justgithubaccount/app-poly-gitops-helm.git destinations: + # In-cluster (dev) - namespace: chat-api server: https://kubernetes.default.svc + # Multi-cluster destinations + - namespace: chat-api + name: tst-cluster + - namespace: chat-api + name: stg-cluster + - namespace: chat-api + name: prd-cluster clusterResourceWhitelist: - group: '' kind: Namespace + namespaceResourceWhitelist: + - group: '' + kind: ConfigMap + - group: '' + kind: Secret + - group: '' + kind: Service + - group: apps + kind: Deployment + - group: apps + kind: StatefulSet + - group: networking.k8s.io + kind: Ingress From 324dcef6b62bbb93c174571bb2a11afdce1f3409 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:46:27 +0300 Subject: [PATCH 08/16] fix(nginx): move ingress resources to base directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix kustomize validation error by moving ingress YAML files from overlays/ to base/ directory. Kustomize doesn't allow referencing files outside the base directory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../nginx/{overlays => base}/ingress-argo.yaml | 0 .../nginx/{overlays => base}/ingress-chat.yaml | 0 .../nginx/{overlays => base}/ingress-grafana.yaml | 0 .../nginx/{overlays => base}/ingress-openwebui.yaml | 0 .../networking/nginx/base/kustomization.yaml | 12 +++++++----- 5 files changed, 7 insertions(+), 5 deletions(-) rename platform/infrastructure/networking/nginx/{overlays => base}/ingress-argo.yaml (100%) rename platform/infrastructure/networking/nginx/{overlays => base}/ingress-chat.yaml (100%) rename platform/infrastructure/networking/nginx/{overlays => base}/ingress-grafana.yaml (100%) rename platform/infrastructure/networking/nginx/{overlays => base}/ingress-openwebui.yaml (100%) diff --git a/platform/infrastructure/networking/nginx/overlays/ingress-argo.yaml b/platform/infrastructure/networking/nginx/base/ingress-argo.yaml similarity index 100% rename from platform/infrastructure/networking/nginx/overlays/ingress-argo.yaml rename to platform/infrastructure/networking/nginx/base/ingress-argo.yaml diff --git a/platform/infrastructure/networking/nginx/overlays/ingress-chat.yaml b/platform/infrastructure/networking/nginx/base/ingress-chat.yaml similarity index 100% rename from platform/infrastructure/networking/nginx/overlays/ingress-chat.yaml rename to platform/infrastructure/networking/nginx/base/ingress-chat.yaml diff --git a/platform/infrastructure/networking/nginx/overlays/ingress-grafana.yaml b/platform/infrastructure/networking/nginx/base/ingress-grafana.yaml similarity index 100% rename from platform/infrastructure/networking/nginx/overlays/ingress-grafana.yaml rename to platform/infrastructure/networking/nginx/base/ingress-grafana.yaml diff --git a/platform/infrastructure/networking/nginx/overlays/ingress-openwebui.yaml b/platform/infrastructure/networking/nginx/base/ingress-openwebui.yaml similarity index 100% rename from platform/infrastructure/networking/nginx/overlays/ingress-openwebui.yaml rename to platform/infrastructure/networking/nginx/base/ingress-openwebui.yaml diff --git a/platform/infrastructure/networking/nginx/base/kustomization.yaml b/platform/infrastructure/networking/nginx/base/kustomization.yaml index 1a779f4..035e0a3 100644 --- a/platform/infrastructure/networking/nginx/base/kustomization.yaml +++ b/platform/infrastructure/networking/nginx/base/kustomization.yaml @@ -1,7 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + resources: - application.yaml - - overlays/ingress-chat.yaml - - overlays/ingress-grafana.yaml - - overlays/ingress-argo.yaml - - overlays/ingress-openwebui.yaml - \ No newline at end of file + - ingress-chat.yaml + - ingress-grafana.yaml + - ingress-argo.yaml + - ingress-openwebui.yaml From 4256026929773cacdada62f4487585be35141538 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:52:44 +0300 Subject: [PATCH 09/16] feat(tenants): add data-team tenant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add data-team tenant structure: - namespace.yaml with team labels - resource-quota.yaml (8/16 CPU, 16/32Gi memory, 100Gi storage) - base/kustomization.yaml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tenants/data-team/base/kustomization.yaml | 6 ++++++ tenants/data-team/namespace.yaml | 9 +++++++++ tenants/data-team/resource-quota.yaml | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 tenants/data-team/base/kustomization.yaml create mode 100644 tenants/data-team/namespace.yaml create mode 100644 tenants/data-team/resource-quota.yaml diff --git a/tenants/data-team/base/kustomization.yaml b/tenants/data-team/base/kustomization.yaml new file mode 100644 index 0000000..70cd580 --- /dev/null +++ b/tenants/data-team/base/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../namespace.yaml + - ../resource-quota.yaml diff --git a/tenants/data-team/namespace.yaml b/tenants/data-team/namespace.yaml new file mode 100644 index 0000000..d7f69fe --- /dev/null +++ b/tenants/data-team/namespace.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: data-team + labels: + team: data-team + app.kubernetes.io/managed-by: argocd + annotations: + argocd.argoproj.io/sync-wave: "-10" diff --git a/tenants/data-team/resource-quota.yaml b/tenants/data-team/resource-quota.yaml new file mode 100644 index 0000000..9df7d7d --- /dev/null +++ b/tenants/data-team/resource-quota.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: ResourceQuota +metadata: + name: data-team-quota + namespace: data-team + labels: + team: data-team + annotations: + argocd.argoproj.io/sync-wave: "-9" +spec: + hard: + requests.cpu: "8" + requests.memory: 16Gi + limits.cpu: "16" + limits.memory: 32Gi + pods: "30" + services: "15" + persistentvolumeclaims: "20" + requests.storage: 100Gi From a55e29a7dcca7c72b7791fe8779148235fd6d6e3 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 09:53:45 +0300 Subject: [PATCH 10/16] feat(tenants): add ml-team tenant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add ml-team tenant structure: - namespace.yaml with team labels - resource-quota.yaml (16/32 CPU, 32/64Gi memory, 200Gi storage) - base/kustomization.yaml Higher resource limits for ML workloads (GPU training, inference). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tenants/ml-team/base/kustomization.yaml | 6 ++++++ tenants/ml-team/namespace.yaml | 9 +++++++++ tenants/ml-team/resource-quota.yaml | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 tenants/ml-team/base/kustomization.yaml create mode 100644 tenants/ml-team/namespace.yaml create mode 100644 tenants/ml-team/resource-quota.yaml diff --git a/tenants/ml-team/base/kustomization.yaml b/tenants/ml-team/base/kustomization.yaml new file mode 100644 index 0000000..70cd580 --- /dev/null +++ b/tenants/ml-team/base/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../namespace.yaml + - ../resource-quota.yaml diff --git a/tenants/ml-team/namespace.yaml b/tenants/ml-team/namespace.yaml new file mode 100644 index 0000000..9675fce --- /dev/null +++ b/tenants/ml-team/namespace.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: ml-team + labels: + team: ml-team + app.kubernetes.io/managed-by: argocd + annotations: + argocd.argoproj.io/sync-wave: "-10" diff --git a/tenants/ml-team/resource-quota.yaml b/tenants/ml-team/resource-quota.yaml new file mode 100644 index 0000000..0403729 --- /dev/null +++ b/tenants/ml-team/resource-quota.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: ResourceQuota +metadata: + name: ml-team-quota + namespace: ml-team + labels: + team: ml-team + annotations: + argocd.argoproj.io/sync-wave: "-9" +spec: + hard: + requests.cpu: "16" + requests.memory: 32Gi + limits.cpu: "32" + limits.memory: 64Gi + pods: "50" + services: "20" + persistentvolumeclaims: "30" + requests.storage: 200Gi From 5153c4ba763347c457c738e30573d071d66b0f54 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 10:06:03 +0300 Subject: [PATCH 11/16] fix(clusters): update dev bootstrap to correct repository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix dev bootstrap.yaml: - Change repoURL from app-release.git to app-poly-gitops-k8s.git - Update path from platform/core/cluster-bootstrap to clusters/dev - Add labels, finalizers, project, syncPolicy - Use destination.name: in-cluster instead of server URL Now consistent with tst/stg/prd bootstrap configurations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- clusters/dev/bootstrap.yaml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/clusters/dev/bootstrap.yaml b/clusters/dev/bootstrap.yaml index 86523b2..34fac6e 100644 --- a/clusters/dev/bootstrap.yaml +++ b/clusters/dev/bootstrap.yaml @@ -1,14 +1,27 @@ -# clusters/dev/bootstrap.yaml apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: root-app-dev namespace: argocd + labels: + tier: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io spec: + destination: + namespace: argocd + name: in-cluster + project: default source: - repoURL: https://github.com/justgithubaccount/app-release.git - path: platform/core/cluster-bootstrap + repoURL: https://github.com/justgithubaccount/app-poly-gitops-k8s.git + path: clusters/dev targetRevision: main - destination: - server: https://kubernetes.default.svc - namespace: argocd \ No newline at end of file + syncPolicy: + automated: + allowEmpty: true + selfHeal: true + prune: true + syncOptions: + - Validate=true + - CreateNamespace=true + - PruneLast=true From ba7cd0de77fcf38b807d69d687bbef2d1cf01b92 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 10:25:39 +0300 Subject: [PATCH 12/16] feat(tenants): add helm values for all chat environments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Helm values for chat-api across all environments: dev (2 replicas, 1Gi): - host: chat-dev.syncjob.ru tst (1 replica, 512Mi): - host: chat-tst.syncjob.ru stg (2 replicas, 1Gi): - host: chat-stg.syncjob.ru prd (3 replicas, 2Gi): - host: chat.syncjob.ru Create kustomization.yaml for tst/stg/prd overlays. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../apps/chat/overlays/dev/values.yaml | 17 +++++++++++++++++ .../apps/chat/overlays/prd/kustomization.yaml | 5 +++++ .../apps/chat/overlays/prd/values.yaml | 17 +++++++++++++++++ .../apps/chat/overlays/stg/kustomization.yaml | 5 +++++ .../apps/chat/overlays/stg/values.yaml | 17 +++++++++++++++++ .../apps/chat/overlays/tst/kustomization.yaml | 5 +++++ .../apps/chat/overlays/tst/values.yaml | 17 +++++++++++++++++ 7 files changed, 83 insertions(+) create mode 100644 tenants/product-team/apps/chat/overlays/dev/values.yaml create mode 100644 tenants/product-team/apps/chat/overlays/prd/kustomization.yaml create mode 100644 tenants/product-team/apps/chat/overlays/prd/values.yaml create mode 100644 tenants/product-team/apps/chat/overlays/stg/kustomization.yaml create mode 100644 tenants/product-team/apps/chat/overlays/stg/values.yaml create mode 100644 tenants/product-team/apps/chat/overlays/tst/kustomization.yaml create mode 100644 tenants/product-team/apps/chat/overlays/tst/values.yaml diff --git a/tenants/product-team/apps/chat/overlays/dev/values.yaml b/tenants/product-team/apps/chat/overlays/dev/values.yaml new file mode 100644 index 0000000..6bf49ac --- /dev/null +++ b/tenants/product-team/apps/chat/overlays/dev/values.yaml @@ -0,0 +1,17 @@ +image: + name: ghcr.io/justgithubaccount/chat-api + tag: "1.1.7" + +replicaCount: 2 + +resources: + limits: + cpu: 1000m + memory: 1Gi + requests: + cpu: 500m + memory: 512Mi + +ingress: + enabled: true + host: chat-dev.syncjob.ru diff --git a/tenants/product-team/apps/chat/overlays/prd/kustomization.yaml b/tenants/product-team/apps/chat/overlays/prd/kustomization.yaml new file mode 100644 index 0000000..774a422 --- /dev/null +++ b/tenants/product-team/apps/chat/overlays/prd/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base diff --git a/tenants/product-team/apps/chat/overlays/prd/values.yaml b/tenants/product-team/apps/chat/overlays/prd/values.yaml new file mode 100644 index 0000000..4df87b1 --- /dev/null +++ b/tenants/product-team/apps/chat/overlays/prd/values.yaml @@ -0,0 +1,17 @@ +image: + name: ghcr.io/justgithubaccount/chat-api + tag: "1.1.7" + +replicaCount: 3 + +resources: + limits: + cpu: 2000m + memory: 2Gi + requests: + cpu: 1000m + memory: 1Gi + +ingress: + enabled: true + host: chat.syncjob.ru diff --git a/tenants/product-team/apps/chat/overlays/stg/kustomization.yaml b/tenants/product-team/apps/chat/overlays/stg/kustomization.yaml new file mode 100644 index 0000000..774a422 --- /dev/null +++ b/tenants/product-team/apps/chat/overlays/stg/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base diff --git a/tenants/product-team/apps/chat/overlays/stg/values.yaml b/tenants/product-team/apps/chat/overlays/stg/values.yaml new file mode 100644 index 0000000..55f1778 --- /dev/null +++ b/tenants/product-team/apps/chat/overlays/stg/values.yaml @@ -0,0 +1,17 @@ +image: + name: ghcr.io/justgithubaccount/chat-api + tag: "1.1.7" + +replicaCount: 2 + +resources: + limits: + cpu: 1000m + memory: 1Gi + requests: + cpu: 500m + memory: 512Mi + +ingress: + enabled: true + host: chat-stg.syncjob.ru diff --git a/tenants/product-team/apps/chat/overlays/tst/kustomization.yaml b/tenants/product-team/apps/chat/overlays/tst/kustomization.yaml new file mode 100644 index 0000000..774a422 --- /dev/null +++ b/tenants/product-team/apps/chat/overlays/tst/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base diff --git a/tenants/product-team/apps/chat/overlays/tst/values.yaml b/tenants/product-team/apps/chat/overlays/tst/values.yaml new file mode 100644 index 0000000..f061a13 --- /dev/null +++ b/tenants/product-team/apps/chat/overlays/tst/values.yaml @@ -0,0 +1,17 @@ +image: + name: ghcr.io/justgithubaccount/chat-api + tag: "1.1.7" + +replicaCount: 1 + +resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 250m + memory: 256Mi + +ingress: + enabled: true + host: chat-tst.syncjob.ru From a9942da965daf6f6e1a26cb4a1e3463b5f7b7605 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 10:27:40 +0300 Subject: [PATCH 13/16] refactor(gitops): implement matrix generator for tenant apps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace simple list generator with matrix generator for multi-env support. Matrix generates 4 Applications automatically: - product-team-chat-dev → in-cluster - product-team-chat-tst → tst-cluster - product-team-chat-stg → stg-cluster - product-team-chat-prd → prd-cluster Features: - Multi-source: Helm chart + GitOps values - Dynamic path: tenants/{{team}}/apps/{{app}}/overlays/{{env}} - Environment-specific values from overlays - Labels for filtering (team, app, env) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- platform/gitops/appsets/tenant-apps.yaml | 53 ++++++++++++++++++------ 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/platform/gitops/appsets/tenant-apps.yaml b/platform/gitops/appsets/tenant-apps.yaml index a23f616..8913c2c 100644 --- a/platform/gitops/appsets/tenant-apps.yaml +++ b/platform/gitops/appsets/tenant-apps.yaml @@ -5,25 +5,52 @@ metadata: namespace: argocd spec: generators: - - list: - elements: - - name: chat-api - path: tenants/product-team/apps/chat/base - namespace: chat-api + - matrix: + generators: + - list: + elements: + - app: chat + team: product-team + - list: + elements: + - cluster: in-cluster + env: dev + - cluster: tst-cluster + env: tst + - cluster: stg-cluster + env: stg + - cluster: prd-cluster + env: prd template: metadata: - name: '{{name}}' + name: '{{team}}-{{app}}-{{env}}' namespace: argocd + labels: + team: '{{team}}' + app: '{{app}}' + env: '{{env}}' + finalizers: + - resources-finalizer.argocd.argoproj.io spec: project: tenants - source: - repoURL: https://github.com/justgithubaccount/app-poly-gitops-k8s.git - targetRevision: main - path: '{{path}}' destination: - server: https://kubernetes.default.svc - namespace: '{{namespace}}' + name: '{{cluster}}' + namespace: '{{team}}' + sources: + - repoURL: https://github.com/justgithubaccount/app-poly-gitops-helm + targetRevision: main + path: chat + helm: + valueFiles: + - values.yaml + - $values/values.yaml + - repoURL: https://github.com/justgithubaccount/app-poly-gitops-k8s + targetRevision: main + path: tenants/{{team}}/apps/{{app}}/overlays/{{env}} + ref: values syncPolicy: automated: - selfHeal: true prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true From dd372706fdf15c8f93277069142cc951d03d944f Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 10:33:05 +0300 Subject: [PATCH 14/16] fix(gitops): split ApplicationSet for dev Image Updater support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Split tenant-apps into tenant-apps-dev (with Image Updater) and tenant-apps (tst/stg/prd) - Enable goTemplate for proper variable interpolation - Image Updater writes to tenants/.../overlays/dev/values.yaml - Remove legacy base/application.yaml (now managed by ApplicationSet) - Remove legacy clusters/dev/chat-values.yaml 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- clusters/dev/chat-values.yaml | 8 -- platform/gitops/appsets/tenant-apps.yaml | 76 +++++++++++++++++-- .../apps/chat/base/application.yaml | 51 ------------- .../apps/chat/base/kustomization.yaml | 5 +- 4 files changed, 71 insertions(+), 69 deletions(-) delete mode 100644 clusters/dev/chat-values.yaml delete mode 100644 tenants/product-team/apps/chat/base/application.yaml diff --git a/clusters/dev/chat-values.yaml b/clusters/dev/chat-values.yaml deleted file mode 100644 index 62e6a51..0000000 --- a/clusters/dev/chat-values.yaml +++ /dev/null @@ -1,8 +0,0 @@ -helm: - parameters: - - name: image.name - value: ghcr.io/justgithubaccount/chat-api - forcestring: true - - name: image.tag - value: 1.1.7 - forcestring: true diff --git a/platform/gitops/appsets/tenant-apps.yaml b/platform/gitops/appsets/tenant-apps.yaml index 8913c2c..0803db1 100644 --- a/platform/gitops/appsets/tenant-apps.yaml +++ b/platform/gitops/appsets/tenant-apps.yaml @@ -1,9 +1,11 @@ apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: - name: tenant-apps + name: tenant-apps-dev namespace: argocd spec: + goTemplate: true + goTemplateOptions: ["missingkey=error"] generators: - matrix: generators: @@ -15,6 +17,64 @@ spec: elements: - cluster: in-cluster env: dev + template: + metadata: + name: '{{ .team }}-{{ .app }}-{{ .env }}' + namespace: argocd + labels: + team: '{{ .team }}' + app: '{{ .app }}' + env: '{{ .env }}' + annotations: + argocd-image-updater.argoproj.io/image-list: chat=ghcr.io/justgithubaccount/chat-api:~1 + argocd-image-updater.argoproj.io/chat.update-strategy: semver + argocd-image-updater.argoproj.io/chat.helm.image-tag: image.tag + argocd-image-updater.argoproj.io/write-back-method: git + argocd-image-updater.argoproj.io/write-back-target: 'kustomization:tenants/{{ .team }}/apps/{{ .app }}/overlays/{{ .env }}/values.yaml' + argocd-image-updater.argoproj.io/git-branch: main + finalizers: + - resources-finalizer.argocd.argoproj.io + spec: + project: tenants + destination: + name: '{{ .cluster }}' + namespace: '{{ .team }}' + sources: + - repoURL: https://github.com/justgithubaccount/app-poly-gitops-helm + targetRevision: main + path: chat + helm: + valueFiles: + - values.yaml + - $values/values.yaml + - repoURL: https://github.com/justgithubaccount/app-poly-gitops-k8s + targetRevision: main + path: 'tenants/{{ .team }}/apps/{{ .app }}/overlays/{{ .env }}' + ref: values + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true +--- +apiVersion: argoproj.io/v1alpha1 +kind: ApplicationSet +metadata: + name: tenant-apps + namespace: argocd +spec: + goTemplate: true + goTemplateOptions: ["missingkey=error"] + generators: + - matrix: + generators: + - list: + elements: + - app: chat + team: product-team + - list: + elements: - cluster: tst-cluster env: tst - cluster: stg-cluster @@ -23,19 +83,19 @@ spec: env: prd template: metadata: - name: '{{team}}-{{app}}-{{env}}' + name: '{{ .team }}-{{ .app }}-{{ .env }}' namespace: argocd labels: - team: '{{team}}' - app: '{{app}}' - env: '{{env}}' + team: '{{ .team }}' + app: '{{ .app }}' + env: '{{ .env }}' finalizers: - resources-finalizer.argocd.argoproj.io spec: project: tenants destination: - name: '{{cluster}}' - namespace: '{{team}}' + name: '{{ .cluster }}' + namespace: '{{ .team }}' sources: - repoURL: https://github.com/justgithubaccount/app-poly-gitops-helm targetRevision: main @@ -46,7 +106,7 @@ spec: - $values/values.yaml - repoURL: https://github.com/justgithubaccount/app-poly-gitops-k8s targetRevision: main - path: tenants/{{team}}/apps/{{app}}/overlays/{{env}} + path: 'tenants/{{ .team }}/apps/{{ .app }}/overlays/{{ .env }}' ref: values syncPolicy: automated: diff --git a/tenants/product-team/apps/chat/base/application.yaml b/tenants/product-team/apps/chat/base/application.yaml deleted file mode 100644 index b8bd730..0000000 --- a/tenants/product-team/apps/chat/base/application.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: argoproj.io/v1alpha1 -kind: Application -metadata: - labels: - app.kubernetes.io/name: chat-api - app.kubernetes.io/part-of: chat - app.kubernetes.io/managed-by: argocd - app.kubernetes.io/component: backend - env: dev - name: chat-api - namespace: argocd - annotations: - argocd.argoproj.io/sync-wave: "5" - - argocd-image-updater.argoproj.io/image-list: chat=ghcr.io/justgithubaccount/chat-api:^1 - argocd-image-updater.argoproj.io/chat.update-strategy: semver - argocd-image-updater.argoproj.io/chat.helm.image-tag: image.tag - - argocd-image-updater.argoproj.io/write-back-method: git - argocd-image-updater.argoproj.io/write-back-target: clusters/dev/chat-values.yaml - argocd-image-updater.argoproj.io/write-back-target-branch: main - argocd-image-updater.argoproj.io/git-commit-user-name: justgithubaccount - argocd-image-updater.argoproj.io/git-commit-user-email: kulikovyevgeny@outlook.com - - argocd-image-updater.argoproj.io/git-credentialSecret: chat-github - - # notifications.argoproj.io/subscribe.on-sync-succeeded.slack: chat-devops - # notifications.argoproj.io/subscribe.on-sync-failed.slack: chat-devops -spec: - project: default - source: - repoURL: https://github.com/justgithubaccount/app-poly-gitops-helm - targetRevision: main - path: chat - helm: - valueFiles: - - values.yaml - # values из k8s-репы подтягиваются через additionalValueFiles или patch - # - ../../clusters/dev/chat-values.yaml - destination: - name: CLUSTER - namespace: chat-api - syncPolicy: - automated: - allowEmpty: true - selfHeal: true - prune: true - syncOptions: - - Validate=true - - CreateNamespace=true - - PruneLast=true diff --git a/tenants/product-team/apps/chat/base/kustomization.yaml b/tenants/product-team/apps/chat/base/kustomization.yaml index 04b2ef6..893fab5 100644 --- a/tenants/product-team/apps/chat/base/kustomization.yaml +++ b/tenants/product-team/apps/chat/base/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -resources: - - application.yaml +# Application managed by ApplicationSet in platform/gitops/appsets/tenant-apps.yaml +# This directory contains shared resources for the chat application +resources: [] From 37c3ccd672951e65d70c987e98d67632eefd618e Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 10:35:25 +0300 Subject: [PATCH 15/16] chore: add semantic-release configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .releaserc.json | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .releaserc.json diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 0000000..3467942 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,80 @@ +{ + "branches": ["main"], + "plugins": [ + [ + "@semantic-release/commit-analyzer", + { + "preset": "conventionalcommits", + "releaseRules": [ + {"type": "feat", "release": "minor"}, + {"type": "fix", "release": "patch"}, + {"type": "perf", "release": "patch"}, + {"type": "revert", "release": "patch"}, + {"type": "docs", "release": "patch"}, + {"type": "style", "release": "patch"}, + {"type": "refactor", "release": "patch"}, + {"type": "test", "release": "patch"}, + {"type": "ci", "release": "patch"}, + {"type": "chore", "release": "patch"}, + {"type": "build", "release": "patch"}, + {"breaking": true, "release": "major"}, + {"scope": "no-release", "release": false} + ], + "parserOpts": { + "noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"] + } + } + ], + [ + "@semantic-release/release-notes-generator", + { + "preset": "conventionalcommits", + "presetConfig": { + "types": [ + {"type": "feat", "section": "🚀 Features"}, + {"type": "fix", "section": "🐛 Bug Fixes"}, + {"type": "perf", "section": "⚡ Performance Improvements"}, + {"type": "revert", "section": "⏪ Reverts"}, + {"type": "docs", "section": "📚 Documentation"}, + {"type": "style", "section": "💄 Styles"}, + {"type": "refactor", "section": "♻️ Code Refactoring"}, + {"type": "test", "section": "✅ Tests"}, + {"type": "ci", "section": "🔧 CI/CD"}, + {"type": "chore", "section": "🏗️ Chores"}, + {"type": "build", "section": "📦 Build System"} + ] + }, + "writerOpts": { + "commitsSort": ["subject", "scope"] + } + } + ], + [ + "@semantic-release/changelog", + { + "changelogFile": "CHANGELOG.md" + } + ], + [ + "@semantic-release/github", + { + "assets": [ + { + "path": "CHANGELOG.md", + "label": "Changelog" + } + ], + "successComment": false, + "failComment": false, + "releasedLabels": false + } + ], + [ + "@semantic-release/git", + { + "assets": ["CHANGELOG.md"], + "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" + } + ] + ] +} From 54d11bfca0661042b626ee5a29abe3ef782cd956 Mon Sep 17 00:00:00 2001 From: justgithubaccount Date: Fri, 5 Dec 2025 10:40:20 +0300 Subject: [PATCH 16/16] fix(ci): skip CRD types in kubeconform validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skip ArgoCD, cert-manager, and sealed-secrets CRDs that don't have built-in schemas in kubeconform. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/validate.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml index 7ccc2a0..826d7c2 100644 --- a/.github/workflows/validate.yaml +++ b/.github/workflows/validate.yaml @@ -29,7 +29,10 @@ jobs: kubectl kustomize clusters/${{ matrix.env }}/ > rendered.yaml - name: Kubeconform validation - run: kubeconform -summary -strict rendered.yaml + run: | + kubeconform -summary -strict \ + -skip Application,ApplicationSet,Certificate,ClusterIssuer,SealedSecret \ + rendered.yaml - name: OPA policy check run: |