controllercontext

package
v14.17.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func NewContext

func NewContext(ctx context.Context, c Context) context.Context

Types

type Context

type Context struct {
	// Client holds the client implementations used for several tenant cluster
	// specific actions.
	Client ContextClient

	// Spec holds the desired state we compute in a resource and then keep
	// inside the context to be used in a different resource.
	Spec ContextSpec

	// Status holds the data used to communicate between controller's
	// resources. It can be edited in place as Context is stored as
	// a pointer within context.Context. The content of the status should
	// reflect the current state.
	Status ContextStatus
}

func FromContext

func FromContext(ctx context.Context) (*Context, error)

type ContextClient

type ContextClient struct {
	ControlPlane  ContextClientControlPlane
	TenantCluster ContextClientTenantCluster
}

type ContextClientControlPlane

type ContextClientControlPlane struct {
	AWS aws.Clients
}

type ContextClientTenantCluster

type ContextClientTenantCluster struct {
	AWS aws.Clients
	K8s k8sclient.Interface
}

type ContextSpec

type ContextSpec struct {
	TenantCluster ContextSpecTenantCluster
}

type ContextSpecTenantCluster

type ContextSpecTenantCluster struct {
	TCCP ContextSpecTenantClusterTCCP
	TCNP ContextSpecTenantClusterTCNP
}

type ContextSpecTenantClusterTCCP

type ContextSpecTenantClusterTCCP struct {
	AvailabilityZones []ContextSpecTenantClusterTCCPAvailabilityZone
}

type ContextSpecTenantClusterTCCPAvailabilityZone

type ContextSpecTenantClusterTCCPAvailabilityZone struct {
	Name   string
	Subnet ContextSpecTenantClusterTCCPAvailabilityZoneSubnet
}

type ContextSpecTenantClusterTCCPAvailabilityZoneRouteTablePrivate

type ContextSpecTenantClusterTCCPAvailabilityZoneRouteTablePrivate struct {
	ID string
}

type ContextSpecTenantClusterTCCPAvailabilityZoneRouteTablePublic

type ContextSpecTenantClusterTCCPAvailabilityZoneRouteTablePublic struct {
	ID string
}

type ContextSpecTenantClusterTCCPAvailabilityZoneSubnetAWSCNI

type ContextSpecTenantClusterTCCPAvailabilityZoneSubnetAWSCNI struct {
	CIDR net.IPNet
	ID   string
}

type ContextSpecTenantClusterTCCPAvailabilityZoneSubnetPrivate

type ContextSpecTenantClusterTCCPAvailabilityZoneSubnetPrivate struct {
	CIDR net.IPNet
	ID   string
}

type ContextSpecTenantClusterTCCPAvailabilityZoneSubnetPublic

type ContextSpecTenantClusterTCCPAvailabilityZoneSubnetPublic struct {
	CIDR net.IPNet
	ID   string
}

type ContextSpecTenantClusterTCNP

type ContextSpecTenantClusterTCNP struct {
	AvailabilityZones []ContextSpecTenantClusterTCNPAvailabilityZone
	SecurityGroupIDs  []string
}

type ContextSpecTenantClusterTCNPAvailabilityZoneNATGateway

type ContextSpecTenantClusterTCNPAvailabilityZoneNATGateway struct {
	ID string
}

type ContextSpecTenantClusterTCNPAvailabilityZoneSubnet

type ContextSpecTenantClusterTCNPAvailabilityZoneSubnet struct {
	Private ContextSpecTenantClusterTCNPAvailabilityZoneSubnetPrivate
}

type ContextSpecTenantClusterTCNPAvailabilityZoneSubnetPrivate

type ContextSpecTenantClusterTCNPAvailabilityZoneSubnetPrivate struct {
	CIDR net.IPNet
}

type ContextStatus

type ContextStatus struct {
	ControlPlane  ContextStatusControlPlane
	TenantCluster ContextStatusTenantCluster
}

type ContextStatusControlPlane

