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>
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
|
|
# Definition source cue file: vela-templates/definitions/internal/node-affinity.cue
|
|
apiVersion: core.oam.dev/v1beta1
|
|
kind: TraitDefinition
|
|
metadata:
|
|
annotations:
|
|
definition.oam.dev/description: affinity specify node affinity and toleration on K8s pod for your workload which follows the pod spec in path 'spec.template'.
|
|
labels:
|
|
custom.definition.oam.dev/ui-hidden: "true"
|
|
name: node-affinity
|
|
namespace: {{ include "systemDefinitionNamespace" . }}
|
|
spec:
|
|
appliesToWorkloads:
|
|
- '*'
|
|
podDisruptive: true
|
|
schematic:
|
|
cue:
|
|
template: |
|
|
patch: spec: template: spec: {
|
|
if parameter.affinity != _|_ {
|
|
affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: [{
|
|
matchExpressions: [
|
|
for k, v in parameter.affinity {
|
|
key: k
|
|
operator: "In"
|
|
values: v
|
|
},
|
|
]}]
|
|
}
|
|
if parameter.tolerations != _|_ {
|
|
tolerations: [
|
|
for k, v in parameter.tolerations {
|
|
effect: "NoSchedule"
|
|
key: k
|
|
operator: "Equal"
|
|
value: v
|
|
}]
|
|
}
|
|
}
|
|
parameter: {
|
|
affinity?: [string]: [...string]
|
|
tolerations?: [string]: string
|
|
}
|
|
|