Documentation
¶
Overview ¶
Copyright 2025 HAProxy Technologies LLC
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Copyright 2025 HAProxy Technologies LLC ¶
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.
Index ¶
- Variables
- func ConvertListenerKeyToGatewayKey(listenerKey client.ObjectKey) client.ObjectKey
- func ConvertListenerKeyToGatewayKeyAndListenerName(listenerKey client.ObjectKey) (client.ObjectKey, string, error)
- func GetBackendRefNamespacedName(backendRef gatewayv1.BackendObjectReference, defaultNamespace string) types.NamespacedName
- func GetCertificateRefNamespacedName(certRef gatewayv1.SecretObjectReference, gw *gatewayv1.Gateway) types.NamespacedName
- func GetParentRefNamespacedName(parentRef gatewayv1.ParentReference, defaultNamespace string) types.NamespacedName
- func GetParentRefNamespacedNameFromResource(parentRef gatewayv1.ParentReference, resourceNamespace string) types.NamespacedName
- func ListenerKeyFromListenerName(gw *gatewayv1.Gateway, listenerName gatewayv1.SectionName) client.ObjectKey
- func NewListenerKey(gw *gatewayv1.Gateway, listener gatewayv1.Listener) client.ObjectKey
- func ServiceNsNameKey(routeNs string, backendRef gatewayv1.BackendObjectReference) client.ObjectKey
- func ServiceNsNameKeyTlSRoute(tlsRoute *v1alpha2.TLSRoute, backendRef gatewayv1.BackendObjectReference) client.ObjectKey
- type AttachedRoutes
- type Builder
- func NewCertificateBuilder(controllerStore *ControllerStore, storeCertOnDisk, runtimeUpdate bool, ...) Builder
- func NewGatewayBuilder(params GatewayBuilderParams) Builder
- func NewGatewayClassBuilder(params GatewayClassBuilderParams) Builder
- func NewHTTPRouteBuilder(params HTTPRouteBuilderParams) Builder
- func NewSecretBuilder(controllerStore *ControllerStore) Builder
- func NewServiceBuilder(controllerStore *ControllerStore) Builder
- func NewTLSRouteBuilder(params TLSRouteBuilderParams) Builder
- func NewVirtualListenerBuilder(controllerStore *ControllerStore) Builder
- type CertUpdates
- type CertificateBuilderImpl
- type CheckResult
- type CheckResultRoute
- type ControllerStore
- func (b *ControllerStore) CheckGatewayClassExists(gwcName string) bool
- func (b *ControllerStore) CleanInstalledVersionsUpdates()
- func (b *ControllerStore) GetGatewayForListener(listener *Listener) *Gateway
- func (b *ControllerStore) GetListenerForKey(listenerKey types.NamespacedName) *Listener
- func (b *ControllerStore) ResetCertificateUpdates()
- func (b *ControllerStore) ResetCrtListUpdates()
- type CrtListUpdates
- type DefaultsCR
- func (s *DefaultsCR) DeepCopy() *DefaultsCR
- func (s *DefaultsCR) GetTreeStatus() *TreeUpdate[DefaultsCR]
- func (s *DefaultsCR) SetAsDeleted(logger *slog.Logger)
- func (s *DefaultsCR) SetAsUpserted(logger *slog.Logger, newK8sResource *v3.Defaults)
- func (s *DefaultsCR) SetTreeStatus(treeStatus TreeUpdate[DefaultsCR])
- type DefaultsCRBuilder
- type GateBuilderImpl
- type GateTree
- type Gateway
- func (g *Gateway) BuildConditions()
- func (g *Gateway) DeepCopy() *Gateway
- func (g *Gateway) GetCreationTimestamp() metav1.Time
- func (g *Gateway) GetK8sResource() *gatewayv1.Gateway
- func (g *Gateway) GetName() string
- func (g *Gateway) GetTreeStatus() *TreeUpdate[Gateway]
- func (g *Gateway) SetAsDeleted(logger *slog.Logger)
- func (g *Gateway) SetAsManaged(logger *slog.Logger, cs ControllerStore)
- func (g *Gateway) SetAsUnmanaged(logger *slog.Logger, cs ControllerStore)
- func (g *Gateway) SetAsUpserted(logger *slog.Logger, newK8sResource *gatewayv1.Gateway)
- func (g *Gateway) SetTreeStatus(treeStatus TreeUpdate[Gateway])
- type GatewayBuilderImpl
- type GatewayBuilderParams
- type GatewayClass
- func (g *GatewayClass) BuildConditions(controllerStore ControllerStore)
- func (g *GatewayClass) DeepCopy() *GatewayClass
- func (g *GatewayClass) GetCreationTimestamp() metav1.Time
- func (g *GatewayClass) GetName() string
- func (g *GatewayClass) GetTreeStatus() *TreeUpdate[GatewayClass]
- func (g *GatewayClass) ResetChecks()
- func (g *GatewayClass) SetAsDeleted(logger *slog.Logger)
- func (g *GatewayClass) SetAsManaged(logger *slog.Logger, controllerStore ControllerStore)
- func (g *GatewayClass) SetAsUnmanaged(logger *slog.Logger, controllerStore ControllerStore)
- func (g *GatewayClass) SetAsUpserted(logger *slog.Logger, newK8sResource *gatewayv1.GatewayClass)
- func (g *GatewayClass) SetTreeStatus(treeStatus TreeUpdate[GatewayClass])
- type GatewayClassBuilderImpl
- type GatewayClassBuilderParams
- type Global
- type HTTPRoute
- func (r *HTTPRoute) BuildConditions()
- func (r *HTTPRoute) DeepCopy() *HTTPRoute
- func (r *HTTPRoute) GetTreeStatus() *TreeUpdate[HTTPRoute]
- func (r *HTTPRoute) ResetChecks()
- func (r *HTTPRoute) SetAsDeleted(logger *slog.Logger)
- func (r *HTTPRoute) SetAsUpserted(logger *slog.Logger, newK8sResource *gatewayv1.HTTPRoute)
- func (r *HTTPRoute) SetTreeStatus(treeStatus TreeUpdate[HTTPRoute])
- type HTTPRouteBuilderImpl
- type HTTPRouteBuilderParams
- type HTTPRouteRule
- type HugConfBuilderImpl
- type HugConfBuilderParams
- type HugGateParamsRefChecker
- type InstalledVersions
- type InstalledVersionsBuilderImpl
- type Listener
- type ReferenceManager
- type ReferencedObjects
- type RouteGroupKind
- type Secret
- func (s *Secret) DeepCopy() *Secret
- func (s *Secret) GetTreeStatus() *TreeUpdate[Secret]
- func (s *Secret) SetAsDeleted(logger *slog.Logger)
- func (s *Secret) SetAsManaged(logger *slog.Logger, cs ControllerStore)
- func (s *Secret) SetAsUpserted(logger *slog.Logger, newK8sResource *v1.Secret)
- func (s *Secret) SetTreeStatus(treeStatus TreeUpdate[Secret])
- type SecretBuilderImpl
- type Service
- func (s *Service) DeepCopy() *Service
- func (s *Service) GetTreeStatus() *TreeUpdate[Service]
- func (s *Service) SetAsDeleted(logger *slog.Logger)
- func (s *Service) SetAsManaged(logger *slog.Logger, cs ControllerStore)
- func (s *Service) SetAsUpserted(logger *slog.Logger, newK8sResource *v1.Service)
- func (s *Service) SetTreeStatus(treeStatus TreeUpdate[Service])
- type ServiceBuilderImpl
- type SupportedVersions
- type TLSRoute
- func (r *TLSRoute) BuildConditions()
- func (r *TLSRoute) DeepCopy() *TLSRoute
- func (r *TLSRoute) GetTreeStatus() *TreeUpdate[TLSRoute]
- func (r *TLSRoute) ResetChecks()
- func (r *TLSRoute) SetAsDeleted(logger *slog.Logger)
- func (r *TLSRoute) SetAsUpserted(logger *slog.Logger, newK8sResource *v1alpha2.TLSRoute)
- func (r *TLSRoute) SetTreeStatus(treeStatus TreeUpdate[TLSRoute])
- type TLSRouteBuilderImpl
- type TLSRouteBuilderParams
- type TLSRouteRule
- type TreeObject
- type TreeResource
- type TreeResourcePointer
- type TreeUpdate
- type VirtualListener
- func (vl *VirtualListener) DeepCopy() *VirtualListener
- func (vl *VirtualListener) Equal(other *VirtualListener) bool
- func (vl *VirtualListener) SetAsCreated(logger *slog.Logger)
- func (vl *VirtualListener) SetAsDeleted(logger *slog.Logger)
- func (vl *VirtualListener) SetAsUpserted(logger *slog.Logger)
- type VirtualListenerBuilderImpl
Constants ¶
This section is empty.
Variables ¶
var ( SupportedGatewayAPIBundleVersion = SupportedVersions{"v1.3", "v1.4", "v1.5"} SupportedParametersRefKind = gatewayv1.Kind("HugGate") SupportedParametersRefGroup = gatewayv1.Group("gate.v3.haproxy.org") )
Functions ¶
func ConvertListenerKeyToGatewayKey ¶
ConvertListenerKeyToGatewayKey converts a listener key back to a gateway key. It assumes the listener key is in the format "gateway-name_listener-name", built by the previous ListenerKey function. For a listener key with namespace "ns" and name "my-gateway_https", it returns a gateway key with namespace "ns" and name "my-gateway".
func ConvertListenerKeyToGatewayKeyAndListenerName ¶
func ConvertListenerKeyToGatewayKeyAndListenerName(listenerKey client.ObjectKey) (client.ObjectKey, string, error)
ConvertListenerKeyToGatewayKeyAndListenerName converts a listener key back to a gateway key and listener name. It assumes the listener key is in the format "gateway-name_listener-name", built by the ListenerKey function. For a listener key with namespace "ns" and name "my-gateway_https", it returns a gateway key with namespace "ns" and name "my-gateway", the listener name "https", and no error. If the format is invalid, it returns an error.
func GetBackendRefNamespacedName ¶
func GetBackendRefNamespacedName(backendRef gatewayv1.BackendObjectReference, defaultNamespace string) types.NamespacedName
GetBackendRefNamespacedName returns the namespaced name for a backendref reference, using the Route's namespace as a default if the reference does not specify one.
func GetCertificateRefNamespacedName ¶
func GetCertificateRefNamespacedName(certRef gatewayv1.SecretObjectReference, gw *gatewayv1.Gateway) types.NamespacedName
GetCertificateRefNamespacedName returns the namespaced name for a certificate reference, using the Gateway's namespace as a default if the reference does not specify one.
func GetParentRefNamespacedName ¶
func GetParentRefNamespacedName(parentRef gatewayv1.ParentReference, defaultNamespace string) types.NamespacedName
GetParentRefNamespacedName returns the namespaced name for a parentRef reference, using the Route's namespace as a default if the reference does not specify one.
func GetParentRefNamespacedNameFromResource ¶ added in v0.8.0
func GetParentRefNamespacedNameFromResource(parentRef gatewayv1.ParentReference, resourceNamespace string) types.NamespacedName
func NewListenerKey ¶ added in v0.9.0
NewListenerKey returns the Listener owner key appending the listener name to it For Gateway ns/gateway, if the Listener name is "https", will return ns/gateway_https = Listener Key
Listener Key = NamespaceName {
Namespace : <gateway_ns>
Name: : <gateway-name>_<listener_name>
}
func ServiceNsNameKey ¶
func ServiceNsNameKey(routeNs string, backendRef gatewayv1.BackendObjectReference) client.ObjectKey
ServiceNsNameKey returns the service Ns/Name If the backendRef namespace is empty or nil, fills with the Route Namesapce
func ServiceNsNameKeyTlSRoute ¶ added in v0.8.0
func ServiceNsNameKeyTlSRoute(tlsRoute *v1alpha2.TLSRoute, backendRef gatewayv1.BackendObjectReference) client.ObjectKey
ServiceNsNameKey returns the service Ns/Name If the backendRef namespace is empty or nil, fills with the Route Namesapce
Types ¶
type AttachedRoutes ¶
type AttachedRoutes map[types.NamespacedName]struct{} // map[routeKey]
AttachedRoutes is a map from a route's NamespacedName to a placeholder struct.
func (AttachedRoutes) MarshalJSON ¶
func (m AttachedRoutes) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for AttachedRoutes.
func (*AttachedRoutes) UnmarshalJSON ¶
func (m *AttachedRoutes) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for AttachedRoutes.
type Builder ¶
type Builder interface {
ComputeTreeUpdates()
CleanTreeUpdates()
}
func NewCertificateBuilder ¶
func NewCertificateBuilder(controllerStore *ControllerStore, storeCertOnDisk, runtimeUpdate bool, certStorage storage.CertificateStorage) Builder
func NewGatewayBuilder ¶
func NewGatewayBuilder(params GatewayBuilderParams) Builder
func NewGatewayClassBuilder ¶
func NewGatewayClassBuilder(params GatewayClassBuilderParams) Builder
func NewHTTPRouteBuilder ¶
func NewHTTPRouteBuilder(params HTTPRouteBuilderParams) Builder
func NewSecretBuilder ¶
func NewSecretBuilder(controllerStore *ControllerStore) Builder
func NewServiceBuilder ¶
func NewServiceBuilder(controllerStore *ControllerStore) Builder
func NewTLSRouteBuilder ¶ added in v0.8.0
func NewTLSRouteBuilder(params TLSRouteBuilderParams) Builder
func NewVirtualListenerBuilder ¶ added in v0.9.0
func NewVirtualListenerBuilder(controllerStore *ControllerStore) Builder
type CertUpdates ¶
type CertUpdates struct {
Created map[string]certificate.CertificateData
Updated map[string]certificate.CertificateData
Deleted map[string]certificate.CertificateData
}
type CertificateBuilderImpl ¶
type CertificateBuilderImpl struct {
*ControllerStore
// contains filtered or unexported fields
}
func (*CertificateBuilderImpl) CleanTreeUpdates ¶
func (*CertificateBuilderImpl) CleanTreeUpdates()
func (*CertificateBuilderImpl) ComputeTreeUpdates ¶
func (b *CertificateBuilderImpl) ComputeTreeUpdates()
type CheckResult ¶
type CheckResult struct {
Conditions generic.Conditions
// If Valid = true, then Conditions should be empty
// If Valid = false:
// - Conditions are set if there is an invalid check
// - Conditions is empty if the check does not make sense (for example no listener status for an invalid Gateway)
Valid bool
}
type CheckResultRoute ¶
type CheckResultRoute struct {
Conditions rc.RouteConditions
// If Valid = true, then Conditions should be empty
// If Valid = false:
// - Conditions are set if there is an invalid check
// - Conditions is empty if the check does not make sense (for example no listener status for an invalid Gateway)
Valid bool
Managed bool
}
type ControllerStore ¶
type ControllerStore struct {
ClusterStore *store.ClusterStore
GateTree *GateTree
UnmanagedGateTree *GateTree
ReferencedObjects *ReferencedObjects
// A Map of installed GwApi CRDs versions
InstalledGwAPIVersions *InstalledVersions
Logger *slog.Logger
ExtractGVK utilsk8s.ExtractGVK
CertUpdates *CertUpdates
CrtListUpdates *CrtListUpdates
// from config
ControllerName string
// contains filtered or unexported fields
}
func (*ControllerStore) CheckGatewayClassExists ¶
func (b *ControllerStore) CheckGatewayClassExists(gwcName string) bool
func (*ControllerStore) CleanInstalledVersionsUpdates ¶
func (b *ControllerStore) CleanInstalledVersionsUpdates()
func (*ControllerStore) GetGatewayForListener ¶ added in v0.9.0
func (b *ControllerStore) GetGatewayForListener(listener *Listener) *Gateway
GetGatewayForListener returns the Gateway for the given Listener, or nil if not found. It uses the Listener's Owner field to look up the gateway in the GateTree.
func (*ControllerStore) GetListenerForKey ¶ added in v0.9.0
func (b *ControllerStore) GetListenerForKey(listenerKey types.NamespacedName) *Listener
GetListenerForKey returns the Listener for the given listenerKey, or nil if not found. It parses the listenerKey to extract the Gateway and Listener name, then looks up the listener in the GateTree.
func (*ControllerStore) ResetCertificateUpdates ¶
func (b *ControllerStore) ResetCertificateUpdates()
func (*ControllerStore) ResetCrtListUpdates ¶
func (b *ControllerStore) ResetCrtListUpdates()
type CrtListUpdates ¶
type CrtListUpdates struct {
Created map[string]certificate.CrtListData
Updated map[string]certificate.CrtListData
Deleted map[string]certificate.CrtListData
}
type DefaultsCR ¶ added in v0.9.1
type DefaultsCR struct {
// K8sResource is the source resource.
K8sResource *v3.Defaults
// TreeStatus
TreeStatus TreeUpdate[DefaultsCR]
}
A DefaultsCR represents a Kubernetes Defaults CR
func NewDefaultsCR ¶ added in v0.9.1
func NewDefaultsCR(k8sObject *v3.Defaults) *DefaultsCR
NewDefaultsCR creates a new DefaultsCR for the GateTree.
func (*DefaultsCR) DeepCopy ¶ added in v0.9.1
func (s *DefaultsCR) DeepCopy() *DefaultsCR
DeepCopy creates a deep copy of the DefaultsCR.
func (*DefaultsCR) GetTreeStatus ¶ added in v0.9.1
func (s *DefaultsCR) GetTreeStatus() *TreeUpdate[DefaultsCR]
GetTreeStatus returns the TreeStatus of the DefaultsCR.
func (*DefaultsCR) SetAsDeleted ¶ added in v0.9.1
func (s *DefaultsCR) SetAsDeleted(logger *slog.Logger)
SetAsDeleted marks the Defaults CR as deleted in the GateTree.
func (*DefaultsCR) SetAsUpserted ¶ added in v0.9.1
func (s *DefaultsCR) SetAsUpserted(logger *slog.Logger, newK8sResource *v3.Defaults)
SetAsUpserted marks the Defaults CR as upserted in the GateTree.
func (*DefaultsCR) SetTreeStatus ¶ added in v0.9.1
func (s *DefaultsCR) SetTreeStatus(treeStatus TreeUpdate[DefaultsCR])
SetTreeStatus sets the TreeStatus of the DefaultsCR.
type DefaultsCRBuilder ¶ added in v0.9.1
type DefaultsCRBuilder struct {
*ControllerStore
}
DefaultsCRBuilder processes Defaults CR updates and maintains the Defaults node in the GateTree. Only the Defaults CR whose spec.name equals "haproxytech" is managed; CRs with any other spec.name are discarded with a warning log.
func NewDefaultsCRBuilder ¶ added in v0.9.1
func NewDefaultsCRBuilder(controllerStore *ControllerStore) *DefaultsCRBuilder
func (*DefaultsCRBuilder) CleanTreeUpdates ¶ added in v0.9.1
func (b *DefaultsCRBuilder) CleanTreeUpdates()
func (*DefaultsCRBuilder) ComputeTreeUpdates ¶ added in v0.9.1
func (b *DefaultsCRBuilder) ComputeTreeUpdates()
type GateBuilderImpl ¶
type GateBuilderImpl struct {
*ControllerStore
}
func NewGateBuilder ¶
func NewGateBuilder(params *ControllerStore) *GateBuilderImpl
func (*GateBuilderImpl) BuildStatus ¶
func (*GateBuilderImpl) BuildStatus()
type GateTree ¶
type GateTree struct {
// GatewayClasses holds the GatewayClasses resource that are accepted and ignored
GatewayClasses map[types.NamespacedName]*GatewayClass
Gateways map[types.NamespacedName]*Gateway
Secrets map[types.NamespacedName]*Secret
HTTPRoutes map[types.NamespacedName]*HTTPRoute
TLSRoutes map[types.NamespacedName]*TLSRoute
Services map[types.NamespacedName]*Service
VirtualListeners map[string]*VirtualListener // map[virtualListener.name()]VirtualListener
PreviousVirtualListeners map[string]*VirtualListener // map[virtualListener.name()]VirtualListener
Global *Global
Defaults *DefaultsCR
}
GateTree is a Graph-like representation of Gateway API resources.
func NewGateTree ¶
func NewGateTree() *GateTree
type Gateway ¶
type Gateway struct {
// K8sResource is the source resource.
K8sResource *gatewayv1.Gateway
// Conditions include Conditions for the Gateway.
// HugGate is a merge between the ParamsRef from GatewayClass and the one from Gateway
// If it is invalid at GatewayClass level, it is ignored and overridden by the one at Gateway level.
HugGate *v3.HugGate
// Final Conditions
Conditions generic.Conditions
// Listeners include the listeners of the Gateway.
Listeners map[string]*Listener // map[listenerName]
// TreeStatus
TreeStatus TreeUpdate[Gateway]
// Management Checks
CheckParamsRef CheckResult
CheckValidGatewayClass CheckResult
// Additional checks
CheckConflict CheckResult
// Valid shows whether the Gateway is valid.
Valid bool
}
Gateway represents the Gateway resource.
func NewGateway ¶
func (*Gateway) BuildConditions ¶
func (g *Gateway) BuildConditions()
func (*Gateway) GetCreationTimestamp ¶ added in v0.9.0
func (*Gateway) GetK8sResource ¶
func (*Gateway) GetName ¶ added in v0.9.0
GetName returns the name of the Gateway Kubernetes resource. If the K8sResource is nil (for example a DELETED Gateway), it returns an empty string.
func (*Gateway) GetTreeStatus ¶
func (g *Gateway) GetTreeStatus() *TreeUpdate[Gateway]
GetTreeStatus returns the TreeStatus of the Gateway.
func (*Gateway) SetAsDeleted ¶
func (*Gateway) SetAsManaged ¶
func (g *Gateway) SetAsManaged(logger *slog.Logger, cs ControllerStore)
func (*Gateway) SetAsUnmanaged ¶
func (g *Gateway) SetAsUnmanaged(logger *slog.Logger, cs ControllerStore)
func (*Gateway) SetAsUpserted ¶
func (*Gateway) SetTreeStatus ¶
func (g *Gateway) SetTreeStatus(treeStatus TreeUpdate[Gateway])
SetTreeStatus sets the TreeStatus of the Gateway.
type GatewayBuilderImpl ¶
type GatewayBuilderImpl struct {
*ControllerStore
// contains filtered or unexported fields
}
func (*GatewayBuilderImpl) CleanTreeUpdates ¶
func (b *GatewayBuilderImpl) CleanTreeUpdates()
func (*GatewayBuilderImpl) ComputeTreeUpdates ¶
func (b *GatewayBuilderImpl) ComputeTreeUpdates()
type GatewayBuilderParams ¶
type GatewayBuilderParams struct {
storage.CertificateStorage
*ControllerStore
}
type GatewayClass ¶
type GatewayClass struct {
// TreeStatus
TreeStatus TreeUpdate[GatewayClass]
// K8sResource is the source resource.
K8sResource *gatewayv1.GatewayClass
// HugGate is the linked HugGate from ParamsRef
HugGate *v3.HugGate
// Conditions include Conditions for the GatewayClass.
Conditions generic.Conditions
// CheckParamsRef shows whether the GatewayClass is valid as for ParamsRef
CheckParamsRef CheckResult
// Valid is true if the GatewayClass is Valid (versions + haproxy gate paramsRef)
Valid bool
// Managed is true if the GatewayClass is Managed (should be always true)
Managed bool
}
GatewayClass represents the GatewayClass resource.
func NewGatewayClass ¶
func NewGatewayClass(k8sObject *gatewayv1.GatewayClass) *GatewayClass
func (*GatewayClass) BuildConditions ¶
func (g *GatewayClass) BuildConditions(controllerStore ControllerStore)
func (*GatewayClass) DeepCopy ¶
func (g *GatewayClass) DeepCopy() *GatewayClass
func (*GatewayClass) GetCreationTimestamp ¶
func (g *GatewayClass) GetCreationTimestamp() metav1.Time
func (*GatewayClass) GetName ¶
func (g *GatewayClass) GetName() string
GetName returns the name of the GatewayClass Kubernetes resource. If the K8sResource is nil (for example a DELETED GatewayClass), it returns an empty string.
func (*GatewayClass) GetTreeStatus ¶
func (g *GatewayClass) GetTreeStatus() *TreeUpdate[GatewayClass]
GetTreeStatus returns the TreeStatus of the GatewayClass.
func (*GatewayClass) ResetChecks ¶
func (g *GatewayClass) ResetChecks()
func (*GatewayClass) SetAsDeleted ¶
func (g *GatewayClass) SetAsDeleted(logger *slog.Logger)
func (*GatewayClass) SetAsManaged ¶
func (g *GatewayClass) SetAsManaged(logger *slog.Logger, controllerStore ControllerStore)
func (*GatewayClass) SetAsUnmanaged ¶
func (g *GatewayClass) SetAsUnmanaged(logger *slog.Logger, controllerStore ControllerStore)
func (*GatewayClass) SetAsUpserted ¶
func (g *GatewayClass) SetAsUpserted(logger *slog.Logger, newK8sResource *gatewayv1.GatewayClass)
func (*GatewayClass) SetTreeStatus ¶
func (g *GatewayClass) SetTreeStatus(treeStatus TreeUpdate[GatewayClass])
SetTreeStatus sets the TreeStatus of the GatewayClass.
type GatewayClassBuilderImpl ¶
type GatewayClassBuilderImpl struct {
*ControllerStore
}
func (*GatewayClassBuilderImpl) CleanTreeUpdates ¶
func (b *GatewayClassBuilderImpl) CleanTreeUpdates()
func (*GatewayClassBuilderImpl) ComputeTreeUpdates ¶
func (b *GatewayClassBuilderImpl) ComputeTreeUpdates()
type GatewayClassBuilderParams ¶
type GatewayClassBuilderParams struct {
*ControllerStore
}
type Global ¶ added in v0.9.1
type Global struct {
// K8sResource is the source resource.
K8sResource *v3.Global
// TreeStatus
TreeStatus TreeUpdate[Global]
}
A Global represents a Kubernetes Global CR
func (*Global) GetTreeStatus ¶ added in v0.9.1
func (s *Global) GetTreeStatus() *TreeUpdate[Global]
GetTreeStatus returns the TreeStatus of the Global.
func (*Global) SetAsDeleted ¶ added in v0.9.1
SetAsDeleted marks the Global as deleted in the GateTree.
func (*Global) SetAsUpserted ¶ added in v0.9.1
SetAsUpserted marks the Global CR as upserted in the GateTree.
func (*Global) SetTreeStatus ¶ added in v0.9.1
func (s *Global) SetTreeStatus(treeStatus TreeUpdate[Global])
SetTreeStatus sets the TreeStatus of the Global.
type HTTPRoute ¶
type HTTPRoute struct {
// K8sResource is the source resource.
K8sResource *gatewayv1.HTTPRoute
// selected listener
Listeners utils.KeyMap[gatewayv1.ParentReference, []*Listener] // map[parentRef]
// Rules
Rules []*HTTPRouteRule
// Final Conditions
Conditions rc.RouteConditions
// TreeStatus
TreeStatus TreeUpdate[HTTPRoute]
ControllerName string
// Management Checks
// CheckParentRefs will only contains conditions for parents (Gateways) managed by us
CheckParentRefs CheckResultRoute
// Valid
Valid bool
}
A HTTPRoute represents a Kubernetes HTTPRoute
func (*HTTPRoute) BuildConditions ¶
func (r *HTTPRoute) BuildConditions()
func (*HTTPRoute) GetTreeStatus ¶
func (r *HTTPRoute) GetTreeStatus() *TreeUpdate[HTTPRoute]
GetTreeStatus returns the TreeStatus of the HTTPRoute.
func (*HTTPRoute) ResetChecks ¶
func (r *HTTPRoute) ResetChecks()
func (*HTTPRoute) SetAsDeleted ¶
SetAsDeleted marks the Secret as deleted in the GateTree.
func (*HTTPRoute) SetAsUpserted ¶
SetAsUpserted marks the HTTPRoute as upserted in the GateTree.
func (*HTTPRoute) SetTreeStatus ¶
func (r *HTTPRoute) SetTreeStatus(treeStatus TreeUpdate[HTTPRoute])
SetTreeStatus sets the TreeStatus of the HTTPRoute.
type HTTPRouteBuilderImpl ¶
type HTTPRouteBuilderImpl struct {
*ControllerStore
// contains filtered or unexported fields
}
func (*HTTPRouteBuilderImpl) CleanTreeUpdates ¶
func (b *HTTPRouteBuilderImpl) CleanTreeUpdates()
func (*HTTPRouteBuilderImpl) ComputeTreeUpdates ¶
func (b *HTTPRouteBuilderImpl) ComputeTreeUpdates()
func (*HTTPRouteBuilderImpl) SetAsManaged ¶
func (b *HTTPRouteBuilderImpl) SetAsManaged(route *HTTPRoute)
func (*HTTPRouteBuilderImpl) SetAsUnmanaged ¶
func (b *HTTPRouteBuilderImpl) SetAsUnmanaged(route *HTTPRoute)
type HTTPRouteBuilderParams ¶
type HTTPRouteBuilderParams struct {
storage.MapsStorageEx
*ControllerStore
RuntimeUpdate bool
}
type HTTPRouteRule ¶
type HTTPRouteRule struct {
K8sResource gatewayv1.HTTPRouteRule
// CheckBackendRef contains the result of the BackendRef checks for each BackendRef
CheckBackendRef utils.KeyMap[gatewayv1.BackendObjectReference, CheckResult]
Valid bool
}
type HugConfBuilderImpl ¶
type HugConfBuilderImpl struct {
*ControllerStore
// contains filtered or unexported fields
}
func NewHugConfBuilder ¶
func NewHugConfBuilder(params HugConfBuilderParams) *HugConfBuilderImpl
func (*HugConfBuilderImpl) Build ¶
func (b *HugConfBuilderImpl) Build()
func (*HugConfBuilderImpl) BuildStatus ¶
func (*HugConfBuilderImpl) BuildStatus()
type HugConfBuilderParams ¶
type HugConfBuilderParams struct {
*ControllerStore
LogCategoryFilterHandler *logging.CategoryFilterHandler
HugConfNsName types.NamespacedName
}
type HugGateParamsRefChecker ¶
type HugGateParamsRefChecker struct {
ParamRef *gatewayv1.ParametersReference
StoreHugGates map[types.NamespacedName]*v3.HugGate
}
func (*HugGateParamsRefChecker) CheckGateway ¶
func (c *HugGateParamsRefChecker) CheckGateway() (CheckResult, *v3.HugGate)
func (*HugGateParamsRefChecker) CheckGatewayClass ¶
func (c *HugGateParamsRefChecker) CheckGatewayClass() (CheckResult, *v3.HugGate)
type InstalledVersions ¶
type InstalledVersionsBuilderImpl ¶
type InstalledVersionsBuilderImpl struct {
*ControllerStore
}
func NewInstalledVersionsBuilder ¶
func NewInstalledVersionsBuilder(params *ControllerStore) *InstalledVersionsBuilderImpl
func (*InstalledVersionsBuilderImpl) Build ¶
func (b *InstalledVersionsBuilderImpl) Build()
type Listener ¶
type Listener struct {
// K8sResource is the source resource.
K8sResource gatewayv1.Listener
// Final Conditions
Conditions generic.Conditions
AttachedRoutes AttachedRoutes
// Owner is the gateway that this listener is connected to
Owner client.ObjectKey
// VirtualListenerName is the virtual listener name that this listener is attached to, identified by its port and protocol category
VirtualListenerName string
// Checks results
CheckRouteGroupKind CheckResult
CheckProtocol CheckResult
CheckSecret CheckResult
CheckConflict CheckResult
// AllowedRouteKinds is the list of allowed route kinds for this listener.
AllowedRouteKinds []gatewayv1.RouteGroupKind
// Valid indicates the listener is fully programmed (Accepted, no conflicts, all refs resolved).
Valid bool
// Accepted indicates the listener configuration is accepted (valid protocol, no conflicts).
// Routes can attach to an accepted listener even if refs are unresolved.
Accepted bool
}
func (*Listener) BuildConditions ¶
type ReferenceManager ¶
type ReferenceManager struct {
*ControllerStore
}
func NewReferenceManager ¶
func NewReferenceManager(controllerStore *ControllerStore) *ReferenceManager
func (*ReferenceManager) UpdateRefences ¶
func (rm *ReferenceManager) UpdateRefences()
type ReferencedObjects ¶
type ReferencedObjects struct {
// ReferencedSecrets includes the GatewayClasses that are references by Gateways Listeners
// Owners are Listeners
ReferencedSecrets references.ReferencedBy
PreviousReferencedSecrets references.ReferencedBy
}
func NewReferencedObjects ¶
func NewReferencedObjects(extractGVK utilsk8s.ExtractGVK) *ReferencedObjects
type RouteGroupKind ¶
type Secret ¶
type Secret struct {
// K8sResource is the source resource.
K8sResource *v1.Secret
// TreeStatus
TreeStatus TreeUpdate[Secret]
}
A Secret represents a Kubernetes Secret
func (*Secret) GetTreeStatus ¶
func (s *Secret) GetTreeStatus() *TreeUpdate[Secret]
GetTreeStatus returns the TreeStatus of the Secret.
func (*Secret) SetAsDeleted ¶
SetAsDeleted marks the Secret as deleted in the GateTree.
func (*Secret) SetAsManaged ¶
func (s *Secret) SetAsManaged(logger *slog.Logger, cs ControllerStore)
SetAsManaged moves the Secret to the managed GateTree.
func (*Secret) SetAsUpserted ¶
SetAsUpserted marks the Secret as upserted in the GateTree.
func (*Secret) SetTreeStatus ¶
func (s *Secret) SetTreeStatus(treeStatus TreeUpdate[Secret])
SetTreeStatus sets the TreeStatus of the Secret.
type SecretBuilderImpl ¶
type SecretBuilderImpl struct {
*ControllerStore
}
func (*SecretBuilderImpl) CleanTreeUpdates ¶
func (b *SecretBuilderImpl) CleanTreeUpdates()
func (*SecretBuilderImpl) ComputeTreeUpdates ¶
func (b *SecretBuilderImpl) ComputeTreeUpdates()
type Service ¶
type Service struct {
// K8sResource is the source resource.
K8sResource *v1.Service
// TreeStatus
TreeStatus TreeUpdate[Service]
}
A Service represents a Kubernetes Service
func NewService ¶
NewService creates a new Service for the GateTree.
func (*Service) GetTreeStatus ¶
func (s *Service) GetTreeStatus() *TreeUpdate[Service]
GetTreeStatus returns the TreeStatus of the Service.
func (*Service) SetAsDeleted ¶
SetAsDeleted marks the Service as deleted in the GateTree.
func (*Service) SetAsManaged ¶
func (s *Service) SetAsManaged(logger *slog.Logger, cs ControllerStore)
SetAsManaged moves the Service to the managed GateTree.
func (*Service) SetAsUpserted ¶
SetAsUpserted marks the Service as upserted in the GateTree.
func (*Service) SetTreeStatus ¶
func (s *Service) SetTreeStatus(treeStatus TreeUpdate[Service])
SetTreeStatus sets the TreeStatus of the Service.
type ServiceBuilderImpl ¶
type ServiceBuilderImpl struct {
*ControllerStore
}
func (*ServiceBuilderImpl) CleanTreeUpdates ¶
func (b *ServiceBuilderImpl) CleanTreeUpdates()
func (*ServiceBuilderImpl) ComputeTreeUpdates ¶
func (b *ServiceBuilderImpl) ComputeTreeUpdates()
type SupportedVersions ¶
type SupportedVersions []string
func (SupportedVersions) String ¶
func (s SupportedVersions) String() string
type TLSRoute ¶ added in v0.8.0
type TLSRoute struct {
// K8sResource is the source resource.
K8sResource *v1alpha2.TLSRoute
// selected listener
Listeners utils.KeyMap[gatewayv1.ParentReference, []*Listener] // map[parentRef]
// Rules
Rules []*TLSRouteRule
// Final Conditions
Conditions rc.RouteConditions
// TreeStatus
TreeStatus TreeUpdate[TLSRoute]
ControllerName string
// Management Checks
// CheckParentRefs will only contains conditions for parents (Gateways) managed by us
CheckParentRefs CheckResultRoute
// Valid
Valid bool
}
func NewTLSRoute ¶ added in v0.8.0
func (*TLSRoute) BuildConditions ¶ added in v0.8.0
func (r *TLSRoute) BuildConditions()
func (*TLSRoute) GetTreeStatus ¶ added in v0.8.0
func (r *TLSRoute) GetTreeStatus() *TreeUpdate[TLSRoute]
func (*TLSRoute) ResetChecks ¶ added in v0.8.0
func (r *TLSRoute) ResetChecks()
func (*TLSRoute) SetAsDeleted ¶ added in v0.8.0
func (*TLSRoute) SetAsUpserted ¶ added in v0.8.0
SetAsUpserted marks the HTTPRoute as upserted in the GateTree.
func (*TLSRoute) SetTreeStatus ¶ added in v0.8.0
func (r *TLSRoute) SetTreeStatus(treeStatus TreeUpdate[TLSRoute])
SetTreeStatus sets the TreeStatus of the HTTPRoute.
type TLSRouteBuilderImpl ¶ added in v0.8.0
type TLSRouteBuilderImpl struct {
*ControllerStore
// contains filtered or unexported fields
}
func (*TLSRouteBuilderImpl) CleanTreeUpdates ¶ added in v0.8.0
func (b *TLSRouteBuilderImpl) CleanTreeUpdates()
func (*TLSRouteBuilderImpl) ComputeTreeUpdates ¶ added in v0.8.0
func (b *TLSRouteBuilderImpl) ComputeTreeUpdates()
func (*TLSRouteBuilderImpl) SetAsManaged ¶ added in v0.8.0
func (b *TLSRouteBuilderImpl) SetAsManaged(tlsRoute *TLSRoute)
func (*TLSRouteBuilderImpl) SetAsUnmanaged ¶ added in v0.8.0
func (b *TLSRouteBuilderImpl) SetAsUnmanaged(tlsRoute *TLSRoute)
type TLSRouteBuilderParams ¶ added in v0.8.0
type TLSRouteBuilderParams struct {
storage.MapsStorageEx
*ControllerStore
}
type TLSRouteRule ¶ added in v0.8.0
type TLSRouteRule struct {
// CheckBackendRef contains the result of the BackendRef checks for each BackendRef
CheckBackendRef utils.KeyMap[gatewayv1.BackendObjectReference, CheckResult]
K8sResource v1alpha2.TLSRouteRule
Valid bool
}
type TreeObject ¶
type TreeObject[T TreeResource] interface { GetTreeStatus() *TreeUpdate[T] SetTreeStatus(TreeUpdate[T]) DeepCopy() *T }
type TreeResource ¶
type TreeResource interface {
GatewayClass | Gateway | Secret | HTTPRoute | Service | TLSRoute | Global | DefaultsCR
}
TreeResource is a constraint that permits any of the tree's resource types.
type TreeResourcePointer ¶
type TreeResourcePointer[T TreeResource] interface { *T TreeObject[T] }
TreeResourcePointer is a constraint for a pointer to a tree resource that implements the TreeObject interface.
type TreeUpdate ¶
type VirtualListener ¶ added in v0.9.0
type VirtualListener struct {
ProtocolCategory protocols.ProtocolCategory
Name string
// Status
Status store.Status
Listeners []*Listener
Port v1.PortNumber
}
func NewVirtualListener ¶ added in v0.9.0
func NewVirtualListener(protocolCategory protocols.ProtocolCategory, port v1.PortNumber) *VirtualListener
func (*VirtualListener) DeepCopy ¶ added in v0.9.0
func (vl *VirtualListener) DeepCopy() *VirtualListener
DeepCopy creates a deep copy of the VirtualListener using JSON marshalling.
func (*VirtualListener) Equal ¶ added in v0.9.0
func (vl *VirtualListener) Equal(other *VirtualListener) bool
Equal checks if two VirtualListeners are equal by comparing ProtocolCategory, Port, and each Listener's K8sResource.
func (*VirtualListener) SetAsCreated ¶ added in v0.9.0
func (vl *VirtualListener) SetAsCreated(logger *slog.Logger)
SetAsCreated marks the VirtualListener as created.
func (*VirtualListener) SetAsDeleted ¶ added in v0.9.0
func (vl *VirtualListener) SetAsDeleted(logger *slog.Logger)
SetAsDeleted marks the VirtualListener as deleted.
func (*VirtualListener) SetAsUpserted ¶ added in v0.9.0
func (vl *VirtualListener) SetAsUpserted(logger *slog.Logger)
SetAsUpserted marks the VirtualListener as upserted.
type VirtualListenerBuilderImpl ¶ added in v0.9.0
type VirtualListenerBuilderImpl struct {
*ControllerStore
}
func (*VirtualListenerBuilderImpl) CleanTreeUpdates ¶ added in v0.9.0
func (b *VirtualListenerBuilderImpl) CleanTreeUpdates()
func (*VirtualListenerBuilderImpl) ComputeTreeUpdates ¶ added in v0.9.0
func (b *VirtualListenerBuilderImpl) ComputeTreeUpdates()
Source Files
¶
- HTTPRoute-builder.go
- HTTPRoute.go
- TLSRoute-builder.go
- TLSRoute.go
- attached_routes.go
- certificate_builder.go
- controller_store.go
- defaults.go
- defaults_builder.go
- gate.go
- gateway.go
- gateway_builder.go
- gateway_listener.go
- gateway_listener_conflict.go
- gatewayclass.go
- gatewayclass_builder.go
- global.go
- hug_conf.go
- hug_conf_defaults.go
- hug_conf_global.go
- hug_conf_logs.go
- installed_versions.go
- maps.go
- references_manager.go
- route-rule.go
- secret.go
- secret_builder.go
- service.go
- service_builder.go
- tls-route-rule.go
- tree.go
- virtual_listener.go
- virtual_listener_builder.go