Merge pull request #10364 from johngmyers/custom-account-issuer

Use custom-configured ServiceAccountIssuer when present
This commit is contained in:
Kubernetes Prow Robot 2020-12-07 19:39:11 -08:00 committed by GitHub
commit 2f6c67e92c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -82,6 +82,9 @@ func BuildNodeRoleSubject(igRole kops.InstanceGroupRole) (Subject, error) {
// ServiceAccountIssuer determines the issuer in the ServiceAccount JWTs
func ServiceAccountIssuer(clusterName string, clusterSpec *kops.ClusterSpec) string {
if clusterSpec.KubeAPIServer != nil && clusterSpec.KubeAPIServer.ServiceAccountIssuer != nil {
return *clusterSpec.KubeAPIServer.ServiceAccountIssuer
}
return "https://api." + clusterName
}