config

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultWatchedConfigMaps = sets.String{}
)

Functions

func DefaultConfigurationFilter

func DefaultConfigurationFilter(obj interface{}) bool

func GetFsmNamespace

func GetFsmNamespace() string

func GetFsmPodName added in v0.1.6

func GetFsmPodName() string

func GetFsmPodNamespace added in v0.1.6

func GetFsmPodNamespace() string

func RegisterConfigurationHanlder

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

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" validate:"required"`
}

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"`
	//ClusterConnectorNamespace      string `envconfig:"CLUSTER_CONNECTOR_NAMESPACE" required:"true" split_words:"true"`
	ClusterConnectorIsInCluster    bool   `envconfig:"CLUSTER_CONNECTOR_IS_IN_CLUSTER" required:"true" split_words:"true"`
	ClusterControlPlaneRepoRootUrl string `envconfig:"CLUSTER_CONTROL_PLANE_REPO_ROOT_URL" default:"http://fsm-repo-service: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 FsmMetadata added in v0.1.6

type FsmMetadata struct {
	PodName      string `envconfig:"POD_NAME" required:"true" split_words:"true"`
	PodNamespace string `envconfig:"POD_NAMESPACE" required:"true" split_words:"true"`
	FsmNamespace string `envconfig:"NAMESPACE" required:"true" split_words:"true"`
}

type GatewayApi

type GatewayApi struct {
	Enabled bool `json:"enabled,omitempty"`
}

type Images

type Images struct {
	Repository     string `json:"repository" validate:"required"`
	PipyImage      string `json:"pipyImage" validate:"required"`
	ProxyInitImage string `json:"proxyInitImage" validate:"required"`
	KlipperLbImage string `json:"klipperLbImage" validate:"required"`
}

type Ingress

type Ingress struct {
	Enabled    bool `json:"enabled,omitempty"`
	Namespaced bool `json:"namespaced,omitempty"`
	TLS        TLS  `json:"tls,omitempty"`
}

type MeshConfig

type MeshConfig struct {
	IsControlPlane    bool              `json:"isControlPlane,omitempty"`
	Repo              Repo              `json:"repo"`
	Images            Images            `json:"images"`
	ServiceAggregator ServiceAggregator `json:"serviceAggregator"`
	Webhook           Webhook           `json:"webhook"`
	Ingress           Ingress           `json:"ingress"`
	GatewayApi        GatewayApi        `json:"gatewayApi"`
	Certificate       Certificate       `json:"certificate"`
	Cluster           Cluster           `json:"cluster"`
	ServiceLB         ServiceLB         `json:"serviceLB"`
}

func ParseMeshConfig

func ParseMeshConfig(cm *corev1.ConfigMap) *MeshConfig

func (*MeshConfig) AggregatorPort added in v0.1.6

func (o *MeshConfig) AggregatorPort() string

func (*MeshConfig) GetDefaultIngressPath added in v0.1.7

func (o *MeshConfig) GetDefaultIngressPath() string

func (*MeshConfig) GetDefaultServicesPath added in v0.1.7

func (o *MeshConfig) GetDefaultServicesPath() string

func (*MeshConfig) IngressCodebasePath

func (o *MeshConfig) IngressCodebasePath() string

func (*MeshConfig) NamespacedIngressCodebasePath added in v0.1.7

func (o *MeshConfig) NamespacedIngressCodebasePath(namespace string) string

func (*MeshConfig) PipyImage

func (o *MeshConfig) PipyImage() string

func (*MeshConfig) ProxyInitImage

func (o *MeshConfig) ProxyInitImage() string

func (*MeshConfig) RepoAddr added in v0.1.6

func (o *MeshConfig) RepoAddr() string

func (*MeshConfig) RepoApiBaseURL

func (o *MeshConfig) RepoApiBaseURL() string

func (*MeshConfig) RepoBaseURL

func (o *MeshConfig) RepoBaseURL() string

func (*MeshConfig) ServiceLbImage added in v0.1.8

func (o *MeshConfig) ServiceLbImage() 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 MeshConfigClient

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

func NewMeshConfigClient

func NewMeshConfigClient(k8sApi *kube.K8sAPI) *MeshConfigClient

func (*MeshConfigClient) GetConfig

func (c *MeshConfigClient) GetConfig() *MeshConfig

func (*MeshConfigClient) UpdateConfig

func (c *MeshConfigClient) UpdateConfig(config *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 Repo

type Repo struct {
	RootURL string `json:"rootURL" validate:"required,url"`
	Path    string `json:"path" validate:"required"`
	ApiPath string `json:"apiPath" validate:"required"`
}

type SSLPassthrough added in v0.1.7

type SSLPassthrough struct {
	Enabled      bool  `json:"enabled,omitempty"`
	UpstreamPort int32 `json:"upstreamPort" validate:"gte=1,lte=65535"`
}

type ServiceAggregator

type ServiceAggregator struct {
	Addr string `json:"addr" validate:"required,hostname_port"`
}

type ServiceLB added in v0.1.8

type ServiceLB struct {
	Enabled bool `json:"enabled,omitempty"`
}

type Store

type Store struct {
	MeshConfig *MeshConfigClient
}

func NewStore

func NewStore(k8sApi *kube.K8sAPI) *Store

type TLS added in v0.1.7

type TLS struct {
	Enabled        bool           `json:"enabled,omitempty"`
	SSLPassthrough SSLPassthrough `json:"sslPassthrough,omitempty"`
}

type Webhook

type Webhook struct {
	ServiceName string `json:"serviceName" validate:"required,hostname"`
}

Jump to

Keyboard shortcuts

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