mirror of https://github.com/kubernetes/kops.git
Include multiple certs in aws-iam-authenticator trust bundle
This commit is contained in:
parent
e64c9c2c45
commit
fc94505a76
|
|
@ -201,7 +201,7 @@ func (b *KubeAPIServerBuilder) writeAuthenticationConfig(c *fi.ModelBuilderConte
|
|||
b.Cluster.Spec.KubeAPIServer.AuthenticationTokenWebhookConfigFile = fi.String(PathAuthnConfig)
|
||||
|
||||
{
|
||||
caCertificate, err := b.NodeupModelContext.KeyStore.FindCert(fi.CertificateIDCA)
|
||||
caCertificate, _, err := b.NodeupModelContext.KeyStore.FindPrimaryKeypair(fi.CertificateIDCA)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error fetching AWS IAM Authentication CA certificate from keystore: %v", err)
|
||||
}
|
||||
|
|
@ -217,6 +217,7 @@ func (b *KubeAPIServerBuilder) writeAuthenticationConfig(c *fi.ModelBuilderConte
|
|||
User: "kube-apiserver",
|
||||
}
|
||||
|
||||
// Since we're talking to localhost, we don't need the entire certificate bundle.
|
||||
cluster.CertificateAuthorityData, err = caCertificate.AsBytes()
|
||||
if err != nil {
|
||||
return fmt.Errorf("error encoding AWS IAM Authentication CA certificate: %v", err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue