19 lines
399 B
Python
19 lines
399 B
Python
|
|
"""Copy only the provisioner token into a namespace-local client Secret."""
|
||
|
|
|
||
|
|
import json
|
||
|
|
import sys
|
||
|
|
|
||
|
|
|
||
|
|
source = json.load(sys.stdin)
|
||
|
|
target = {
|
||
|
|
"apiVersion": "v1",
|
||
|
|
"kind": "Secret",
|
||
|
|
"metadata": {
|
||
|
|
"name": "identity-provisioner-client",
|
||
|
|
"namespace": "user-engine",
|
||
|
|
},
|
||
|
|
"type": "Opaque",
|
||
|
|
"data": {"token": source["data"]["token"]},
|
||
|
|
}
|
||
|
|
json.dump(target, sys.stdout)
|