types

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IngressRouteString            string = "route"
	IngressLoadBalancerString     string = "loadbalancer"
	IngressNodePortString         string = "nodeport"
	IngressNginxIngressString     string = "nginx-ingress-v1"
	IngressContourHttpProxyString string = "contour-http-proxy"
	IngressKubernetes             string = "ingress"
	IngressNoneString             string = "none"
)
View Source
const (
	// NamespaceDefault means the VAN is in the  skupper namespace which is applied when not specified by clients
	NamespaceDefault    string = "skupper"
	DefaultVanName      string = "skupper"
	DefaultSiteName     string = "skupper-site"
	ClusterLocalPostfix string = ".svc.cluster.local"
	SiteConfigMapName   string = "skupper-site"
)
View Source
const (
	TransportDeploymentName       string = "skupper-router"
	TransportComponentName        string = "router"
	TransportContainerName        string = "router"
	ConfigSyncContainerName       string = "config-sync"
	TransportLivenessPort         int32  = 9090
	TransportServiceAccountName   string = "skupper-router"
	TransportRoleName             string = "skupper-router"
	TransportRoleBindingName      string = "skupper-router"
	TransportEnvConfig            string = "QDROUTERD_CONF"
	TransportSaslConfig           string = "skupper-sasl-config"
	TransportConfigFile           string = "skrouterd.json"
	TransportConfigMapName        string = "skupper-internal"
	TransportServiceName          string = "skupper-router"
	LocalTransportServiceName     string = "skupper-router-local"
	RouterMaxFrameSizeDefault     int    = 16384
	RouterMaxSessionFramesDefault int    = 640
)

Transport constants

View Source
const (
	ControllerDeploymentName             string = "skupper-service-controller"
	ControllerComponentName              string = "service-controller"
	ControllerContainerName              string = "service-controller"
	ControllerServiceAccountName         string = "skupper-service-controller"
	ControllerRoleBindingName            string = "skupper-service-controller"
	ControllerClusterRoleBindingNsFormat string = "skupper-service-controller-%s"
	ControllerRoleName                   string = "skupper-service-controller"
	ControllerClusterRoleName            string = "skupper-service-controller"
	ControllerConfigPath                 string = "/etc/messaging/"
	ControllerServiceName                string = "skupper"
	FlowCollectorContainerName           string = "vflow-collector"
)

Controller constants

View Source
const (
	LocalClientSecret        string = "skupper-local-client"
	LocalServerSecret        string = "skupper-local-server"
	LocalCaSecret            string = "skupper-local-ca"
	SiteServerSecret         string = "skupper-site-server"
	ClaimsServerSecret       string = "skupper-claims-server"
	SiteCaSecret             string = "skupper-site-ca"
	ConsoleServerSecret      string = "skupper-console-certs"
	OauthRouterConsoleSecret string = "skupper-router-console-certs"
	ServiceCaSecret          string = "skupper-service-ca"
	ServiceClientSecret      string = "skupper-service-client" // Secret that is used in sslProfiles for all http2 connectors with tls enabled
)

Certifcates/Secrets constants

View Source
const (
	BaseQualifier               string = "skupper.io"
	InternalQualifier           string = "internal." + BaseQualifier
	AddressQualifier            string = BaseQualifier + "/address"
	PortQualifier               string = BaseQualifier + "/port"
	ProxyQualifier              string = BaseQualifier + "/proxy"
	TargetServiceQualifier      string = BaseQualifier + "/target"
	HeadlessQualifier           string = BaseQualifier + "/headless"
	IngressModeQualifier        string = BaseQualifier + "/ingress"
	CpuRequestAnnotation        string = BaseQualifier + "/cpu-request"
	MemoryRequestAnnotation     string = BaseQualifier + "/memory-request"
	AffinityAnnotation          string = BaseQualifier + "/affinity"
	AntiAffinityAnnotation      string = BaseQualifier + "/anti-affinity"
	NodeSelectorAnnotation      string = BaseQualifier + "/node-selector"
	ControlledQualifier         string = InternalQualifier + "/controlled"
	ServiceQualifier            string = InternalQualifier + "/service"
	OriginQualifier             string = InternalQualifier + "/origin"
	OriginalSelectorQualifier   string = InternalQualifier + "/originalSelector"
	OriginalTargetPortQualifier string = InternalQualifier + "/originalTargetPort"
	OriginalAssignedQualifier   string = InternalQualifier + "/originalAssignedPort"
	InternalTypeQualifier       string = InternalQualifier + "/type"
	SkupperTypeQualifier        string = BaseQualifier + "/type"
	TypeProxyQualifier          string = InternalTypeQualifier + "=proxy"
	SkupperDisabledQualifier    string = InternalQualifier + "/disabled"
	TypeToken                   string = "connection-token"
	TypeClaimRecord             string = "token-claim-record"
	TypeClaimRequest            string = "token-claim"
	TypeGatewayToken            string = "gateway-connection-token"
	TypeTokenQualifier          string = BaseQualifier + "/type=connection-token"
	TypeTokenRequestQualifier   string = BaseQualifier + "/type=connection-token-request"
	TokenGeneratedBy            string = BaseQualifier + "/generated-by"
	SiteVersion                 string = BaseQualifier + "/site-version"
	TokenCost                   string = BaseQualifier + "/cost"
	TokenTemplate               string = BaseQualifier + "/token-template"
	UpdatedAnnotation           string = InternalQualifier + "/updated"
	AnnotationExcludes          string = BaseQualifier + "/exclude-annotations"
	LabelExcludes               string = BaseQualifier + "/exclude-labels"
	ServiceLabels               string = BaseQualifier + "/service-labels"
	ServiceAnnotations          string = BaseQualifier + "/service-annotations"
	ComponentAnnotation         string = BaseQualifier + "/component"
	SiteControllerIgnore        string = InternalQualifier + "/site-controller-ignore"
	RouterComponent             string = "router"
	ClaimExpiration             string = BaseQualifier + "/claim-expiration"
	ClaimsRemaining             string = BaseQualifier + "/claims-remaining"
	ClaimsMade                  string = BaseQualifier + "/claims-made"
	ClaimUrlAnnotationKey       string = BaseQualifier + "/url"
	ClaimPasswordDataKey        string = "password"
	ClaimCaCertDataKey          string = "ca.crt"
	ClaimRequestSelector        string = SkupperTypeQualifier + "=" + TypeClaimRequest
	LastFailedAnnotationKey     string = InternalQualifier + "/last-failed"
	StatusAnnotationKey         string = InternalQualifier + "/status"
	GatewayQualifier            string = InternalQualifier + "/gateway"
	IngressOnlyQualifier        string = BaseQualifier + "/ingress-only"
	TlsCertQualifier            string = BaseQualifier + "/tls-cert"
	TlsTrustQualifier           string = BaseQualifier + "/tls-trust"
)

Skupper qualifiers

View Source
const (
	AppLabel    string = "app.kubernetes.io/name"
	PartOfLabel string = "app.kubernetes.io/part-of"
	AppName     string = "skupper"
)

standard labels

View Source
const (
	ConsolePortName                        string = "console"
	ConsoleDefaultServicePort              int32  = 8080
	ConsoleDefaultServiceTargetPort        int32  = 8080
	FlowCollectorDefaultServicePort        int32  = 8010
	FlowCollectorDefaultServiceTargetPort  int32  = 8010
	ConsoleOpenShiftServicePort            int32  = 8888
	ConsoleOpenShiftOauthServicePort       int32  = 443
	ConsoleOpenShiftOauthServiceTargetPort int32  = 8443
	ConsoleRouteName                       string = "skupper"
	RouterConsoleServiceName               string = "skupper-router-console"
)

Console and vFlow Collector constants

View Source
const (
	ConsoleAuthModeOpenshift ConsoleAuthMode = "openshift"
	ConsoleAuthModeInternal                  = "internal"
	ConsoleAuthModeUnsecured                 = "unsecured"
)
View Source
const (
	ClaimRedemptionPort      int32  = 8081
	ClaimRedemptionPortName  string = "claims"
	ClaimRedemptionRouteName string = "claims"
)
View Source
const (
	AmqpDefaultPort         int32  = 5672
	AmqpsDefaultPort        int32  = 5671
	EdgeRole                string = "edge"
	EdgeRouteName           string = "skupper-edge"
	EdgeListenerPort        int32  = 45671
	InterRouterRole         string = "inter-router"
	InterRouterListenerPort int32  = 55671
	InterRouterRouteName    string = "skupper-inter-router"
	InterRouterProfile      string = "skupper-internal"
	IngressName             string = "skupper"
)

Assembly constants

View Source
const (
	ConsoleIngressPrefix     = "skupper-console"
	ClaimsIngressPrefix      = "skupper-claims"
	InterRouterIngressPrefix = "skupper-inter-router"
	EdgeIngressPrefix        = "skupper-edge"
)
View Source
const DefaultTimeoutDuration = time.Second * 120
View Source
const (
	ENV_PLATFORM = "SKUPPER_PLATFORM"
)
View Source
const (
	OpenShiftServingCertSecretName string = "service.alpha.openshift.io/serving-cert-secret-name"
)

OpenShift constants

View Source
const (
	ServiceInterfaceConfigMap string = "skupper-services"
)

Service Interface constants

View Source
const (
	ServiceSyncAddress = "mc/$skupper-service-sync"
)

Service Sync constants

View Source
const (
	SkupperServiceCertPrefix string = "skupper-tls-"
)

Variables

