[LFX 导师] 介绍基于 CRD 的配置管理 (`config.oam.dev/v1alpha1`) 以及服务器端验证
作者: Chaitanyareddy0702创建于 2026年4月28日更新于 2026年9月29日
标签program/lfx
1. New API group config.oam.dev/v1alpha1
Two CRDs, defined in apis/config.oam.dev/v1alpha1:
type ConfigTemplateSpec struct {
Template string `json:"template"` // CUE template
Scope string `json:"scope,omitempty"` // "system" | "namespace"
Sensitive bool `json:"sensitive,omitempty"`
Alias string `json:"alias,omitempty"`
Description string `json:"description,omitempty"`
}
type ConfigSpec struct {
TemplateRef *ConfigTemplateReference `json:"templateRef,omitempty"`
Properties *runtime.RawExtension `json:"properties,omitempty"` // non-sensitive only
PropertiesFrom *PropertiesReference `json:"propertiesFrom,omitempty"` // for sensitive values
Alias string `json:"alias,omitempty"`
Description string `json:"description,omitempty"`
}Sensitive values are never stored in the CRD. Users provide a propertiesFrom.secretRef pointing at an existing Secret; the controller reads it at reconcile time.
内容来源: kubevela/kubevela