Documentation ¶
Index ¶
- type FakeFirewallRuleSyncer
- func (h *FakeFirewallRuleSyncer) DeleteFirewallRules() error
- func (h *FakeFirewallRuleSyncer) EnsureFirewallRule(lbName string, ports []ingressbe.ServicePort, igLinks map[string][]string, ...) error
- func (h *FakeFirewallRuleSyncer) RemoveFromClusters(lbName string, removeIGLinks map[string][]string) error
- type Syncer
- type SyncerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeFirewallRuleSyncer ¶
type FakeFirewallRuleSyncer struct {
// List of firewall rules that this has been asked to ensure.
EnsuredFirewallRules []fakeFirewallRule
}
FakeFirewallRuleSyncer is a fake implementation of SyncerInterface to be used in tests.
func (*FakeFirewallRuleSyncer) DeleteFirewallRules ¶
func (h *FakeFirewallRuleSyncer) DeleteFirewallRules() error
DeleteFirewallRules deletes the firewall rules that EnsureFirewallRule would have created. See the interface for more details.
func (*FakeFirewallRuleSyncer) EnsureFirewallRule ¶
func (h *FakeFirewallRuleSyncer) EnsureFirewallRule(lbName string, ports []ingressbe.ServicePort, igLinks map[string][]string, forceUpdate bool) error
EnsureFirewallRule ensures that the required firewall rules exist. See the interface for more details.
func (*FakeFirewallRuleSyncer) RemoveFromClusters ¶
func (h *FakeFirewallRuleSyncer) RemoveFromClusters(lbName string, removeIGLinks map[string][]string) error
RemoveFromClusters removes the clusters corresponding to the given instance groups from the firewall rule. See the interface for more details.
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer manages GCP firewall rules for multicluster GCP L7 load balancers.
func (*Syncer) DeleteFirewallRules ¶
DeleteFirewallRules deletes the firewall rules that EnsureFirewallRule would have created. See the interface for more details.
func (*Syncer) EnsureFirewallRule ¶
func (s *Syncer) EnsureFirewallRule(lbName string, ports []ingressbe.ServicePort, igLinks map[string][]string, forceUpdate bool) error
EnsureFirewallRule ensures that the required firewall rules exist for the given ports. Does nothing if they exist already, else creates new ones. See the interface for more details.
type SyncerInterface ¶
type SyncerInterface interface { // EnsureFirewallRule ensures that the required firewall rules exist. // If a firewall rule already exists and differs, it will not be updated unless forceUpdate is true. EnsureFirewallRule(lbName string, ports []ingressbe.ServicePort, igLinks map[string][]string, forceUpdate bool) error // DeleteFirewallRules deletes all firewall rules that would have been created by EnsureFirewallRule. DeleteFirewallRules() error // RemoveFromClusters removes the clusters corresponding to the given instance groups from the firewall rule. RemoveFromClusters(lbName string, removeIGLinks map[string][]string) error }
SyncerInterface is an interface to manage GCP firewall rules.
func NewFakeFirewallRuleSyncer ¶
func NewFakeFirewallRuleSyncer() SyncerInterface
NewFakeFirewallRuleSyncer returns a new instance of the fake syncer.
func NewFirewallRuleSyncer ¶
func NewFirewallRuleSyncer(namer *utilsnamer.Namer, fwp ingressfw.Firewall, ig instances.InstanceGetterInterface) SyncerInterface
NewFirewallRuleSyncer returns a new instance of the syncer.