Documentation ¶
Index ¶
- Constants
- Variables
- func MergeDeployment(a, b *appsv1.Deployment) *appsv1.Deployment
- func MergeSecret(a, b *corev1.Secret) *corev1.Secret
- func MergeService(a, b *corev1.Service) *corev1.Service
- func RegisterTypes(scheme *runtime.Scheme)
- type AuthSpec
- type ConnectionManagementSpec
- type ConsulSpec
- type CopyAnnotationsSpec
- type DeploymentSpec
- type GatewayClassConfig
- func (in *GatewayClassConfig) DeepCopy() *GatewayClassConfig
- func (in *GatewayClassConfig) DeepCopyInto(out *GatewayClassConfig)
- func (in *GatewayClassConfig) DeepCopyObject() runtime.Object
- func (c *GatewayClassConfig) RoleBindingFor(gw *gwv1beta1.Gateway) *rbac.RoleBinding
- func (c *GatewayClassConfig) RoleFor(gw *gwv1beta1.Gateway) *rbac.Role
- func (c *GatewayClassConfig) ServiceAccountFor(gw *gwv1beta1.Gateway) *corev1.ServiceAccount
- type GatewayClassConfigList
- type GatewayClassConfigSpec
- type ImageSpec
- type MeshService
- type MeshServiceList
- type MeshServiceSpec
- type PortSpec
Constants ¶
const ( Group = "api-gateway.consul.hashicorp.com" Version = "v1alpha1" )
const ( GatewayClassConfigKind = "GatewayClassConfig" MeshServiceKind = "MeshService" )
Variables ¶
var (
GroupVersion = schema.GroupVersion{Group: Group, Version: Version}
)
Functions ¶
func MergeDeployment ¶
func MergeDeployment(a, b *appsv1.Deployment) *appsv1.Deployment
MergeDeployment merges a gateway deployment a onto b and returns b, overriding all of the fields that we'd normally set for a service deployment. It does not attempt to change the service type
func MergeService ¶
MergeService merges a gateway service a onto b and returns b, overriding all of the fields that we'd normally set for a service deployment. It does not attempt to change the service type
func RegisterTypes ¶
Types ¶
type AuthSpec ¶
type AuthSpec struct { // Whether deployments should be run with "managed" Kubernetes ServiceAccounts created by the gateway controller. Managed bool `json:"managed,omitempty"` // The Consul auth method used for initial authentication by consul-api-gateway. Method string `json:"method,omitempty"` // The name of an existing Kubernetes ServiceAccount to authenticate as. Ignored if managed is true. Account string `json:"account,omitempty"` // The Consul namespace to use for authentication. Namespace string `json:"namespace,omitempty"` // The name of an existing Kubernetes PodSecurityPolicy to bind to the managed ServiceAccount if managed is true. PodSecurityPolicy string `json:"podSecurityPolicy,omitempty"` }
type ConnectionManagementSpec ¶ added in v0.5.0
type ConnectionManagementSpec struct { // The maximum number of connections allowed for the Gateway proxy. // If not set, the default for the proxy implementation will be used. MaxConnections *int32 `json:"maxConnections,omitempty"` }
func (*ConnectionManagementSpec) DeepCopy ¶ added in v0.5.0
func (in *ConnectionManagementSpec) DeepCopy() *ConnectionManagementSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionManagementSpec.
func (*ConnectionManagementSpec) DeepCopyInto ¶ added in v0.5.0
func (in *ConnectionManagementSpec) DeepCopyInto(out *ConnectionManagementSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConsulSpec ¶
type ConsulSpec struct { // Consul authentication information AuthSpec AuthSpec `json:"authentication,omitempty"` // The scheme to use for connecting to Consul. // +kubebuilder:validation:Enum=http;https Scheme string `json:"scheme,omitempty"` // The Consul admin partition in which the gateway is registered. // https://developer.hashicorp.com/consul/tutorials/enterprise/consul-admin-partitions Partition string `json:"partition,omitempty"` // The server name presented by the server's TLS certificate. This is // useful when attempting to talk to a Consul server over TLS while // referencing it via ip address. ServerName string `json:"serverName,omitempty"` // The address of the consul server to communicate with in the gateway // pod. If not specified, the pod will attempt to use a local agent on // the host on which it is running. Address string `json:"address,omitempty"` // The information about Consul's ports PortSpec PortSpec `json:"ports,omitempty"` }
type CopyAnnotationsSpec ¶
type CopyAnnotationsSpec struct { // List of annotations to copy to the gateway service. Service []string `json:"service,omitempty"` }
func (*CopyAnnotationsSpec) DeepCopy ¶
func (in *CopyAnnotationsSpec) DeepCopy() *CopyAnnotationsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CopyAnnotationsSpec.
func (*CopyAnnotationsSpec) DeepCopyInto ¶
func (in *CopyAnnotationsSpec) DeepCopyInto(out *CopyAnnotationsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeploymentSpec ¶ added in v0.3.0
type DeploymentSpec struct { // +kubebuilder:default:=1 // +kubebuilder:validation:Maximum=8 // +kubebuilder:validation:Minimum=1 // Number of gateway instances that should be deployed by default DefaultInstances *int32 `json:"defaultInstances,omitempty"` // +kubebuilder:default:=8 // +kubebuilder:validation:Maximum=8 // +kubebuilder:validation:Minimum=1 // Max allowed number of gateway instances MaxInstances *int32 `json:"maxInstances,omitempty"` // +kubebuilder:default:=1 // +kubebuilder:validation:Maximum=8 // +kubebuilder:validation:Minimum=1 // Minimum allowed number of gateway instances MinInstances *int32 `json:"minInstances,omitempty"` }
func (*DeploymentSpec) DeepCopy ¶ added in v0.3.0
func (in *DeploymentSpec) DeepCopy() *DeploymentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentSpec.
func (*DeploymentSpec) DeepCopyInto ¶ added in v0.3.0
func (in *DeploymentSpec) DeepCopyInto(out *DeploymentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GatewayClassConfig ¶
type GatewayClassConfig struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of GatewayClassConfig. Spec GatewayClassConfigSpec `json:"spec,omitempty"` }
GatewayClassConfig describes the configuration of a consul-api-gateway GatewayClass.
func (*GatewayClassConfig) DeepCopy ¶
func (in *GatewayClassConfig) DeepCopy() *GatewayClassConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayClassConfig.
func (*GatewayClassConfig) DeepCopyInto ¶
func (in *GatewayClassConfig) DeepCopyInto(out *GatewayClassConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GatewayClassConfig) DeepCopyObject ¶
func (in *GatewayClassConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GatewayClassConfig) RoleBindingFor ¶ added in v0.5.0
func (c *GatewayClassConfig) RoleBindingFor(gw *gwv1beta1.Gateway) *rbac.RoleBinding
RoleBindingFor constructs a Kubernetes RoleBinding for the specified Gateway based on the GatewayClassConfig. If the GatewayClassConfig is configured in such a way that does not require a RoleBinding, nil is returned.
func (*GatewayClassConfig) RoleFor ¶ added in v0.5.0
func (c *GatewayClassConfig) RoleFor(gw *gwv1beta1.Gateway) *rbac.Role
RoleFor constructs a Kubernetes Role for the specified Gateway based on the GatewayClassConfig. If the GatewayClassConfig is configured in such a way that does not require a Role, nil is returned.
func (*GatewayClassConfig) ServiceAccountFor ¶
func (c *GatewayClassConfig) ServiceAccountFor(gw *gwv1beta1.Gateway) *corev1.ServiceAccount
ServiceAccountFor constructs a Kubernetes ServiceAccount for the specified Gateway based on the GatewayClassConfig. If the GatewayClassConfig is configured in such a way that does not require a ServiceAccount, nil is returned.
type GatewayClassConfigList ¶
type GatewayClassConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []GatewayClassConfig `json:"items"` }
GatewayClassConfigList is a list of Config resources.
func (*GatewayClassConfigList) DeepCopy ¶
func (in *GatewayClassConfigList) DeepCopy() *GatewayClassConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayClassConfigList.
func (*GatewayClassConfigList) DeepCopyInto ¶
func (in *GatewayClassConfigList) DeepCopyInto(out *GatewayClassConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GatewayClassConfigList) DeepCopyObject ¶
func (in *GatewayClassConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GatewayClassConfigSpec ¶
type GatewayClassConfigSpec struct { // +kubebuilder:validation:Enum=ClusterIP;NodePort;LoadBalancer ServiceType *corev1.ServiceType `json:"serviceType,omitempty"` // NodeSelector is a selector which must be true for the pod to fit on a node. // Selector which must match a node's labels for the pod to be scheduled on that node. // More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Tolerations allow the scheduler to schedule nodes with matching taints // More Info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ Tolerations []corev1.Toleration `json:"tolerations,omitempty"` // If this is set, then the Envoy container ports are mapped // to host ports. UseHostPorts bool `json:"useHostPorts,omitempty"` // Configuration information about connecting to Consul. ConsulSpec ConsulSpec `json:"consul,omitempty"` // Configuration information about the images to use ImageSpec ImageSpec `json:"image,omitempty"` // Annotation Information to copy to services or deployments CopyAnnotations CopyAnnotationsSpec `json:"copyAnnotations,omitempty"` // +kubebuilder:validation:Enum=trace;debug;info;warning;error // Logging levels LogLevel string `json:"logLevel,omitempty"` // Configuration information about how many instances to deploy DeploymentSpec DeploymentSpec `json:"deployment,omitempty"` // Configuration information for managing connections in Envoy ConnectionManagement ConnectionManagementSpec `json:"connectionManagement,omitempty"` }
GatewayClassConfigSpec specifies the 'spec' of the Config CRD.
func (*GatewayClassConfigSpec) DeepCopy ¶
func (in *GatewayClassConfigSpec) DeepCopy() *GatewayClassConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayClassConfigSpec.
func (*GatewayClassConfigSpec) DeepCopyInto ¶
func (in *GatewayClassConfigSpec) DeepCopyInto(out *GatewayClassConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MeshService ¶
type MeshService struct { metav1.TypeMeta `json:",inline"` // Standard object's metadata. metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of MeshService. Spec MeshServiceSpec `json:"spec,omitempty"` }
MeshService holds a reference to an externally managed Consul Service Mesh service.
func (*MeshService) DeepCopy ¶
func (in *MeshService) DeepCopy() *MeshService
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshService.
func (*MeshService) DeepCopyInto ¶
func (in *MeshService) DeepCopyInto(out *MeshService)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MeshService) DeepCopyObject ¶
func (in *MeshService) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MeshServiceList ¶
type MeshServiceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []MeshService `json:"items"` }
MeshServiceList is a list of MeshService resources.
func (*MeshServiceList) DeepCopy ¶
func (in *MeshServiceList) DeepCopy() *MeshServiceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshServiceList.
func (*MeshServiceList) DeepCopyInto ¶
func (in *MeshServiceList) DeepCopyInto(out *MeshServiceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MeshServiceList) DeepCopyObject ¶
func (in *MeshServiceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MeshServiceSpec ¶
type MeshServiceSpec struct { // Name holds the service name for a Consul service. Name string `json:"name,omitempty"` // Peer optionally specifies the name of the peer exporting the Consul service. // If not specified, the Consul service is assumed to be in the local datacenter. Peer *string `json:"peer,omitempty"` }
MeshServiceSpec specifies the 'spec' of the MeshService CRD.
func (*MeshServiceSpec) DeepCopy ¶
func (in *MeshServiceSpec) DeepCopy() *MeshServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MeshServiceSpec.
func (*MeshServiceSpec) DeepCopyInto ¶
func (in *MeshServiceSpec) DeepCopyInto(out *MeshServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.