Files
kubevela/e2e/plugin/testdata/dynamic-sa.yaml
chival f4feb1af9c Add oss registry support (#1715)
* Add oss registry support

* fix test

* refactor and clean up URL parse logic

* add:design docs

* change default registry to oss
2021-06-02 18:32:54 +08:00

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
}