options

package
v1.9.0-beta12 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: Apache-2.0 Imports: 14 Imported by: 38

Documentation

Index

Constants

View Source
const (
	UpstreamType_Aws    = "aws"
	UpstreamType_AwsEc2 = "ec2"
	UpstreamType_Azure  = "azure"
	UpstreamType_Consul = "consul"
	UpstreamType_Kube   = "kube"
	UpstreamType_Static = "static"
)
View Source
const (
	ServiceType_Rest = "rest"
	ServiceType_Grpc = "grpc"
)

Variables

View Source
var RateLimit_TimeUnits = func() []string {
	var vals []string
	for _, name := range rltypes.RateLimit_Unit_name {
		vals = append(vals, name)
	}
	sort.Strings(vals)
	return vals
}()

Functions

This section is empty.

Types

type Add

type Add struct {
	Route  InputRoute
	DryRun bool // print resource as a kubernetes style yaml and exit without writing to storage
}

type ApiKeyAuth added in v0.18.42

type ApiKeyAuth struct {
	Enable          bool
	Labels          []string
	SecretNamespace string
	SecretName      string
}

type AuthConfig added in v1.0.0

type AuthConfig struct {
	Name      string
	Namespace string
}

type AwsDestinationSpec

type AwsDestinationSpec struct {
	LogicalName            string
	ResponseTransformation bool
}

type AwsSecret

type AwsSecret struct {
	AccessKey    string
	SecretKey    string
	SessionToken string
}

type AzureSecret

type AzureSecret struct {
	ApiKeys InputMapStringString
}

type Cluster added in v1.5.0

type Cluster struct {
	FederationNamespace string
	Register            Register
	Deregister          Register
}

type Consul added in v0.18.23

type Consul struct {
	UseConsul bool // enable consul config clients
	RootKey   string
	Client    func() (*api.Client, error)
}

type Create

type Create struct {
	VirtualService     InputVirtualService
	InputUpstream      InputUpstream
	InputUpstreamGroup InputUpstreamGroup
	InputSecret        Secret
	AuthConfig         InputAuthConfig
	DryRun             bool  // print resource as a kubernetes style yaml and exit without writing to storage
	Vault              Vault // use vault as secrets backend
}

type Dashboard added in v0.18.42

type Dashboard struct {
}

type Delegate added in v1.2.15

type Delegate struct {
	Single   core.ResourceRef
	Selector DelegateSelector
}

type DelegateSelector added in v1.2.15

type DelegateSelector struct {
	Labels     map[string]string
	Namespaces []string
}

type Delete

type Delete struct {
	Selector InputMapStringString
	All      bool
}

type Destination

type Destination struct {
	Upstream        core.ResourceRef
	Delegate        Delegate
	DestinationSpec DestinationSpec
}

type DestinationSpec

type DestinationSpec struct {
	Aws  AwsDestinationSpec
	Rest RestDestinationSpec
}

type Edit added in v0.18.23

type Edit struct {
}

type ExtraOptions added in v0.18.42

type ExtraOptions struct {
	RateLimit  RateLimit
	OIDCAuth   OIDCAuth
	ApiKeyAuth ApiKeyAuth
	OpaAuth    OpaAuth
}

type Get

type Get struct {
	Selector InputMapStringString
}

type HeaderSecret added in v1.4.11

type HeaderSecret struct {
	Headers InputMapStringString
}

type HelmInstall added in v1.5.0

type HelmInstall struct {
	CreateNamespace         bool
	Namespace               string
	HelmChartOverride       string
	HelmChartValueFileNames []string
	HelmReleaseName         string
}

type HelmUninstall added in v1.5.0

type HelmUninstall struct {
	Namespace       string
	HelmReleaseName string
	DeleteCrds      bool
	DeleteNamespace bool
	DeleteAll       bool
}

type InputAuthConfig added in v1.0.0

type InputAuthConfig struct {
	OIDCAuth   OIDCAuth
	ApiKeyAuth ApiKeyAuth
	OpaAuth    OpaAuth
}

type InputAwsEc2Spec added in v0.18.16

