diff --git a/examples/credential-plugin/e2e.sh b/examples/credential-plugin/e2e.sh index 6d41ce37..1719b25c 100644 --- a/examples/credential-plugin/e2e.sh +++ b/examples/credential-plugin/e2e.sh @@ -17,12 +17,28 @@ function get_kubeconfig() { bar_tip "get kubeconfig" ack-ram-tool credential-plugin get-kubeconfig -m ${MODE} --cluster-id ${CLUSTER_ID} > ${KUBECONFIG_PATH} + + if echo ${MODE} |grep token; then + Arn=$(aliyun sts GetCallerIdentity | jq .Arn -r) + UserId=$(aliyun sts GetCallerIdentity | jq .UserId -r) + ack-ram-tool credential-plugin get-kubeconfig --cluster-id ${CLUSTER_ID} > ${KUBECONFIG_PATH}.crt.yaml + cat <