v1

package
v0.0.0-...-0bb286d Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the mesh v1 API group +kubebuilder:object:generate=true +groupName=mesh.webmesh.io

Index

Constants

View Source
const (
	// DefaultNodeImage is the default image to use for nodes.
	DefaultNodeImage = "ghcr.io/webmeshproj/node:latest"
	// DefaultNodeProxyImage is the default image to use for node proxies.
	DefaultNodeProxyImage = "ghcr.io/webmeshproj/node-proxy:latest"
	// DefaultRaftPort is the default port to use for Raft.
	DefaultRaftPort = 9443
	// DefaultGRPCPort is the default port to use for gRPC.
	DefaultGRPCPort = 8443
	// DefaultWireGuardPort is the default port to use for WireGuard.
	DefaultWireGuardPort = 51820
	// DefaultStorageSize is the default storage size to use for nodes.
	DefaultStorageSize = "1Gi"
	// DefaultDataDirectory is the default data directory to use for nodes.
	DefaultDataDirectory = "/data"
	// DefaultTLSDirectory is the default TLS directory to use for nodes.
	DefaultTLSDirectory = "/etc/webmesh/tls"
	// FieldOwner is the field owner to use for all resources.
	FieldOwner = "webmesh-operator"
	// MeshNameLabel is the label to use for the Mesh name.
	MeshNameLabel = "webmesh.io/mesh-name"
	// MeshNamespaceLabel is the label to use for the Mesh namespace.
	MeshNamespaceLabel = "webmesh.io/mesh-namespace"
	// NodeGroupNameLabel is the label to use for the NodeGroup name.
	NodeGroupNameLabel = "webmesh.io/nodegroup-name"
	// NodeGroupNamespaceLabel is the label to use for the NodeGroup namespace.
	NodeGroupNamespaceLabel = "webmesh.io/nodegroup-namespace"
	// ConfigChecksumAnnotation is the annotation to use for configmap checksums.
	ConfigChecksumAnnotation = "webmesh.io/config-checksum"
	// SpecChecksumAnnotation is the annotation to use for spec checksums.
	SpecChecksumAnnotation = "webmesh.io/spec-checksum"
	// BootstrapNodeGroupAnnotation is the annotation to use for bootstrap node groups.
	// This should only be set by the controller for bootstrap node groups. It is also
	// used as a label selector for bootstrap node groups.
	BootstrapNodeGroupAnnotation = "webmesh.io/bootstrap-nodegroup"
	// ZoneAwarenessLabel is a label placed on NodeGroups to override the default
	// zone awareness behavior.
	ZoneAwarenessLabel = "webmesh.io/zone-awareness"
	// BootstrapNodeGroupLabel is the same value as BootstrapNodeGroupAnnotation.
	BootstrapNodeGroupLabel = BootstrapNodeGroupAnnotation
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "mesh.webmesh.io", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// DefaultTLSKeyConfig is the default TLS key config certificates.
	DefaultTLSKeyConfig = certv1.CertificatePrivateKey{
		Algorithm: certv1.ECDSAKeyAlgorithm,
		Size:      384,
	}
)

Functions

func MeshAdminCertName

func MeshAdminCertName(mesh *Mesh) string

MeshAdminCertName returns the name of the admin certificate for the given Mesh.

func MeshAdminConfigName

func MeshAdminConfigName(mesh *Mesh) string

MeshAdminConfigName returns the name of the admin config for the given Mesh.

func MeshAdminHostname

func MeshAdminHostname(mesh *Mesh) string

MeshAdminHostname returns the hostname for the given Mesh admin.

func MeshBootstrapGroupName

func MeshBootstrapGroupName(mesh *Mesh) string

MeshBootstrapGroupName returns the name of the bootstrap group for the given Mesh.

func MeshBootstrapGroupSelector

func MeshBootstrapGroupSelector(mesh *Mesh) map[string]string

MeshBootstrapGroupSelector returns the selector for a Mesh's bootstrap node group.

func MeshBootstrapLBGroupName

func MeshBootstrapLBGroupName(mesh *Mesh) string

MeshBootstrapLBGroupName returns the name of the bootstrap load balancer group for the given Mesh.

