config

package
v0.13.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// EnvSSLRootFilePath is the environment variable name for the path to
	// local SSL cert to use for requests.
	EnvSSLRootFilePath = "TKN_RESULTS_SSL_ROOTS_FILE_PATH"
	// EnvSSLServerNameOverride is the environment variable name for the SSL server
	// name override.
	EnvSSLServerNameOverride = "TKN_RESULTS_SSL_SERVER_NAME_OVERRIDE"
)

Variables

This section is empty.

Functions

func Init

func Init()

Init sets defaults and reads in config from the config file.

Types

type Config

type Config struct {
	// Address is the server address to connect to.
	Address string

	// Token is the bearer token to use for authentication. Takes priority over ServiceAccount.
	Token string
	// ServiceAccount is the Kubernetes Service Account to use to authenticate with the Results API.
	// When specified, the client will fetch a bearer token from the Kubernetes API and use that token
	// for all Results API requests.
	ServiceAccount *ServiceAccount `mapstructure:"service_account"`

	// SSL contains SSL configuration information.
	SSL SSLConfig
	// Portforward enable auto portforwarding to tekton-results-api-service
	// When Address is set and Portforward is true, tkn-results will portforward tekton-results-api-service automatically
	Portforward bool
	// Insecure determines whether to use insecure GRPC tls communication
	Insecure bool

	// v1alpha2
	UseV1Alpha2 bool
}

Config contains configuration information for the Results CLI.

func GetConfig

func GetConfig() *Config

GetConfig returns the current config.

type SSLConfig

type SSLConfig struct {
	RootsFilePath      string `mapstructure:"roots_file_path"`
	ServerNameOverride string `mapstructure:"server_name_override"`
}

SSLConfig contains SSL configuration information.

type ServiceAccount

type ServiceAccount struct {
	Namespace string
	Name      string
}

ServiceAccount contains information about a Kubernetes ServiceAccount.

Jump to

Keyboard shortcuts

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