component

package
v4.2.733+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2020 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CertificateBlockType   = "CERTIFICATE"
	RSAPrivateKeyBlockType = "RSA PRIVATE KEY"
)

Variables

This section is empty.

Functions

func EncodeCertPEM

func EncodeCertPEM(cert *x509.Certificate) []byte

func EncodePrivateKeyPEM

func EncodePrivateKeyPEM(key *rsa.PrivateKey) []byte

func NewPrivateKey

func NewPrivateKey() (*rsa.PrivateKey, error)

func NewSignedCert

func NewSignedCert(cfg cert.Config, key crypto.Signer, caCert *x509.Certificate, caKey crypto.Signer) (*x509.Certificate, error)

Types

type AIDispatcherConfig

type AIDispatcherConfig struct {
	Enabled bool
}

func NewDefaultAIDispatcherConfig

func NewDefaultAIDispatcherConfig() AIDispatcherConfig

type BasicAuth

type BasicAuth struct {
	Username string
	Password string
}

type ComponentConfig

type ComponentConfig struct {
	Platform                 string
	NameSpace                string
	PodSecurityPolicyGroup   string
	PodSecurityPolicyVersion string

	PodTemplateConfig PodTemplateConfig

	FederatoraiAgentGPU FederatoraiAgentGPUConfig
	AIDispatcher        AIDispatcherConfig
	Execution           ExecutionConfig

	Image ImageConfig

	Prometheus      PrometheusConfig
	Kafka           KafkaConfig
	FedemeterConfig FedemeterConfig
}

func (ComponentConfig) NewAPIService added in v0.9.1

func (ComponentConfig) NewAdmissionControllerSecret

func (c ComponentConfig) NewAdmissionControllerSecret() (*corev1.Secret, error)

func (ComponentConfig) NewAlamedaNotificationChannel added in v0.9.1

func (c ComponentConfig) NewAlamedaNotificationChannel(str string) (*unstructuredv1.Unstructured, error)

func (ComponentConfig) NewAlamedaNotificationTopic added in v0.9.1

func (c ComponentConfig) NewAlamedaNotificationTopic(str string) (*unstructuredv1.Unstructured, error)

func (ComponentConfig) NewAlamedaScaler added in v0.2.12

func (c ComponentConfig) NewAlamedaScaler(str string) *autoscaling_v1alpha1.AlamedaScaler

func (ComponentConfig) NewClusterRole

func (c ComponentConfig) NewClusterRole(str string) *rbacv1.ClusterRole

func (ComponentConfig) NewClusterRoleBinding

func (c ComponentConfig) NewClusterRoleBinding(str string) *rbacv1.ClusterRoleBinding

func (ComponentConfig) NewConfigMap

func (c ComponentConfig) NewConfigMap(str string) *corev1.ConfigMap

func (ComponentConfig) NewCustomResourceDefinition

func (c ComponentConfig) NewCustomResourceDefinition(str string) *apiextv1beta1.CustomResourceDefinition

func (ComponentConfig) NewDaemonSet added in v0.2.35

func (c ComponentConfig) NewDaemonSet(str string) *appsv1.DaemonSet

func (ComponentConfig) NewDeployment

func (c ComponentConfig) NewDeployment(str string) *appsv1.Deployment

func (ComponentConfig) NewInfluxDBSecret

func (c ComponentConfig) NewInfluxDBSecret() (*corev1.Secret, error)

func (ComponentConfig) NewIngress added in v0.2.30

func (c ComponentConfig) NewIngress(str string) *extensionsv1beta1.Ingress

func (ComponentConfig) NewMutatingWebhookConfiguration added in v0.9.1

func (c ComponentConfig) NewMutatingWebhookConfiguration(str string) (*admissionregistration_v1beta1.MutatingWebhookConfiguration, error)

func (ComponentConfig) NewPersistentVolumeClaim

func (c ComponentConfig) NewPersistentVolumeClaim(str string) *corev1.PersistentVolumeClaim

func (ComponentConfig) NewPodSecurityPolicy added in v0.2.35

func (c ComponentConfig) NewPodSecurityPolicy(str string) (runtime.Object, error)

func (ComponentConfig) NewRole added in v0.9.1

func (c ComponentConfig) NewRole(str string) *rbacv1.Role

func (ComponentConfig) NewRoleBinding added in v0.9.1

func (c ComponentConfig) NewRoleBinding(str string) *rbacv1.RoleBinding

func (ComponentConfig) NewRoute added in v0.2.19

func (c ComponentConfig) NewRoute(str string) *routev1.Route

func (ComponentConfig) NewSecret

func (c ComponentConfig) NewSecret(str string) (*corev1.Secret, error)