func MeshCAHostname

func MeshCAHostname(mesh *Mesh) string

MeshCAHostname returns the hostname for the given Mesh CA.

func MeshCAName

func MeshCAName(mesh *Mesh) string

MeshCAName returns the name of the CA for the given Mesh.

func MeshLabels

func MeshLabels(mesh *Mesh) map[string]string

MeshLabels returns the labels for the given Mesh.

func MeshManagerConfigName

func MeshManagerConfigName(mesh *Mesh) string

MeshManagerConfigName returns the name of the manager config for the given Mesh.

func MeshNodeCertName

func MeshNodeCertName(mesh *Mesh, group *NodeGroup, index int) string

MeshNodeCertName returns the name of the node certificate for the given Mesh.

func MeshNodeClusterFQDN

func MeshNodeClusterFQDN(mesh *Mesh, group *NodeGroup, index int) string

MeshNodeClusterFQDN returns the cluster FQDN for the given Mesh node.

func MeshNodeDNSNames

func MeshNodeDNSNames(mesh *Mesh, group *NodeGroup, index int) []string

MeshNodeDNSNames returns the DNS names for the given Mesh node.

func MeshNodeGroupConfigMapName

func MeshNodeGroupConfigMapName(mesh *Mesh, group *NodeGroup) string

MeshNodeGroupConfigMapName returns the name of the ConfigMap for the given Mesh node group.

func MeshNodeGroupHeadlessServiceFQDN

func MeshNodeGroupHeadlessServiceFQDN(mesh *Mesh, group *NodeGroup) string

MeshNodeGroupHeadlessServiceFQDN returns the cluster FQDN for the given Mesh node group's headless service.

func MeshNodeGroupHeadlessServiceName

func MeshNodeGroupHeadlessServiceName(mesh *Mesh, group *NodeGroup) string

MeshNodeGroupHeadlessServiceName returns the name of the headless Service for the given Mesh node group.

func MeshNodeGroupLBName

func MeshNodeGroupLBName(mesh *Mesh, group *NodeGroup) string

MeshNodeGroupLBName returns the name of the LB Service for the given Mesh node group.

func MeshNodeGroupPodName

func MeshNodeGroupPodName(mesh *Mesh, group *NodeGroup, index int) string

MeshNodeGroupPodName returns the name of the Pod for the given Mesh node group.

func MeshNodeGroupStatefulSetName

func MeshNodeGroupStatefulSetName(mesh *Mesh, group *NodeGroup) string

MeshNodeGroupStatefulSetName returns the name of the StatefulSet for the given Mesh node group.

func MeshNodeHostname

func MeshNodeHostname(mesh *Mesh, group *NodeGroup, index int) string

MeshNodeHostname returns the hostname for the given Mesh node.

func MeshSelector

func MeshSelector(mesh *Mesh) map[string]string

MeshSelector returns the selector for the given Mesh.

func MeshSelfSignerName

func MeshSelfSignerName(mesh *Mesh) string

MeshSelfSignerName returns the name of the self-signer for the given Mesh.

func MeshSelfSignerRef

func MeshSelfSignerRef(mesh *Mesh) cmmeta.ObjectReference

MeshSelfSignerRef returns a reference to the self-signer for the given Mesh.

func NodeGroupLabels

func NodeGroupLabels(mesh *Mesh, group *NodeGroup) map[string]string

NodeGroupLabels returns the labels for the given Mesh node group.

func NodeGroupSelector

func NodeGroupSelector(mesh *Mesh, group *NodeGroup) map[string]string

NodeGroupSelector returns the selector for the given Mesh node group.

func OwnerReferences

func OwnerReferences(obj client.Object) []metav1.OwnerReference

OwnerReferences returns the owner references for the given object.

Types

type IssuerConfig

type IssuerConfig struct {
	// Create is true if the issuer should be created.
	// +optional
	Create bool `json:"create,omitempty"`

	// Kind is the kind of issuer to create.
	// +kubebuilder:default:="Issuer"
	// +optional
	Kind string `json:"type,omitempty"`

	// IssuerRef is the reference to an existing issuer to use.
	// +optional
	IssuerRef cmmeta.ObjectReference `json:"issuerRef,omitempty"`
}

