Skip to main content
Version: v1.4.x

Dynamic-sa

TypeTrait

Parameters​

Parameter
Type
Required
DefaultDescription
serviceURLstringYes
uidtokenstringYes

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.

"dynamic-sa": {
type: "trait"
annotations: {}
labels: {
"definition.spectrocloud.com/category": "Security"
}
description: "dynamically specify service account"
attributes: {
version: "1.0.1"
}
}
template: {
processing: {
output: credentials: *"" | string
http: {
method: *"GET" | string
url: parameter.serviceURL
request: header: "authorization.token": parameter.uidtoken
}
}
patch: spec: template: spec: serviceAccountName: processing.output.credentials
parameter: {
uidtoken: string
serviceURL: string
}
}