View Source
var ControllerPolicyRule = []rbacv1.PolicyRule{
	{
		Verbs:     []string{"get", "list", "watch", "create", "update", "delete"},
		APIGroups: []string{""},
		Resources: []string{"services", "configmaps", "pods", "secrets"},
	},
	{
		Verbs:     []string{"get", "list", "watch", "create", "update", "delete"},
		APIGroups: []string{"apps"},
		Resources: []string{"deployments", "statefulsets"},
	},
	{
		Verbs:     []string{"get", "list", "watch"},
		APIGroups: []string{"apps"},
		Resources: []string{"daemonsets"},
	},
	{
		Verbs:     []string{"get", "list", "watch"},
		APIGroups: []string{"route.openshift.io"},
		Resources: []string{"routes"},
	},
	{
		Verbs:     []string{"get", "list", "watch"},
		APIGroups: []string{"apps.openshift.io"},
		Resources: []string{"deploymentconfigs"},
	},
	{
		Verbs:     []string{"get", "list", "watch"},
		APIGroups: []string{"networking.k8s.io"},
		Resources: []string{"ingresses"},
	},
}
View Source
var TransportPolicyRule = []rbacv1.PolicyRule{
	{
		Verbs:     []string{"get", "list", "watch"},
		APIGroups: []string{""},
		Resources: []string{"secrets", "pods", "configmaps"},
	},
}
View Source
var TransportPrometheusAnnotations = map[string]string{
	"prometheus.io/port":   "9090",
	"prometheus.io/scrape": "true",
}

Functions

func IsOfLocalOrigin

func IsOfLocalOrigin(origin string) bool

func QualifiedServiceName

func QualifiedServiceName(name string, namespace string) string

func ValidIngressOptions

func ValidIngressOptions(platform Platform) []string

Types

type AssemblySpec

type AssemblySpec struct {
	Name                  string       `json:"name,omitempty"`
	Mode                  string       `json:"mode,omitempty"`
	Listeners             []Listener   `json:"listeners,omitempty"`
	InterRouterListeners  []Listener   `json:"interRouterListeners,omitempty"`
	EdgeListeners         []Listener   `json:"edgeListeners,omitempty"`
	SslProfiles           []SslProfile `json:"sslProfiles,omitempty"`
	Connectors            []Connector  `json:"connectors,omitempty"`
	InterRouterConnectors []Connector  `json:"interRouterConnectors,omitempty"`
	EdgeConnectors        []Connector  `json:"edgeConnectors,omitempty"`
}

AssemblySpec for the links and connectors that form the VAN topology

type ByServiceInterfaceAddress

type ByServiceInterfaceAddress []ServiceInterface

func (ByServiceInterfaceAddress) Len

func (ByServiceInterfaceAddress) Less

func (a ByServiceInterfaceAddress) Less(i, j int) bool

func (ByServiceInterfaceAddress) Swap

func (a ByServiceInterfaceAddress) Swap(i, j int)

type CertAuthority

type CertAuthority struct {
	Name string
}

type ConfigSyncOptions

type ConfigSyncOptions struct {
	Tuning
}

type Connector

type Connector struct {
	Name           string `json:"name,omitempty"`
	Role           string `json:"role,omitempty"`
	Host           string `json:"host"`
	Port           string `json:"port"`
	RouteContainer bool   `json:"routeContainer,omitempty"`
	Cost           int32  `json:"cost,omitempty"`
	VerifyHostname bool   `json:"verifyHostname,omitempty"`
	SslProfile     string `json:"sslProfile,omitempty"`
	LinkCapacity   int32  `json:"linkCapacity,omitempty"`
}

type ConnectorCreateOptions

type ConnectorCreateOptions struct {
	SkupperNamespace string
	Name             string
	Cost             int32
}

type ConnectorRemoveOptions

type ConnectorRemoveOptions struct {
	SkupperNamespace string
	Name             string
	ForceCurrent     bool
}

type ConnectorRole

type ConnectorRole string
const (
	ConnectorRoleInterRouter ConnectorRole = "inter-router"
	ConnectorRoleEdge                      = "edge"
)

type ConsoleAuthMode

type ConsoleAuthMode string

type ControllerOptions

type ControllerOptions struct {
	Tuning
	IngressHost        string
	ServiceAnnotations map[string]string
	LoadBalancerIp     string
}

type Credential

type Credential struct {
	CA          string
	Name        string
	Subject     string
	Hosts       []string
	ConnectJson bool
	Post        bool
	Data        map[string][]byte
	Simple      bool `default:"false"`
}

type DeploymentSpec

type DeploymentSpec struct {
	Image               ImageDetails                 `json:"image,omitempty"`
	Replicas            int32                        `json:"replicas,omitempty"`
	Labels              map[string]string            `json:"labels,omitempty"`
	Annotations         map[string]string            `json:"annotations,omitempty"`
	LabelSelector       map[string]string            `json:"labelSelector,omitempty"`
	EnvVar              []corev1.EnvVar              `json:"envVar,omitempty"`
	Ports               []corev1.ContainerPort       `json:"ports,omitempty"`
	Volumes             []corev1.Volume              `json:"volumes,omitempty"`
	VolumeMounts        [][]corev1.VolumeMount       `json:"volumeMounts,omitempty"`
	Roles               []*rbacv1.Role               `json:"roles,omitempty"`
	RoleBindings        []*rbacv1.RoleBinding        `json:"roleBinding,omitempty"`
	ClusterRoles        []*rbacv1.ClusterRole        `json:"clusterRoles,omitempty"`
	ClusterRoleBindings []*rbacv1.ClusterRoleBinding `json:"clusterRoleBinding,omitempty"`
	Routes              []*routev1.Route             `json:"routes,omitempty"`
	ServiceAccounts     []*corev1.ServiceAccount     `json:"serviceAccounts,omitempty"`
	Services            []*corev1.Service            `json:"services,omitempty"`
	Sidecars            []*corev1.Container          `json:"sidecars,omitempty"`
	Affinity            map[string]string            `json:"affinity,omitempty"`
	AntiAffinity        map[string]string            `json:"antiAffinity,omitempty"`
	NodeSelector        map[string]string            `json:"nodeSelector,omitempty"`
	CpuRequest          *resource.Quantity           `json:"cpuRequest,omitempty"`
	MemoryRequest       *resource.Quantity           `json:"memoryRequest,omitempty"`
	CpuLimit            *resource.Quantity           `json:"cpuLimit,omitempty"`
	MemoryLimit         *resource.Quantity           `json:"memoryLimit,omitempty"`
}

DeploymentSpec for the VAN router or controller components to run within a cluster

func (*DeploymentSpec) GetCpuLimit

func (s *DeploymentSpec) GetCpuLimit() resource.Quantity

func (*DeploymentSpec) GetCpuRequest

func (s *DeploymentSpec) GetCpuRequest() resource.Quantity

func (*DeploymentSpec) GetMemoryLimit

func (s *DeploymentSpec) GetMemoryLimit() resource.Quantity

func (*DeploymentSpec) GetMemoryRequest

func (s *DeploymentSpec) GetMemoryRequest() resource.Quantity

func (*DeploymentSpec) HasCpuLimit

func (s *DeploymentSpec) HasCpuLimit() bool

func (*DeploymentSpec) HasCpuRequest

func (s *DeploymentSpec) HasCpuRequest() bool

func (*DeploymentSpec) HasMemoryLimit

func (s *DeploymentSpec) HasMemoryLimit() bool

func (*DeploymentSpec) HasMemoryRequest

func (s *DeploymentSpec) HasMemoryRequest() bool

type FlowCollectorOptions

type FlowCollectorOptions struct {
	Tuning
}

type GatewayEndpoint

type GatewayEndpoint struct {
	Name        string           `json:"name,omitempty" yaml:"name,omitempty"`
	Host        string           `json:"host,omitempty" yaml:"host,omitempty"`
	Loopback    bool             `json:"loopback,omitempty" yaml:"loopback,omitempty"`
	LocalPort   string           `json:"localPort,omitempty" yaml:"local_port,omitempty"`
	Service     ServiceInterface `json:"service,omitempty" yaml:"service,omitempty"`
	TargetPorts []int            `json:"targetPorts,omitempty" yaml:"target_ports,omitempty"`
}

type GatewayInspectResponse

type GatewayInspectResponse struct {
	Name       string
	Type       string
	Url        string
	Version    string
	Connectors map[string]GatewayEndpoint
	Listeners  map[string]GatewayEndpoint
}

type Headless

type Headless struct {
	Name          string             `json:"name" yaml:"name"`
	Size          int                `json:"size" yaml:"size"`
	TargetPorts   map[int]int        `json:"targetPorts,omitempty" yaml:"targetPorts,omitempty"`
	Affinity      map[string]string  `json:"affinity,omitempty" yaml:"affinity,omitempty"`
	AntiAffinity  map[string]string  `json:"antiAffinity,omitempty" yaml:"antiAffinity,omitempty"`
	NodeSelector  map[string]string  `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"`
	CpuRequest    *resource.Quantity `json:"cpuRequest,omitempty" yaml:"cpuRequest,omitempty"`
	MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty" yaml:"memoryRequest,omitempty"`
	CpuLimit      *resource.Quantity `json:"cpuLimit,omitempty" yaml:"cpuLimit,omitempty"`
	MemoryLimit   *resource.Quantity `json:"memoryLimit,omitempty" yaml:"memoryLimit,omitempty"`
}

func (*Headless) GetCpuLimit

func (s *Headless) GetCpuLimit() resource.Quantity

func (*Headless) GetCpuRequest

func (s *Headless) GetCpuRequest() resource.Quantity

func (*Headless) GetMemoryLimit

func (s *Headless) GetMemoryLimit() resource.Quantity