func (ComponentConfig) NewSecurityContextConstraints added in v0.9.1

func (c ComponentConfig) NewSecurityContextConstraints(str string) *securityv1.SecurityContextConstraints

func (ComponentConfig) NewService

func (c ComponentConfig) NewService(str string) *corev1.Service

func (ComponentConfig) NewServiceAccount

func (c ComponentConfig) NewServiceAccount(str string) *corev1.ServiceAccount

func (ComponentConfig) NewStatefulSet added in v0.2.30

func (c ComponentConfig) NewStatefulSet(str string) *appsv1.StatefulSet

func (ComponentConfig) NewTLSSecret added in v0.9.1

func (c ComponentConfig) NewTLSSecret(assetFile, cn string) (*corev1.Secret, error)

func (ComponentConfig) NewUnstructed added in v0.9.1

func (c ComponentConfig) NewUnstructed(str string) (*unstructuredv1.Unstructured, error)

func (ComponentConfig) NewValidatingWebhookConfiguration added in v0.9.1

func (c ComponentConfig) NewValidatingWebhookConfiguration(str string) (*admissionregistration_v1beta1.ValidatingWebhookConfiguration, error)

func (ComponentConfig) NewfedemeterSecret added in v0.2.30

func (c ComponentConfig) NewfedemeterSecret() (*corev1.Secret, error)

func (*ComponentConfig) SetNameSpace

func (c *ComponentConfig) SetNameSpace(ns string)

type ComponentConfigOption

type ComponentConfigOption func(*ComponentConfig)

func WithAIDispatcherConfig

func WithAIDispatcherConfig(config AIDispatcherConfig) ComponentConfigOption

func WithExecutionConfig

func WithExecutionConfig(config ExecutionConfig) ComponentConfigOption

func WithFederatoraiAgentGPUConfig

func WithFederatoraiAgentGPUConfig(config FederatoraiAgentGPUConfig) ComponentConfigOption

func WithFedermeterConfig

func WithFedermeterConfig(clusterType string) ComponentConfigOption

func WithImageConfig

func WithImageConfig(ic ImageConfig) ComponentConfigOption

func WithKafkaConfig

func WithKafkaConfig(config KafkaConfig) ComponentConfigOption

func WithNamespace

func WithNamespace(namespace string) ComponentConfigOption

func WithPodSecurityPolicyGroup

func WithPodSecurityPolicyGroup(podSecurityPolicyGroup string) ComponentConfigOption

func WithPodSecurityPolicyVersion

func WithPodSecurityPolicyVersion(podSecurityPolicyVersion string) ComponentConfigOption

func WithPrometheusConfig

func WithPrometheusConfig(config PrometheusConfig) ComponentConfigOption

type ExecutionConfig

type ExecutionConfig struct {
	EnabledVPA bool
}

func NewDefaultExecutionConfig

func NewDefaultExecutionConfig() ExecutionConfig

type FedemeterConfig

type FedemeterConfig struct {
	FedemeterWorkerNodeLowerLimit string
	FedemeterFilterTable          string
}

func NewDefaultFedemeterConfig

func NewDefaultFedemeterConfig() FedemeterConfig

type FederatoraiAgentGPUConfig added in v0.9.13

type FederatoraiAgentGPUConfig struct {
	Enabled    bool
	Datasource FederatoraiAgentGPUDatasourceConfig
}

func NewDefaultFederatoraiAgentGPUConfig added in v0.9.13

func NewDefaultFederatoraiAgentGPUConfig() FederatoraiAgentGPUConfig

type FederatoraiAgentGPUDatasourceConfig added in v0.9.13

type FederatoraiAgentGPUDatasourceConfig struct {
	InfluxDB   InfluxDBConfig
	Prometheus PrometheusConfig
}

type ImageConfig

type ImageConfig struct {
	AdmissionController       string
	AIDispatcher              string
	AIEngine                  string
	Analyzer                  string
	Datahub                   string
	Evictioner                string
	Executor                  string
	Alpine                    string
	Grafana                   string
	InfluxDB                  string
	Notifier                  string
	Operator                  string
	RabbitMQ                  string
	Recommender               string
	FedemeterAPI              string
	FederatoraiAgentGPU       string
	FederatoraiAgentPreloader string
	FederatoraiAgent          string
	FederatoraiAgentApp       string
	FederatoraiRestAPI        string
	FedemeterInfluxDB         string
	DashboardFrontend         string
	DashboardBackend          string
}

func NewDefautlImageConfig

func NewDefautlImageConfig() ImageConfig

NewDefautlImageConfig returns ImageConfig with default value

func (*ImageConfig) SetAIDispatcher

func (i *ImageConfig) SetAIDispatcher(image string)

