Documentation
¶
Index ¶
Constants ¶
View Source
const (
// TokenAudiencePrefix is the prefix for projected service account token audiences
TokenAudiencePrefix = "trainer.kubeflow.org"
)
Variables ¶
This section is empty.
Functions ¶
func SetupServer ¶
func TokenAudience ¶
TokenAudience returns the required audience for a TrainJob's status endpoint.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server for collecting runtime status updates.
func NewServer ¶
func NewServer(c client.Client, cfg *configapi.StatusServer, tlsConfig *tls.Config, authorizer TokenAuthorizer) (*Server, error)
NewServer creates a new Server for collecting runtime status updates.
func (*Server) NeedLeaderElection ¶
type TokenAuthorizer ¶
type TokenAuthorizer interface {
Init(ctx context.Context) error
Authorize(ctx context.Context, rawIDToken, namespace, trainJobName string) (bool, error)
}
func NewProjectedServiceAccountTokenAuthorizer ¶
func NewProjectedServiceAccountTokenAuthorizer(config *rest.Config) TokenAuthorizer
NewProjectedServiceAccountTokenAuthorizer creates a validator for checking a bearer token has permission to update the requested train job.
Click to show internal directories.
Click to hide internal directories.