mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-02 01:11:11 +01:00
fix: properly set up tls for KMS endpoint
The condition was inverted 🤦
Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
This commit is contained in:
parent
cb226eec46
commit
936111ce06
@ -455,7 +455,7 @@ func create(ctx context.Context, flags *pflag.FlagSet) (err error) {
|
||||
|
||||
keys = append(keys, &v1alpha1.EncryptionKey{
|
||||
KeyKMS: &v1alpha1.EncryptionKeyKMS{
|
||||
KMSEndpoint: "http://" + nethelpers.JoinHostPort(ip.String(), port),
|
||||
KMSEndpoint: "grpc://" + nethelpers.JoinHostPort(ip.String(), port),
|
||||
},
|
||||
KeySlot: i,
|
||||
})
|
||||
|
||||
@ -128,9 +128,9 @@ func (h *KMSKeyHandler) getConn(ctx context.Context) (*grpc.ClientConn, error) {
|
||||
}
|
||||
|
||||
if endpoint.Insecure {
|
||||
transportCredentials = credentials.NewTLS(&tls.Config{})
|
||||
} else {
|
||||
transportCredentials = insecure.NewCredentials()
|
||||
} else {
|
||||
transportCredentials = credentials.NewTLS(&tls.Config{})
|
||||
}
|
||||
|
||||
return grpc.DialContext(ctx, endpoint.Host, grpc.WithTransportCredentials(transportCredentials))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user