components

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package components contains some helper functions related to the components.

Index

Constants

View Source
const (
	RuntimeModeNative    = "native"
	RuntimeModeContainer = "container"
	RuntimeModeCluster   = "cluster"
)

The following runtime mode is classification of runtime for components.

Variables

View Source
var (
	// ErrBrokenLinks is returned when there are broken links.
	ErrBrokenLinks = fmt.Errorf("broken links dependency detected")
)

Functions

func BuildDashboardComponent added in v0.4.0

func BuildDashboardComponent(conf BuildDashboardComponentConfig) (component internalversion.Component, err error)

BuildDashboardComponent builds the dashboard component.

func BuildDashboardMetricsScraperComponent added in v0.5.0

func BuildDashboardMetricsScraperComponent(conf BuildDashboardMetricsScraperComponentConfig) (component internalversion.Component, err error)

BuildDashboardMetricsScraperComponent builds the dashboard component.

func BuildEtcdComponent

func BuildEtcdComponent(conf BuildEtcdComponentConfig) (component internalversion.Component, err error)

BuildEtcdComponent builds an etcd component.

func BuildJaegerComponent added in v0.4.0

func BuildJaegerComponent(conf BuildJaegerComponentConfig) (component internalversion.Component, err error)

BuildJaegerComponent builds a jaeger component.

func BuildKubeApiserverComponent

func BuildKubeApiserverComponent(conf BuildKubeApiserverComponentConfig) (component internalversion.Component, err error)

BuildKubeApiserverComponent builds a kube-apiserver component.

func BuildKubeControllerManagerComponent

func BuildKubeControllerManagerComponent(conf BuildKubeControllerManagerComponentConfig) (component internalversion.Component, err error)

BuildKubeControllerManagerComponent builds a kube-controller-manager component.

func BuildKubeSchedulerComponent

func BuildKubeSchedulerComponent(conf BuildKubeSchedulerComponentConfig) (component internalversion.Component, err error)

BuildKubeSchedulerComponent builds a kube-scheduler component.

func BuildKubectlProxyComponent added in v0.6.0

func BuildKubectlProxyComponent(conf BuildKubectlProxyComponentConfig) (component internalversion.Component, err error)

BuildKubectlProxyComponent builds a kubectl proxy component.

func BuildKwokControllerComponent

func BuildKwokControllerComponent(conf BuildKwokControllerComponentConfig) (component internalversion.Component)

BuildKwokControllerComponent builds a kwok controller component.

func BuildMetricsServerAPIService added in v0.5.0

func BuildMetricsServerAPIService(conf BuildMetricsServerAPIServiceConfig) (string, error)

BuildMetricsServerAPIService builds the metrics server apiservice yaml content.

func BuildMetricsServerComponent added in v0.5.0

func BuildMetricsServerComponent(conf BuildMetricsServerComponentConfig) (component internalversion.Component, err error)

BuildMetricsServerComponent builds a metrics server component.

func BuildPrometheus added in v0.5.0

func BuildPrometheus(conf BuildPrometheusConfig) (string, error)

BuildPrometheus builds the prometheus yaml content.

func BuildPrometheusComponent

func BuildPrometheusComponent(conf BuildPrometheusComponentConfig) (component internalversion.Component, err error)

BuildPrometheusComponent builds a prometheus component.

func ConvertFromPod added in v0.5.0

func ConvertFromPod(p corev1.Pod) internalversion.Component

ConvertFromPod converts a pod to a component.

func ConvertToPod added in v0.5.0

func ConvertToPod(component internalversion.Component) corev1.Pod

ConvertToPod converts a component to a pod.

func GetRuntimeMode added in v0.5.0

func GetRuntimeMode(runtime string) string

GetRuntimeMode returns the mode of runtime.

func GroupByLinks(components []internalversion.Component) ([][]internalversion.Component, error)

GroupByLinks groups stages by links.

Types

type BuildDashboardComponentConfig added in v0.4.0

type BuildDashboardComponentConfig struct {
	Runtime     string
	ProjectName string
	Binary      string
	Image       string
	Version     version.Version
	Workdir     string
	BindAddress string
	Port        uint32

	Banner string

	EnableMetrics bool

	CaCertPath     string
	AdminCertPath  string
	AdminKeyPath   string
	KubeconfigPath string
}

BuildDashboardComponentConfig is the configuration for building the dashboard component.

type BuildDashboardMetricsScraperComponentConfig added in v0.5.0

type BuildDashboardMetricsScraperComponentConfig struct {
	Runtime string
	Binary  string
	Image   string
	Version version.Version
	Workdir string

	CaCertPath     string
	AdminCertPath  string
	AdminKeyPath   string
	KubeconfigPath string
}

BuildDashboardMetricsScraperComponentConfig is the configuration for building the dashboard component.

type BuildEtcdComponentConfig

type BuildEtcdComponentConfig struct {
	Runtime     string
	Binary      string
	Image       string
	ProjectName string
	Version     version.Version
	DataPath    string
	Workdir     string
	BindAddress string
	Port        uint32
	PeerPort    uint32
	Verbosity   log.Level
}

BuildEtcdComponentConfig is the configuration for building an etcd component.

type BuildJaegerComponentConfig added in v0.4.0

