config

package
v0.23.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_internal_config_config_proto protoreflect.FileDescriptor

Functions

func ReplicaSetForComponent added in v0.22.1

func ReplicaSetForComponent(component string, config *GKEConfig) string

ReplicaSetForComponent returns the name of the Kubernetes ReplicaSet that should host the given component.

Types

type GKEConfig

type GKEConfig struct {

	// Name of the base docker image used to build the container.
	//
	// If empty, Service Weaver will pick 'ubuntu:rolling' as the base image.
	Image string `protobuf:"bytes,12,opt,name=image,proto3" json:"image,omitempty"`
	// List of unique regions to deploy the application to. Service Weaver will
	// manage the clusters in the given regions.
	//
	// If empty, Service Weaver will pick regions automatically.
	//
	// For a list of Google Cloud regions, see:
	//
	//	https://cloud.google.com/compute/docs/regions-zones
	Regions []string `protobuf:"bytes,3,rep,name=regions,proto3" json:"regions,omitempty"`
	// Minimum number of running pods for each component.
	MinReplicas int32                                 `protobuf:"varint,11,opt,name=min_replicas,json=minReplicas,proto3" json:"min_replicas,omitempty"`
	Listeners   map[string]*GKEConfig_ListenerOptions `` /* 159-byte string literal not displayed */
	// If true, enables the intra-component mTLS protocol. In particular:
	//  1. All intra-component communication will be authenticated, ensuring
	//     that the caller and callee components' identities can be verified.
	//  2. All intra-component communication will be authorized, ensuring that
	//     the caller -> callee relationship matches the call graph encoded
	//     in the program.
	//  3. All intra-component traffic will be encrypted, ensuring that a third
	//     party cannot snoop on the network packets.
	//
	// Note that enabling mTLS will likely increase the CPU usage of your
	// application.
	Mtls bool `protobuf:"varint,8,opt,name=mtls,proto3" json:"mtls,omitempty"`
	// Address of the manager local to a Service Weaver process. This field is
	// typically filled by the manager, before starting a Service Weaver process.
	ManagerAddr string `protobuf:"bytes,5,opt,name=manager_addr,json=managerAddr,proto3" json:"manager_addr,omitempty"`
	// The URL of the container used to deploy the application (e.g.,
	// us-docker.pkg.dev/my-project/serviceweaver-repo/todo:tag4df65e28), or the
	// empty string if containers are not being used.
	Container  string             `protobuf:"bytes,6,opt,name=container,proto3" json:"container,omitempty"`
	Deployment *protos.Deployment `protobuf:"bytes,7,opt,name=deployment,proto3" json:"deployment,omitempty"`
	// Map from component name to the expected component identity.
	ComponentIdentity map[string]string                `` /* 200-byte string literal not displayed */
	IdentityAllowlist map[string]*GKEConfig_Components `` /* 201-byte string literal not displayed */
	// contains filtered or unexported fields
}

GKEConfig holds configuration information for one execution of a Service Weaver application on GKE. Fields are populated from a combination of user specified configuration and Service Weaver provided information specific to a particular execution.

func (*GKEConfig) Descriptor deprecated

func (*GKEConfig) Descriptor() ([]byte, []int)

Deprecated: Use GKEConfig.ProtoReflect.Descriptor instead.

func (*GKEConfig) GetComponentIdentity added in v0.10.0

func (x *GKEConfig) GetComponentIdentity() map[string]string

func (*GKEConfig) GetContainer

func (x *GKEConfig) GetContainer() string

func (*GKEConfig) GetDeployment

func (x *GKEConfig) GetDeployment() *protos.Deployment

func (*GKEConfig) GetIdentityAllowlist added in v0.10.0

func (x *GKEConfig) GetIdentityAllowlist() map[string]*GKEConfig_Components

func (*GKEConfig) GetImage added in v0.23.4

func (x *GKEConfig) GetImage() string

