@@ -215,39 +215,39 @@ func (a APIServerNetworkPolicyTarget) ApplyToCiliumEgressNetworkPolicy(
215215 return a .ApplyToCiliumIngressNetworkPolicy (ciliumPolicyPeer )
216216}
217217
218- type InClusterAPISeverNetworkPolicyTarget struct {}
218+ type InClusterAPIServerNetworkPolicyTarget struct {}
219219
220- func NewInClusterAPIServerNetworkPolicyTarget () InClusterAPISeverNetworkPolicyTarget {
221- return InClusterAPISeverNetworkPolicyTarget {}
220+ func NewInClusterAPIServerNetworkPolicyTarget () InClusterAPIServerNetworkPolicyTarget {
221+ return InClusterAPIServerNetworkPolicyTarget {}
222222}
223223
224224var (
225- _ IngressNetworkPolicyTarget = InClusterAPISeverNetworkPolicyTarget {}
226- _ EgressNetworkPolicyTarget = InClusterAPISeverNetworkPolicyTarget {}
225+ _ IngressNetworkPolicyTarget = InClusterAPIServerNetworkPolicyTarget {}
226+ _ EgressNetworkPolicyTarget = InClusterAPIServerNetworkPolicyTarget {}
227227)
228228
229- func (i InClusterAPISeverNetworkPolicyTarget ) ApplyToKubernetesIngressNetworkPolicy (
229+ func (i InClusterAPIServerNetworkPolicyTarget ) ApplyToKubernetesIngressNetworkPolicy (
230230 networkPolicyPeerApplyConfiguration * networkingv1ac.NetworkPolicyPeerApplyConfiguration ,
231231) * networkingv1ac.NetworkPolicyPeerApplyConfiguration {
232232 // In-cluster API server filtering is not supported in NetworkPolicy, so we allow traffic to anywhere.
233233 return NewCIDRNetworkPolicyTarget ("0.0.0.0/0" ).
234234 ApplyToKubernetesIngressNetworkPolicy (networkPolicyPeerApplyConfiguration )
235235}
236236
237- func (i InClusterAPISeverNetworkPolicyTarget ) ApplyToKubernetesEgressNetworkPolicy (
237+ func (i InClusterAPIServerNetworkPolicyTarget ) ApplyToKubernetesEgressNetworkPolicy (
238238 networkPolicyPeerApplyConfiguration * networkingv1ac.NetworkPolicyPeerApplyConfiguration ,
239239) * networkingv1ac.NetworkPolicyPeerApplyConfiguration {
240240 return i .ApplyToKubernetesIngressNetworkPolicy (networkPolicyPeerApplyConfiguration )
241241}
242242
243- func (i InClusterAPISeverNetworkPolicyTarget ) ApplyToCiliumIngressNetworkPolicy (
243+ func (i InClusterAPIServerNetworkPolicyTarget ) ApplyToCiliumIngressNetworkPolicy (
244244 ciliumPolicyPeer * CiliumPolicyPeer ,
245245) * CiliumPolicyPeer {
246246 ciliumPolicyPeer .Identities = append (ciliumPolicyPeer .Identities , api .EntityKubeAPIServer )
247247 return ciliumPolicyPeer
248248}
249249
250- func (i InClusterAPISeverNetworkPolicyTarget ) ApplyToCiliumEgressNetworkPolicy (
250+ func (i InClusterAPIServerNetworkPolicyTarget ) ApplyToCiliumEgressNetworkPolicy (
251251 ciliumPolicyPeer * CiliumPolicyPeer ,
252252) * CiliumPolicyPeer {
253253 return i .ApplyToCiliumIngressNetworkPolicy (ciliumPolicyPeer )
0 commit comments