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.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterStore ¶
type ClusterStore struct {
GatewayClasses map[types.NamespacedName]*gatewayv1.GatewayClass
Gateways map[types.NamespacedName]*gatewayv1.Gateway
HTTPRoutes map[types.NamespacedName]*gatewayv1.HTTPRoute
TLSRoutes map[types.NamespacedName]*gatewayv1alpha2.TLSRoute
Services map[types.NamespacedName]*v1.Service
Namespaces map[types.NamespacedName]*v1.Namespace
Secrets map[types.NamespacedName]*v1.Secret
ConfigMaps map[types.NamespacedName]*v1.ConfigMap
GatewayAPICRDs map[types.NamespacedName]*metav1.PartialObjectMetadata
HugGates map[types.NamespacedName]*v3.HugGate
BackendCRs map[types.NamespacedName]*v3.Backend
GlobalCRs map[types.NamespacedName]*v3.Global
DefaultsCRs map[types.NamespacedName]*v3.Defaults
HugConfs map[types.NamespacedName]*v3.HugConf
EndpointSlices map[types.NamespacedName]*discoveryV1.EndpointSlice
Updates ClusterUpdates
}
ClusterStore includes cluster resources necessary to build the Tree.
type ClusterStoreUpdater ¶
type ClusterStoreUpdater interface {
Upsert(obj client.Object)
Delete(obj client.Object, nsname types.NamespacedName)
ResetUpdates()
}
ClusterStoreUpdater updates the cluster store.
func NewClusterStoreUpdaterImpl ¶
func NewClusterStoreUpdaterImpl( clusterStore *ClusterStore, extractGVK utilsk8s.ExtractGVK, logger *slog.Logger, ) ClusterStoreUpdater
type ClusterStoreUpdaterImpl ¶
type ClusterStoreUpdaterImpl struct {
// contains filtered or unexported fields
}
func (*ClusterStoreUpdaterImpl) Delete ¶
func (cs *ClusterStoreUpdaterImpl) Delete(obj client.Object, nsname types.NamespacedName)
func (*ClusterStoreUpdaterImpl) ResetUpdates ¶
func (cs *ClusterStoreUpdaterImpl) ResetUpdates()
func (*ClusterStoreUpdaterImpl) Upsert ¶
func (cs *ClusterStoreUpdaterImpl) Upsert(obj client.Object)
type ClusterUpdates ¶
type ClusterUpdates struct {
GatewayClasses map[types.NamespacedName]Update[*gatewayv1.GatewayClass]
Gateways map[types.NamespacedName]Update[*gatewayv1.Gateway]
HTTPRoutes map[types.NamespacedName]Update[*gatewayv1.HTTPRoute]
TLSRoutes map[types.NamespacedName]Update[*gatewayv1alpha2.TLSRoute]
Services map[types.NamespacedName]Update[*v1.Service]
Namespaces map[types.NamespacedName]Update[*v1.Namespace]
Secrets map[types.NamespacedName]Update[*v1.Secret]
ConfigMaps map[types.NamespacedName]Update[*v1.ConfigMap]
GatewayAPICRDs map[types.NamespacedName]Update[*metav1.PartialObjectMetadata]
HugGates map[types.NamespacedName]Update[*v3.HugGate]
BackendCRs map[types.NamespacedName]Update[*v3.Backend]
GlobalCRs map[types.NamespacedName]Update[*v3.Global]
DefaultsCRs map[types.NamespacedName]Update[*v3.Defaults]
HugConfs map[types.NamespacedName]Update[*v3.HugConf]
EndpointSlices map[types.NamespacedName]Update[*discoveryV1.EndpointSlice]
}
ClusterUpdated contains the updates that happened to cluster objects during a sync cycle
func NewClusterUpdates ¶
func NewClusterUpdates() ClusterUpdates
type ObjectStoreUpdater ¶
type ObjectStoreUpdater interface {
// contains filtered or unexported methods
}
ObjectStoreUpdater updates the cluster state.
type Update ¶
type Update[T client.Object] struct { // OldObject is the previous version of the object before any update // The first time we receive an update, we keep the object as it is // This is useful to compare the previous version with the current version OldObject T // NewObject is the new version of the object after all updated, the latest value NewObject T Status Status // Indirect is set to true when the update is not direct from a K8s object but // from a linked K8s object update // For example a GatewayClass referencing a HugGate and the HugGate is updated Indirect bool }