IssuerConfig defines the configuration for issuing TLS certificates.

func (*IssuerConfig) DeepCopy

func (in *IssuerConfig) DeepCopy() *IssuerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IssuerConfig.

func (*IssuerConfig) DeepCopyInto

func (in *IssuerConfig) DeepCopyInto(out *IssuerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Mesh

type Mesh struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   MeshSpec   `json:"spec,omitempty"`
	Status MeshStatus `json:"status,omitempty"`
}

Mesh is the Schema for the meshes API

func (*Mesh) BootstrapGroups

func (c *Mesh) BootstrapGroups() []*NodeGroup

BootstrapGroup returns a NodeGroup for the bootstrap group.

func (*Mesh) DeepCopy

func (in *Mesh) DeepCopy() *Mesh

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mesh.

func (*Mesh) DeepCopyInto

func (in *Mesh) DeepCopyInto(out *Mesh)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Mesh) DeepCopyObject

func (in *Mesh) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Mesh) Default

func (r *Mesh) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Mesh) IssuerReference

func (c *Mesh) IssuerReference() cmmeta.ObjectReference

IssuerReference returns the issuer reference for the mesh.

func (*Mesh) SetupWebhookWithManager

func (r *Mesh) SetupWebhookWithManager(mgr ctrl.Manager) error

type MeshList

type MeshList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Mesh `json:"items"`
}

MeshList contains a list of Mesh

func (*MeshList) DeepCopy

func (in *MeshList) DeepCopy() *MeshList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshList.

func (*MeshList) DeepCopyInto

func (in *MeshList) DeepCopyInto(out *MeshList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MeshList) DeepCopyObject

func (in *MeshList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MeshSpec

type MeshSpec struct {
	// Image is the default image to use for configurations if not
	// specified otherwise.
	// +kubebuilder:default:="ghcr.io/webmeshproj/node:latest"
	// +optional
	Image string `json:"image,omitempty"`

	// ConfigGroups is a map of configurations for groups of nodes.
	// These can be referenced by name in NodeGroupSpecs.
	// +optional
	ConfigGroups map[string]NodeGroupConfig `json:"configGroups,omitempty"`

	// Bootstrap is the configuration for the bootstrap node group.
	// A headless service is created for this group that is only accessible
	// within the cluster. If an exposed service is configured, an additional
	// load balancer node group will be created as an initial entrypoint to
	// the mesh.
	// +optional
	Bootstrap NodeGroupSpec `json:"bootstrap,omitempty"`

	// IPv4 is the IPv4 CIDR to use for the mesh. This cannot be
	// changed after creation.
	// +kubebuilder:default:="172.16.0.0/12"
	// +optional
	IPv4 string `json:"ipv4,omitempty"`

	// DefaultNetworkPolicy is the default network policy to use for
	// the mesh. This can only be changed after creation via the API.
	// +kubebuilder:default:="deny"
	// +kubebuilder:validation:Enum:=deny;accept
	// +optional
	DefaultNetworkPolicy NetworkPolicyType `json:"defaultNetworkPolicy,omitempty"`

	// Issuer is the configuration for issuing TLS certificates.
	// +optional
	Issuer IssuerConfig `json:"issuer,omitempty"`
}

MeshSpec defines the desired state of Mesh

func (*MeshSpec) DeepCopy

func (in *MeshSpec) DeepCopy() *MeshSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshSpec.

func (*MeshSpec) DeepCopyInto

func (in *MeshSpec) DeepCopyInto(out *MeshSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MeshStatus

type MeshStatus struct {
}

MeshStatus defines the observed state of Mesh

func (*MeshStatus) DeepCopy

func (in *MeshStatus) DeepCopy() *MeshStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshStatus.

func (*MeshStatus) DeepCopyInto

func (in *MeshStatus) DeepCopyInto(out *MeshStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkPolicyType

type NetworkPolicyType string
const (
	NetworkPolicyTypeDeny  NetworkPolicyType = "deny"
	NetworkPolicyTypeAllow NetworkPolicyType = "accept"
)

type NodeGroup

type NodeGroup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   NodeGroupSpec   `json:"spec,omitempty"`
	Status NodeGroupStatus `json:"status,omitempty"`
}

NodeGroup is the Schema for the nodegroups API

func (*NodeGroup) DeepCopy

func (in *NodeGroup) DeepCopy() *NodeGroup

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroup.

func (*NodeGroup) DeepCopyInto

func (in *NodeGroup) DeepCopyInto(out *NodeGroup)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGroup) DeepCopyObject

func (in *NodeGroup) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*NodeGroup) Default