func (*Headless) GetMemoryRequest

func (s *Headless) GetMemoryRequest() resource.Quantity

func (*Headless) HasCpuLimit

func (s *Headless) HasCpuLimit() bool

func (*Headless) HasCpuRequest

func (s *Headless) HasCpuRequest() bool

func (*Headless) HasMemoryLimit

func (s *Headless) HasMemoryLimit() bool

func (*Headless) HasMemoryRequest

func (s *Headless) HasMemoryRequest() bool

type HeadlessV1

type HeadlessV1 struct {
	Name          string             `json:"name"`
	Size          int                `json:"size"`
	TargetPort    int                `json:"targetPort,omitempty"`
	Affinity      map[string]string  `json:"affinity,omitempty"`
	AntiAffinity  map[string]string  `json:"antiAffinity,omitempty"`
	NodeSelector  map[string]string  `json:"nodeSelector,omitempty"`
	CpuRequest    *resource.Quantity `json:"cpuRequest,omitempty"`
	MemoryRequest *resource.Quantity `json:"memoryRequest,omitempty"`
}

type ImageDetails

type ImageDetails struct {
	Name       string `json:"image,omitempty"`
	PullPolicy string `json:"imagePullPolicy,omitempty"`
}

type LinkStatus

type LinkStatus struct {
	Name        string
	Url         string
	Cost        int
	Connected   bool
	Configured  bool
	Description string
	Created     string
}

type Listener

type Listener struct {
	Name             string `json:"name,omitempty"`
	Host             string `json:"host,omitempty"`
	Port             int32  `json:"port"`
	RouteContainer   bool   `json:"routeContainer,omitempty"`
	Http             bool   `json:"http,omitempty"`
	Cost             int32  `json:"cost,omitempty"`
	SslProfile       string `json:"sslProfile,omitempty"`
	SaslMechanisms   string `json:"saslMechanisms,omitempty"`
	AuthenticatePeer bool   `json:"authenticatePeer,omitempty"`
	LinkCapacity     int32  `json:"linkCapacity,omitempty"`
}

type Platform

type Platform string
const (
	PlatformKubernetes Platform = "kubernetes"
	PlatformPodman              = "podman"
)

type RemoteLinkInfo

type RemoteLinkInfo struct {
	SiteName  string `json:"site_name,omitempty"`
	Namespace string `json:"namespace,omitempty"`
	SiteId    string `json:"site_id,omitempty"`
}

type Resources

type Resources interface {
	GetCpuRequest() resource.Quantity
	GetMemoryRequest() resource.Quantity
	GetCpuLimit() resource.Quantity
	GetMemoryLimit() resource.Quantity
	HasCpuRequest() bool
	HasMemoryRequest() bool
	HasCpuLimit() bool
	HasMemoryLimit() bool
}

type RouterInspectResponse

type RouterInspectResponse struct {
	Status            RouterStatusSpec
	TransportVersion  string
	ControllerVersion string
	ExposedServices   int
	ConsoleUrl        string
}

type RouterLogConfig

type RouterLogConfig struct {
	Module string
	Level  string
}

type RouterOptions

type RouterOptions struct {
	Tuning
	Logging            []RouterLogConfig
	DebugMode          string
	MaxFrameSize       int
	MaxSessionFrames   int
	IngressHost        string
	ServiceAnnotations map[string]string
	LoadBalancerIp     string
	DisableMutualTLS   bool
}

type RouterSpec

type RouterSpec struct {
	Name                  string          `json:"name,omitempty"`
	Namespace             string          `json:"namespace,omitempty"`
	AuthMode              ConsoleAuthMode `json:"authMode,omitempty"`
	Transport             DeploymentSpec  `json:"transport,omitempty"`
	ConfigSync            DeploymentSpec  `json:"configSync,omitempty"`
	Controller            DeploymentSpec  `json:"controller,omitempty"`
	Collector             DeploymentSpec  `json:"collector,omitempty"`
	RouterConfig          string          `json:"routerConfig,omitempty"`
	Users                 []User          `json:"users,omitempty"`
	CertAuthoritys        []CertAuthority `json:"certAuthoritys,omitempty"`
	TransportCredentials  []Credential    `json:"transportCredentials,omitempty"`
	ControllerCredentials []Credential    `json:"controllerCredentials,omitempty"`
}

RouterSpec is the specification of VAN network with router, controller and assembly

type RouterStatusSpec

type RouterStatusSpec struct {
	SiteName               string                  `json:"siteName,omitempty"`
	Mode                   string                  `json:"mode,omitempty"`
	TransportReadyReplicas int32                   `json:"transportReadyReplicas,omitempty"`
	ConnectedSites         TransportConnectedSites `json:"connectedSites,omitempty"`
	BindingsCount          int                     `json:"bindingsCount,omitempty"`
}

type ServiceInfo

