v1alpha2

package
v0.0.0-...-398e186 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: BSD-3-Clause, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package

Index

Constants

View Source
const (
	ClusterPhaseNone     ClusterPhase = ""
	ClusterPhaseCreating              = "Creating"
	ClusterPhaseRunning               = "Running"
	ClusterPhaseFailed                = "Failed"
)
View Source
const (
	ClusterConditionReady = "Ready"

	ClusterConditionScalingUp   = "ScalingUp"
	ClusterConditionScalingDown = "ScalingDown"

	ClusterConditionUpgrading = "Upgrading"
)
View Source
const (
	CRDResourceKind   = "NatsCluster"
	CRDResourcePlural = "natsclusters"

	ServiceRoleCRDResourceKind   = "NatsServiceRole"
	ServiceRoleCRDResourcePlural = "natsserviceroles"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme

	SchemeGroupVersion = schema.GroupVersion{Group: groupName, Version: "v1alpha2"}
	CRDName            = CRDResourcePlural + "." + groupName
	ServiceRoleCRDName = ServiceRoleCRDResourcePlural + "." + groupName
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a group-qualified GroupResource.

Types

type AuthConfig

type AuthConfig struct {
	// EnableServiceAccounts makes the operator lookup for mappings among
	// Kubernetes ServiceAccounts and NatsServiceRoles to issue tokens that
	// can be used to authenticate against a NATS cluster with authorization
	// following the permissions set for the role.
	EnableServiceAccounts bool `json:"enableServiceAccounts,omitempty"`

	// ClientsAuthSecret is the secret containing the explicit authorization
	// configuration in JSON.
	ClientsAuthSecret string `json:"clientsAuthSecret,omitempty"`

	// ClientsAuthFile is the path that nats-operator should read
	// auth secrets from on disk.
	ClientsAuthFile string `json:"clientsAuthFile,omitempty"`

	// ClientsAuthTimeout is the time in seconds that the NATS server will
	// allow to clients to send their auth credentials.
	ClientsAuthTimeout int `json:"clientsAuthTimeout,omitempty"`

	// TLSVerifyAndMap toggles verify and map to auth based on TLS certs.
	TLSVerifyAndMap bool `json:"tlsVerifyAndMap,omitempty"`
}

AuthConfig is the authorization configuration for user permissions in the cluster.

func (*AuthConfig) DeepCopy

func (in *AuthConfig) DeepCopy() *AuthConfig

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

func (*AuthConfig) DeepCopyInto

func (in *AuthConfig) DeepCopyInto(out *AuthConfig)

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

type ClusterCondition

type ClusterCondition struct {
	Type ClusterConditionType `json:"type"`

	Reason string `json:"reason"`

	TransitionTime string `json:"transitionTime"`
}

func (*ClusterCondition) DeepCopy

func (in *ClusterCondition) DeepCopy() *ClusterCondition

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

func (*ClusterCondition) DeepCopyInto

func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition)

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

type ClusterConditionType

type ClusterConditionType string

type ClusterPhase

type ClusterPhase string

type ClusterSpec