func (r *NodeGroup) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*NodeGroup) SetupWebhookWithManager

func (r *NodeGroup) SetupWebhookWithManager(mgr ctrl.Manager) error

type NodeGroupClusterConfig

type NodeGroupClusterConfig struct {
	// ImagePullPolicy is the image pull policy to use for the node.
	// +kubebuilder:default:="IfNotPresent"
	// +optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// ImagePullSecrets is the list of image pull secrets to use for the
	// node.
	// +optional
	ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// PodAnnotations is the annotations to use for the node containers in
	// this group.
	// +optional
	PodAnnotations map[string]string `json:"podAnnotations,omitempty"`

	// HostNetwork is whether to use host networking for the node
	// containers in this group.
	// +optional
	HostNetwork bool `json:"hostNetwork,omitempty"`

	// NodeSelector is the node selector to use for the node containers in
	// this group.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// Affininity is the affinity to use for the node containers in this
	// group.
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// Tolerations is the tolerations to use for the node containers in
	// this group.
	// +optional
	Tolerations []corev1.Toleration `json:"tolerations,omitempty"`

	// PreemptionPolicy is the preemption policy to use for the node
	// containers in this group.
	// +optional
	PreemptionPolicy *corev1.PreemptionPolicy `json:"preemptionPolicy,omitempty"`

	// TopologySpreadConstraints is the topology spread constraints to use
	// for the node containers in this group.
	// +optional
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`

	// ResourceClaims is the resource claims to use for the node containers
	// in this group.
	// +optional
	ResourceClaims []corev1.PodResourceClaim `json:"resourceClaims,omitempty"`

	// AdditionalVolumes is the additional volumes to use for the node
	// containers in this group.
	// +optional
	AdditionalVolumes []corev1.Volume `json:"additionalVolumes,omitempty"`

	// AdditionalVolumeMounts is the additional volume mounts to use for
	// the node containers in this group.
	// +optional
	AdditionalVolumeMounts []corev1.VolumeMount `json:"additionalVolumeMounts,omitempty"`

	// AdditionalContainers is the additional containers to use for the
	// node pods in this group.
	// +optional
	AdditionalContainers []corev1.Container `json:"additionalContainers,omitempty"`

	// InitContainers is the init containers to use for the node pods in
	// this group.
	// +optional
	InitContainers []corev1.Container `json:"initContainers,omitempty"`

	// Resources is the resource requirements for the node containers in
	// this group.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`

	// Service is the configuration for exposing this group of nodes.
	// +optional
	Service *NodeGroupLBConfig `json:"service,omitempty"`

	// PVCSpec is the specification for the PVCs to use for this group.
	// +optional
	PVCSpec *corev1.PersistentVolumeClaimSpec `json:"pvcSpec,omitempty"`

	// Kubeconfig is a reference to a secret containing a kubeconfig to use
	// for this group. If not specified, the current kubeconfig will be used.
	// +optional
	Kubeconfig *corev1.SecretKeySelector `json:"kubeconfig,omitempty"`
}

NodeGroupClusterConfig is the configuration for a group of nodes running in a Kubernetes cluster.

