net-kingdom/identity-provisioner/copy-client-secret.py

19 lines
399 B
Python
Raw Normal View History

2026-07-28 00:57:16 +02:00
"""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)