Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Store public key in k8s secret
Browse files Browse the repository at this point in the history
Signed-off-by: Alaa Qutaish <[email protected]>
  • Loading branch information
alaa committed Jan 28, 2021
1 parent 881dd8e commit 0b06322
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/cluster/kubernetes/sshkeyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes/typed/core/v1"
v1 "k8s.io/client-go/kubernetes/typed/core/v1"

"github.com/fluxcd/flux/pkg/ssh"
)
Expand Down Expand Up @@ -119,7 +119,8 @@ func (skr *sshKeyRing) Regenerate() error {

patch := map[string]map[string]string{
"data": map[string]string{
"identity": base64.StdEncoding.EncodeToString(privateKey),
"identity": base64.StdEncoding.EncodeToString(privateKey),
"identity.pub": base64.StdEncoding.EncodeToString([]byte(publicKey.Key)),
},
}

Expand Down

0 comments on commit 0b06322

Please sign in to comment.