type ServiceInfo struct {
	Name     string `json:"name,omitempty"`
	Protocol string `json:"protocol,omitempty"`
	Address  string `json:"address,omitempty"`
	Targets  []TargetInfo
}

type ServiceIngressMode

type ServiceIngressMode string
const (
	ServiceIngressModeAlways ServiceIngressMode = "Always"
	ServiceIngressModeNever  ServiceIngressMode = "Never"
)

type ServiceInterface

type ServiceInterface struct {
	Address                  string                   `json:"address" yaml:"address"`
	Protocol                 string                   `json:"protocol" yaml:"protocol"`
	Ports                    []int                    `json:"ports" yaml:"ports"`
	ExposeIngress            ServiceIngressMode       `json:"exposeIngress" yaml:"exposeIngress"`
	EventChannel             bool                     `json:"eventchannel,omitempty" yaml:"eventchannel,omitempty"`
	Aggregate                string                   `json:"aggregate,omitempty" yaml:"aggregate,omitempty"`
	Headless                 *Headless                `json:"headless,omitempty" yaml:"headless,omitempty"`
	Labels                   map[string]string        `json:"labels,omitempty" yaml:"labels,omitempty"`
	Annotations              map[string]string        `json:"annotations,omitempty" yaml:"annotations,omitempty"`
	Targets                  []ServiceInterfaceTarget `json:"targets" yaml:"targets,omitempty"`
	Origin                   string                   `json:"origin,omitempty" yaml:"origin,omitempty"`
	TlsCredentials           string                   `json:"tlsCredentials,omitempty"`
	TlsCertAuthority         string                   `json:"tlsCertAuthority,omitempty"`
	PublishNotReadyAddresses bool                     `json:"publishNotReadyAddresses,omitempty"`
	BridgeImage              string                   `json:"bridgeImage,omitempty"`
}

func (*ServiceInterface) AddTarget

func (service *ServiceInterface) AddTarget(target *ServiceInterfaceTarget)

func (*ServiceInterface) IsAnnotated

func (service *ServiceInterface) IsAnnotated() bool

func (*ServiceInterface) IsOfLocalOrigin

func (s *ServiceInterface) IsOfLocalOrigin() bool

func (*ServiceInterface) RequiresExternalBridge

func (s *ServiceInterface) RequiresExternalBridge() bool

func (*ServiceInterface) RequiresIngressPortAllocations

func (s *ServiceInterface) RequiresIngressPortAllocations() bool

func (*ServiceInterface) SetIngressMode

func (s *ServiceInterface) SetIngressMode(mode string) error

type ServiceInterfaceCreateOptions

type ServiceInterfaceCreateOptions struct {
	Protocol   string
	Address    string
	Port       int
	TargetPort int
	Headless   bool
}

type ServiceInterfaceList

type ServiceInterfaceList []ServiceInterface

func (*ServiceInterfaceList) ConvertFrom

func (sl *ServiceInterfaceList) ConvertFrom(updates string) error

type ServiceInterfaceTarget

type ServiceInterfaceTarget struct {
	Name        string      `json:"name,omitempty"`
	Selector    string      `json:"selector,omitempty"`
	TargetPorts map[int]int `json:"targetPorts,omitempty"`
	Service     string      `json:"service,omitempty"`
}

type ServiceInterfaceTargetV1

type ServiceInterfaceTargetV1 struct {
	Name       string `json:"name,omitempty"`
	Selector   string `json:"selector,omitempty"`
	TargetPort int    `json:"targetPort,omitempty"`
	Service    string `json:"service,omitempty"`
}

type ServiceInterfaceV1

type ServiceInterfaceV1 struct {
	Address      string                     `json:"address" yaml:"address"`
	Protocol     string                     `json:"protocol" yaml:"protocol"`
	Port         int                        `json:"port" yaml:"port"`
	EventChannel bool                       `json:"eventchannel,omitempty" yaml:"eventchannel,omitempty"`
	Aggregate    string                     `json:"aggregate,omitempty" yaml:"aggregate,omitempty"`
	Headless     *HeadlessV1                `json:"headless,omitempty" yaml:"headless,omitempty"`
	Labels       map[string]string          `json:"labels,omitempty" yaml:"labels,omitempty"`
	Targets      []ServiceInterfaceTargetV1 `json:"targets" yaml:"targets,omitempty"`
	Origin       string                     `json:"origin,omitempty" yaml:"origin,omitempty"`
}

type SiteConfig

type SiteConfig struct {
	Spec      SiteConfigSpec
	Reference SiteConfigReference
}

type SiteConfigReference

type SiteConfigReference struct {
	UID        string
	Name       string
	APIVersion string
	Kind       string
}

type SiteConfigSpec

