// NewTokens returns executor that removes old service account tokens.
//
// During the reconfigure operation, the secrets get regenerated thus
// invalidating old service account tokens. Kubernetes will recreate
// them automatically when they are deleted during this phase.
NewTokens returns executor that removes old service account tokens.

During the reconfigure operation, the secrets get regenerated thus
invalidating old service account tokens. Kubernetes will recreate
them automatically when they are deleted during this phase.
// NewTokens returns executor that removes old service account tokens . // // During the reconfigure operation the secrets get regenerated thus // invalidating old service account tokens . Kubernetes will recreate // them automatically when they are deleted during this phase .
func NewTokens(p fsm.ExecutorParams, operator ops.Operator) (*tokensExecutor, error) {
	logger := &fsm.Logger{
		FieldLogger: logrus.WithField(constants.FieldPhase, p.Phase.ID),
		Key:         p.Key(),
		Operator:    operator,
		Server:      p.Phase.Data.Server,
	}
	client, _, err := httplib.GetClusterKubeClient(p.Plan.DNSConfig.Addr())
	if err != nil {
		return nil, trace.Wrap(err)
	}
	return &tokensExecutor{
		FieldLogger:    logger,
		ExecutorParams: p,
		Client:         client,
	}, nil
}
func NewTokens ( p fsm . ExecutorParams , operator ops . Operator ) ( * tokensExecutor , error ) { logger := & fsm . Logger { FieldLogger : logrus . WithField ( constants . FieldPhase , p . Phase . ID ) , Key : p . Key ( ) , Operator : operator , Server : p . Phase . Data . Server , } client , _ , err := httplib . GetClusterKubeClient ( p . Plan . DNSConfig . Addr ( ) ) if err != nil { return nil , trace . Wrap ( err ) } return & tokensExecutor { FieldLogger : logger , ExecutorParams : p , Client : client , } , nil }
NewTokens returns executor that removes old service account tokens.
NewTokens returns executor that removes old service account tokens .