type InputAwsEc2Spec struct {
	Region          string
	Secret          core.ResourceRef
	Role            string
	PublicIp        bool
	Port            uint32
	KeyFilters      []string
	KeyValueFilters InputMapStringString
}

type InputAwsSpec

type InputAwsSpec struct {
	Region string
	Secret core.ResourceRef
}

type InputAzureSpec

type InputAzureSpec struct {
	FunctionAppName string
	Secret          core.ResourceRef
}

type InputConsulSpec

type InputConsulSpec struct {
	// The name of the Consul Service
	ServiceName string
	// The list of service tags Gloo should search for on a service instance
	// before deciding whether or not to include the instance as part of this
	// upstream
	ServiceTags []string
}

type InputGrpcServiceSpec

type InputGrpcServiceSpec struct {
	// inline from a file
	Descriptors []byte
}

type InputKubeSpec

type InputKubeSpec struct {
	// The name of the Kubernetes Service
	ServiceName string
	// The namespace where the Service lives
	ServiceNamespace string
	// The port exposed by the Kubernetes Service
	ServicePort uint32
	// Allows finer-grained filtering of pods for the Upstream. Gloo will select pods based on their labels if
	// any are provided here.
	// (see [Kubernetes labels and selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)
	Selector InputMapStringString
}

type InputMapStringString

type InputMapStringString struct {
	Entries []string `json:"values"`
}

func (*InputMapStringString) MustMap

func (m *InputMapStringString) MustMap() map[string]string

type InputRestServiceSpec

type InputRestServiceSpec struct {
	SwaggerUrl       string
	SwaggerDocInline string
}

type InputRoute

type InputRoute struct {
	InsertIndex uint32
	Matcher     RouteMatchers
	Destination Destination
	// TODO: multi destination
	// Destinations []Destination
	UpstreamGroup         core.ResourceRef
	Plugins               RoutePlugins
	AddToRouteTable       bool // add the route to a route table rather than a virtual service
	ClusterScopedVsClient bool
}

type InputServiceSpec

type InputServiceSpec struct {
	ServiceType          string
	InputRestServiceSpec InputRestServiceSpec
	InputGrpcServiceSpec InputGrpcServiceSpec
}

type InputStaticSpec

type InputStaticSpec struct {
	Hosts []string
	// Attempt to use outbound TLS
	// Gloo will automatically set this to true for port 443
	UseTls bool
}

type InputUpstream

type InputUpstream struct {
	UpstreamType string
	Aws          InputAwsSpec
	AwsEc2       InputAwsEc2Spec
	Azure        InputAzureSpec
	Consul       InputConsulSpec
	Kube         InputKubeSpec
	Static       InputStaticSpec

	// An optional Service Spec describing the service listening on this upstream
	ServiceSpec InputServiceSpec
}

type InputUpstreamGroup added in v0.18.1

type InputUpstreamGroup struct {
	WeightedDestinations InputMapStringString
}

type InputVirtualService

type InputVirtualService struct {
	Domains     []string
	DisplayName string
	RateLimit   RateLimit
	AuthConfig  AuthConfig
}

type Install

type Install struct {
	Gloo        HelmInstall
	Federation  HelmInstall
	Knative     Knative
	LicenseKey  string
	WithGlooFed bool
	DryRun      bool
	Version     string
}

type Istio added in v1.5.0

type Istio struct {
	Upstream           string // upstream for which we are changing the istio mTLS settings
	IncludeUpstreams   bool   // whether or not to modify upstreams when uninstalling mTLS
	Namespace          string // namespace in which istio is installed
	IstioMetaMeshId    string // IstioMetaMeshId sets ISTIO_META_MESH_ID env var
	IstioMetaClusterId string // IstioMetaClusterId sets ISTIO_META_CLUSTER_ID env var
}

type Knative added in v0.17.0

type Knative struct {
	InstallKnativeVersion         string `json:"version"`
	InstallKnative                bool   `json:"-"`
	SkipGlooInstall               bool   `json:"-"`
	InstallKnativeMonitoring      bool   `json:"monitoring"`
	InstallKnativeEventing        bool   `json:"eventing"`
	InstallKnativeEventingVersion string `json:"eventingVersion"`
}