type SiteConfigSpec struct {
	SkupperName         string
	SkupperNamespace    string
	RouterMode          string
	Routers             int
	EnableController    bool
	EnableServiceSync   bool
	SiteTtl             time.Duration
	EnableConsole       bool
	EnableFlowCollector bool
	AuthMode            string
	User                string
	Password            string
	Ingress             string
	IngressAnnotations  map[string]string
	ConsoleIngress      string
	IngressHost         string
	Replicas            int32
	SiteControlled      bool
	CreateNetworkPolicy bool
	Annotations         map[string]string
	Labels              map[string]string
	Router              RouterOptions
	Controller          ControllerOptions
	ConfigSync          ConfigSyncOptions
	FlowCollector       FlowCollectorOptions
	Platform            Platform
	RunAsUser           int64
	RunAsGroup          int64
}

func (*SiteConfigSpec) CheckConsoleIngress

func (s *SiteConfigSpec) CheckConsoleIngress() error

func (*SiteConfigSpec) CheckIngress

func (s *SiteConfigSpec) CheckIngress() error

func (*SiteConfigSpec) GetControllerIngressHost

func (s *SiteConfigSpec) GetControllerIngressHost() string

func (*SiteConfigSpec) GetRouterIngressHost

func (s *SiteConfigSpec) GetRouterIngressHost() string

func (*SiteConfigSpec) IsConsoleIngressContourHttpProxy

func (s *SiteConfigSpec) IsConsoleIngressContourHttpProxy() bool

func (*SiteConfigSpec) IsConsoleIngressKubernetes

func (s *SiteConfigSpec) IsConsoleIngressKubernetes() bool

func (*SiteConfigSpec) IsConsoleIngressLoadBalancer

func (s *SiteConfigSpec) IsConsoleIngressLoadBalancer() bool

func (*SiteConfigSpec) IsConsoleIngressNginxIngress

func (s *SiteConfigSpec) IsConsoleIngressNginxIngress() bool

func (*SiteConfigSpec) IsConsoleIngressNodePort

func (s *SiteConfigSpec) IsConsoleIngressNodePort() bool

func (*SiteConfigSpec) IsConsoleIngressNone

func (s *SiteConfigSpec) IsConsoleIngressNone() bool

func (*SiteConfigSpec) IsConsoleIngressRoute

func (s *SiteConfigSpec) IsConsoleIngressRoute() bool

func (*SiteConfigSpec) IsIngressContourHttpProxy

func (s *SiteConfigSpec) IsIngressContourHttpProxy() bool

func (*SiteConfigSpec) IsIngressKubernetes

func (s *SiteConfigSpec) IsIngressKubernetes() bool

func (*SiteConfigSpec) IsIngressLoadBalancer

func (s *SiteConfigSpec) IsIngressLoadBalancer() bool

func (*SiteConfigSpec) IsIngressNginxIngress

func (s *SiteConfigSpec) IsIngressNginxIngress() bool

func (*SiteConfigSpec) IsIngressNodePort

func (s *SiteConfigSpec) IsIngressNodePort() bool

func (*SiteConfigSpec) IsIngressNone

func (s *SiteConfigSpec) IsIngressNone() bool

func (*SiteConfigSpec) IsIngressRoute

func (s *SiteConfigSpec) IsIngressRoute() bool

type SiteInfo

type SiteInfo struct {
	Name           string   `json:"site_name,omitempty"`
	Namespace      string   `json:"namespace,omitempty"`
	SiteId         string   `json:"site_id,omitempty"`
	Url            string   `json:"url,omitempty"`
	Version        string   `json:"version,omitempty"`
	Gateway        bool     `json:"gateway,omitempty"`
	MinimumVersion string   `json:"minimum_version,omitempty"`
	Links          []string `json:"connected,omitempty"`
	Services       []ServiceInfo
}

type SslProfile

type SslProfile struct {
	Name   string `json:"name,omitempty"`
	Cert   string `json:"cert,omitempty"`
	Key    string `json:"key,omitempty"`
	CaCert string `json:"caCert,omitempty"`
}

type TargetInfo

type TargetInfo struct {
	Name   string `json:"name,omitempty"`
	Target string `json:"target,omitempty"`
	SiteId string `json:"site_id,omitempty"`
}

type TransportConnectedSites

type TransportConnectedSites struct {
	Direct   int
	Indirect int
	Total    int
	Warnings []string
}

type TransportMode

type TransportMode string

TransportMode describes how a qdr is intended to be deployed, either interior or edge

const (
	// TransportModeInterior means the qdr will participate in inter-router protocol exchanges
	TransportModeInterior TransportMode = "interior"
	// TransportModeEdge means that the qdr will connect to interior routers for network access
	TransportModeEdge TransportMode = "edge"
)

type Tuning

type Tuning struct {
	NodeSelector string
	Affinity     string
	AntiAffinity string
	Cpu          string
	Memory       string
	CpuLimit     string
	MemoryLimit  string
}

type User

type User struct {
	Name     string
	Password string
}

type VanClientInterface

