Skip to content

Arena golang sdk is just for single user/single cluster/single ns #1402

@zwbdzb

Description

@zwbdzb

What you would like to be added?

Arena sdk need to supports multiple users

The doc says:
Arena cli supports multiple users
Arena depends on the kubeconfig file to submit the training jobs to the kubernetes cluster,so if you want to grant certain users different permissions to use arena, you can generate different kubeconfig files.

arena cli support multiple user/multiple cluster/switch ns depend on the kubeconfig.

but the arena golang sdk is embed in a process, the github code show the areanClient only initialize once, so
the arena golang sdk can not switch user/cluster/ns.

// InitArenaConfiger creates and init ArenaConfiger
	// Warning: this function only init one time
	configer, err := config.InitArenaConfiger(args)
	if err != nil {
		return nil, err
	}

var arenaClient *ArenaConfiger
var errInitArenaClient error

var once sync.Once

// InitArenaConfiger initialize
func InitArenaConfiger(args types.ArenaClientArgs) (*ArenaConfiger, error) {
	once.Do(func() {
		arenaClient, errInitArenaClient = newArenaConfiger(args)
	})
	return arenaClient, errInitArenaClient
}

Why is this needed?

the arena golang sdk is now open for use, but we can not switch user/cluser/ns when using the sdk.
so the sdk is of little practical use.

Does anyone else have any ideas for the arena golang sdk to support switch user/cluser/ns

Love this feature?

Give it a 👍 We prioritize the features with most 👍

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions