mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-08 22:23:15 +00:00
Remove default token from all service accounts
Instead of only removing the default token from a service account when it already exists in the cluster, always remove it. If the service account already exists, continue to do the merging logic. Signed-off-by: Andy Goldstein <andy.goldstein@gmail.com>
This commit is contained in:
@@ -54,6 +54,7 @@ func NewCommand(f client.Factory) *cobra.Command {
|
||||
RegisterRestoreItemAction("pod", newPodRestoreItemAction).
|
||||
RegisterRestoreItemAction("restic", newResticRestoreItemAction).
|
||||
RegisterRestoreItemAction("service", newServiceRestoreItemAction).
|
||||
RegisterRestoreItemAction("serviceaccount", newServiceAccountRestoreItemAction).
|
||||
Serve()
|
||||
},
|
||||
}
|
||||
@@ -133,3 +134,7 @@ func newResticRestoreItemAction(logger logrus.FieldLogger) (interface{}, error)
|
||||
func newServiceRestoreItemAction(logger logrus.FieldLogger) (interface{}, error) {
|
||||
return restore.NewServiceAction(logger), nil
|
||||
}
|
||||
|
||||
func newServiceAccountRestoreItemAction(logger logrus.FieldLogger) (interface{}, error) {
|
||||
return restore.NewServiceAccountAction(logger), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user