Skip to content

Commit

Permalink
feat(installer): add oidc scripts (#2194)
Browse files Browse the repository at this point in the history
  • Loading branch information
Huimintai committed Dec 22, 2022
1 parent 4cfa235 commit 711c110
Show file tree
Hide file tree
Showing 4 changed files with 646 additions and 0 deletions.
24 changes: 24 additions & 0 deletions hack/oidc-scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# OIDC config and rollback scripts

## How to use oidc.sh script
`oidc.sh` script use to config the OIDC login.
When the first tile use the `oidc.sh`.You should fill in the configuration file `oidc.conf`then execute the `oidc.sh`with the `oidc.conf`:
```
chmod +x oidc.sh
./oidc.sh oidc.conf
```
After that,it will store the `oidc.conf` in configmap, you can check:
```
kubectl get cm -n tke oidc-config
```
Except for the first time,you can execute the script without the script:
```
./oidc.sh
```
## How to use rollback.sh script
`rollback.sh` use to rollback OIDC login, after rollback you can use tkeanywhere to login.
```
chmod +x rollback.sh
./rollback.sh
```

9 changes: 9 additions & 0 deletions hack/oidc-scripts/oidc.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ca_crt="/root/oidc/ca.crt"
secret_id="123456"
secret_key="123456"
endpoint="oidc.cn"
master_id="123456"
username="oidc"
issuer_url="https://oidc.cn/iamapp/api/v1/OIDC"
hostnames="oidc.cn,iam-api.oidc.cn"
tke_domain_name="tke.domain.name"

0 comments on commit 711c110

Please sign in to comment.