config

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClusterRoleMaster = "master"
	ClusterRoleRemote = "remote"
)
View Source
const (
	Pubnet   = AccessType("PUBNET")
	Intranet = AccessType("INTRANET")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessType

type AccessType string

type ClusterConfig

type ClusterConfig struct {
	Name   string `json:"name"`
	Region string `json:"region"`
	Role   string `json:"role"`

	KubeMesh                KubeMeshConfiguration         `json:"kubeMesh"`
	AutoInjectionNamespaces []string                      `json:"autoInjectionNamespaces"`
	Gateways                GatewaysConfiguration         `json:"gateways"`
	SystemGateways          GatewaysConfiguration         `json:"systemGateways"`
	SidecarInjector         SidecarInjectorConfiguration  `json:"sidecarInjector,omitempty"`
	DeployMode              ComponentDeployMode           `json:"deployMode,omitempty"`
	MeshKubeOperator        MeshKubeOperatorConfiguration `json:"meshKubeOperator,omitempty"`
	Istiod                  IstiodConfiguration           `json:"istiod,omitempty"`

	Proxy     ProxyConfiguration     `json:"proxy,omitempty"`
	ProxyInit ProxyInitConfiguration `json:"proxyInit,omitempty"`

	ImageHub string `json:"imageHub,omitempty"`
}

func (*ClusterConfig) IsMaster

func (c *ClusterConfig) IsMaster() bool

type CommonConfiguration

type CommonConfiguration struct {
	Image         string                   `json:"image,omitempty"`
	ReplicaCount  int32                    `json:"replicaCount,omitempty"`
	MinReplicas   int32                    `json:"minReplicas,omitempty"`
	MaxReplicas   int32                    `json:"maxReplicas,omitempty"`
	Resources     *v1.ResourceRequirements `json:"resources,omitempty"`
	Metrics       []v2beta1.MetricSpec     `json:"metrics,omitempty"`
	SelectedNodes []string                 `json:"selectedNodes,omitempty"`
}

type CommonServiceConfiguration

type CommonServiceConfiguration struct {
	ServiceType        v1.ServiceType    `json:"serviceType,omitempty"`
	ServiceAnnotations map[string]string `json:"serviceAnnotations,omitempty"`
	ServiceLabels      map[string]string `json:"serviceLabels,omitempty"`
}

type ComponentDeployMode

type ComponentDeployMode struct {
	ProprietaryNodesDeploy bool              `json:"proprietaryNodesDeploy"`
	Labels                 map[string]string `json:"labels,omitempty"`
	Nodes                  []string          `json:"nodes,omitempty"`
}

type ComponentsConfig

type ComponentsConfig struct {
	Istiod      CommonConfiguration `json:"istiod,omitempty"`
	MeshTracing MeshTracingConfig   `json:"meshTracing,omitempty"`
}

type GatewayConfiguration

type GatewayConfiguration struct {
	Name               string                  `json:"name"`
	Namespace          string                  `json:"namespace"`
	ServiceType        v1.ServiceType          `json:"serviceType,omitempty"`
	ServiceAnnotations map[string]string       `json:"serviceAnnotations,omitempty"`
	ServiceLabels      map[string]string       `json:"serviceLabels,omitempty"`
	SDS                GatewaySDSConfiguration `json:"sds,omitempty"`
	Inner              bool                    `json:"inner,omitempty"` // add label `managed-by: tke-mesh`, not editable

	CommonConfiguration
}

type GatewaySDSConfiguration

type GatewaySDSConfiguration struct {
	Enabled bool   `json:"enabled,omitempty"`
	Image   string `json:"image,omitempty"`
}

type GatewaysConfiguration

type GatewaysConfiguration struct {
	IngressConfigs []IngressGatewayConfiguration `json:"ingressGateways,omitempty"`
	EgressConfigs  []GatewayConfiguration        `json:"egressGateways,omitempty"`
}

GatewaysConfiguration defines config options for Gateways

type IngressGatewayConfiguration

type IngressGatewayConfiguration struct {
	GatewayConfiguration
	ExistLBID  string     `json:"existLBID,omitempty"` // TCNP-TODO
	LBName     string     `json:"lbName,omitempty"`    // TCNP-TODO
	AccessType AccessType `json:"accessType"`          // TCNP-TODO
	Subnet     string     `json:"subnet,omitempty"`    // TCNP-TODO
}

type IstiodConfiguration

type IstiodConfiguration struct {
	TraceSampling float32 `json:"traceSampling"`
	CommonConfiguration
	CommonServiceConfiguration
}

type K8SIngressConfiguration

type K8SIngressConfiguration struct {
	Disabled bool `json:"disabled,omitempty"`
}

type KubeMeshConfiguration

type KubeMeshConfiguration struct {
	CommonServiceConfiguration
	Port int `json:"port"`
}

type MeshConfig

type MeshConfig struct {
	Name      string `json:"name,omitempty"`
	Namespace string `json:"namespace,omitempty"`

	TenantID    string `json:"tenantID"`
	Version     string `json:"version"`
	Revision    string `json:"revision"`
	Region      string `json:"region"`
	DisplayName string `json:"displayName"`

	Mode     string `json:"mode"`
	Topology string `json:"topology"`

	Clusters []*ClusterConfig `json:"clusters"`

	// TODO: may remove, from 1.3.6 DO NOT USE ANYMORE
	MasterCluster  *ClusterConfig   `json:"masterCluster"`
	RemoteClusters []*ClusterConfig `json:"remoteClusters,omitempty"`

	// MTLS enables or disables global mTLS
	MTLS bool `json:"mtls,omitempty"`

	// ControlPlaneSecurityEnabled control plane services are communicating through mTLS
	ControlPlaneSecurityEnabled bool `json:"controlPlaneSecurityEnabled,omitempty"`

	// if policy is enabled, global.disablePolicyChecks has affect.
	DisablePolicyChecks bool `json:"disablePolicyChecks"`

	TraceSampling float32 `json:"traceSampling"`

	// Istiod configuration options
	Istiod IstiodConfiguration `json:"istiod,omitempty"`

	// Proxy configuration options
	Proxy ProxyConfiguration `json:"proxy,omitempty"`

	// Proxy Init configuration options
	ProxyInit ProxyInitConfiguration `json:"proxyInit,omitempty"`

	// Enable pod disruption budget for the control plane, which is used to
	// ensure MeshConfig control plane components are gradually upgraded or recovered
	DefaultPodDisruptionBudget PDBConfiguration `json:"defaultPodDisruptionBudget,omitempty"`

	// Set the default behavior of the sidecar for handling outbound traffic from the application (ALLOW_ANY or REGISTRY_ONLY)
	OutboundTrafficPolicy OutboundTrafficPolicyConfiguration `json:"outboundTrafficPolicy,omitempty"`

	// MeshTracing  configuration options
	MeshTracing MeshTracingConfiguration `json:"meshTracing,omitempty"`
}

func (*MeshConfig) Scan

func (c *MeshConfig) Scan(value interface{}) error

Scan implement sql.Scanner

func (MeshConfig) Value

func (c MeshConfig) Value() (driver.Value, error)

Value implement driver.Valuer

type MeshKubeOperatorConfiguration

type MeshKubeOperatorConfiguration struct {
	CommonConfiguration
}

type MeshMetadata

type MeshMetadata struct {
	MeshTitle string           `json:"meshTitle"`
	Region    string           `json:"region"`
	Version   string           `json:"version"`
	TenantID  string           `json:"tenantID"`
	Topology  string           `json:"topology"`
	Mode      string           `json:"mode"`
	Clusters  []*ClusterConfig `json:"clusters,omitempty"`

	OutboundTrafficPolicy string   `json:"outboundTrafficPolicy,omitempty"`
	TraceSampling         *float32 `json:"traceSampling,omitempty"`
	DisablePolicyChecks   *bool    `json:"disablePolicyChecks,omitempty"`
	MeshTracingEnable     *bool    `json:"meshTracingEnable,omitempty"`
}

type MeshRequest

type MeshRequest struct {
	MeshMetadata `json:",inline"`

	Components ComponentsConfig       `json:"components"`
	DeployMode ComponentDeployMode    `json:"deployMode,omitempty"`
	Proxy      ProxyConfiguration     `json:"proxy,omitempty"`
	ProxyInit  ProxyInitConfiguration `json:"proxyInit,omitempty"`
}

type MeshTracingConfig

type MeshTracingConfig struct {
	CommonConfiguration `json:",inline"`

	Debug       bool   `json:"debug,omitempty"`
	LogToStderr bool   `json:"logToStderr,omitempty"`
	LoggerDir   string `json:"loggerDir,omitempty"`
	LoggerFile  string `json:"loggerFile,omitempty"`
}

type MeshTracingConfiguration

type MeshTracingConfiguration struct {
	CommonConfiguration
	Disabled    bool   `json:"disabled,omitempty"`
	Debug       bool   `json:"debug,omitempty"`
	LogToStderr bool   `json:"logToStderr,omitempty"`
	LoggerDir   string `json:"loggerDir,omitempty"`
	LoggerFile  string `json:"loggerFile,omitempty"`
}

type MixerConfiguration

type MixerConfiguration struct {
	CommonConfiguration
}

MixerConfiguration defines config options for Mixer

type OutboundTrafficPolicyConfiguration

type OutboundTrafficPolicyConfiguration struct {
	Mode string `json:"mode,omitempty"`
}

type PDBConfiguration

type PDBConfiguration struct {
	Disabled bool `json:"disabled,omitempty"`
}

PDBConfiguration holds Pod Disruption Budget related config options

type ProxyConfiguration

type ProxyConfiguration struct {
	Image string `json:"image,omitempty"`
	// If set to true, istio-proxy container will have privileged securityContext
	Privileged bool `json:"privileged,omitempty"`
	// If set, newly injected sidecars will have core dumps enabled.
	EnableCoreDump bool `json:"enableCoreDump,omitempty"`

	Resources *v1.ResourceRequirements `json:"resources,omitempty"`
}

ProxyConfiguration defines config options for Proxy

type ProxyInitConfiguration

type ProxyInitConfiguration struct {
	Image string `json:"image,omitempty"`
}

ProxyInitConfiguration defines config options for Proxy Init containers

type SidecarInjectorConfiguration

type SidecarInjectorConfiguration struct {
	CommonConfiguration
	// If true, sidecar injector will rewrite PodSpec for liveness
	// health check to redirect request to sidecar. This makes liveness check work
	// even when mTLS is enabled.
	RewriteAppHTTPProbe bool `json:"rewriteAppHTTPProbe,omitempty"`
}

SidecarInjectorConfiguration defines config options for SidecarInjector

Jump to

Keyboard shortcuts

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