fix: track gitops render source in runtime readiness
This commit is contained in:
+1
-1
@@ -291,7 +291,7 @@ lanes:
|
||||
- skills/hwlab-agent-runtime/
|
||||
env:
|
||||
HWLAB_METRICS_NAMESPACE: hwlab-v03
|
||||
HWLAB_OBSERVABILITY_CONFIG_REVISION: PJ2026-01060505-20260617-render-env
|
||||
HWLAB_OBSERVABILITY_CONFIG_REVISION: PJ2026-01060505-20260617-render-source
|
||||
observable: true
|
||||
hwlab-user-billing:
|
||||
runtimeKind: go-service
|
||||
|
||||
@@ -1038,11 +1038,13 @@ function transformWorkloads({ workloads, deploy, catalog, source, sourceBranch =
|
||||
label(item.metadata, {
|
||||
...stableRuntimeLabels,
|
||||
"hwlab.pikastech.local/gitops-target": gitopsTarget,
|
||||
"hwlab.pikastech.local/gitops-render-source-commit": source.full,
|
||||
"hwlab.pikastech.local/source-commit": source.full,
|
||||
"unidesk.ai/node-staging": profile === "dev" ? "true" : "false"
|
||||
});
|
||||
annotate(item.metadata, {
|
||||
"hwlab.pikastech.local/gitops-note": profile === "v02" ? "HWLAB v0.2 GitOps target." : profile === "prod" ? "node PROD GitOps target." : "node DEV GitOps target.",
|
||||
"hwlab.pikastech.local/gitops-render-source-commit": source.full,
|
||||
"hwlab.pikastech.local/source-commit": source.full
|
||||
});
|
||||
if (item.kind === "Job") {
|
||||
@@ -1064,6 +1066,7 @@ function transformWorkloads({ workloads, deploy, catalog, source, sourceBranch =
|
||||
label(podTemplate.metadata ??= {}, {
|
||||
...stableRuntimeLabels,
|
||||
"hwlab.pikastech.local/gitops-target": gitopsTarget,
|
||||
"hwlab.pikastech.local/gitops-render-source-commit": source.full,
|
||||
"hwlab.pikastech.local/source-commit": templateSourceCommit,
|
||||
"hwlab.pikastech.local/artifact-source-commit": templateArtifactCommit
|
||||
});
|
||||
@@ -1080,6 +1083,7 @@ function transformWorkloads({ workloads, deploy, catalog, source, sourceBranch =
|
||||
};
|
||||
}
|
||||
annotate(podTemplate.metadata, {
|
||||
"hwlab.pikastech.local/gitops-render-source-commit": source.full,
|
||||
"hwlab.pikastech.local/source-commit": templateSourceCommit,
|
||||
"hwlab.pikastech.local/artifact-source-commit": templateArtifactCommit,
|
||||
"hwlab.pikastech.local/rendered-by": "scripts/gitops-render.mjs"
|
||||
@@ -2939,7 +2943,11 @@ async function runtimeItems() {
|
||||
}
|
||||
|
||||
function runtimeSourceCommit(item) {
|
||||
return item.spec?.template?.metadata?.labels?.["hwlab.pikastech.local/source-commit"] ||
|
||||
return item.spec?.template?.metadata?.labels?.["hwlab.pikastech.local/gitops-render-source-commit"] ||
|
||||
item.spec?.template?.metadata?.annotations?.["hwlab.pikastech.local/gitops-render-source-commit"] ||
|
||||
item.metadata?.labels?.["hwlab.pikastech.local/gitops-render-source-commit"] ||
|
||||
item.metadata?.annotations?.["hwlab.pikastech.local/gitops-render-source-commit"] ||
|
||||
item.spec?.template?.metadata?.labels?.["hwlab.pikastech.local/source-commit"] ||
|
||||
item.spec?.template?.metadata?.annotations?.["hwlab.pikastech.local/source-commit"] ||
|
||||
item.metadata?.labels?.["hwlab.pikastech.local/source-commit"] ||
|
||||
item.metadata?.annotations?.["hwlab.pikastech.local/source-commit"] ||
|
||||
|
||||
Reference in New Issue
Block a user