mirror of
https://github.com/kubevela/kubevela.git
synced 2026-02-14 10:00:06 +00:00
* refactor: refactor Helm chart with unnecessary 'systemDefinitionNamespace' value
* Revert "refactor: refactor Helm chart with unnecessary 'systemDefinitionNamespace' value"
This reverts commit 2ae764737f.
* Fix: Helm chart's 'Values.systemDefinitionNamespace' have default value of '.Release.Namespace' if unspecified.
* fix: fixed vela cli referenced '{{.Values.systemDefinitionNamespace}}'
Co-authored-by: yungcheng.tyc <yungcheng.tyc@alibaba-inc.com>
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
|
# Definition source cue file: vela-templates/definitions/deprecated/configmap.cue
|
|
apiVersion: core.oam.dev/v1beta1
|
|
kind: TraitDefinition
|
|
metadata:
|
|
annotations:
|
|
definition.oam.dev/description: Create/Attach configmaps on K8s pod for your workload which follows the pod spec in path 'spec.template'. This definition is DEPRECATED, please specify configmap in 'storage' instead.
|
|
labels:
|
|
custom.definition.oam.dev/deprecated: "true"
|
|
name: configmap
|
|
namespace: {{ include "systemDefinitionNamespace" . }}
|
|
spec:
|
|
appliesToWorkloads:
|
|
- '*'
|
|
podDisruptive: true
|
|
schematic:
|
|
cue:
|
|
template: |
|
|
patch: spec: template: spec: {
|
|
containers: [{
|
|
// +patchKey=name
|
|
volumeMounts: [
|
|
for v in parameter.volumes {
|
|
{
|
|
name: "volume-\(v.name)"
|
|
mountPath: v.mountPath
|
|
readOnly: v.readOnly
|
|
}
|
|
},
|
|
]
|
|
}, ...]
|
|
// +patchKey=name
|
|
volumes: [
|
|
for v in parameter.volumes {
|
|
{
|
|
name: "volume-\(v.name)"
|
|
configMap: name: v.name
|
|
}
|
|
},
|
|
]
|
|
}
|
|
outputs: {
|
|
for v in parameter.volumes {
|
|
if v.data != _|_ {
|
|
"\(v.name)": {
|
|
apiVersion: "v1"
|
|
kind: "ConfigMap"
|
|
metadata: name: v.name
|
|
data: v.data
|
|
}
|
|
}
|
|
}
|
|
}
|
|
parameter: {
|
|
// +usage=Specify mounted configmap names and their mount paths in the container
|
|
volumes: [...{
|
|
name: string
|
|
mountPath: string
|
|
readOnly: *false | bool
|
|
data?: [string]: string
|
|
}]
|
|
}
|
|
|