config

package
v0.1.1-beta5 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigurationFilter

func DefaultConfigurationFilter(obj interface{}) bool

func GetMeshConfigMap

func GetMeshConfigMap(k8sApi *kube.K8sAPI) *corev1.ConfigMap

func RegisterConfigurationHanlder

func RegisterConfigurationHanlder(handler ConfigEventHandler, configmapInformer ctrlruntimecache.Informer, resyncPeriod time.Duration)

func UpdateMeshConfig

func UpdateMeshConfig(k8sApi *kube.K8sAPI, config *MeshConfig)

Types

type Certificate

type Certificate struct {
	Manager string `json:"manager,omitempty"`
}

type Cluster

type Cluster struct {
	Region string `json:"region,omitempty"`
	Zone   string `json:"zone,omitempty"`
	Group  string `json:"group,omitempty"`
	Name   string `json:"name,omitempty"`
}

type ClusterConnector

type ClusterConnector struct {
	DefaultImage       string `json:"default-image,omitempty"`
	SecretMountPath    string `json:"secret-mount-path,omitempty"`
	Namespace          string `json:"namespace,omitempty"`
	ConfigmapName      string `json:"configmap-name,omitempty"`
	ConfigFile         string `json:"config-file,omitempty"`
	LogLevel           int32  `json:"log-level,omitempty"`
	ServiceAccountName string `json:"service-account-name,omitempty"`
}

type ConfigEventHandler

type ConfigEventHandler interface {
	OnConfigMapAdd(cm *corev1.ConfigMap)
	OnConfigMapUpdate(oldCm, cm *corev1.ConfigMap)
	OnConfigMapDelete(cm *corev1.ConfigMap)
}

type ConnectorConfig

type ConnectorConfig struct {
	ClusterName                    string `envconfig:"CLUSTER_NAME" required:"true" split_words:"true"`
	ClusterRegion                  string `envconfig:"CLUSTER_REGION" default:"default" split_words:"true"`
	ClusterZone                    string `envconfig:"CLUSTER_ZONE" default:"default" split_words:"true"`
	ClusterGroup                   string `envconfig:"CLUSTER_GROUP" default:"default" split_words:"true"`
	ClusterGateway                 string `envconfig:"CLUSTER_GATEWAY" required:"true" split_words:"true"`
	ClusterConnectorMode           string `envconfig:"CLUSTER_CONNECTOR_MODE" required:"true" split_words:"true"`
	ClusterControlPlaneRepoRootUrl string `envconfig:"CLUSTER_CONTROL_PLANE_REPO_ROOT_URL" default:"http://repo-service.flomesh.svc:6060" split_words:"true"`
	ClusterControlPlaneRepoPath    string `envconfig:"CLUSTER_CONTROL_PLANE_REPO_PATH" default:"/repo" split_words:"true"`
	ClusterControlPlaneRepoApiPath string `envconfig:"CLUSTER_CONTROL_PLANE_REPO_API_PATH" default:"/api/v1/repo" split_words:"true"`
}

func (*ConnectorConfig) UID

func (c *ConnectorConfig) UID() string

type FlomeshConfigurationHandler

type FlomeshConfigurationHandler struct {
	// contains filtered or unexported fields
}

func NewFlomeshConfigurationHandler

func NewFlomeshConfigurationHandler(client client.Client, k8sApi *kube.K8sAPI, store *Store) *FlomeshConfigurationHandler

func (FlomeshConfigurationHandler) OnConfigMapAdd

func (f FlomeshConfigurationHandler) OnConfigMapAdd(cm *corev1.ConfigMap)

func (FlomeshConfigurationHandler) OnConfigMapDelete

func (f FlomeshConfigurationHandler) OnConfigMapDelete(cm *corev1.ConfigMap)

func (FlomeshConfigurationHandler) OnConfigMapUpdate

func (f FlomeshConfigurationHandler) OnConfigMapUpdate(oldCm, cm *corev1.ConfigMap)

type MeshConfig

type MeshConfig struct {
	Namespace             string           `json:"namespace,omitempty"`
	IsControlPlane        bool             `json:"is-control-plane,omitempty"`
	IngressEnabled        bool             `json:"ingress-enabled,omitempty"`
	GatewayApiEnabled     bool             `json:"gateway-api-enabled,omitempty"`
	RepoRootURL           string           `json:"repo-root-url,omitempty"`
	RepoPath              string           `json:"repo-path,omitempty"`
	RepoApiPath           string           `json:"repo-api-path,omitempty"`
	ServiceAggregatorAddr string           `json:"service-aggregator-addr,omitempty"`
	DefaultPipyImage      string           `json:"default-pipy-image,omitempty"`
	ProxyInitImage        string           `json:"proxy-init-image,omitempty"`
	WaitForItImage        string           `json:"wait-for-it-image,omitempty"`
	Certificate           Certificate      `json:"certificate,omitempty"`
	Cluster               Cluster          `json:"cluster,omitempty"`
	ClusterConnector      ClusterConnector `json:"cluster-connector,omitempty"`
}

func DefaultMeshConfig

func DefaultMeshConfig(k8sApi *kube.K8sAPI) *MeshConfig

func GetMeshConfig

func GetMeshConfig(k8sApi *kube.K8sAPI) *MeshConfig

func ParseMeshConfig

func ParseMeshConfig(cm *corev1.ConfigMap) *MeshConfig

func (*MeshConfig) IngressCodebasePath

func (o *MeshConfig) IngressCodebasePath() string

func (*MeshConfig) RepoApiBaseURL

func (o *MeshConfig) RepoApiBaseURL() string

func (*MeshConfig) RepoBaseURL

func (o *MeshConfig) RepoBaseURL() string

func (*MeshConfig) ToJson

func (o *MeshConfig) ToJson() string

type MeshConfigChangeListener

type MeshConfigChangeListener interface {
	OnConfigCreate(cfg *MeshConfig)
	OnConfigUpdate(oldCfg, cfg *MeshConfig)
	OnConfigDelete(cfg *MeshConfig)
}

type ProxyInitEnvironmentConfiguration

type ProxyInitEnvironmentConfiguration struct {
	MatchedProxyProfile string   `envconfig:"MATCHED_PROXY_PROFILE" required:"true" split_words:"true"`
	ProxyRepoBaseUrl    string   `envconfig:"PROXY_REPO_BASE_URL" required:"true" split_words:"true"`
	ProxyRepoApiBaseUrl string   `envconfig:"PROXY_REPO_API_BASE_URL" required:"true" split_words:"true"`
	ProxyParentPath     string   `envconfig:"PROXY_PARENT_PATH" required:"true" split_words:"true"`
	ProxyPaths          []string `envconfig:"PROXY_PATHS" required:"true" split_words:"true"`
}

type Store

type Store struct {
	MeshConfig *MeshConfig
}

func NewStore

func NewStore(k8sApi *kube.K8sAPI) *Store

Jump to

Keyboard shortcuts

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