config

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtensionName string = "tekton-results"
	Group         string = "results.tekton.dev"
	Version       string = "v1alpha2"
	Kind          string = "Client"
	Path          string = "apis"
)

Constants defining various labels, names, and paths used in the Tekton Results configuration.

Variables

This section is empty.

Functions

func BuildDirectClientConfig added in v0.15.1

func BuildDirectClientConfig(p common.Params) (*client.Config, error)

BuildDirectClientConfig builds a client.Config from CLI flags (host, token, api-path, insecure-skip-tls-verify).

func ServerConnectionFlagsChanged added in v0.15.1

func ServerConnectionFlagsChanged(cmd *cobra.Command) bool

ServerConnectionFlagsChanged returns true if any server connection flags are set.

Types

type Config

type Config interface {
	Get() *client.Config
	GetObject() runtime.Object
	Set(prompt bool, p common.Params) error
	Reset(p common.Params) error
	Validate() error
}

Config defines the interface for managing Tekton Results configuration.

func NewConfig added in v0.15.0

func NewConfig(p common.Params) (Config, error)

NewConfig creates a new Config instance based on the provided parameters.

It loads the kubeconfig, sets up the client configuration, and initializes the extension for Tekton Results.

Parameters:

  • p: common.Params containing configuration parameters such as kubeconfig path and context.

Returns:

  • Config: A new Config instance if successful.
  • error: An error if any step in the configuration process fails.

type Extension added in v0.15.0

type Extension struct {
	// TypeMeta is embedded to provide API version and kind information.
	runtime.TypeMeta `json:",inline"`

	// APIPath is the path to the API endpoint.
	APIPath string `json:"api-path"`

	// Host is the hostname or IP address of the API server.
	Host string `json:"host"`

	// Token is the authentication token used for API requests.
	Token string `json:"token"`

	// Timeout specifies the maximum duration for API requests.
	// It is optional and can be omitted.
	Timeout string `json:"timeout,omitempty"`

	// InsecureSkipTLSVerify indicates whether to skip TLS certificate verification.
	// It is optional and can be omitted. If set, it should be used with caution.
	InsecureSkipTLSVerify string `json:"insecure-skip-tls-verify,omitempty"`
}

Extension represents the configuration for an API extension. It includes details necessary for connecting to and authenticating with an external API.

func (*Extension) DeepCopy added in v0.15.0

func (in *Extension) DeepCopy() *Extension

DeepCopy is an autogenerated deep copy function, copying the receiver, creating a new Extension.

func (*Extension) DeepCopyInto added in v0.15.0

func (in *Extension) DeepCopyInto(out *Extension)

DeepCopyInto is an autogenerated deep copy function, copying the receiver, writing into out. in must be non-nil.

func (*Extension) DeepCopyObject added in v0.15.0

func (in *Extension) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deep copy function, copying the receiver, creating a new runtime.Object.

type PlatformType added in v0.16.0

type PlatformType string

PlatformType represents the type of Kubernetes platform

const (
	PlatformUnknown    PlatformType = "Unknown"
	PlatformOpenShift  PlatformType = "OpenShift"
	PlatformKubernetes PlatformType = "Kubernetes"
)

Platform types for identifying the underlying Kubernetes platform

func DetectPlatform added in v0.16.0

func DetectPlatform(c *rest.Config) PlatformType

DetectPlatform determines if we're running on OpenShift or Kubernetes Checks for OpenShift-specific API groups

Jump to

Keyboard shortcuts

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