Source dexidp/dex#1606 (comment)
Dex OAuth2Client CRD metadata.name
field should match spec.id
and spec.name
but needs a special encoding.
Generate it with:
wget https://gist.github.com/aslafy-z/c7e6cc1e2efb15b33fe497e4adbbf6f5/raw/dex-encode-crd-name.go
go run dex-encode-crd-name.go "some-client"
Then, feed it to your OAuth2Client CRD as ${CLIENT_ID_ENCODED}
:
apiVersion: dex.coreos.com/v1
kind: OAuth2Client
metadata:
name: ${CLIENT_ID_ENCODED}
id: some-client
name: some-client
secret: <some-secret>
redirectURIs:
- https://foo