Skip to main content

Hostalias

TypeTrait

Parameters

Parameter
Type
Required
DefaultDescription
hostAliasesarrayYes

Specify the hostAliases to add

Template

The following tabs display the definition's Cue template and the rendered YAML. The rendered YAML is the output of the Cue template when the definition is applied to a cluster.

hostalias: {
type: "trait"
annotations: {}
labels: {
"definition.spectrocloud.com/category": "Networking"
}
description: "Add host aliases on K8s pod for your workload which follows the pod spec in path 'spec.template'."
attributes: {}
}

template: {
patch: {
// +patchKey=ip
spec: template: spec: hostAliases: parameter.hostAliases
}
parameter: {
// +usage=Specify the hostAliases to add
hostAliases: [...{
ip: string
hostnames!: [...string]
}]
}
}