Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the k8gb v1beta1 API group +kubebuilder:object:generate=true +groupName=k8gb.absa.oss
Copyright 2021 The k8gb Contributors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "k8gb.absa.oss", Version: "v1beta1"} // 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 )
Functions ¶
func ToV1Beta1IngressSpec ¶
func ToV1Beta1IngressSpec(spec IngressSpec) v1beta1.IngressSpec
ToV1Beta1IngressSpec transforms from k8gb ingress Spec to v1beta1 ingress Spec
Types ¶
type Gslb ¶
type Gslb struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GslbSpec `json:"spec,omitempty"` Status GslbStatus `json:"status,omitempty"` }
Gslb is the Schema for the gslbs API +kubebuilder:printcolumn:name="strategy",type=string,JSONPath=`.spec.strategy.type` +kubebuilder:printcolumn:name="geoTag",type=string,JSONPath=`.status.geoTag`
func (*Gslb) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gslb.
func (*Gslb) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Gslb) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GslbList ¶
type GslbList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Gslb `json:"items"` }
GslbList contains a list of Gslb
func (*GslbList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GslbList.
func (*GslbList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GslbList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GslbSpec ¶
type GslbSpec struct { // Gslb-enabled Ingress Spec Ingress IngressSpec `json:"ingress"` // Gslb Strategy spec Strategy Strategy `json:"strategy"` }
GslbSpec defines the desired state of Gslb +k8s:openapi-gen=true
func (*GslbSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GslbSpec.
func (*GslbSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GslbStatus ¶
type GslbStatus struct { // Associated Service status ServiceHealth map[string]HealthStatus `json:"serviceHealth"` // Current Healthy DNS record structure HealthyRecords map[string][]string `json:"healthyRecords"` // Cluster Geo Tag GeoTag string `json:"geoTag"` }
GslbStatus defines the observed state of Gslb
func (*GslbStatus) DeepCopy ¶
func (in *GslbStatus) DeepCopy() *GslbStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GslbStatus.
func (*GslbStatus) DeepCopyInto ¶
func (in *GslbStatus) DeepCopyInto(out *GslbStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HealthStatus ¶
type HealthStatus string
const ( Healthy HealthStatus = "Healthy" Unhealthy HealthStatus = "Unhealthy" NotFound HealthStatus = "NotFound" )
func (HealthStatus) String ¶
func (h HealthStatus) String() string
type IngressRule ¶
type IngressRule struct { // Host is the fully qualified domain name of a network host, as defined by RFC 3986. // Note the following deviations from the "host" part of the // URI as defined in RFC 3986: // 1. IPs are not allowed. Currently an IngressRuleValue can only apply to // the IP in the Spec of the parent Ingress. // 2. The `:` delimiter is not respected because ports are not allowed. // Currently the port of an Ingress is implicitly :80 for http and // :443 for https. // Both these may change in the future. // Incoming requests are matched against the host before the // IngressRuleValue. If the host is unspecified, the Ingress routes all // traffic based on the specified IngressRuleValue. // // Host can be "precise" which is a domain name without the terminating dot of // a network host (e.g. "foo.bar.com") or "wildcard", which is a domain name // prefixed with a single wildcard label (e.g. "*.foo.com"). // The wildcard character '*' must appear by itself as the first DNS label and // matches only a single label. You cannot have a wildcard label by itself (e.g. Host == "*"). // Requests will be matched against the Host field in the following way: // 1. If Host is precise, the request matches this rule if the http host header is equal to Host. // 2. If Host is a wildcard, then the request matches this rule if the http host header // is to equal to the suffix (removing the first label) of the wildcard rule. // +optional Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"` // IngressRuleValue represents a rule to route requests for this IngressRule. // If unspecified, the rule defaults to a http catch-all. Whether that sends // just traffic matching the host to the default backend or all traffic to the // default backend, is left to the controller fulfilling the Ingress. Http is // currently the only supported IngressRuleValue. // +optional IngressRuleValue `json:",inline,omitempty" protobuf:"bytes,2,opt,name=ingressRuleValue"` }
IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.
func (*IngressRule) DeepCopy ¶
func (in *IngressRule) DeepCopy() *IngressRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRule.
func (*IngressRule) DeepCopyInto ¶
func (in *IngressRule) DeepCopyInto(out *IngressRule)
DeepCopyInto copying the receiver, writing into out. in must be non-nil.
type IngressRuleValue ¶
type IngressRuleValue struct { // HTTPIngressRuleValue is a list of http selectors // pointing to backends. In the example: http://<host>/<path>?<searchpart> // -> backend where where parts of the url correspond to // RFC 3986, this resource will be used to match against // everything after the last '/' and before the first '?' // or '#'. HTTP *v1beta1.HTTPIngressRuleValue `json:"http" protobuf:"bytes,1,opt,name=http"` }
IngressRuleValue represents a rule to apply against incoming requests. If the rule is satisfied, the request is routed to the specified backend. Currently mixing different types of rules in a single Ingress is disallowed, so exactly one of the following must be set.
func (*IngressRuleValue) DeepCopy ¶
func (in *IngressRuleValue) DeepCopy() *IngressRuleValue
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressRuleValue.
func (*IngressRuleValue) DeepCopyInto ¶
func (in *IngressRuleValue) DeepCopyInto(out *IngressRuleValue)
DeepCopyInto copying the receiver, writing into out. in must be non-nil.
type IngressSpec ¶
type IngressSpec struct { // IngressClassName is the name of the IngressClass cluster resource. The // associated IngressClass defines which controller will implement the // resource. This replaces the deprecated `kubernetes.io/ingress.class` // annotation. For backwards compatibility, when that annotation is set, it // must be given precedence over this field. The controller may emit a // warning if the field and annotation have different values. // Implementations of this API should ignore Ingresses without a class // specified. An IngressClass resource may be marked as default, which can // be used to set a default value for this field. For more information, // refer to the IngressClass documentation. // +optional IngressClassName *string `json:"ingressClassName,omitempty" protobuf:"bytes,4,opt,name=ingressClassName"` // A default backend capable of servicing requests that don't match any // rule. At least one of 'backend' or 'rules' must be specified. This field // is optional to allow the loadbalancer controller or defaulting logic to // specify a global default. // +optional Backend *v1beta1.IngressBackend `json:"backend,omitempty" protobuf:"bytes,1,opt,name=backend"` // TLS configuration. Currently the Ingress only supports a single TLS // port, 443. If multiple members of this list specify different hosts, they // will be multiplexed on the same port according to the hostname specified // through the SNI TLS extension, if the ingress controller fulfilling the // ingress supports SNI. // +optional TLS []v1beta1.IngressTLS `json:"tls,omitempty" protobuf:"bytes,2,rep,name=tls"` // A list of host rules used to configure the Ingress. If unspecified, or // no rule matches, all traffic is sent to the default backend. // +optional Rules []IngressRule `json:"rules,omitempty" protobuf:"bytes,3,rep,name=rules"` }
IngressSpec overrides https://github.com/kubernetes/api/blob/master/networking/v1beta1/types.go IngressSpec is upstream Ingress to be included in Gslb specification and extended with Gslb specific requirements.
func FromV1Beta1IngressSpec ¶
func FromV1Beta1IngressSpec(v1beta1Spec v1beta1.IngressSpec) IngressSpec
FromV1Beta1IngressSpec transforms from v1beta1 ingress Spec to custom k8gb ingress Spec
func (*IngressSpec) DeepCopy ¶
func (in *IngressSpec) DeepCopy() *IngressSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressSpec.
func (*IngressSpec) DeepCopyInto ¶
func (in *IngressSpec) DeepCopyInto(out *IngressSpec)
DeepCopyInto copying the receiver, writing into out. in must be non-nil.
type Strategy ¶
type Strategy struct { // Load balancing strategy type:(roundRobin|failover) Type string `json:"type"` // Primary Geo Tag. Valid for failover strategy only PrimaryGeoTag string `json:"primaryGeoTag,omitempty"` // Defines DNS record TTL in seconds DNSTtlSeconds int `json:"dnsTtlSeconds,omitempty"` // Split brain TXT record expiration in seconds SplitBrainThresholdSeconds int `json:"splitBrainThresholdSeconds,omitempty"` }
Strategy defines Gslb behavior +k8s:openapi-gen=true
func (*Strategy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Strategy.
func (*Strategy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.