Documentation
¶
Index ¶
- type ExistingPolicy
- type IngPolicy
- type IngPool
- type OpenStack
- func (os *OpenStack) EnsureFloatingIP(ctx context.Context, needDelete bool, portID string, existingfloatingIP string, ...) (string, error)
- func (os *OpenStack) EnsureListener(ctx context.Context, name string, lbID string, secretRefs []string, ...) (*listeners.Listener, error)
- func (os *OpenStack) EnsureLoadBalancer(ctx context.Context, name string, subnetID string, ingNamespace string, ...) (*loadbalancers.LoadBalancer, error)
- func (os *OpenStack) EnsurePoolMembers(ctx context.Context, deleted bool, poolName string, lbID string, ...) (*string, error)
- func (os *OpenStack) EnsurePortSecurityGroup(ctx context.Context, needDelete bool, sgID string, nodes []*v1.Node) error
- func (os *OpenStack) EnsureSecurityGroup(ctx context.Context, needDelete bool, name string, description string, ...) (string, error)
- func (os *OpenStack) EnsureSecurityGroupRules(ctx context.Context, sgID string, sourceIP string, dstPorts []int) error
- func (os *OpenStack) GetSecurityGroups(ctx context.Context, listOpts groups.ListOpts) ([]groups.SecGroup, error)
- func (os *OpenStack) GetSubnet(ctx context.Context, subnetID string) (*subnets.Subnet, error)
- func (os *OpenStack) UpdateLoadBalancerDescription(ctx context.Context, lbID string, newDescription string) error
- func (os *OpenStack) UpdateLoadbalancerMembers(ctx context.Context, lbID string, nodes []*apiv1.Node) error
- type ResourceTracker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExistingPolicy ¶ added in v1.19.4
type ExistingPolicy struct {
Policy l7policies.L7Policy
Rules []l7policies.Rule
}
type IngPolicy ¶ added in v1.19.4
type IngPolicy struct {
RedirectPoolName string
Opts l7policies.CreateOpts
RulesOpts []l7policies.CreateRuleOpts
}
type IngPool ¶ added in v1.19.4
type IngPool struct {
Name string
Opts pools.CreateOptsBuilder
PoolMembers []pools.BatchUpdateMemberOpts
}
type OpenStack ¶
type OpenStack struct {
Octavia *gophercloud.ServiceClient
Barbican *gophercloud.ServiceClient
// contains filtered or unexported fields
}
OpenStack is an implementation of cloud provider Interface for OpenStack.
func NewOpenStack ¶
NewOpenStack gets openstack struct
func (*OpenStack) EnsureFloatingIP ¶
func (os *OpenStack) EnsureFloatingIP(ctx context.Context, needDelete bool, portID string, existingfloatingIP string, floatingIPNetwork string, description string) (string, error)
EnsureFloatingIP makes sure a floating IP is allocated for the port
func (*OpenStack) EnsureListener ¶
func (os *OpenStack) EnsureListener(ctx context.Context, name string, lbID string, secretRefs []string, listenerAllowedCIDRs []string, timeoutClientData, timeoutMemberData, timeoutTCPInspect, timeoutMemberConnect *int) (*listeners.Listener, error)
EnsureListener creates a loadbalancer listener in octavia if it does not exist, wait for the loadbalancer to be ACTIVE.
func (*OpenStack) EnsureLoadBalancer ¶
func (os *OpenStack) EnsureLoadBalancer(ctx context.Context, name string, subnetID string, ingNamespace string, ingName string, clusterName string, flavorId string) (*loadbalancers.LoadBalancer, error)
EnsureLoadBalancer creates a loadbalancer in octavia if it does not exist, wait for the loadbalancer to be ACTIVE.
func (*OpenStack) EnsurePoolMembers ¶
func (os *OpenStack) EnsurePoolMembers(ctx context.Context, deleted bool, poolName string, lbID string, listenerID string, nodePort *int, nodes []*apiv1.Node) (*string, error)
EnsurePoolMembers ensure the pool and its members exist if deleted flag is not set, delete the pool and all its members otherwise.
func (*OpenStack) EnsurePortSecurityGroup ¶ added in v1.14.0
func (os *OpenStack) EnsurePortSecurityGroup(ctx context.Context, needDelete bool, sgID string, nodes []*v1.Node) error
EnsurePortSecurityGroup ensures the security group is attached to all the node ports or detached from all the ports according to needDelete param.
func (*OpenStack) EnsureSecurityGroup ¶ added in v1.14.0
func (os *OpenStack) EnsureSecurityGroup(ctx context.Context, needDelete bool, name string, description string, tags []string) (string, error)
EnsureSecurityGroup make sure the security group with given tags exists or not according to need_delete param. Make sure the EnsurePortSecurityGroup function is called before EnsureSecurityGroup if you want to delete the security group.
func (*OpenStack) EnsureSecurityGroupRules ¶ added in v1.14.0
func (os *OpenStack) EnsureSecurityGroupRules(ctx context.Context, sgID string, sourceIP string, dstPorts []int) error
EnsureSecurityGroupRules ensures the only dstPorts are allowed in the given security group.
func (*OpenStack) GetSecurityGroups ¶ added in v1.14.0
func (os *OpenStack) GetSecurityGroups(ctx context.Context, listOpts groups.ListOpts) ([]groups.SecGroup, error)
GetSecurityGroups gets all the filtered security groups.
type ResourceTracker ¶ added in v1.19.4
type ResourceTracker struct {
// contains filtered or unexported fields
}
ResourceTracker tracks the resources created for Ingress.
func NewResourceTracker ¶ added in v1.19.4
func NewResourceTracker(ingressName string, client *gophercloud.ServiceClient, lbID string, listenerID string, newPools []IngPool, newPolicies []IngPolicy, oldPools []pools.Pool, oldPolicies []ExistingPolicy) *ResourceTracker
func (*ResourceTracker) CleanupResources ¶ added in v1.19.4
func (rt *ResourceTracker) CleanupResources(ctx context.Context) error
func (*ResourceTracker) CreateResources ¶ added in v1.19.4
func (rt *ResourceTracker) CreateResources(ctx context.Context) error
createResources only creates resources when necessary.