func (*NodeGroupClusterConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupClusterConfig.

func (*NodeGroupClusterConfig) DeepCopyInto

func (in *NodeGroupClusterConfig) DeepCopyInto(out *NodeGroupClusterConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGroupClusterConfig) Default

func (c *NodeGroupClusterConfig) Default()

Default sets default values for the configuration.

type NodeGroupConfig

type NodeGroupConfig struct {
	// LogLevel is the log level to use for the node containers in this
	// group.
	// +kubebuilder:Validation:Enum:=debug;info;warn;error
	// +kubebuilder:default:="info"
	// +optional
	LogLevel string `json:"logLevel,omitempty"`

	// Voter is true if the nodes in this group should be voters.
	// +optional
	Voter bool `json:"voter,omitempty"`

	// NoIPv6 is true if IPv6 should not be used for the node group.
	// +optional
	NoIPv6 bool `json:"noIPv6,omitempty"`

	// Services is the configuration for services enabled for this group.
	// +optional
	Services *NodeServicesConfig `json:"services,omitempty"`
}

NodeGroupConfig defines the desired Webmesh configurations for a group of nodes.

func (*NodeGroupConfig) DeepCopy

func (in *NodeGroupConfig) DeepCopy() *NodeGroupConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupConfig.

func (*NodeGroupConfig) DeepCopyInto

func (in *NodeGroupConfig) DeepCopyInto(out *NodeGroupConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGroupConfig) Default

func (c *NodeGroupConfig) Default()

Default sets default values for any unset fields.

func (*NodeGroupConfig) Merge

Merge merges the given NodeGroupConfig into this NodeGroupConfig. The given NodeGroupConfig takes precedence. The merged NodeGroupConfig is returned for convenience. If both are nil, a default NodeGroupConfig is returned.

type NodeGroupGoogleCloudConfig

type NodeGroupGoogleCloudConfig struct {
	// ProjectID is the ID of the Google Cloud project.
	// +optional
	ProjectID string `json:"projectID,omitempty"`

	// Subnetwork is the name of the subnetwork to place the WAN interface.
	// +kubebuilder:validation:Required
	Subnetwork string `json:"subnetwork"`

	// Region is the region where the router resides.
	// +optional
	Region string `json:"region,omitempty"`

	// Zone is the zone where the router resides.
	// +kubebuilder:validation:Required
	Zone string `json:"zone"`

	// MachineType is the machine type of the router.
	// +kubebuilder:validation:Required
	MachineType string `json:"machineType"`

	// Tags is a list of instance tags to which this router applies.
	// +optional
	Tags []string `json:"tags,omitempty"`

	// Credentials is the credentials to use for the Google Cloud API.
	// If omitted, workload identity will be used.
	// +optional
	Credentials *corev1.SecretKeySelector `json:"credentials,omitempty"`
}

NodeGroupGoogleCloudConfig defines the desired configurations for a node group running on Google Cloud compute instances.

func (*NodeGroupGoogleCloudConfig) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupGoogleCloudConfig.

func (*NodeGroupGoogleCloudConfig) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGroupGoogleCloudConfig) Validate

func (c *NodeGroupGoogleCloudConfig) Validate(path *field.Path) error

type NodeGroupLBConfig

type NodeGroupLBConfig struct {
	// Type is the type of service to expose.
	// +kubebuilder:default:="ClusterIP"
	// +optional
	Type corev1.ServiceType `json:"type,omitempty"`

	// GRPCPort is the GRPC port to expose. This is used for communication
	// between clients and nodes.
	// +kubebuilder:default:=8443
	// +optional
	GRPCPort int32 `json:"grpcPort,omitempty"`

	// WireGuardPort is the WireGuard port to expose. This is used for communication
	// between nodes.
	// +kubebuilder:default:=51820
	// +optional
	WireGuardPort int32 `json:"wireGuardPort,omitempty"`

	// Annotations are the annotations to use for the service.
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`

	// ExternalURL is the external URL to broadcast for this service.
	// If left unset it will be generated from the service IP.
	// +optional
	ExternalURL string `json:"externalURL,omitempty"`
}

NodeGroupLBConfig defines the configurations for exposing a group of nodes.

func (*NodeGroupLBConfig) DeepCopy

func (in *NodeGroupLBConfig) DeepCopy() *NodeGroupLBConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupLBConfig.

func (*NodeGroupLBConfig) DeepCopyInto

func (in *NodeGroupLBConfig) DeepCopyInto(out *NodeGroupLBConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGroupLBConfig) Default

func (c *NodeGroupLBConfig) Default()

type NodeGroupList

type NodeGroupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NodeGroup `json:"items"`
}

NodeGroupList contains a list of NodeGroup

func (*NodeGroupList) DeepCopy

func (in *NodeGroupList) DeepCopy() *NodeGroupList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupList.

func (*NodeGroupList) DeepCopyInto

func (in *NodeGroupList) DeepCopyInto(out *NodeGroupList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGroupList) DeepCopyObject

func (in *NodeGroupList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type NodeGroupSpec

type NodeGroupSpec struct {
	// Image is the image to use for the node.
	// +kubebuilder:default:="ghcr.io/webmeshproj/node:latest"
	// +optional
	Image string `json:"image,omitempty"`

	// Replicas is the number of replicas to run for this group.
	// +kubebuilder:default:=1
	// +optional
	Replicas *int32 `json:"replicas,omitempty"`

	// Mesh is a reference to the Mesh this group belongs to.
	// +optional
	Mesh corev1.ObjectReference `json:"mesh,omitempty"`

	// ConfigGroup is the name of the configuration group from the Mesh
	// to use for this group. If not specified, the default configuration
	// will be used. Configurations can be further customized by specifying
	// a Config.
	// +optional
	ConfigGroup string `json:"configGroup,omitempty"`

	// Config is configuration overrides for this group.
	// +optional
	Config *NodeGroupConfig `json:"config,omitempty"`

	// Cluster is the configuration for a group of nodes running in a
	// Kubernetes cluster.
	// +optional
	Cluster *NodeGroupClusterConfig `json:"cluster,omitempty"`

	// GoogleCloud is the configuration for a group of nodes running in
	// Google Cloud.
	// +optional
	GoogleCloud *NodeGroupGoogleCloudConfig `json:"googleCloud,omitempty"`
}

NodeGroupSpec is the specification for a group of nodes.

func (*NodeGroupSpec) DeepCopy

func (in *NodeGroupSpec) DeepCopy() *NodeGroupSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupSpec.

func (*NodeGroupSpec) DeepCopyInto

func (in *NodeGroupSpec) DeepCopyInto(out *NodeGroupSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeGroupSpec) Default

func (n *NodeGroupSpec) Default()

func (*NodeGroupSpec) Validate

func (n *NodeGroupSpec) Validate() error

Validate validates the NodeGroupSpec.

type NodeGroupStatus

type NodeGroupStatus struct {
}

NodeGroupStatus defines the observed state of NodeGroup

func (*NodeGroupStatus) DeepCopy

func (in *NodeGroupStatus) DeepCopy() *NodeGroupStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeGroupStatus.

func (*NodeGroupStatus) DeepCopyInto

func (in *NodeGroupStatus) DeepCopyInto(out *NodeGroupStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NodeMeshDNSConfig

type NodeMeshDNSConfig struct {
	// ListenUDP is the address to listen on for MeshDNS UDP.
	// +kubebuilder:default:=":5353"
	// +optional
	ListenUDP string `json:"listenUDP,omitempty"`

	// ListenTCP is the address to listen on for MeshDNS TCP.
	// +kubebuilder:default:=":5353"
	// +optional
	ListenTCP string `json:"listenTCP,omitempty"`
}

NodeMeshDNSConfig defines the desired MeshDNS configurations for a group of nodes.

func (*NodeMeshDNSConfig) DeepCopy

func (in *NodeMeshDNSConfig) DeepCopy() *NodeMeshDNSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMeshDNSConfig.

func (*NodeMeshDNSConfig) DeepCopyInto

func (in *NodeMeshDNSConfig) DeepCopyInto(out *NodeMeshDNSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeMeshDNSConfig) Default

func (c *NodeMeshDNSConfig) Default()

Default sets default values for any unset fields.

func (*NodeMeshDNSConfig) Merge

Merge merges the given NodeMeshDNSConfig into this NodeMeshDNSConfig. The given NodeMeshDNSConfig takes precedence. The merged NodeMeshDNSConfig is returned for convenience. If both are nil, a default NodeMeshDNSConfig is returned.

type NodeMetricsConfig

type NodeMetricsConfig struct {
	// ListenAddress is the address to listen on for metrics.
	// +kubebuilder:default:=":8080"
	// +optional
	ListenAddress string `json:"listenAddress,omitempty"`

	// Path is the path to expose metrics on.
	// +kubebuilder:default:="/metrics"
	// +optional
	Path string `json:"path,omitempty"`
}

NodeMetricsConfig defines the configurations for metrics enabled for a group of nodes.

func (*NodeMetricsConfig) DeepCopy

func (in *NodeMetricsConfig) DeepCopy() *NodeMetricsConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetricsConfig.

func (*NodeMetricsConfig) DeepCopyInto

func (in *NodeMetricsConfig) DeepCopyInto(out *NodeMetricsConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeMetricsConfig) Default

func (c *NodeMetricsConfig) Default()

Default sets default values for any unset fields.

func (*NodeMetricsConfig) Merge

Merge merges the given NodeMetricsConfig into this NodeMetricsConfig. The given NodeMetricsConfig takes precedence. The merged NodeMetricsConfig is returned for convenience. If both are nil, a default NodeMetricsConfig is returned.

type NodeServicesConfig

type NodeServicesConfig struct {
	// Metrics is the configuration for metrics enabled for this group.
	// +optional
	Metrics *NodeMetricsConfig `json:"metrics,omitempty"`

	// WebRTC is the configuration for WebRTC enabled for this group.
	// +optional
	WebRTC *NodeWebRTCConfig `json:"webRTC,omitempty"`

	// MeshDNS is the configuration for MeshDNS enabled for this group.
	// +optional
	MeshDNS *NodeMeshDNSConfig `json:"meshDNS,omitempty"`

	// EnableLeaderProxy is true if leader proxy should be enabled for
	// this group.
	// +optional
	EnableLeaderProxy bool `json:"enableLeaderProxy,omitempty"`

	// EnableMeshAPI is true if the Mesh API should be enabled for this
	// group.
	// +optional
	EnableMeshAPI bool `json:"enableMeshAPI,omitempty"`

	// EnablePeerDiscoveryAPI is true if peer discovery API should be enabled for
	// this group.
	// +optional
	EnablePeerDiscoveryAPI bool `json:"enablePeerDiscoveryAPI,omitempty"`

	// EnableAdminAPI is true if the admin API should be enabled for this
	// group.
	// +optional
	EnableAdminAPI bool `json:"enableAdminAPI,omitempty"`
}

NodeServicesConfig defines the configurations for the services enabled on a group of nodes.

func (*NodeServicesConfig) DeepCopy

func (in *NodeServicesConfig) DeepCopy() *NodeServicesConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeServicesConfig.

func (*NodeServicesConfig) DeepCopyInto

func (in *NodeServicesConfig) DeepCopyInto(out *NodeServicesConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeServicesConfig) Default

func (c *NodeServicesConfig) Default()

Default sets default values for any unset fields.

func (*NodeServicesConfig) Merge

Merge merges the given NodeServicesConfig into this NodeServicesConfig. The given NodeServicesConfig takes precedence. The merged NodeServicesConfig is returned for convenience. If both are nil, a default NodeServicesConfig is returned.

type NodeWebRTCConfig

type NodeWebRTCConfig struct {
	// STUNServers is the list of STUN servers to use for WebRTC.
	// +kubebuilder:default:={"stun:stun.l.google.com:19302"}
	// +optional
	STUNServers []string `json:"stunServers,omitempty"`
}

NodeWebRTCConfig defines the desired WebRTC configurations for a group of nodes.

func (*NodeWebRTCConfig) DeepCopy

func (in *NodeWebRTCConfig) DeepCopy() *NodeWebRTCConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeWebRTCConfig.

func (*NodeWebRTCConfig) DeepCopyInto

func (in *NodeWebRTCConfig) DeepCopyInto(out *NodeWebRTCConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*NodeWebRTCConfig) Default

func (c *NodeWebRTCConfig) Default()

Default sets default values for any unset fields.

func (*NodeWebRTCConfig) Merge

Merge merges the given NodeWebRTCConfig into this NodeWebRTCConfig. The given NodeWebRTCConfig takes precedence. The merged NodeWebRTCConfig is returned for convenience. If both are nil, a default NodeWebRTCConfig is returned.

Jump to

Keyboard shortcuts

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