Closed Peefy closed 5 months ago
here is a "real-world" usage example
schema ArgoCdManifest:
[str]: any
metadata: ArgoCdManifestMetadata
schema ArgoCdManifestMetadata:
[str]: any
annotations: ArgoCdManifestMetadataAnnotations
schema ArgoCdManifestMetadataAnnotations:
[str]: any
"argocd.argoproj.io/sync-wave": str
"argocd.argoproj.io/phase": str
check:
argocd.argoproj.io/phase in ["preSync","sync","postSync"]
int(argocd.argoproj.io/sync-wave) >= 1
preparePhase = lambda phase: str, a: [any] -> [ArgoCdManifest] {
resources = filter resource in a {
resource != None
}
sync_wave = 0
[
resource | ArgoCdManifest {
metadata = {
annotations = {
"argocd.argoproj.io/sync-wave"" = phase
"argocd.argoproj.io/phase" = str(sync_wave + 1)
}
}
}
for resource in resources
]
}
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
Compile sucessful!
3. What did you see instead (Required)
4. What is your KCL components version? (Required)
kcl v0.8.4