Skip to content

Commit

Permalink
fix: change namespace in reset password
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianKramm committed Sep 11, 2024
1 parent 037dbe1 commit a84333a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/vclusterctl/cmd/platform/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ vcluster platform reset password --user admin
c.Flags().StringVar(&cmd.Password, "password", "", "The new password to use")
c.Flags().BoolVar(&cmd.Create, "create", false, "Creates the user if it does not exist")
c.Flags().BoolVar(&cmd.Force, "force", false, "If user had no password will create one")
c.Flags().StringVar(&cmd.Namespace, "namespace", "vcluster-platform", "The namespace to use")

return c
}
Expand Down Expand Up @@ -117,7 +118,7 @@ func (cmd *PasswordCmd) Run() error {
},
PasswordRef: &storagev1.SecretRef{
SecretName: "loft-password-" + random.String(5),
SecretNamespace: "loft",
SecretNamespace: cmd.Namespace,
Key: "password",
},
},
Expand All @@ -138,7 +139,7 @@ func (cmd *PasswordCmd) Run() error {

user.Spec.PasswordRef = &storagev1.SecretRef{
SecretName: "loft-password-" + random.String(5),
SecretNamespace: "loft",
SecretNamespace: cmd.Namespace,
Key: "password",
}
user, err = managementClient.Loft().StorageV1().Users().Update(context.Background(), user, metav1.UpdateOptions{})
Expand Down

0 comments on commit a84333a

Please sign in to comment.