type ClusterSpec struct {
	// Size is the expected positive size of the NATS cluster.
	// The operator will eventually make the size of the running
	// cluster equal to the expected size.
	Size int `json:"size"`

	// Version is the expected version of the NATS cluster.
	// The operator will eventually make the cluster version
	// equal to the expected version.
	//
	// The version must follow the [semver]( http://semver.org) format, for example "1.0.4".
	// Only NATS released versions are supported: https://github.com/nats-io/gnatsd/releases
	//
	Version string `json:"version"`

	// ServerImage is the image of the NATS server to use.
	ServerImage string `json:"serverImage"`

	// ServerConfig is the extra configuration for the NATS server.
	ServerConfig *ServerConfig `json:"natsConfig,omitempty"`

	// Paused is to pause the control of the operator for the cluster.
	Paused bool `json:"paused,omitempty"`

	// Pod defines the policy to create pod for the NATS pod.
	//
	// Updating Pod does not take effect on any existing NATS pods.
	Pod *PodPolicy `json:"pod,omitempty"`

	// TLS is the configuration to secure the cluster.
	TLS *TLSConfig `json:"tls,omitempty"`

	// Auth is the configuration to set permissions for users.
	Auth *AuthConfig `json:"auth,omitempty"`

	// LameDuckDurationSeconds is the number of seconds during
	// which the server spreads the closing of clients when
	// signaled to go into "lame duck mode".
	// +optional
	LameDuckDurationSeconds *int64 `json:"lameDuckDurationSeconds,omitempty"`

	// NoAdvertise disables advertising of endpoints for clients.
	NoAdvertise bool `json:"noAdvertise,omitempty"`

	// PodTemplate is the optional template to use for the pods.
	PodTemplate *v1.PodTemplateSpec `json:"template,omitempty"`

	// ExtraRoutes is a list of extra routes to which the cluster will connect.
	ExtraRoutes []*ExtraRoute `json:"extraRoutes,omitempty"`

	// GatewayConfig is the configuration for the gateways.
	GatewayConfig *GatewayConfig `json:"gatewayConfig,omitempty"`

	// LeafNodeConfig is the configuration for the leafnode.
	LeafNodeConfig *LeafNodeConfig `json:"leafnodeConfig,omitempty"`

	// OperatorConfig is the operator configuration from a server.
	OperatorConfig *OperatorConfig `json:"operatorConfig,omitempty"`
}

func (*ClusterSpec) Cleanup

func (c *ClusterSpec) Cleanup()

Cleanup cleans up user passed spec, e.g. defaulting, transforming fields. TODO: move this to admission controller

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

func (*ClusterSpec) Validate

func (c *ClusterSpec) Validate() error

type ClusterStatus

type ClusterStatus struct {
	// Phase is the cluster running phase.
	Phase  ClusterPhase `json:"phase"`
	Reason string       `json:"reason"`

	// ControlPaused indicates the operator pauses the control of
	// the cluster.
	ControlPaused bool `json:"controlPaused"`

	// Condition keeps ten most recent cluster conditions.
	Conditions []ClusterCondition `json:"conditions"`

	// Size is the current size of the cluster.
	Size int `json:"size"`

	// CurrentVersion is the current cluster version.
	CurrentVersion string `json:"currentVersion"`
}

func (*ClusterStatus) AppendScalingDownCondition

func (cs *ClusterStatus) AppendScalingDownCondition(from, to int)

func (*ClusterStatus) AppendScalingUpCondition

func (cs *ClusterStatus) AppendScalingUpCondition(from, to int)

func (*ClusterStatus) AppendUpgradingCondition

func (cs *ClusterStatus) AppendUpgradingCondition(from, to string)

func (*ClusterStatus) Control

func (cs *ClusterStatus) Control()

func (ClusterStatus) Copy

func (cs ClusterStatus) Copy() ClusterStatus

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

func (*ClusterStatus) IsFailed

func (cs *ClusterStatus) IsFailed() bool

func (*ClusterStatus) PauseControl

func (cs *ClusterStatus) PauseControl()

func (*ClusterStatus) SetCurrentVersion

func (cs *ClusterStatus) SetCurrentVersion(v string)

func (*ClusterStatus) SetPhase

func (cs *ClusterStatus) SetPhase(p ClusterPhase)

func (*ClusterStatus) SetReadyCondition

func (cs *ClusterStatus) SetReadyCondition()

func (*ClusterStatus) SetReason

func (cs *ClusterStatus) SetReason(r string)

func (*ClusterStatus) SetSize

func (cs *ClusterStatus) SetSize(size int)

SetSize sets the current size of the cluster.

type ExtraRoute

type ExtraRoute struct {
	// Cluster is the name of a NatsCluster.
	Cluster string `json:"cluster,omitempty"`

	// Route is a network endpoint to which the cluster should connect.
	Route string `json:"route,omitempty"`
}

ExtraRoute is a route that is not originally part of the NatsCluster but that it will try to connect to.

func (*ExtraRoute) DeepCopy

func (in *ExtraRoute) DeepCopy() *ExtraRoute

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

func (*ExtraRoute) DeepCopyInto

func (in *ExtraRoute) DeepCopyInto(out *ExtraRoute)

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

type GatewayConfig

type GatewayConfig struct {
	// Name is the name of the gateway cluster.
	Name string `json:"name,omitempty"`

	// Port is the port that will bound from this host
	// for external access.
	Port int `json:"hostPort,omitempty"`

	// Gateways is the list of remote gateways to which
	// this cluster will be connecting.
	Gateways []*RemoteGatewayOpts `json:"gateways,omitempty"`
}

GatewayConfig is the configuration for the gateway.

func (*GatewayConfig) DeepCopy

func (in *GatewayConfig) DeepCopy() *GatewayConfig

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

func (*GatewayConfig) DeepCopyInto

func (in *GatewayConfig) DeepCopyInto(out *GatewayConfig)

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

type LeafNodeConfig

type LeafNodeConfig struct {
	Port int `json:"hostPort,omitempty"`
}

LeafNodeConfig is the configuration for leafnodes.

func (*LeafNodeConfig) DeepCopy

func (in *LeafNodeConfig) DeepCopy() *LeafNodeConfig

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

func (*LeafNodeConfig) DeepCopyInto

func (in *LeafNodeConfig) DeepCopyInto(out *LeafNodeConfig)

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

type NatsCluster

type NatsCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ClusterSpec   `json:"spec"`
	Status            ClusterStatus `json:"status"`
}

NatsCluster is a NATS cluster.

+genclient +genclient:noStatus +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*NatsCluster) AsOwner

func (c *NatsCluster) AsOwner() metav1.OwnerReference

func (*NatsCluster) DeepCopy

func (in *NatsCluster) DeepCopy() *NatsCluster

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

func (*NatsCluster) DeepCopyInto

func (in *NatsCluster) DeepCopyInto(out *NatsCluster)

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

func (*NatsCluster) DeepCopyObject

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

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

func (*NatsCluster) GetClientAuthSecretResourceVersion

func (c *NatsCluster) GetClientAuthSecretResourceVersion() string

GetClientAuthSecretResourceVersion returns the last-observed resource version of the secret containing authentication data for the NATS cluster.

func (*NatsCluster) GetGroupVersionKind

func (c *NatsCluster) GetGroupVersionKind() schema.GroupVersionKind

GetGroupVersionKind returns a GroupVersionKind based on the current GroupVersion and the specified Kind.

func (*NatsCluster) GetNatsServiceRolesHash

func (c *NatsCluster) GetNatsServiceRolesHash() string

GetNatsServiceRolesHash returns the hash of the comma-separated list of NatsServiceRole UIDs associated with the NATS cluster.

func (*NatsCluster) SetClientAuthSecretResourceVersion

func (c *NatsCluster) SetClientAuthSecretResourceVersion(v string)

SetClientAuthSecretResourceVersion sets the last-observed resource version of the secret containing authentication data for the NATS cluster.

func (*NatsCluster) SetNatsServiceRolesHash

func (c *NatsCluster) SetNatsServiceRolesHash(v string)

SetNatsServiceRolesHash sets the hash of the comma-separated list of NatsServiceRole UIDs associated with the NATS cluster.

type NatsClusterList

type NatsClusterList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NatsCluster `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*NatsClusterList) DeepCopy

func (in *NatsClusterList) DeepCopy() *NatsClusterList

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

func (*NatsClusterList) DeepCopyInto

func (in *NatsClusterList) DeepCopyInto(out *NatsClusterList)

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

func (*NatsClusterList) DeepCopyObject

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

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

type NatsServiceRole

type NatsServiceRole struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ServiceRoleSpec `json:"spec"`
}

ServiceRole is a NATS cluster service role. Its name is should be the same as the name a Kubernetes ServiceAccount in a namespace.

+genclient +genclient:noStatus +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*NatsServiceRole) AsOwner

func (c *NatsServiceRole) AsOwner() metav1.OwnerReference

func (*NatsServiceRole) DeepCopy

func (in *NatsServiceRole) DeepCopy() *NatsServiceRole

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

func (*NatsServiceRole) DeepCopyInto

func (in *NatsServiceRole) DeepCopyInto(out *NatsServiceRole)

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

func (*NatsServiceRole) DeepCopyObject

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

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

type NatsServiceRoleList

type NatsServiceRoleList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []NatsServiceRole `json:"items"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*NatsServiceRoleList) DeepCopy

func (in *NatsServiceRoleList) DeepCopy() *NatsServiceRoleList

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

func (*NatsServiceRoleList) DeepCopyInto

func (in *NatsServiceRoleList) DeepCopyInto(out *NatsServiceRoleList)

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

func (*NatsServiceRoleList) DeepCopyObject

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

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

type OperatorConfig

type OperatorConfig struct {
	Secret        string `json:"secret,omitempty"`
	SystemAccount string `json:"systemAccount,omitempty"`
	Resolver      string `json:"resolver,omitempty"`
}

OperatorConfig is the operator configuration from a server.

func (*OperatorConfig) DeepCopy

func (in *OperatorConfig) DeepCopy() *OperatorConfig

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

func (*OperatorConfig) DeepCopyInto

func (in *OperatorConfig) DeepCopyInto(out *OperatorConfig)

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

type Permissions

type Permissions struct {
	Publish   []string `json:"publish,omitempty"`
	Subscribe []string `json:"subscribe,omitempty"`
}

Permissions are the authorization rules defined for a role.

func (*Permissions) DeepCopy

func (in *Permissions) DeepCopy() *Permissions

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

func (*Permissions) DeepCopyInto

func (in *Permissions) DeepCopyInto(out *Permissions)

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

type PodPolicy

type PodPolicy struct {
	// Labels specifies the labels to attach to pods the operator creates for the
	// NATS cluster.
	// "app" and "nats_*" labels are reserved for the internal use of this operator.
	// Do not overwrite them.
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations specifies the annotations to attach to pods the operator creates.
	Annotations map[string]string `json:"annotations,omitempty"`

	// NodeSelector specifies a map of key-value pairs. For the pod to be eligible
	// to run on a node, the node must have each of the indicated key-value pairs as
	// labels.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// AntiAffinity determines if the nats-operator tries to avoid putting
	// the NATS members in the same cluster onto the same node.
	AntiAffinity bool `json:"antiAffinity,omitempty"`

	// Resources is the resource requirements for the NATS container.
	// This field cannot be updated once the cluster is created.
	Resources v1.ResourceRequirements `json:"resources,omitempty"`

	// Tolerations specifies the pod's tolerations.
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`

	// List of environment variables to set in the NATS container.
	NatsEnv []v1.EnvVar `json:"natsEnv,omitempty"`

	// EnableConfigReload attaches a sidecar to each NATS Server
	// that will signal the server whenever the configuration is updated.
	EnableConfigReload bool `json:"enableConfigReload,omitempty"`

	// ReloaderImage is the image to use for the reloader.
	ReloaderImage string `json:"reloaderImage,omitempty"`

	// ReloaderImageTag is the tag of the reloader image.
	ReloaderImageTag string `json:"reloaderImageTag,omitempty"`

	// ReloaderImagePullPolicy is the pull policy for the reloader image.
	ReloaderImagePullPolicy string `json:"reloaderImagePullPolicy,omitempty"`

	// EnableMetrics attaches a sidecar to each NATS Server
	// that will export prometheus metrics.
	EnableMetrics bool `json:"enableMetrics,omitempty"`

	// MetricsImage is the image to use for the prometheus metrics exporter.
	MetricsImage string `json:"metricsImage,omitempty"`

	// MetricsImageTag is the tag of the prometheus metrics exporter image.
	MetricsImageTag string `json:"metricsImageTag,omitempty"`

	// MetricsImagePullPolicy is the pull policy for the prometheus metrics exporter image.
	MetricsImagePullPolicy string `json:"metricsImagePullPolicy,omitempty"`

	// EnableClientsHostPort will bind a host port for the NATS container clients port,
	// also meaning that only a single NATS server can be running on that machine.
	EnableClientsHostPort bool `json:"enableClientsHostPort,omitempty"`

	// AdvertiseExternalIP will configure the client advertise address for a pod
	// to be the external IP of the pod where it is running.
	AdvertiseExternalIP bool `json:"advertiseExternalIP,omitempty"`

	// BootConfigContainerImage is the image to use for the initialize
	// container that generates config on the fly for the nats server.
	BootConfigContainerImage string `json:"bootconfigImage,omitempty"`

	// BootConfigContainerImageTag is the tag of the bootconfig container image.
	BootConfigContainerImageTag string `json:"bootconfigImageTag,omitempty"`

	// VolumeMounts is a list of k8s volume mount definitions for the nats container
	VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
}

PodPolicy defines the policy to create pod for the NATS container.

func (*PodPolicy) DeepCopy

func (in *PodPolicy) DeepCopy() *PodPolicy

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

func (*PodPolicy) DeepCopyInto

func (in *PodPolicy) DeepCopyInto(out *PodPolicy)

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

type RemoteGatewayOpts

type RemoteGatewayOpts struct {
	// Name is the name of the remote gateway.
	Name string `json:"name"`

	// URL is the endpoint of the remote gateway.
	URL string `json:"url,omitempty"`
}

RemoteGatewayOpts is the configuration for a remote gateway entry.

func (*RemoteGatewayOpts) DeepCopy

func (in *RemoteGatewayOpts) DeepCopy() *RemoteGatewayOpts

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

func (*RemoteGatewayOpts) DeepCopyInto

func (in *RemoteGatewayOpts) DeepCopyInto(out *RemoteGatewayOpts)

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

type ServerConfig

type ServerConfig struct {
	Debug            bool   `json:"debug,omitempty"`
	Trace            bool   `json:"trace,omitempty"`
	WriteDeadline    string `json:"write_deadline,omitempty"`
	MaxConnections   int    `json:"maxConnections,omitempty"`
	MaxPayload       int    `json:"maxPayload,omitempty"`
	MaxPending       int    `json:"maxPending,omitempty"`
	MaxSubscriptions int    `json:"maxSubscriptions,omitempty"`
	MaxControlLine   int    `json:"maxControlLine,omitempty"`
	DisableLogtime   bool   `json:"disableLogtime,omitempty"`
}

ServerConfig is extra configuration for the NATS server.

func (*ServerConfig) DeepCopy

func (in *ServerConfig) DeepCopy() *ServerConfig

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

func (*ServerConfig) DeepCopyInto

func (in *ServerConfig) DeepCopyInto(out *ServerConfig)

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

type ServiceRoleSpec

type ServiceRoleSpec struct {
	// Permissions are the authorization rules defined for a ServiceAccount.
	Permissions Permissions `json:"permissions,omitempty" protobuf:"bytes,1,opt,name=permissions"`
}

ServiceRoleSpec defines the permissions for a user account used by a NATS cluster client.

func (*ServiceRoleSpec) DeepCopy

func (in *ServiceRoleSpec) DeepCopy() *ServiceRoleSpec

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

func (*ServiceRoleSpec) DeepCopyInto

func (in *ServiceRoleSpec) DeepCopyInto(out *ServiceRoleSpec)

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

type TLSConfig

type TLSConfig struct {
	// ServerSecret is the secret containing the certificates
	// to secure the port to which the clients connect.
	ServerSecret string `json:"serverSecret,omitempty"`

	// ServerSecretCAFileName is the name of the CA in ServerSecret
	// (default: ca.pem)
	ServerSecretCAFileName string `json:"serverSecretCAFileName,omitempty"`

	// ServerSecretKeyFileName is the name of the key in ServerSecret
	// (default: server-key.pem)
	ServerSecretKeyFileName string `json:"serverSecretKeyFileName,omitempty"`

	// ServerSecretCertFileName is the name of the certificate in ServerSecret
	// (default: server.pem)
	ServerSecretCertFileName string `json:"serverSecretCertFileName,omitempty"`

	// RoutesSecret is the secret containing the certificates
	// to secure the port to which cluster routes connect.
	RoutesSecret string `json:"routesSecret,omitempty"`

	// RoutesSecretCAFileName is the name of the CA in RoutesSecret
	// (default: ca.pem)
	RoutesSecretCAFileName string `json:"routesSecretCAFileName,omitempty"`

	// RoutesSecretKeyFileName is the name of the key in RoutesSecret
	// (default: route-key.pem)
	RoutesSecretKeyFileName string `json:"routesSecretKeyFileName,omitempty"`

	// RoutesSecretCertFileName is the name of the certificate in RoutesSecret
	// (default: route.pem)
	RoutesSecretCertFileName string `json:"routesSecretCertFileName,omitempty"`

	// GatewaySecret is the secret containing the certificates
	// to secure the port to which gateway routes connect.
	GatewaySecret string `json:"gatewaySecret,omitempty"`

	// GatewaySecretCAFileName is the name of the CA in GatewaySecret
	// (default: ca.pem)
	GatewaySecretCAFileName string `json:"gatewaySecretCAFileName,omitempty"`

	// GatewaySecretKeyFileName is the name of the key in GatewaySecret
	GatewaySecretKeyFileName string `json:"gatewaySecretKeyFileName,omitempty"`

	// GatewaySecretCertFileName is the name of the certificate in GatewaySecret
	GatewaySecretCertFileName string `json:"gatewaySecretCertFileName,omitempty"`

	// LeafnodeSecret is the secret containing the certificates
	// to secure the port to which leafnode routes connect.
	LeafnodeSecret string `json:"leafnodeSecret,omitempty"`

	// LeafnodeSecretCAFileName is the name of the CA in LeafnodeSecret
	// (default: ca.pem)
	LeafnodeSecretCAFileName string `json:"leafnodeSecretCAFileName,omitempty"`

	// LeafnodeSecretKeyFileName is the name of the key in LeafnodeSecret
	LeafnodeSecretKeyFileName string `json:"leafnodeSecretKeyFileName,omitempty"`

	// LeafnodeSecretCertFileName is the name of the certificate in LeafnodeSecret
	LeafnodeSecretCertFileName string `json:"leafnodeSecretCertFileName,omitempty"`

	// EnableHttps makes the monitoring endpoint use https.
	EnableHttps bool `json:"enableHttps,omitempty"`

	// ClientsTLSTimeout is the time in seconds that the NATS server will
	// allow to clients to finish the TLS handshake.
	ClientsTLSTimeout float64 `json:"clientsTLSTimeout,omitempty"`

	// RoutesTLSTimeout is the time in seconds that the NATS server will
	// allow to routes to finish the TLS handshake.
	RoutesTLSTimeout float64 `json:"routesTLSTimeout,omitempty"`

	// GatewaysTLSTimeout is the time in seconds that the NATS server will
	// allow to routes to finish the TLS handshake.
	GatewaysTLSTimeout float64 `json:"gatewaysTLSTimeout,omitempty"`

	// LeafnodesTLSTimeout is the time in seconds that the NATS server will
	// allow to routes to finish the TLS handshake.
	LeafnodesTLSTimeout float64 `json:"leafnodesTLSTimeout,omitempty"`

	// Verify toggles verifying TLS certs for clients.
	Verify bool `json:"verify,omitempty"`
}

TLSConfig is the optional TLS configuration for the cluster.

func (*TLSConfig) DeepCopy

func (in *TLSConfig) DeepCopy() *TLSConfig

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

func (*TLSConfig) DeepCopyInto

func (in *TLSConfig) DeepCopyInto(out *TLSConfig)

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

Jump to

Keyboard shortcuts

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