securitygroup

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudSecurityGroupImpl added in v0.6.0

type CloudSecurityGroupImpl struct{}

func (*CloudSecurityGroupImpl) CreateSecurityGroup added in v0.6.0

func (sg *CloudSecurityGroupImpl) CreateSecurityGroup(securityGroupIdentifier *cloudresource.CloudResource,
	membershipOnly bool) <-chan error

func (*CloudSecurityGroupImpl) DeleteSecurityGroup added in v0.6.0

func (sg *CloudSecurityGroupImpl) DeleteSecurityGroup(securityGroupIdentifier *cloudresource.CloudResource,
	membershipOnly bool) <-chan error

func (*CloudSecurityGroupImpl) GetSecurityGroupSyncChan added in v0.6.0

func (sg *CloudSecurityGroupImpl) GetSecurityGroupSyncChan() <-chan cloudresource.SynchronizationContent

func (*CloudSecurityGroupImpl) UpdateSecurityGroupMembers added in v0.6.0

func (sg *CloudSecurityGroupImpl) UpdateSecurityGroupMembers(securityGroupIdentifier *cloudresource.CloudResource,
	members []*cloudresource.CloudResource, membershipOnly bool) <-chan error

func (*CloudSecurityGroupImpl) UpdateSecurityGroupRules added in v0.6.0

func (sg *CloudSecurityGroupImpl) UpdateSecurityGroupRules(appliedToGroupIdentifier *cloudresource.CloudResource,
	addRules, rmRules []*cloudresource.CloudRule) <-chan error

type CloudSecurityGroupInterface added in v0.6.0

type CloudSecurityGroupInterface interface {
	// CreateSecurityGroup request to create SecurityGroup name.
	// membershipOnly is true if the SecurityGroup is used for membership tracking, not
	// applying ingress/egress rules.
	// Caller expects to wait on returned channel for status
	CreateSecurityGroup(name *cloudresource.CloudResource, membershipOnly bool) <-chan error

	// UpdateSecurityGroupRules updates SecurityGroup name's ingress/egress rules in entirety.
	// SecurityGroup name must already been created. SecurityGroups referred to in ingressRules and
	// egressRules must have been already created.
	UpdateSecurityGroupRules(name *cloudresource.CloudResource, addRules, rmRules []*cloudresource.CloudRule) <-chan error

	// UpdateSecurityGroupMembers updates SecurityGroup name with members.
	// SecurityGroup name must already have been created.
	// For appliedSecurityGroup, UpdateSecurityGroupMembers is called only if SG has
	// rules configured.
	UpdateSecurityGroupMembers(name *cloudresource.CloudResource, members []*cloudresource.CloudResource, membershipOnly bool) <-chan error

	// DeleteSecurityGroup deletes SecurityGroup name.
	// SecurityGroup name must already been created, is empty.
	DeleteSecurityGroup(name *cloudresource.CloudResource, membershipOnly bool) <-chan error

	// GetSecurityGroupSyncChan returns a channel that networkPolicy controller waits on to retrieve complete SGs
	// configured by cloud plug-in.
	// Usage patterns:
	// 1. Controller calls it at initialization to obtains the channel.
	// 2. Controller waits on channel returned in 1, and expects that when channel wakes up it return the entire SGs configured.
	// 3. Plug-in shall wake up the channel initially after sync up with the cloud; and then periodically.
	// 4. Controller, upon receive entire SGs set, proceed to reconcile between K8s configuration and cloud configuration.
	// This API ensures cloud plug-in stays stateless.
	// - Correct SGs accidentally changed by customers via cloud API/console directly.
	GetSecurityGroupSyncChan() <-chan cloudresource.SynchronizationContent
}

CloudSecurityGroupInterface declares interface to program cloud security groups.

var (
	// CloudSecurityGroup is global entry point to configure cloud specific security group.
	CloudSecurityGroup CloudSecurityGroupInterface
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL