mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-18 03:56:36 +00:00
* feat: implement valuesFrom support for helmchart component and update documentation examples Signed-off-by: Anaswara Suresh <anaswarasuresh2212@gmail.com> * fix: address cubic review feedback on valuesFrom Three issues raised by cubic AI review on kubevela#7099: 1. docs/examples/helmchart-valuesfrom/secret-and-inline.yaml — Expected-result comments used incorrect paths (resources.cpu / resources.mem) and values (500m) that did not match the actual CM data. Rewrote the narrative to use the real paths (resources.limits.cpu / resources.limits.memory) and bundled the Secret inline in the manifest so the example is self-contained and the expected output is deterministic. 2. docs/examples/helmchart-valuesfrom/secret-and-inline.yaml — The Secret was marked optional: true while the narrative required it for the merged output to match. Bundled the Secret inline and dropped the optional flag, removing the order/timing ambiguity. README.md updated to drop the now-redundant "create the Secret first" instruction. 3. pkg/cue/cuex/providers/helm/helm.go:Render — After removing the unconditional "default" fallback for releaseNamespace, Helm could run with an empty namespace when both Context.AppNamespace and Release.Namespace were unset (non-normal code paths — direct callers, tests, CLI tooling). Restored the "default" fallback at the end of the namespace resolution while keeping the Application-namespace plumbing for tenant-scoped cross-namespace rejection. Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com> Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> Signed-off-by: Anaswara Suresh <anaswarasuresh2212@gmail.com> * feat: add valuesFrom fingerprinting for helmchart components to trigger workflow restarts on ConfigMap/Secret changes Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * feat: add valuesFrom fingerprinting for helmchart components to trigger workflow restarts on ConfigMap/Secret changes Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * feat: enhance valuesFrom support for helmchart components with fingerprinting and error handling Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * docs: clarify cross-namespace restrictions for valuesFrom in helmchart examples Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * ci: retrigger checks Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * feat: add publishVersion support to Helm provider for stable release management Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * feat: improve error handling for application retrieval in Helm provider Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * ci: retrigger checks Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> * feat: add application publishVersion lookup defense in Helm provider tests Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> --------- Signed-off-by: Anaswara Suresh <anaswarasuresh2212@gmail.com> Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com> Co-authored-by: Anaswara Suresh <anaswarasuresh2212@gmail.com>
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
# Three-layer merge example: ConfigMap (base) + Secret (overlay) + inline.
|
|
#
|
|
# Expected rendered values:
|
|
# - replicaCount: 2 (from inline — wins over everything)
|
|
# - resources.limits.cpu: 500m (from Secret — wins over CM on conflict)
|
|
# - resources.limits.memory: 256Mi (from CM — Secret didn't set it, preserved)
|
|
# - ui.color: "#34577c" (from CM — no other source sets it)
|
|
#
|
|
# Single self-contained manifest: both the ConfigMap and Secret are bundled.
|
|
# Apply with:
|
|
# kubectl apply -f secret-and-inline.yaml
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: podinfo-base
|
|
data:
|
|
values.yaml: |
|
|
replicaCount: 1
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
ui:
|
|
color: "#34577c"
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: podinfo-overlay
|
|
type: Opaque
|
|
stringData:
|
|
values.yaml: |
|
|
resources:
|
|
limits:
|
|
cpu: 500m
|
|
---
|
|
apiVersion: core.oam.dev/v1beta1
|
|
kind: Application
|
|
metadata:
|
|
name: podinfo-layered
|
|
spec:
|
|
components:
|
|
- name: podinfo
|
|
type: helmchart
|
|
properties:
|
|
chart:
|
|
source: podinfo
|
|
repoURL: https://stefanprodan.github.io/podinfo
|
|
version: "6.11.1"
|
|
release:
|
|
name: podinfo-layered
|
|
namespace: default
|
|
values:
|
|
replicaCount: 2
|
|
valuesFrom:
|
|
- kind: ConfigMap
|
|
name: podinfo-base
|
|
- kind: Secret
|
|
name: podinfo-overlay
|
|
options:
|
|
createNamespace: true
|
|
skipTests: true
|