SetAIDispatcher sets image to imageConfig

func (*ImageConfig) SetAIEngine

func (i *ImageConfig) SetAIEngine(image string)

SetAIEngine sets image to imageConfig

func (*ImageConfig) SetAdmissionController

func (i *ImageConfig) SetAdmissionController(image string)

SetAdmissionController sets image to imageConfig

func (*ImageConfig) SetAlpine

func (i *ImageConfig) SetAlpine(image string)

SetAlpine sets image to imageConfig

func (*ImageConfig) SetAnalyzer

func (i *ImageConfig) SetAnalyzer(image string)

SetAnalyzer sets image to imageConfig

func (*ImageConfig) SetBackend

func (i *ImageConfig) SetBackend(image string)

SetBackEnd sets image to imageConfig

func (*ImageConfig) SetDatahub

func (i *ImageConfig) SetDatahub(image string)

SetDatahub sets image to imageConfig

func (*ImageConfig) SetEvictioner

func (i *ImageConfig) SetEvictioner(image string)

SetEvictioner sets image to imageConfig

func (*ImageConfig) SetExecutor

func (i *ImageConfig) SetExecutor(image string)

SetExecutor sets image to imageConfig

func (*ImageConfig) SetFedemeterAPI

func (i *ImageConfig) SetFedemeterAPI(image string)

SetFedemeterAPI sets image to imageConfig

func (*ImageConfig) SetFedemeterInfluxdb

func (i *ImageConfig) SetFedemeterInfluxdb(image string)

SetFedemeterInfluxdb sets image to imageConfig

func (*ImageConfig) SetFederatoraiAgent

func (i *ImageConfig) SetFederatoraiAgent(image string)

SetFederatoraiAgent sets image to imageConfig

func (*ImageConfig) SetFederatoraiAgentApp

func (i *ImageConfig) SetFederatoraiAgentApp(image string)

SetFederatoraiAgentApp sets image to imageConfig

func (*ImageConfig) SetFederatoraiAgentGPU

func (i *ImageConfig) SetFederatoraiAgentGPU(image string)

SetFederatoraiAgentGPU sets image to imageConfig

func (*ImageConfig) SetFederatoraiAgentPreloader

func (i *ImageConfig) SetFederatoraiAgentPreloader(image string)

SetFederatoraiAgentPreloader sets image to imageConfig

func (*ImageConfig) SetFederatoraiRestAPI

func (i *ImageConfig) SetFederatoraiRestAPI(image string)

SetFederatoraiRestAPI sets image to imageConfig

func (*ImageConfig) SetFrontend

func (i *ImageConfig) SetFrontend(image string)

SetFrontEnd sets image to imageConfig

func (*ImageConfig) SetGrafana

func (i *ImageConfig) SetGrafana(image string)

SetGrafana sets image to imageConfig

func (*ImageConfig) SetInfluxdb

func (i *ImageConfig) SetInfluxdb(image string)

SetInfluxdb sets image to imageConfig

func (*ImageConfig) SetNotifier

func (i *ImageConfig) SetNotifier(image string)

SetNotifier sets image to imageConfig

func (*ImageConfig) SetOperator

func (i *ImageConfig) SetOperator(image string)

SetOperator sets image to imageConfig

func (*ImageConfig) SetRabbitMQ

func (i *ImageConfig) SetRabbitMQ(image string)

SetRabbitMQ sets image to imageConfig

func (*ImageConfig) SetRecommender

func (i *ImageConfig) SetRecommender(image string)

SetRecommender sets image to imageConfig

type InfluxDBConfig added in v0.9.13

type InfluxDBConfig struct {
	Address   string
	BasicAuth BasicAuth
}

type KafkaConfig

type KafkaConfig struct {
	Enabled         bool
	BrokerAddresses []string
	Version         string

	SASL SASLConfig
	TLS  TLSConfig
}

type PodTemplateConfig added in v0.2.0

type PodTemplateConfig struct {
	corev1.PodSecurityContext
}

PodTemplateConfig specifies pod confiruation needed while deploying pod

func NewDefaultPodTemplateConfig added in v0.2.0

func NewDefaultPodTemplateConfig(ns corev1.Namespace) PodTemplateConfig

type PrometheusConfig added in v0.9.13

type PrometheusConfig struct {
	Address         string
	Host            string
	Port            string
	Protocol        string
	BasicAuth       BasicAuth
	BearerTokenFile string
	TLS             TLSConfig
}

type SASLConfig

type SASLConfig struct {
	Enabled   bool
	BasicAuth BasicAuth
}

type TLSConfig

type TLSConfig struct {
	Enabled            bool
	InsecureSkipVerify bool
}

Jump to

Keyboard shortcuts

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