Skip to content

Commit

Permalink
chore: remove remaining MongoDB secrets (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
fharper authored Jul 16, 2024
1 parent dd5720f commit 0b59545
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions internal/kubernetes/createSecret.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,12 @@ func random(seq int) string {

// CreateK8sSecret
func CreateK8sSecret(clientset *kubernetes.Clientset, o *CreateK8sSecretCmdOptions) error {

initialPassword := random(12)
k1AccessToken := random(20)

secret := &v1.Secret{
ObjectMeta: metav1.ObjectMeta{Name: o.Name, Namespace: o.Namespace},
Data: map[string][]byte{
"mongodb-passwords": []byte(initialPassword),
"mongodb-root-password": []byte(initialPassword),
"mongodb-metrics-password": []byte(initialPassword),
"mongodb-replica-set-key": []byte(initialPassword),
"MONGO_INITDB_ROOT_PASSWORD": []byte(initialPassword),
"MONGO_INITDB_ROOT_USERNAME": []byte("root"),
"K1_ACCESS_TOKEN": []byte(k1AccessToken),
"K1_ACCESS_TOKEN": []byte(k1AccessToken),
},
}

Expand Down

0 comments on commit 0b59545

Please sign in to comment.