api_server

package
v0.0.0-...-13f83cf Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

View Source
const (
	APIServerDefaultTimeout = 35 * time.Second
)

Variables

PassThroughAuth never manipulates the request

View Source
var SATokenVolumeProjectionAuth runtime.ClientAuthInfoWriter = runtime.ClientAuthInfoWriterFunc(
	func(r runtime.ClientRequest, _ strfmt.Registry) error {
		var projectedPath string
		if projectedPath = os.Getenv(saTokenPathEnvVar); projectedPath == "" {
			projectedPath = saDefaultTokenPath
		}

		content, err := ioutil.ReadFile(projectedPath)
		if err != nil {
			return fmt.Errorf("Failed to read projected SA token at %s: %w", projectedPath, err)
		}

		r.SetHeaderParam("Authorization", "Bearer "+string(content))
		return nil
	})

Functions

func CreateErrorCouldNotRecoverAPIStatus

func CreateErrorCouldNotRecoverAPIStatus(err error) error

func CreateErrorFromAPIStatus

func CreateErrorFromAPIStatus(error string, code int32) error

func NewHTTPRuntime

func NewHTTPRuntime(clientConfig clientcmd.ClientConfig, debug bool) (
	*httptransport.Runtime, error)

func NewKubeflowInClusterHTTPRuntime

func NewKubeflowInClusterHTTPRuntime(namespace string, debug bool) *httptransport.Runtime

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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