type OIDCAuth added in v0.18.42

type OIDCAuth struct {
	Enable bool

	// Include all options from the vhost extension
	extauth.OAuth
}

type OIDCSettings added in v0.18.42

type OIDCSettings struct {
	ExtAuthServerUpstreamRef core.ResourceRef
}

type OpaAuth added in v0.18.42

type OpaAuth struct {
	Enable bool

	Query   string
	Modules []string
}

type Options

type Options struct {
	Metadata  core.Metadata
	Top       Top
	Install   Install
	Uninstall Uninstall
	Proxy     Proxy
	Upgrade   Upgrade
	Create    Create
	Delete    Delete
	Edit      Edit
	Route     Route
	Get       Get
	Add       Add
	Istio     Istio
	Remove    Remove
	Cluster   Cluster
}

type PrefixRewrite

type PrefixRewrite struct {
	Value *string
}

func (*PrefixRewrite) Set

func (p *PrefixRewrite) Set(s string) error

func (*PrefixRewrite) String

func (p *PrefixRewrite) String() string

func (*PrefixRewrite) Type

func (p *PrefixRewrite) Type() string

type Proxy

type Proxy struct {
	LocalCluster     bool
	LocalClusterName string
	Name             string
	Port             string
	FollowLogs       bool
	DebugLogs        bool
}

type RateLimit added in v0.18.42

type RateLimit struct {
	Enable              bool
	TimeUnit            string
	RequestsPerTimeUnit uint32
}

type Register added in v1.5.0

type Register struct {
	RemoteKubeConfig           string
	RemoteContext              string
	ClusterName                string
	LocalClusterDomainOverride string
	RemoteNamespace            string
}

type Remove

type Remove struct {
	Route RemoveRoute
}

type RemoveRoute

type RemoveRoute struct {
	RemoveIndex uint32
}

type RestDestinationSpec

type RestDestinationSpec struct {
	FunctionName string
	Parameters   InputMapStringString
}

type Route added in v0.18.23

type Route struct {
}

type RouteMatchers

type RouteMatchers struct {
	PathPrefix            string
	PathExact             string
	PathRegex             string
	Methods               []string
	HeaderMatcher         InputMapStringString
	QueryParameterMatcher InputMapStringString
}

type RoutePlugins

type RoutePlugins struct {
	PrefixRewrite PrefixRewrite
}

type Secret

type Secret struct {
	TlsSecret    TlsSecret
	AwsSecret    AwsSecret
	AzureSecret  AzureSecret
	HeaderSecret HeaderSecret
}

type Selector

type Selector struct {
	// Allows finer-grained filtering of pods for the Upstream. Gloo will select pods based on their labels if
	// any are provided here.
	// (see [Kubernetes labels and selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/)
	SelectorKeyValuePairs []string
}

type TlsSecret

type TlsSecret struct {
	RootCaFilename     string
	PrivateKeyFilename string
	CertChainFilename  string
	// non-user facing value for test purposes
	// if set, Read() will just return the filenames
	Mock bool
}

func (*TlsSecret) ReadFiles added in v0.13.12

func (t *TlsSecret) ReadFiles() (string, string, string, error)

ReadFiles provides a way to sidestep file io during testing

type Top

type Top struct {
	Interactive    bool
	File           string
	CheckName      []string
	Output         printTypes.OutputType
	Ctx            context.Context
	Verbose        bool   // currently only used by install and uninstall, sends kubectl command output to terminal
	KubeConfig     string // file to use for kube config, if not standard one.
	Zip            bool
	ErrorsOnly     bool
	ConfigFilePath string
	Consul         Consul // use consul as config backend
}

type Uninstall

type Uninstall struct {
	GlooUninstall HelmUninstall
}

type Upgrade

type Upgrade struct {
	ReleaseTag   string
	DownloadPath string
}

type Vault added in v0.18.23

type Vault struct {
	UseVault bool // enable vault secret clients
	RootKey  string
	Client   func() (*vaultapi.Client, error)
}

Jump to

Keyboard shortcuts

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