type VanClientInterface interface {
	RouterCreate(ctx context.Context, options SiteConfig) error
	RouterInspect(ctx context.Context) (*RouterInspectResponse, error)
	RouterInspectNamespace(ctx context.Context, namespace string) (*RouterInspectResponse, error)
	RouterRemove(ctx context.Context) error
	RouterUpdateVersion(ctx context.Context, hup bool) (bool, error)
	RouterUpdateVersionInNamespace(ctx context.Context, hup bool, namespace string) (bool, error)
	ConnectorCreateFromFile(ctx context.Context, secretFile string, options ConnectorCreateOptions) (*corev1.Secret, error)
	ConnectorCreateSecretFromData(ctx context.Context, secretData []byte, options ConnectorCreateOptions) (*corev1.Secret, error)
	ConnectorCreate(ctx context.Context, secret *corev1.Secret, options ConnectorCreateOptions) error
	ConnectorInspect(ctx context.Context, name string) (*LinkStatus, error)
	ConnectorList(ctx context.Context) ([]LinkStatus, error)
	ConnectorRemove(ctx context.Context, options ConnectorRemoveOptions) error
	ConnectorTokenCreateFromTemplate(ctx context.Context, tokenName string, templateName string) (*corev1.Secret, bool, error)
	ConnectorTokenCreate(ctx context.Context, subject string, namespace string) (*corev1.Secret, bool, error)
	ConnectorTokenCreateFile(ctx context.Context, subject string, secretFile string) error
	TokenClaimCreate(ctx context.Context, name string, password []byte, expiry time.Duration, uses int) (*corev1.Secret, bool, error)
	TokenClaimCreateFile(ctx context.Context, name string, password []byte, expiry time.Duration, uses int, secretFile string) error
	ServiceInterfaceCreate(ctx context.Context, service *ServiceInterface) error
	ServiceInterfaceInspect(ctx context.Context, address string) (*ServiceInterface, error)
	ServiceInterfaceList(ctx context.Context) ([]*ServiceInterface, error)
	ServiceInterfaceRemove(ctx context.Context, address string) error
	ServiceInterfaceUpdate(ctx context.Context, service *ServiceInterface) error
	ServiceInterfaceBind(ctx context.Context, service *ServiceInterface, targetType string, targetName string, protocol string, targetPorts map[int]int) error
	GetHeadlessServiceConfiguration(targetName string, protocol string, address string, ports []int, publishNotReadyAddresses bool) (*ServiceInterface, error)
	ServiceInterfaceUnbind(ctx context.Context, targetType string, targetName string, address string, deleteIfNoTargets bool) error
	GatewayBind(ctx context.Context, gatewayName string, endpoint GatewayEndpoint) error
	GatewayUnbind(ctx context.Context, gatewayName string, endpoint GatewayEndpoint) error
	GatewayExpose(ctx context.Context, gatewayName string, gatewayType string, endpoint GatewayEndpoint) (string, error)
	GatewayUnexpose(ctx context.Context, gatewayName string, endpoint GatewayEndpoint, deleteLast bool) error
	GatewayForward(ctx context.Context, gatewayName string, endpoint GatewayEndpoint) error
	GatewayUnforward(ctx context.Context, gatewayName string, endpoint GatewayEndpoint) error
	GatewayInit(ctx context.Context, gatewayName string, gatewayType string, configFile string) (string, error)
	GatewayDownload(ctx context.Context, gatewayName string, downloadPath string) (string, error)
	GatewayExportConfig(ctx context.Context, targetGatewayName string, exportGatewayName string, exportPath string) (string, error)
	GatewayGenerateBundle(ctx context.Context, configFile string, bundlePath string) (string, error)
	GatewayInspect(ctx context.Context, gatewayName string) (*GatewayInspectResponse, error)
	GatewayList(ctx context.Context) ([]*GatewayInspectResponse, error)
	GatewayRemove(ctx context.Context, gatewayName string) error
	SiteConfigCreate(ctx context.Context, spec SiteConfigSpec) (*SiteConfig, error)
	SiteConfigUpdate(ctx context.Context, spec SiteConfigSpec) ([]string, error)
	SiteConfigInspect(ctx context.Context, input *corev1.ConfigMap) (*SiteConfig, error)
	SiteConfigRemove(ctx context.Context) error
	SkupperDump(ctx context.Context, tarName string, version string, kubeConfigPath string, kubeConfigContext string) (string, error)
	SkupperEvents(verbose bool) (*bytes.Buffer, error)
	SkupperCheckService(service string, verbose bool) (*bytes.Buffer, error)
	GetNamespace() string
	GetVersion(component string, name string) string
	GetIngressDefault() string
	RevokeAccess(ctx context.Context) error
	NetworkStatus(ctx context.Context) ([]*SiteInfo, error)
	GetRemoteLinks(ctx context.Context, siteConfig *SiteConfig) ([]*RemoteLinkInfo, error)
}

Jump to

Keyboard shortcuts

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