mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-22 01:03:27 +00:00
Co-authored-by: ivyilike <pww123@cmbchina.com> Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com> Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
26 lines
497 B
CUE
26 lines
497 B
CUE
testdefcue: {
|
|
type: "trait"
|
|
annotations: {}
|
|
labels: {
|
|
"ui-hidden": "true"
|
|
}
|
|
description: "Add host aliases on K8s pod for your workload which follows the pod spec in path 'spec.template'."
|
|
attributes: {
|
|
podDisruptive: false
|
|
appliesToWorkloads: ["*"]
|
|
}
|
|
}
|
|
template: {
|
|
patch: {
|
|
// +patchKey=ip
|
|
spec: template: spec: hostAliases: parameter.hostAliases
|
|
}
|
|
parameter: {
|
|
// +usage=Specify the hostAliases to add
|
|
hostAliases: [...{
|
|
ip: string
|
|
hostnames: [...string]
|
|
}]
|
|
}
|
|
}
|