Skip to content

Commit

Permalink
fix: fail to dail to xds istiod.istio-system.svc:15012
Browse files Browse the repository at this point in the history
Signed-off-by: wuyouxia wuyouxia1@huawei.com
Signed-off-by: wuyouxia <wuyouxia1@huawei.com>
  • Loading branch information
wuyouxia123 committed Oct 10, 2023
1 parent 25c8975 commit 68faddd
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions internal/controller/istio/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import (

"github.com/aeraki-mesh/aeraki/internal/model"

Check failure on line 36 in internal/controller/istio/controller.go

View workflow job for this annotation

GitHub Actions / go-lint

File is not `goimports`-ed with -local github.com/aeraki-mesh/aeraki (goimports)
"github.com/aeraki-mesh/aeraki/internal/model/protocol"
securityModel "istio.io/istio/pilot/pkg/security/model"
"istio.io/istio/security/pkg/credentialfetcher/plugin"
)

const (
Expand Down Expand Up @@ -321,11 +323,13 @@ func (c *Controller) newSecretManager() (*cache.SecretManagerClient, error) {
// rootCert may be nil - in which case the system roots are used, and the CA is expected to have public key
// Otherwise assume the injection has mounted /etc/certs/root-cert.pem
o := &security.Options{
CAEndpoint: c.options.IstiodAddr,
ClusterID: c.options.ClusterID,
WorkloadNamespace: c.options.NameSpace,
TrustDomain: "cluster.local",
ServiceAccount: "aeraki",
CAEndpoint: c.options.IstiodAddr,
ClusterID: c.options.ClusterID,
WorkloadNamespace: c.options.NameSpace,
TrustDomain: "cluster.local",
ServiceAccount: "aeraki",
WorkloadRSAKeySize: 2048,
CredFetcher: plugin.CreateTokenPlugin(securityModel.K8sSAJwtFileName),
}
tlsOpts := &citadel.TLSOptions{}
tlsOpts.RootCert = istiodCACertPath
Expand Down

0 comments on commit 68faddd

Please sign in to comment.