From c25b67145d14feb435ad9f7fe2401bb508337676 Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 25 May 2026 01:04:12 +0800 Subject: [PATCH] chore: render G14 GitOps desired state --- deploy/gitops/g14/README.md | 10 + deploy/gitops/g14/argocd/application.yaml | 34 + deploy/gitops/g14/argocd/project.yaml | 32 + deploy/gitops/g14/registry/registry.yaml | 113 ++ .../g14/runtime/code-agent-codex-config.yaml | 20 + .../gitops/g14/runtime/health-contract.yaml | 30 + deploy/gitops/g14/runtime/kustomization.yaml | 12 + deploy/gitops/g14/runtime/namespace.yaml | 16 + deploy/gitops/g14/runtime/services.yaml | 492 ++++++ deploy/gitops/g14/runtime/workloads.yaml | 1533 +++++++++++++++++ deploy/gitops/g14/tekton/pipeline.yaml | 228 +++ .../gitops/g14/tekton/pipelinerun.sample.yaml | 74 + deploy/gitops/g14/tekton/rbac.yaml | 93 + 13 files changed, 2687 insertions(+) create mode 100644 deploy/gitops/g14/README.md create mode 100644 deploy/gitops/g14/argocd/application.yaml create mode 100644 deploy/gitops/g14/argocd/project.yaml create mode 100644 deploy/gitops/g14/registry/registry.yaml create mode 100644 deploy/gitops/g14/runtime/code-agent-codex-config.yaml create mode 100644 deploy/gitops/g14/runtime/health-contract.yaml create mode 100644 deploy/gitops/g14/runtime/kustomization.yaml create mode 100644 deploy/gitops/g14/runtime/namespace.yaml create mode 100644 deploy/gitops/g14/runtime/services.yaml create mode 100644 deploy/gitops/g14/runtime/workloads.yaml create mode 100644 deploy/gitops/g14/tekton/pipeline.yaml create mode 100644 deploy/gitops/g14/tekton/pipelinerun.sample.yaml create mode 100644 deploy/gitops/g14/tekton/rbac.yaml diff --git a/deploy/gitops/g14/README.md b/deploy/gitops/g14/README.md new file mode 100644 index 00000000..88ae1002 --- /dev/null +++ b/deploy/gitops/g14/README.md @@ -0,0 +1,10 @@ +# HWLAB G14 GitOps CI/CD + +This directory is generated from `CI.json`, `deploy/deploy.json`, and `deploy/k8s/*` by `scripts/g14-gitops-render.mjs`. + +- Target: G14 k3s only. +- CI: Tekton Pipeline `hwlab-ci/hwlab-g14-ci-image-publish`. +- Artifact contract: images are tagged by source git commit `0b0c02f` and pushed to `127.0.0.1:5000/hwlab`. +- CD: Argo CD Application `argocd/hwlab-g14-dev` consumes `deploy/gitops/g14/runtime`. +- D601 boundary: this path does not target D601, does not use UniDesk Code Queue, and does not change D601 production traffic. +- Concurrency: CI builds are per source commit and do not acquire the legacy DEV CD Lease; Argo CD reconciles the Git desired state. diff --git a/deploy/gitops/g14/argocd/application.yaml b/deploy/gitops/g14/argocd/application.yaml new file mode 100644 index 00000000..778fdb63 --- /dev/null +++ b/deploy/gitops/g14/argocd/application.yaml @@ -0,0 +1,34 @@ +{ + "apiVersion": "argoproj.io/v1alpha1", + "kind": "Application", + "metadata": { + "name": "hwlab-g14-dev", + "namespace": "argocd", + "labels": { + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/gitops-target": "g14" + } + }, + "spec": { + "project": "hwlab-g14", + "source": { + "repoURL": "git@github.com:pikasTech/HWLAB.git", + "targetRevision": "G14", + "path": "deploy/gitops/g14/runtime" + }, + "destination": { + "server": "https://kubernetes.default.svc", + "namespace": "hwlab-dev" + }, + "syncPolicy": { + "automated": { + "prune": false, + "selfHeal": true + }, + "syncOptions": [ + "CreateNamespace=true", + "ApplyOutOfSyncOnly=true" + ] + } + } +} diff --git a/deploy/gitops/g14/argocd/project.yaml b/deploy/gitops/g14/argocd/project.yaml new file mode 100644 index 00000000..1b2ec374 --- /dev/null +++ b/deploy/gitops/g14/argocd/project.yaml @@ -0,0 +1,32 @@ +{ + "apiVersion": "argoproj.io/v1alpha1", + "kind": "AppProject", + "metadata": { + "name": "hwlab-g14", + "namespace": "argocd" + }, + "spec": { + "description": "HWLAB G14 GitOps project; D601 remains outside this project.", + "sourceRepos": [ + "git@github.com:pikasTech/HWLAB.git" + ], + "destinations": [ + { + "server": "https://kubernetes.default.svc", + "namespace": "hwlab-dev" + } + ], + "clusterResourceWhitelist": [ + { + "group": "", + "kind": "Namespace" + } + ], + "namespaceResourceWhitelist": [ + { + "group": "*", + "kind": "*" + } + ] + } +} diff --git a/deploy/gitops/g14/registry/registry.yaml b/deploy/gitops/g14/registry/registry.yaml new file mode 100644 index 00000000..f29ffc9e --- /dev/null +++ b/deploy/gitops/g14/registry/registry.yaml @@ -0,0 +1,113 @@ +{ + "apiVersion": "v1", + "kind": "List", + "items": [ + { + "apiVersion": "v1", + "kind": "Namespace", + "metadata": { + "name": "hwlab-ci" + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-registry", + "namespace": "hwlab-ci", + "labels": { + "app.kubernetes.io/name": "hwlab-registry" + } + }, + "spec": { + "replicas": 1, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-registry" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-registry" + } + }, + "spec": { + "hostNetwork": true, + "dnsPolicy": "ClusterFirstWithHostNet", + "containers": [ + { + "name": "registry", + "image": "registry:2.8.3", + "imagePullPolicy": "IfNotPresent", + "ports": [ + { + "name": "registry", + "containerPort": 5000, + "hostPort": 5000 + } + ], + "env": [ + { + "name": "REGISTRY_STORAGE_DELETE_ENABLED", + "value": "true" + } + ], + "volumeMounts": [ + { + "name": "storage", + "mountPath": "/var/lib/registry" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/v2/", + "port": "registry" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/v2/", + "port": "registry" + } + } + } + ], + "volumes": [ + { + "name": "storage", + "hostPath": { + "path": "/var/lib/hwlab/registry", + "type": "DirectoryOrCreate" + } + } + ] + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-registry", + "namespace": "hwlab-ci", + "labels": { + "app.kubernetes.io/name": "hwlab-registry" + } + }, + "spec": { + "selector": { + "app.kubernetes.io/name": "hwlab-registry" + }, + "ports": [ + { + "name": "registry", + "port": 5000, + "targetPort": "registry" + } + ] + } + } + ] +} diff --git a/deploy/gitops/g14/runtime/code-agent-codex-config.yaml b/deploy/gitops/g14/runtime/code-agent-codex-config.yaml new file mode 100644 index 00000000..b940fc1d --- /dev/null +++ b/deploy/gitops/g14/runtime/code-agent-codex-config.yaml @@ -0,0 +1,20 @@ +{ + "apiVersion": "v1", + "kind": "ConfigMap", + "metadata": { + "name": "hwlab-code-agent-codex-config", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-code-agent-codex-config", + "hwlab.pikastech.local/service-id": "hwlab-cloud-api", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "data": { + "config.toml": "model_provider = \"OpenAI\"\nmodel = \"gpt-5.4\"\nreview_model = \"gpt-5.4\"\nmodel_reasoning_effort = \"xhigh\"\ndisable_response_storage = true\nnetwork_access = \"enabled\"\nmodel_context_window = 1000000\nmodel_auto_compact_token_limit = 900000\n\n[model_providers.OpenAI]\nname = \"OpenAI\"\nbase_url = \"https://hyueapi.com\"\nwire_api = \"responses\"\nrequires_openai_auth = true\n\n[model_providers.crs]\nrequest_max_retries = 1000\nstream_max_retries = 1000\nname = \"crs\"\nbase_url = \"https://api.gptclubapi.xyz/openai\"\nwire_api = \"responses\"\nrequires_openai_auth = true\nenv_key = \"CRS_OAI_KEY\"\n" + } +} diff --git a/deploy/gitops/g14/runtime/health-contract.yaml b/deploy/gitops/g14/runtime/health-contract.yaml new file mode 100644 index 00000000..904b26f5 --- /dev/null +++ b/deploy/gitops/g14/runtime/health-contract.yaml @@ -0,0 +1,30 @@ +{ + "apiVersion": "v1", + "kind": "ConfigMap", + "metadata": { + "name": "hwlab-dev-health-contract", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-dev-health-contract", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "data": { + "endpoint": "http://hwlab-edge-proxy.hwlab-dev.svc.cluster.local:6667", + "cloud-api": "GET /health/live through http://hwlab-edge-proxy.hwlab-dev.svc.cluster.local:6667", + "cloud-api-db": "DEV DB config gate requires HWLAB_CLOUD_DB_URL from Secret hwlab-cloud-api-dev-db/database-url and HWLAB_CLOUD_DB_SSL_MODE=disable. Runtime readiness dials the redacted host parsed from the Secret URL and reports endpointSource=secret-url-host. cloud-api-db is an optional desired alias only until this repo owns Service plus Endpoint or EndpointSlice manifests and rollout/apply contract; health reports env presence, env injection, redacted connection attempt/result, and liveConnected without exposing secret values", + "cloud-web": "GET /health/live on http://hwlab-cloud-web.hwlab-dev.svc.cluster.local:8080; consumes cloud-api only", + "agent": "hwlab-agent-mgr readiness gates worker template creation; hwlab-agent-worker is suspended until a session is scheduled", + "sim": "hwlab-gateway-simu:7101 and hwlab-box-simu:7201 expose /health/live for DEV smoke", + "patch-panel": "hwlab-patch-panel:7301 exposes /health/live and owns patch panel state", + "router": "hwlab-router:7401 exposes /health/live and owns edge reachability routing", + "tunnel-client": "disabled for G14 GitOps; no FRP or production traffic tunnel is required", + "edge-proxy": "hwlab-edge-proxy:6667 exposes /health/live and proxies DEV endpoint traffic to hwlab-cloud-api", + "runtime-substitute-policy": "Do not replace HWLAB runtime with UniDesk backend, provider-gateway, or microservice proxy" + } +} diff --git a/deploy/gitops/g14/runtime/kustomization.yaml b/deploy/gitops/g14/runtime/kustomization.yaml new file mode 100644 index 00000000..c46bd528 --- /dev/null +++ b/deploy/gitops/g14/runtime/kustomization.yaml @@ -0,0 +1,12 @@ +{ + "apiVersion": "kustomize.config.k8s.io/v1beta1", + "kind": "Kustomization", + "namespace": "hwlab-dev", + "resources": [ + "namespace.yaml", + "code-agent-codex-config.yaml", + "services.yaml", + "health-contract.yaml", + "workloads.yaml" + ] +} diff --git a/deploy/gitops/g14/runtime/namespace.yaml b/deploy/gitops/g14/runtime/namespace.yaml new file mode 100644 index 00000000..f1935939 --- /dev/null +++ b/deploy/gitops/g14/runtime/namespace.yaml @@ -0,0 +1,16 @@ +{ + "apiVersion": "v1", + "kind": "Namespace", + "metadata": { + "name": "hwlab-dev", + "labels": { + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + } +} diff --git a/deploy/gitops/g14/runtime/services.yaml b/deploy/gitops/g14/runtime/services.yaml new file mode 100644 index 00000000..9aa6384d --- /dev/null +++ b/deploy/gitops/g14/runtime/services.yaml @@ -0,0 +1,492 @@ +{ + "apiVersion": "v1", + "kind": "List", + "items": [ + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-cloud-api", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-cloud-api", + "hwlab.pikastech.local/service-id": "hwlab-cloud-api", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-cloud-api" + }, + "ports": [ + { + "name": "http", + "port": 6667, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-gateway-simu-1", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-gateway-simu", + "hwlab.pikastech.local/service-id": "hwlab-gateway-simu", + "hwlab.pikastech.local/instance-id": "gwsimu_1", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "statefulset.kubernetes.io/pod-name": "hwlab-gateway-simu-0" + }, + "ports": [ + { + "name": "http", + "port": 7101, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-gateway-simu-2", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-gateway-simu", + "hwlab.pikastech.local/service-id": "hwlab-gateway-simu", + "hwlab.pikastech.local/instance-id": "gwsimu_2", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "statefulset.kubernetes.io/pod-name": "hwlab-gateway-simu-1" + }, + "ports": [ + { + "name": "http", + "port": 7101, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-cloud-web", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-cloud-web", + "hwlab.pikastech.local/service-id": "hwlab-cloud-web", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-cloud-web" + }, + "ports": [ + { + "name": "http", + "port": 8080, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-box-simu-1", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-box-simu", + "hwlab.pikastech.local/service-id": "hwlab-box-simu", + "hwlab.pikastech.local/instance-id": "res_boxsimu_1", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "statefulset.kubernetes.io/pod-name": "hwlab-box-simu-0" + }, + "ports": [ + { + "name": "http", + "port": 7201, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-box-simu-2", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-box-simu", + "hwlab.pikastech.local/service-id": "hwlab-box-simu", + "hwlab.pikastech.local/instance-id": "res_boxsimu_2", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "statefulset.kubernetes.io/pod-name": "hwlab-box-simu-1" + }, + "ports": [ + { + "name": "http", + "port": 7201, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-gateway", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-gateway", + "hwlab.pikastech.local/service-id": "hwlab-gateway", + "hwlab.pikastech.local/activation": "manual", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-gateway" + }, + "ports": [ + { + "name": "http", + "port": 7001, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-cli", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-cli", + "hwlab.pikastech.local/service-id": "hwlab-cli", + "hwlab.pikastech.local/activation": "manual", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-cli" + }, + "ports": [ + { + "name": "http", + "port": 7501, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-agent-skills", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-agent-skills", + "hwlab.pikastech.local/service-id": "hwlab-agent-skills", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-agent-skills" + }, + "ports": [ + { + "name": "http", + "port": 7430, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-agent-mgr", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-agent-mgr", + "hwlab.pikastech.local/service-id": "hwlab-agent-mgr", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-agent-mgr" + }, + "ports": [ + { + "name": "http", + "port": 7410, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-gateway-simu", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-gateway-simu", + "hwlab.pikastech.local/service-id": "hwlab-gateway-simu", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-gateway-simu" + }, + "ports": [ + { + "name": "http", + "port": 7101, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-box-simu", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-box-simu", + "hwlab.pikastech.local/service-id": "hwlab-box-simu", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-box-simu" + }, + "ports": [ + { + "name": "http", + "port": 7201, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-patch-panel", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-patch-panel", + "hwlab.pikastech.local/service-id": "hwlab-patch-panel", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-patch-panel" + }, + "ports": [ + { + "name": "http", + "port": 7301, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-router", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-router", + "hwlab.pikastech.local/service-id": "hwlab-router", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-router" + }, + "ports": [ + { + "name": "http", + "port": 7401, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-tunnel-client", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-tunnel-client", + "hwlab.pikastech.local/service-id": "hwlab-tunnel-client", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-tunnel-client" + }, + "ports": [ + { + "name": "http", + "port": 7402, + "targetPort": "http" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "hwlab-edge-proxy", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-edge-proxy", + "hwlab.pikastech.local/service-id": "hwlab-edge-proxy", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "type": "ClusterIP", + "selector": { + "app.kubernetes.io/name": "hwlab-edge-proxy" + }, + "ports": [ + { + "name": "http", + "port": 6667, + "targetPort": "http" + } + ] + } + } + ] +} diff --git a/deploy/gitops/g14/runtime/workloads.yaml b/deploy/gitops/g14/runtime/workloads.yaml new file mode 100644 index 00000000..81dc9573 --- /dev/null +++ b/deploy/gitops/g14/runtime/workloads.yaml @@ -0,0 +1,1533 @@ +{ + "apiVersion": "v1", + "kind": "List", + "items": [ + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-cloud-api", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-cloud-api", + "hwlab.pikastech.local/service-id": "hwlab-cloud-api", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "replicas": 1, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-cloud-api", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-cloud-api", + "hwlab.pikastech.local/service-id": "hwlab-cloud-api", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-cloud-api", + "image": "127.0.0.1:5000/hwlab/hwlab-cloud-api:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 6667 + } + ], + "env": [ + { + "name": "HWLAB_ENVIRONMENT", + "value": "dev" + }, + { + "name": "HWLAB_PUBLIC_ENDPOINT", + "value": "http://hwlab-edge-proxy.hwlab-dev.svc.cluster.local:6667" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-cloud-api:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_RUNTIME_SUBSTITUTE_FORBIDDEN", + "value": "unidesk-backend,provider-gateway,microservice-proxy" + }, + { + "name": "HWLAB_CLOUD_DB_URL", + "valueFrom": { + "secretKeyRef": { + "name": "hwlab-cloud-api-dev-db", + "key": "database-url", + "optional": true + } + } + }, + { + "name": "HWLAB_CLOUD_DB_SSL_MODE", + "value": "disable" + }, + { + "name": "HWLAB_CLOUD_DB_CONTRACT", + "value": "dev-redacted-presence-only" + }, + { + "name": "HWLAB_CLOUD_RUNTIME_ADAPTER", + "value": "postgres" + }, + { + "name": "HWLAB_CLOUD_RUNTIME_DURABLE", + "value": "true" + }, + { + "name": "HWLAB_M3_IO_CONTROL_ENABLED", + "value": "true" + }, + { + "name": "HWLAB_M3_GATEWAY_SIMU_1_URL", + "value": "http://hwlab-gateway-simu-1.hwlab-dev.svc.cluster.local:7101" + }, + { + "name": "HWLAB_M3_GATEWAY_SIMU_2_URL", + "value": "http://hwlab-gateway-simu-2.hwlab-dev.svc.cluster.local:7101" + }, + { + "name": "HWLAB_M3_PATCH_PANEL_URL", + "value": "http://hwlab-patch-panel.hwlab-dev.svc.cluster.local:7301" + }, + { + "name": "HWLAB_CODE_AGENT_PROVIDER", + "value": "codex-stdio" + }, + { + "name": "HWLAB_CODE_AGENT_MODEL", + "value": "gpt-5.5" + }, + { + "name": "HWLAB_CODE_AGENT_TIMEOUT_MS", + "value": "150000" + }, + { + "name": "HWLAB_CODE_AGENT_OPENAI_BASE_URL", + "value": "http://172.26.26.227:17680/v1/responses" + }, + { + "name": "HWLAB_CODE_AGENT_HWLAB_API_BASE_URL", + "value": "http://hwlab-cloud-api.hwlab-dev.svc.cluster.local:6667" + }, + { + "name": "HWLAB_CODE_AGENT_CODEX_STDIO_ENABLED", + "value": "1" + }, + { + "name": "HWLAB_CODE_AGENT_CODEX_STDIO_SUPERVISOR", + "value": "repo-owned" + }, + { + "name": "HWLAB_CODE_AGENT_WORKSPACE", + "value": "/workspace/hwlab" + }, + { + "name": "HWLAB_CODE_AGENT_CODEX_WORKSPACE", + "value": "/workspace/hwlab" + }, + { + "name": "HWLAB_CODE_AGENT_CODEX_SANDBOX", + "value": "danger-full-access" + }, + { + "name": "HWLAB_CODE_AGENT_CODEX_COMMAND", + "value": "/app/node_modules/.bin/codex" + }, + { + "name": "CODEX_HOME", + "value": "/codex-home" + }, + { + "name": "NO_PROXY", + "value": "hyueapi.com,.hyueapi.com,hyui.com,.hyui.com,127.0.0.1,localhost,::1,api.minimaxi.com,.minimaxi.com" + }, + { + "name": "no_proxy", + "value": "hyueapi.com,.hyueapi.com,hyui.com,.hyui.com,127.0.0.1,localhost,::1,api.minimaxi.com,.minimaxi.com" + }, + { + "name": "HWLAB_CODE_AGENT_SKILLS_DIRS", + "value": "/app/skills:/root/.agents/skills:/home/ubuntu/.agents/skills" + }, + { + "name": "OPENAI_API_KEY", + "valueFrom": { + "secretKeyRef": { + "name": "hwlab-code-agent-provider", + "key": "openai-api-key", + "optional": true + } + } + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "volumeMounts": [ + { + "name": "hwlab-code-agent-workspace", + "mountPath": "/workspace" + }, + { + "name": "hwlab-code-agent-codex-home", + "mountPath": "/codex-home" + }, + { + "name": "hwlab-code-agent-codex-config", + "mountPath": "/codex-home/config.toml", + "subPath": "config.toml", + "readOnly": true + }, + { + "name": "hwlab-code-agent-codex-auth", + "mountPath": "/codex-home/auth.json", + "subPath": "auth.json", + "readOnly": true + } + ], + "imagePullPolicy": "IfNotPresent" + } + ], + "volumes": [ + { + "name": "hwlab-code-agent-workspace", + "emptyDir": {} + }, + { + "name": "hwlab-code-agent-codex-home", + "emptyDir": {} + }, + { + "name": "hwlab-code-agent-codex-config", + "configMap": { + "name": "hwlab-code-agent-codex-config", + "items": [ + { + "key": "config.toml", + "path": "config.toml" + } + ] + } + }, + { + "name": "hwlab-code-agent-codex-auth", + "secret": { + "secretName": "hwlab-code-agent-codex-auth", + "items": [ + { + "key": "auth.json", + "path": "auth.json" + } + ] + } + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-cloud-web", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-cloud-web", + "hwlab.pikastech.local/service-id": "hwlab-cloud-web", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "replicas": 1, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-cloud-web", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-cloud-web", + "hwlab.pikastech.local/service-id": "hwlab-cloud-web", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-cloud-web", + "image": "127.0.0.1:5000/hwlab/hwlab-cloud-web:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 8080 + } + ], + "env": [ + { + "name": "HWLAB_API_BASE_URL", + "value": "http://hwlab-cloud-api.hwlab-dev.svc.cluster.local:6667" + }, + { + "name": "HWLAB_CLOUD_WEB_PROXY_TIMEOUT_MS", + "value": "180000" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-cloud-web:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_PUBLIC_ENDPOINT", + "value": "http://hwlab-cloud-web.hwlab-dev.svc.cluster.local:8080" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-agent-mgr", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-agent-mgr", + "hwlab.pikastech.local/service-id": "hwlab-agent-mgr", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "replicas": 1, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-agent-mgr", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-agent-mgr", + "hwlab.pikastech.local/service-id": "hwlab-agent-mgr", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-agent-mgr", + "image": "127.0.0.1:5000/hwlab/hwlab-agent-mgr:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 7410 + } + ], + "env": [ + { + "name": "HWLAB_AGENT_SESSION_MODE", + "value": "control-plane" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-agent-mgr:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "batch/v1", + "kind": "Job", + "metadata": { + "name": "hwlab-agent-worker-template", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-agent-worker", + "hwlab.pikastech.local/service-id": "hwlab-agent-worker", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "argocd.argoproj.io/sync-options": "Replace=true" + } + }, + "spec": { + "suspend": true, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-agent-worker", + "hwlab.pikastech.local/service-id": "hwlab-agent-worker", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "restartPolicy": "Never", + "containers": [ + { + "name": "hwlab-agent-worker", + "image": "127.0.0.1:5000/hwlab/hwlab-agent-worker:0b0c02f", + "env": [ + { + "name": "HWLAB_AGENT_SESSION_MODE", + "value": "session-scoped" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-agent-worker:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-gateway", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-gateway", + "hwlab.pikastech.local/service-id": "hwlab-gateway", + "hwlab.pikastech.local/activation": "manual", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "replicas": 0, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-gateway", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-gateway", + "hwlab.pikastech.local/service-id": "hwlab-gateway", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-gateway", + "image": "127.0.0.1:5000/hwlab/hwlab-gateway:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 7001 + } + ], + "env": [ + { + "name": "HWLAB_GATEWAY_MODE", + "value": "hardware-boundary" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-gateway:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "StatefulSet", + "metadata": { + "name": "hwlab-gateway-simu", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-gateway-simu", + "hwlab.pikastech.local/service-id": "hwlab-gateway-simu", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "serviceName": "hwlab-gateway-simu", + "replicas": 2, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-gateway-simu", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-gateway-simu", + "hwlab.pikastech.local/service-id": "hwlab-gateway-simu", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-gateway-simu", + "image": "127.0.0.1:5000/hwlab/hwlab-gateway-simu:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 7101 + } + ], + "env": [ + { + "name": "HWLAB_GATEWAY_ID", + "value": "gwsimu_1,gwsimu_2" + }, + { + "name": "HWLAB_BOX_IDS", + "value": "boxsimu_1,boxsimu_2" + }, + { + "name": "HWLAB_BOX_RESOURCES", + "value": "res_boxsimu_1,res_boxsimu_2" + }, + { + "name": "HWLAB_BOX_URLS", + "value": "http://hwlab-box-simu-1.hwlab-dev.svc.cluster.local:7201,http://hwlab-box-simu-2.hwlab-dev.svc.cluster.local:7201" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-gateway-simu:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "StatefulSet", + "metadata": { + "name": "hwlab-box-simu", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-box-simu", + "hwlab.pikastech.local/service-id": "hwlab-box-simu", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "serviceName": "hwlab-box-simu", + "replicas": 2, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-box-simu", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-box-simu", + "hwlab.pikastech.local/service-id": "hwlab-box-simu", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-box-simu", + "image": "127.0.0.1:5000/hwlab/hwlab-box-simu:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 7201 + } + ], + "env": [ + { + "name": "HWLAB_BOX_ID", + "value": "boxsimu_1,boxsimu_2" + }, + { + "name": "HWLAB_BOX_RESOURCE_ID", + "value": "res_boxsimu_1,res_boxsimu_2" + }, + { + "name": "HWLAB_GATEWAY_SESSION_ID", + "value": "gws_gwsimu_1,gws_gwsimu_2" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-box-simu:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-patch-panel", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-patch-panel", + "hwlab.pikastech.local/service-id": "hwlab-patch-panel", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "replicas": 1, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-patch-panel", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-patch-panel", + "hwlab.pikastech.local/service-id": "hwlab-patch-panel", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-patch-panel", + "image": "127.0.0.1:5000/hwlab/hwlab-patch-panel:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 7301 + } + ], + "env": [ + { + "name": "HWLAB_PATCH_PANEL_ENDPOINT_MAP", + "value": "{\"res_boxsimu_2\":\"http://hwlab-box-simu-2.hwlab-dev.svc.cluster.local:7201\"}" + }, + { + "name": "HWLAB_PATCH_PANEL_WIRING_CONFIG", + "value": "{\"wiringConfigId\":\"wir_m3_do1_di1\",\"projectId\":\"prj_m3_hardware_loop\",\"gatewaySessionId\":\"gws_gwsimu_1\",\"name\":\"M3 simulated DO1 to DI1 patch wiring\",\"status\":\"active\",\"connections\":[{\"from\":{\"resourceId\":\"res_boxsimu_1\",\"port\":\"DO1\"},\"to\":{\"resourceId\":\"res_boxsimu_2\",\"port\":\"DI1\"},\"mode\":\"exclusive\"}],\"constraints\":{\"propagation\":\"patch-panel-only\",\"localLoopbackSubstituteAllowed\":false},\"createdAt\":\"2026-05-21T00:00:00.000Z\",\"updatedAt\":\"2026-05-21T00:00:00.000Z\"}" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-patch-panel:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-router", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-router", + "hwlab.pikastech.local/service-id": "hwlab-router", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "replicas": 1, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-router", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-router", + "hwlab.pikastech.local/service-id": "hwlab-router", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-router", + "image": "127.0.0.1:5000/hwlab/hwlab-router:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 7401 + } + ], + "env": [ + { + "name": "HWLAB_EDGE_PROXY_SERVICE", + "value": "hwlab-edge-proxy" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-router:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-tunnel-client", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-tunnel-client", + "hwlab.pikastech.local/service-id": "hwlab-tunnel-client", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "replicas": 0, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-tunnel-client", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-tunnel-client", + "hwlab.pikastech.local/service-id": "hwlab-tunnel-client", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-tunnel-client", + "image": "127.0.0.1:5000/hwlab/hwlab-tunnel-client:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 7402 + } + ], + "env": [ + { + "name": "HWLAB_TUNNEL_MODE", + "value": "disabled-g14-gitops" + }, + { + "name": "HWLAB_FRP_SERVER_ADDR", + "value": "" + }, + { + "name": "HWLAB_FRP_PUBLIC_PORT", + "value": "0" + }, + { + "name": "HWLAB_FRP_WEB_PUBLIC_PORT", + "value": "0" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-tunnel-client:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-edge-proxy", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-edge-proxy", + "hwlab.pikastech.local/service-id": "hwlab-edge-proxy", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "replicas": 1, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-edge-proxy", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-edge-proxy", + "hwlab.pikastech.local/service-id": "hwlab-edge-proxy", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-edge-proxy", + "image": "127.0.0.1:5000/hwlab/hwlab-edge-proxy:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 6667 + } + ], + "env": [ + { + "name": "HWLAB_EDGE_LISTEN", + "value": "0.0.0.0:6667" + }, + { + "name": "HWLAB_EDGE_UPSTREAM", + "value": "http://hwlab-cloud-api.hwlab-dev.svc.cluster.local:6667" + }, + { + "name": "HWLAB_EDGE_PROXY_TIMEOUT_MS", + "value": "180000" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-edge-proxy:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_PUBLIC_ENDPOINT", + "value": "http://hwlab-edge-proxy.hwlab-dev.svc.cluster.local:6667" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "batch/v1", + "kind": "Job", + "metadata": { + "name": "hwlab-cli-template", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-cli", + "hwlab.pikastech.local/service-id": "hwlab-cli", + "hwlab.pikastech.local/activation": "manual", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "argocd.argoproj.io/sync-options": "Replace=true" + } + }, + "spec": { + "suspend": true, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-cli", + "hwlab.pikastech.local/service-id": "hwlab-cli", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "restartPolicy": "Never", + "containers": [ + { + "name": "hwlab-cli", + "image": "127.0.0.1:5000/hwlab/hwlab-cli:0b0c02f", + "env": [ + { + "name": "HWLAB_CLI_ENDPOINT", + "value": "http://hwlab-edge-proxy.hwlab-dev.svc.cluster.local:6667" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-cli:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "name": "hwlab-agent-skills", + "namespace": "hwlab-dev", + "labels": { + "app.kubernetes.io/name": "hwlab-agent-skills", + "hwlab.pikastech.local/service-id": "hwlab-agent-skills", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "unidesk.ai/g14-staging": "true" + }, + "annotations": { + "hwlab.pikastech.local/gitops-note": "G14 GitOps target only; production traffic remains outside this target.", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "replicas": 1, + "selector": { + "matchLabels": { + "app.kubernetes.io/name": "hwlab-agent-skills", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev" + } + }, + "template": { + "metadata": { + "labels": { + "app.kubernetes.io/name": "hwlab-agent-skills", + "hwlab.pikastech.local/service-id": "hwlab-agent-skills", + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/environment": "dev", + "hwlab.pikastech.local/profile": "dev", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + "annotations": { + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b", + "hwlab.pikastech.local/rendered-by": "scripts/g14-gitops-render.mjs" + } + }, + "spec": { + "containers": [ + { + "name": "hwlab-agent-skills", + "image": "127.0.0.1:5000/hwlab/hwlab-agent-skills:0b0c02f", + "ports": [ + { + "name": "http", + "containerPort": 7430 + } + ], + "env": [ + { + "name": "HWLAB_SKILLS_COMMIT_ID", + "value": "4d478a1" + }, + { + "name": "HWLAB_COMMIT_ID", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "HWLAB_IMAGE", + "value": "127.0.0.1:5000/hwlab/hwlab-agent-skills:0b0c02f" + }, + { + "name": "HWLAB_IMAGE_TAG", + "value": "0b0c02f" + }, + { + "name": "HWLAB_GITOPS_TARGET", + "value": "g14" + }, + { + "name": "HWLAB_GITOPS_SOURCE_COMMIT", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "livenessProbe": { + "httpGet": { + "path": "/health/live", + "port": "http" + } + }, + "imagePullPolicy": "IfNotPresent" + } + ] + } + } + } + } + ] +} diff --git a/deploy/gitops/g14/tekton/pipeline.yaml b/deploy/gitops/g14/tekton/pipeline.yaml new file mode 100644 index 00000000..70ff3824 --- /dev/null +++ b/deploy/gitops/g14/tekton/pipeline.yaml @@ -0,0 +1,228 @@ +{ + "apiVersion": "tekton.dev/v1", + "kind": "Pipeline", + "metadata": { + "name": "hwlab-g14-ci-image-publish", + "namespace": "hwlab-ci", + "labels": { + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/gitops-target": "g14" + }, + "annotations": { + "hwlab.pikastech.local/source-config": "CI.json", + "hwlab.pikastech.local/policy": "parallel-no-lock-ci-image-publish" + } + }, + "spec": { + "params": [ + { + "name": "git-url", + "type": "string", + "default": "git@github.com:pikasTech/HWLAB.git" + }, + { + "name": "source-branch", + "type": "string", + "default": "G14" + }, + { + "name": "revision", + "type": "string", + "description": "Full git commit SHA; the only source truth for image tags." + }, + { + "name": "registry-prefix", + "type": "string", + "default": "127.0.0.1:5000/hwlab" + }, + { + "name": "services", + "type": "string", + "default": "hwlab-cloud-api,hwlab-cloud-web,hwlab-agent-mgr,hwlab-agent-worker,hwlab-gateway,hwlab-gateway-simu,hwlab-box-simu,hwlab-patch-panel,hwlab-router,hwlab-tunnel-client,hwlab-edge-proxy,hwlab-cli,hwlab-agent-skills" + }, + { + "name": "base-image", + "type": "string", + "default": "node:20-bookworm-slim" + }, + { + "name": "concurrency", + "type": "string", + "default": "4" + } + ], + "workspaces": [ + { + "name": "source" + }, + { + "name": "git-ssh" + } + ], + "tasks": [ + { + "name": "ci-json", + "workspaces": [ + { + "name": "source", + "workspace": "source" + }, + { + "name": "git-ssh", + "workspace": "git-ssh" + } + ], + "taskSpec": { + "params": [ + { + "name": "git-url" + }, + { + "name": "source-branch" + }, + { + "name": "revision" + } + ], + "workspaces": [ + { + "name": "source" + }, + { + "name": "git-ssh" + } + ], + "steps": [ + { + "name": "ci-json", + "image": "node:22-alpine", + "script": "#!/bin/sh\nset -eu\napk add --no-cache git python3 openssh-client\nmkdir -p /root/.ssh\ncp /workspace/git-ssh/ssh-privatekey /root/.ssh/id_rsa\nchmod 600 /root/.ssh/id_rsa\nssh-keyscan github.com >> /root/.ssh/known_hosts 2>/dev/null\nrm -rf /workspace/source/repo\ngit clone --branch \"$(params.source-branch)\" \"$(params.git-url)\" /workspace/source/repo\ncd /workspace/source/repo\ngit checkout \"$(params.revision)\"\ntest \"$(git rev-parse HEAD)\" = \"$(params.revision)\"\nnpm ci --ignore-scripts\necho 'CI.json hwlab-deploy-skeleton-ci command count=6'\necho 'CI.json command: repo-reports-guard'\nnode scripts/repo-reports-guard.mjs\necho 'CI.json command: contract-check'\nnpm run check\necho 'CI.json command: dev-artifact-publish-static-check'\nnode --check scripts/dev-artifact-publish.mjs\necho 'CI.json command: parse-deploy-json'\nnode -e \"JSON.parse(require('node:fs').readFileSync('deploy/deploy.json','utf8'))\"\necho 'CI.json command: parse-k8s-json-yaml'\nnode -e \"const fs=require('node:fs'); for (const f of fs.readdirSync('deploy/k8s/base').concat(fs.readdirSync('deploy/k8s/dev').map(x=>'../dev/'+x), fs.readdirSync('deploy/k8s/prod').map(x=>'../prod/'+x))) { if (!f.endsWith('.yaml')) continue; const p=f.startsWith('..')?'deploy/k8s/'+f.replace('../',''):'deploy/k8s/base/'+f; JSON.parse(fs.readFileSync(p,'utf8')); }\"\necho 'CI.json command: parse-frp-toml'\npython3 - <<'PY'\nimport pathlib, tomllib\nfor path in pathlib.Path('deploy/frp').glob('*.toml'):\n tomllib.loads(path.read_text())\nPY\n" + } + ] + }, + "params": [ + { + "name": "git-url", + "value": "$(params.git-url)" + }, + { + "name": "source-branch", + "value": "$(params.source-branch)" + }, + { + "name": "revision", + "value": "$(params.revision)" + } + ] + }, + { + "name": "image-publish", + "runAfter": [ + "ci-json" + ], + "workspaces": [ + { + "name": "source", + "workspace": "source" + } + ], + "taskSpec": { + "params": [ + { + "name": "revision" + }, + { + "name": "registry-prefix" + }, + { + "name": "services" + }, + { + "name": "base-image" + }, + { + "name": "concurrency" + } + ], + "workspaces": [ + { + "name": "source" + } + ], + "volumes": [ + { + "name": "docker-run", + "emptyDir": {} + } + ], + "sidecars": [ + { + "name": "docker", + "image": "docker:29-dind", + "args": [ + "--host=unix:///var/run/docker.sock", + "--storage-driver=vfs" + ], + "env": [ + { + "name": "DOCKER_TLS_CERTDIR", + "value": "" + } + ], + "securityContext": { + "privileged": true + }, + "volumeMounts": [ + { + "name": "docker-run", + "mountPath": "/var/run" + } + ] + } + ], + "steps": [ + { + "name": "publish", + "image": "node:22-alpine", + "env": [ + { + "name": "DOCKER_HOST", + "value": "unix:///var/run/docker.sock" + } + ], + "volumeMounts": [ + { + "name": "docker-run", + "mountPath": "/var/run" + } + ], + "script": "#!/bin/sh\nset -eu\napk add --no-cache docker-cli git openssh-client python3\nexport DOCKER_HOST=unix:///var/run/docker.sock\nexport HWLAB_CI_ARTIFACT_RUN_ID=\"$(context.pipelineRun.name)\"\nexport HWLAB_CI_ARTIFACT_RUN_OWNER=\"tekton\"\nexport HWLAB_DEV_REGISTRY_PREFIX=\"$(params.registry-prefix)\"\nexport HWLAB_DEV_REGISTRY_K8S_NATIVE=1\nif [ -n \"$(params.base-image)\" ]; then export HWLAB_DEV_BASE_IMAGE=\"$(params.base-image)\"; fi\nfor i in $(seq 1 90); do docker info >/dev/null 2>&1 && break; sleep 2; done\ndocker info >/dev/null\ncd /workspace/source/repo\ntest \"$(git rev-parse HEAD)\" = \"$(params.revision)\"\nnode scripts/dev-artifact-publish.mjs --publish --registry-prefix \"$(params.registry-prefix)\" --report /workspace/source/dev-artifacts.json --quiet-build --concurrency \"$(params.concurrency)\" --services \"$(params.services)\"\nnode scripts/refresh-artifact-catalog.mjs --target-ref HEAD --publish-report /workspace/source/dev-artifacts.json --no-write\n" + } + ] + }, + "params": [ + { + "name": "revision", + "value": "$(params.revision)" + }, + { + "name": "registry-prefix", + "value": "$(params.registry-prefix)" + }, + { + "name": "services", + "value": "$(params.services)" + }, + { + "name": "base-image", + "value": "$(params.base-image)" + }, + { + "name": "concurrency", + "value": "$(params.concurrency)" + } + ] + } + ] + } +} diff --git a/deploy/gitops/g14/tekton/pipelinerun.sample.yaml b/deploy/gitops/g14/tekton/pipelinerun.sample.yaml new file mode 100644 index 00000000..95f7ae16 --- /dev/null +++ b/deploy/gitops/g14/tekton/pipelinerun.sample.yaml @@ -0,0 +1,74 @@ +{ + "apiVersion": "tekton.dev/v1", + "kind": "PipelineRun", + "metadata": { + "generateName": "hwlab-g14-ci-", + "namespace": "hwlab-ci", + "labels": { + "app.kubernetes.io/part-of": "hwlab", + "hwlab.pikastech.local/gitops-target": "g14", + "hwlab.pikastech.local/source-commit": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + } + }, + "spec": { + "pipelineRef": { + "name": "hwlab-g14-ci-image-publish" + }, + "taskRunTemplate": { + "serviceAccountName": "hwlab-tekton-runner", + "podTemplate": { + "hostNetwork": true, + "dnsPolicy": "ClusterFirstWithHostNet" + } + }, + "params": [ + { + "name": "git-url", + "value": "git@github.com:pikasTech/HWLAB.git" + }, + { + "name": "source-branch", + "value": "G14" + }, + { + "name": "revision", + "value": "0b0c02f39c6a55797a5a1d807e06d5ccd8621e3b" + }, + { + "name": "registry-prefix", + "value": "127.0.0.1:5000/hwlab" + }, + { + "name": "base-image", + "value": "node:20-bookworm-slim" + }, + { + "name": "concurrency", + "value": "4" + } + ], + "workspaces": [ + { + "name": "source", + "volumeClaimTemplate": { + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "8Gi" + } + } + } + } + }, + { + "name": "git-ssh", + "secret": { + "secretName": "hwlab-git-ssh" + } + } + ] + } +} diff --git a/deploy/gitops/g14/tekton/rbac.yaml b/deploy/gitops/g14/tekton/rbac.yaml new file mode 100644 index 00000000..4e2cd800 --- /dev/null +++ b/deploy/gitops/g14/tekton/rbac.yaml @@ -0,0 +1,93 @@ +{ + "apiVersion": "v1", + "kind": "List", + "items": [ + { + "apiVersion": "v1", + "kind": "Namespace", + "metadata": { + "name": "hwlab-ci" + } + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "metadata": { + "name": "hwlab-tekton-runner", + "namespace": "hwlab-ci" + } + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "Role", + "metadata": { + "name": "hwlab-tekton-runtime-observer", + "namespace": "hwlab-dev" + }, + "rules": [ + { + "apiGroups": [ + "" + ], + "resources": [ + "pods", + "services", + "configmaps" + ], + "verbs": [ + "get", + "list", + "watch" + ] + }, + { + "apiGroups": [ + "apps" + ], + "resources": [ + "deployments", + "statefulsets" + ], + "verbs": [ + "get", + "list", + "watch" + ] + }, + { + "apiGroups": [ + "batch" + ], + "resources": [ + "jobs" + ], + "verbs": [ + "get", + "list", + "watch" + ] + } + ] + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "RoleBinding", + "metadata": { + "name": "hwlab-tekton-runtime-observer", + "namespace": "hwlab-dev" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "hwlab-tekton-runner", + "namespace": "hwlab-ci" + } + ], + "roleRef": { + "apiGroup": "rbac.authorization.k8s.io", + "kind": "Role", + "name": "hwlab-tekton-runtime-observer" + } + } + ] +}