type BuildJaegerComponentConfig struct {
	Runtime      string
	Binary       string
	Image        string
	Version      version.Version
	Workdir      string
	BindAddress  string
	Port         uint32
	OtlpGrpcPort uint32
	Verbosity    log.Level
}

BuildJaegerComponentConfig is the configuration for building a jaeger component.

type BuildKubeApiserverComponentConfig

type BuildKubeApiserverComponentConfig struct {
	Runtime           string
	ProjectName       string
	Binary            string
	Image             string
	Version           version.Version
	Workdir           string
	BindAddress       string
	Port              uint32
	EtcdAddress       string
	EtcdPort          uint32
	KubeRuntimeConfig string
	KubeFeatureGates  string
	SecurePort        bool
	KubeAuthorization bool
	KubeAdmission     bool
	AuditPolicyPath   string
	AuditLogPath      string
	CaCertPath        string
	AdminCertPath     string
	AdminKeyPath      string
	Verbosity         log.Level
	DisableQPSLimits  bool
	TracingConfigPath string
	EtcdPrefix        string
}

BuildKubeApiserverComponentConfig is the configuration for building a kube-apiserver component.

type BuildKubeControllerManagerComponentConfig

type BuildKubeControllerManagerComponentConfig struct {
	Runtime                            string
	ProjectName                        string
	Binary                             string
	Image                              string
	Version                            version.Version
	Workdir                            string
	BindAddress                        string
	Port                               uint32
	SecurePort                         bool
	CaCertPath                         string
	AdminCertPath                      string
	AdminKeyPath                       string
	KubeAuthorization                  bool
	KubeconfigPath                     string
	KubeFeatureGates                   string
	NodeMonitorPeriodMilliseconds      int64
	NodeMonitorGracePeriodMilliseconds int64
	Verbosity                          log.Level
	DisableQPSLimits                   bool
}

BuildKubeControllerManagerComponentConfig is the configuration for building a kube-controller-manager component.

type BuildKubeSchedulerComponentConfig

type BuildKubeSchedulerComponentConfig struct {
	Runtime          string
	ProjectName      string
	Binary           string
	Image            string
	Version          version.Version
	Workdir          string
	BindAddress      string
	Port             uint32
	SecurePort       bool
	CaCertPath       string
	AdminCertPath    string
	AdminKeyPath     string
	ConfigPath       string
	KubeconfigPath   string
	KubeFeatureGates string
	Verbosity        log.Level
	DisableQPSLimits bool
}

BuildKubeSchedulerComponentConfig is the configuration for building a kube-scheduler component.

type BuildKubectlProxyComponentConfig added in v0.6.0

type BuildKubectlProxyComponentConfig struct {
	Runtime        string
	ProjectName    string
	Binary         string
	Image          string
	Workdir        string
	BindAddress    string
	Port           uint32
	CaCertPath     string
	AdminCertPath  string
	AdminKeyPath   string
	ConfigPath     string
	KubeconfigPath string
	Verbosity      log.Level
}

BuildKubectlProxyComponentConfig is the configuration for building a kubectl proxy component.

type BuildKwokControllerComponentConfig

type BuildKwokControllerComponentConfig struct {
	Runtime                           string
	ProjectName                       string
	Binary                            string
	Image                             string
	Version                           version.Version
	Workdir                           string
	BindAddress                       string
	Port                              uint32
	ConfigPath                        string
	KubeconfigPath                    string
	CaCertPath                        string
	AdminCertPath                     string
	AdminKeyPath                      string
	NodeIP                            string
	NodeName                          string
	ManageNodesWithAnnotationSelector string
	Verbosity                         log.Level
	NodeLeaseDurationSeconds          uint
	EnableCRDs                        []string
}

BuildKwokControllerComponentConfig is the configuration for building a kwok controller component.

type BuildMetricsServerAPIServiceConfig added in v0.5.0

type BuildMetricsServerAPIServiceConfig struct {
	Port         uint32
	ExternalName string
}

BuildMetricsServerAPIServiceConfig is the config for BuildMetricsServerAPIService.

type BuildMetricsServerComponentConfig added in v0.5.0

type BuildMetricsServerComponentConfig struct {
	Runtime        string
	ProjectName    string
	Binary         string
	Image          string
	Version        version.Version
	Workdir        string
	BindAddress    string
	Port           uint32
	CaCertPath     string
	AdminCertPath  string
	AdminKeyPath   string
	KubeconfigPath string
	Verbosity      log.Level
}

BuildMetricsServerComponentConfig is the configuration for building a metrics server component.

type BuildPrometheusComponentConfig

type BuildPrometheusComponentConfig struct {
	Runtime                      string
	Binary                       string
	Image                        string
	Version                      version.Version
	Workdir                      string
	BindAddress                  string
	Port                         uint32
	ConfigPath                   string
	AdminCertPath                string
	AdminKeyPath                 string
	Verbosity                    log.Level
	DisableKubeControllerManager bool
	DisableKubeScheduler         bool
}

BuildPrometheusComponentConfig is the configuration for building a prometheus component.

type BuildPrometheusConfig added in v0.5.0

type BuildPrometheusConfig struct {
	Components []internalversion.Component
}

BuildPrometheusConfig is the configuration for building the prometheus config

Jump to

Keyboard shortcuts

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