github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/templates/defwithtemplate/hostalias.yaml (about)

     1  # Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
     2  # Definition source cue file: vela-templates/definitions/internal/hostalias.cue
     3  apiVersion: core.oam.dev/v1beta1
     4  kind: TraitDefinition
     5  metadata:
     6    annotations:
     7      definition.oam.dev/description: Add host aliases on K8s pod for your workload which follows the pod spec in path 'spec.template'.
     8    name: hostalias
     9    namespace: {{ include "systemDefinitionNamespace" . }}
    10  spec:
    11    appliesToWorkloads:
    12      - deployments.apps
    13      - statefulsets.apps
    14      - daemonsets.apps
    15      - jobs.batch
    16    podDisruptive: false
    17    schematic:
    18      cue:
    19        template: |
    20          patch: {
    21          	// +patchKey=ip
    22          	spec: template: spec: hostAliases: parameter.hostAliases
    23          }
    24          parameter: {
    25          	// +usage=Specify the hostAliases to add
    26          	hostAliases: [...{
    27          		ip: string
    28          		hostnames: [...string]
    29          	}]
    30          }
    31