statusserver

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

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 SetupServer(mgr ctrl.Manager, cfg *configapi.StatusServer, enableHTTP2 bool) error

func StatusUrl

func StatusUrl(namespace, name string) string

StatusUrl is the path of the endpoint for receiving status updates

func TokenAudience

func TokenAudience(namespace, name string) string

TokenAudience returns the required audience for a TrainJob's status endpoint.

Types

type Middleware

type Middleware func(http.Handler) http.Handler

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

func (s *Server) NeedLeaderElection() bool

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start implements manager.Runnable and starts the HTTPS Server. It blocks until the Server stops, either due to an error or graceful shutdown.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL