Documentation
¶
Index ¶
- Constants
- Variables
- func MergeDeployment(a, b *appsv1.Deployment) *appsv1.Deployment
- func MergeService(a, b *corev1.Service) *corev1.Service
- func RegisterTypes(scheme *runtime.Scheme)
- type AuthSpec
- type ConsulSpec
- type CopyAnnotationsSpec
- type GatewayClassConfig
- func (in *GatewayClassConfig) DeepCopy() *GatewayClassConfig
- func (in *GatewayClassConfig) DeepCopyInto(out *GatewayClassConfig)
- func (in *GatewayClassConfig) DeepCopyObject() runtime.Object
- func (c *GatewayClassConfig) DeploymentFor(gw *gateway.Gateway, sds SDSConfig) *appsv1.Deployment
- func (c *GatewayClassConfig) EmptyServiceFor(gw *gateway.Gateway) *corev1.Service
- func (c *GatewayClassConfig) ServiceFor(gw *gateway.Gateway) *corev1.Service
- type GatewayClassConfigList
- type GatewayClassConfigSpec
- type ImageSpec
- type PortSpec
- type SDSConfig
Constants ¶
const ( Group = "api-gateway.consul.hashicorp.com" Version = "v1alpha1" )
const (
GatewayClassConfigKind = "GatewayClassConfig"
)
Variables ¶
var (
GroupVersion = schema.GroupVersion{Group: Group, Version: Version}
)
Functions ¶
func MergeDeployment ¶
func MergeDeployment(a, b *appsv1.Deployment) *appsv1.Deployment
MergeDeploymentmerges 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 {
// The Consul auth method used for initial authentication by consul-api-gateway.
Method string `json:"method,omitempty"`
// The Kubernetes service account to authenticate as.
Account string `json:"account,omitempty"`
// The Consul namespace to use for authentication.
Namespace string `json:"namespace,omitempty"`
}
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 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"`
// The location of a secret to mount with the Consul root CA.
CASecret string `json:"caSecret,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 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) DeploymentFor ¶
func (c *GatewayClassConfig) DeploymentFor(gw *gateway.Gateway, sds SDSConfig) *appsv1.Deployment
DeploymentsFor returns the deployment configuration for the given gateway.
func (*GatewayClassConfig) EmptyServiceFor ¶
func (c *GatewayClassConfig) EmptyServiceFor(gw *gateway.Gateway) *corev1.Service
EmptyServiceFor returns an empty service definition for ensuring deletion
func (*GatewayClassConfig) ServiceFor ¶
func (c *GatewayClassConfig) ServiceFor(gw *gateway.Gateway) *corev1.Service
ServicesFor returns the service configuration for the given gateway. The gateway should be marked with the api-gateway.consul.hashicorp.com/service-type annotation and marked with 'ClusterIP', `NodePort` or `LoadBalancer` to expose the gateway listeners. Any other value does not expose the gateway.
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"`
// 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"`
}
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.