mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-14 05:16:49 +00:00
* Add oss registry support * fix test * refactor and clean up URL parse logic * add:design docs * change default registry to oss
33 lines
798 B
YAML
33 lines
798 B
YAML
kind: TraitDefinition
|
|
metadata:
|
|
annotations:
|
|
definition.oam.dev/description: "dynamically specify service account"
|
|
name: service-account
|
|
spec:
|
|
appliesToWorkloads:
|
|
- deployments.apps
|
|
schematic:
|
|
cue:
|
|
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
|
|
}
|