func (*GKEConfig) GetListeners added in v0.15.0

func (x *GKEConfig) GetListeners() map[string]*GKEConfig_ListenerOptions

func (*GKEConfig) GetManagerAddr

func (x *GKEConfig) GetManagerAddr() string

func (*GKEConfig) GetMinReplicas added in v0.23.1

func (x *GKEConfig) GetMinReplicas() int32

func (*GKEConfig) GetMtls added in v0.12.0

func (x *GKEConfig) GetMtls() bool

func (*GKEConfig) GetRegions

func (x *GKEConfig) GetRegions() []string

func (*GKEConfig) ProtoMessage

func (*GKEConfig) ProtoMessage()

func (*GKEConfig) ProtoReflect

func (x *GKEConfig) ProtoReflect() protoreflect.Message

func (*GKEConfig) Reset

func (x *GKEConfig) Reset()

func (*GKEConfig) String

func (x *GKEConfig) String() string

type GKEConfig_Components added in v0.10.0

type GKEConfig_Components struct {
	Component []string `protobuf:"bytes,1,rep,name=component,proto3" json:"component,omitempty"`
	// contains filtered or unexported fields
}

Map from a component identity to the list of components the identity is allowed to invoke methods on.

func (*GKEConfig_Components) Descriptor deprecated added in v0.10.0

func (*GKEConfig_Components) Descriptor() ([]byte, []int)

Deprecated: Use GKEConfig_Components.ProtoReflect.Descriptor instead.

func (*GKEConfig_Components) GetComponent added in v0.10.0

func (x *GKEConfig_Components) GetComponent() []string

func (*GKEConfig_Components) ProtoMessage added in v0.10.0

func (*GKEConfig_Components) ProtoMessage()

func (*GKEConfig_Components) ProtoReflect added in v0.10.0

func (x *GKEConfig_Components) ProtoReflect() protoreflect.Message

func (*GKEConfig_Components) Reset added in v0.10.0

func (x *GKEConfig_Components) Reset()

func (*GKEConfig_Components) String added in v0.10.0

func (x *GKEConfig_Components) String() string

type GKEConfig_ListenerOptions added in v0.15.0

type GKEConfig_ListenerOptions struct {

	// Is the listener public, i.e., should it be accessible from outside of
	// the cloud project?
	IsPublic bool `protobuf:"varint,2,opt,name=is_public,json=isPublic,proto3" json:"is_public,omitempty"`
	// Hostname for the listener. It can be empty, iff the listener is private.
	//
	// Public listeners will be configured to receive ingress traffic; all other
	// listeners will be configured only for VPC-internal access.
	Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// contains filtered or unexported fields
}

Options for the application listeners, keyed by listener name. If a listener isn't specified in the map, default options will be used.

func (*GKEConfig_ListenerOptions) Descriptor deprecated added in v0.15.0

func (*GKEConfig_ListenerOptions) Descriptor() ([]byte, []int)

Deprecated: Use GKEConfig_ListenerOptions.ProtoReflect.Descriptor instead.

func (*GKEConfig_ListenerOptions) GetHostname added in v0.23.5

func (x *GKEConfig_ListenerOptions) GetHostname() string

func (*GKEConfig_ListenerOptions) GetIsPublic added in v0.23.5

func (x *GKEConfig_ListenerOptions) GetIsPublic() bool

func (*GKEConfig_ListenerOptions) ProtoMessage added in v0.15.0

func (*GKEConfig_ListenerOptions) ProtoMessage()

func (*GKEConfig_ListenerOptions) ProtoReflect added in v0.15.0

func (*GKEConfig_ListenerOptions) Reset added in v0.15.0

func (x *GKEConfig_ListenerOptions) Reset()

func (*GKEConfig_ListenerOptions) String added in v0.15.0

func (x *GKEConfig_ListenerOptions) String() string

Jump to

Keyboard shortcuts

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