config

package
v0.0.0-...-26d813d Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadTLSCertByKubeConfig

func LoadTLSCertByKubeConfig(config *restclient.Config) (*xds.TLSCert, error)

func LoadTLSCertByTLSConfig

func LoadTLSCertByTLSConfig(config *kusciaconfig.TLSConfig) (*xds.TLSCert, error)

Types

type ClusterConfig

type ClusterConfig struct {
	Host     string
	Port     uint32
	Path     string
	Protocol string

	TLSCert *xds.TLSCert
}

func LoadClusterConfig

func LoadClusterConfig(config *kusciaconfig.TLSConfig, endpoint string) (*ClusterConfig, error)

func LoadServiceConfig

func LoadServiceConfig(config *kusciaconfig.ServiceConfig) (*ClusterConfig, error)

type GatewayConfig

type GatewayConfig struct {
	RootDir       string `yaml:"rootdir,omitempty"`
	DomainID      string `yaml:"domainID,omitempty"`
	ConfBasedir   string `yaml:"confBasedir,omitempty"`
	WhiteListFile string `yaml:"whiteListFile,omitempty"`
	CsrData       string `yaml:"-"`
	DomainKey     *rsa.PrivateKey
	CACert        *x509.Certificate
	CAKey         *rsa.PrivateKey

	ExternalPort   uint32 `yaml:"externalPort,omitempty"`
	HandshakePort  uint32 `yaml:"handshakePort,omitempty"`
	XDSPort        uint32 `yaml:"xdsPort,omitempty"`
	EnvoyAdminPort uint32 `yaml:"envoyAdminPort,omitempty"`

	IdleTimeout  int `yaml:"idleTimeout,omitempty"`
	ResyncPeriod int `yaml:"resyncPeriod,omitempty"`

	MasterConfig   *kusciaconfig.MasterConfig `yaml:"master,omitempty"`
	ExternalTLS    *kusciaconfig.TLSConfig    `yaml:"externalTLS,omitempty"`
	InnerServerTLS *kusciaconfig.TLSConfig    `yaml:"InnerServerTLS,omitempty"`
	InnerClientTLS *kusciaconfig.TLSConfig    `yaml:"InnerClientTLS,omitempty"`

	TransportConfig          *kusciaconfig.ServiceConfig `yaml:"transport,omitempty"`
	InterConnSchedulerConfig *kusciaconfig.ServiceConfig `yaml:"interConnScheduler,omitempty"`
}

func DefaultStaticGatewayConfig

func DefaultStaticGatewayConfig() *GatewayConfig

func (*GatewayConfig) CheckConfig

func (config *GatewayConfig) CheckConfig() error

func (*GatewayConfig) GetEnvoyNodeID

func (config *GatewayConfig) GetEnvoyNodeID() string

type InterConnClusterConfig

type InterConnClusterConfig struct {
	TransportConfig *ClusterConfig
	SchedulerConfig *ClusterConfig
}

func LoadInterConnClusterConfig

func LoadInterConnClusterConfig(transportConfig, schedulerConfig *kusciaconfig.ServiceConfig) (*InterConnClusterConfig, error)

type MasterConfig

type MasterConfig struct {
	Master        bool
	Namespace     string
	MasterProxy   *ClusterConfig
	APIServer     *ClusterConfig
	KusciaStorage *ClusterConfig
	KusciaAPI     *ClusterConfig
	Reporter      *ClusterConfig
	APIWhitelist  []string
}

func LoadMasterConfig

func LoadMasterConfig(masterConfig *kusciaconfig.MasterConfig, kubeConfig *restclient.Config) (*MasterConfig, error)

func LoadMasterProxyConfig

func LoadMasterProxyConfig(masterConfig *kusciaconfig.MasterConfig) (*MasterConfig, error)

Jump to

Keyboard shortcuts

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