github.com/oam-dev/kubevela@v1.9.11/references/cli/test-data/defapply/testdef.cue (about)

     1  testdefcue: {
     2  	type: "trait"
     3  	annotations: {}
     4  	labels: {
     5  		"ui-hidden": "true"
     6  	}
     7  	description: "Add host aliases on K8s pod for your workload which follows the pod spec in path 'spec.template'."
     8  	attributes: {
     9  		podDisruptive: false
    10  		appliesToWorkloads: ["*"]
    11  	}
    12  }
    13  template: {
    14  	patch: {
    15  		// +patchKey=ip
    16  		spec: template: spec: hostAliases: parameter.hostAliases
    17  	}
    18  	parameter: {
    19  		// +usage=Specify the hostAliases to add
    20  		hostAliases: [...{
    21  			ip: string
    22  			hostnames: [...string]
    23  		}]
    24  	}
    25  }