type ContextStatusControlPlane struct {
	AWSAccountID string
	NATGateway   ContextStatusControlPlaneNATGateway
	RouteTables  []*ec2.RouteTable
	PeerRole     ContextStatusControlPlanePeerRole
	VPC          ContextStatusControlPlaneVPC
}

type ContextStatusControlPlaneNATGateway

type ContextStatusControlPlaneNATGateway struct {
	Addresses []*ec2.Address
}

type ContextStatusControlPlanePeerRole

type ContextStatusControlPlanePeerRole struct {
	ARN string
}

type ContextStatusControlPlaneVPC

type ContextStatusControlPlaneVPC struct {
	CIDR string
	ID   string
}

type ContextStatusTenantClusterASG

type ContextStatusTenantClusterASG struct {
	DesiredCapacity int
	MaxSize         int
	MinSize         int
	Name            string
}

func (ContextStatusTenantClusterASG) IsEmpty

func (a ContextStatusTenantClusterASG) IsEmpty() bool

type ContextStatusTenantClusterAWS

type ContextStatusTenantClusterAWS struct {
	AccountID string
	Region    string
}

type ContextStatusTenantClusterDNS

type ContextStatusTenantClusterDNS struct {
	APIPublicLoadBalancer     string
	HostedZoneID              string
	HostedZoneNameServers     string
	IngressPublicLoadBalancer string
	InternalHostedZoneID      string
}

type ContextStatusTenantClusterMasterInstance

type ContextStatusTenantClusterMasterInstance struct {
	EtcdVolumeSnapshotID string
	Type                 string
}

type ContextStatusTenantClusterS3Object

type ContextStatusTenantClusterS3Object struct {
	Uploaded bool
}

type ContextStatusTenantClusterTCCP

type ContextStatusTenantClusterTCCP struct {
	AvailabilityZones []ContextStatusTenantClusterTCCPAvailabilityZone
	IsTransitioning   bool
	NATGateways       []*ec2.NatGateway
	RouteTables       []*ec2.RouteTable
	SecurityGroups    []*ec2.SecurityGroup
	Subnets           []*ec2.Subnet
	VPC               ContextStatusTenantClusterTCCPVPC
}

type ContextStatusTenantClusterTCCPAvailabilityZone

type ContextStatusTenantClusterTCCPAvailabilityZone struct {
	Name   string
	Subnet ContextStatusTenantClusterTCCPAvailabilityZoneSubnet
}

type ContextStatusTenantClusterTCCPAvailabilityZoneSubnetAWSCNI

type ContextStatusTenantClusterTCCPAvailabilityZoneSubnetAWSCNI struct {
	CIDR net.IPNet
	ID   string
}

type ContextStatusTenantClusterTCCPAvailabilityZoneSubnetPrivate

type ContextStatusTenantClusterTCCPAvailabilityZoneSubnetPrivate struct {
	CIDR net.IPNet
	ID   string
}

type ContextStatusTenantClusterTCCPAvailabilityZoneSubnetPublic

type ContextStatusTenantClusterTCCPAvailabilityZoneSubnetPublic struct {
	CIDR net.IPNet
	ID   string
}

type ContextStatusTenantClusterTCCPN

type ContextStatusTenantClusterTCCPN struct {
	IsTransitioning bool
	InstanceType    string
	MasterReplicas  int
}

type ContextStatusTenantClusterTCCPVPC

type ContextStatusTenantClusterTCCPVPC struct {
	ID                  string
	PeeringConnectionID string
}

type ContextStatusTenantClusterTCNP

type ContextStatusTenantClusterTCNP struct {
	Instances        ContextStatusTenantClusterTCNPInstances
	SecurityGroupIDs []string
	WorkerInstance   ContextStatusTenantClusterTCNPWorkerInstance
}

type ContextStatusTenantClusterTCNPInstances

type ContextStatusTenantClusterTCNPInstances struct {
	InstanceTypes         []string
	NumberOfSpotInstances int
}

type ContextStatusTenantClusterTCNPWorkerInstance

type ContextStatusTenantClusterTCNPWorkerInstance struct {
	DockerVolumeSizeGB string
	Image              string
	Type               string
}

Jump to

Keyboard shortcuts

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