endpoints

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTriggersInstalled added in v0.6.0

func IsTriggersInstalled(r Resource, namespace string) bool

IsTriggersInstalled returns true if it can detect a Triggers install in the cluster, false otherwise

Types

type Options added in v0.7.0

type Options struct {
	InstallNamespace   string
	PipelinesNamespace string
	TriggersNamespace  string
	TenantNamespaces   []string
	DefaultNamespace   string
	ReadOnly           bool
	LogoutURL          string
	StreamLogs         bool
	ExternalLogsURL    string
	XFrameOptions      string
}

Options for enpoints

func (Options) GetPipelinesNamespace added in v0.7.0

func (o Options) GetPipelinesNamespace() string

GetPipelinesNamespace returns the PipelinesNamespace property if set or the InstallNamespace property otherwise (this assumes Tekton pipelines is installed in the same namespace as the dashboard if the property is not set)

func (Options) GetTriggersNamespace added in v0.7.0

func (o Options) GetTriggersNamespace() string

GetTriggersNamespace returns the TriggersNamespace property if set or the InstallNamespace property otherwise (this assumes Tekton triggers is installed in the same namespace as the dashboard if the property is not set)

type Properties

type Properties struct {
	DashboardNamespace string   `json:"dashboardNamespace"`
	DashboardVersion   string   `json:"dashboardVersion"`
	DefaultNamespace   string   `json:"defaultNamespace,omitempty"`
	ExternalLogsURL    string   `json:"externalLogsURL"`
	LogoutURL          string   `json:"logoutURL,omitempty"`
	PipelineNamespace  string   `json:"pipelinesNamespace"`
	PipelineVersion    string   `json:"pipelinesVersion"`
	ReadOnly           bool     `json:"isReadOnly"`
	StreamLogs         bool     `json:"streamLogs"`
	TenantNamespaces   []string `json:"tenantNamespaces,omitempty"`
	TriggersNamespace  string   `json:"triggersNamespace,omitempty"`
	TriggersVersion    string   `json:"triggersVersion,omitempty"`
}

Properties : properties we want to be able to retrieve via REST

type Resource

type Resource struct {
	Config    *rest.Config
	K8sClient k8sclientset.Interface
	Options   Options
}

Resource is a wrapper around all necessary clients and config used for endpoints

func (Resource) CheckHealth

func (r Resource) CheckHealth(response http.ResponseWriter, _ *http.Request)

CheckHealth responds with a status code 200 signalling that the application can receive requests

func (Resource) GetDashboardVersion added in v0.32.0

func (r Resource) GetDashboardVersion() string

GetDashboardVersion returns the version string for the Tekton Dashboard

func (Resource) GetProperties

func (r Resource) GetProperties(response http.ResponseWriter, _ *http.Request)

GetProperties is used to get the installed namespace for the Dashboard, the version of the Tekton Dashboard, the version of Tekton Pipelines, when one's in read-only mode and Tekton Triggers version (if Installed)

func (Resource) LogsProxy added in v0.9.0

func (r Resource) LogsProxy(response http.ResponseWriter, request *http.Request)

LogsProxy forwards requests to the configured external log provider and proxies the response to the client

Jump to

Keyboard shortcuts

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