Documentation
¶
Index ¶
- Constants
- Variables
- func CleanupKubernetesLoadbalancers(ctx context.Context, log logr.Logger, client openstackclient.Loadbalancing, ...) error
- func CleanupKubernetesRoutes(ctx context.Context, client openstackclient.Networking, ...) error
- func InjectConfig(config *stackitv1alpha1.Networks, snaConfig *SNAConfig)
- func IsSNAShoot(labels map[string]string) bool
- func PatchProviderStatusAndState(ctx context.Context, runtimeClient client.Client, ...) error
- func WorkersCIDR(config *stackitv1alpha1.InfrastructureConfig) string
- type SNAConfig
Constants ¶
const (
// LabelAreaID is the label key used to identify Shoots that are SNA-enabled.
LabelAreaID = "stackit.cloud/area-id"
)
Variables ¶
var StatusTypeMeta = metav1.TypeMeta{ APIVersion: stackitv1alpha1.SchemeGroupVersion.String(), Kind: "InfrastructureStatus", }
StatusTypeMeta is the TypeMeta of the InfrastructureStatus
Functions ¶
func CleanupKubernetesLoadbalancers ¶
func CleanupKubernetesLoadbalancers(ctx context.Context, log logr.Logger, client openstackclient.Loadbalancing, subnetID, clusterName string) error
CleanupKubernetesLoadbalancers cleans loadbalancers that could prevent shoot deletion from proceeding. Particularly it tries to prevent orphan ports from blocking subnet deletion. It filters for LBs that bear the "kube_service" prefix along with the cluster name. Note that this deletion may still leave some leftover resources like the floating IPs. This is intentional because the users may want to preserve them but without the k8s service object we cannot decide that - therefore the floating IPs will be untouched.
func CleanupKubernetesRoutes ¶
func CleanupKubernetesRoutes(ctx context.Context, client openstackclient.Networking, routerID, workers string) error
CleanupKubernetesRoutes deletes all routes from the router which have a nextHop in the subnet.
func InjectConfig ¶
func InjectConfig(config *stackitv1alpha1.Networks, snaConfig *SNAConfig)
func IsSNAShoot ¶
isSNAShoot determines if a Shoot is in fact SNA-enabled based on its labels. For this to be true, the areaID label value must be non-empty.
func PatchProviderStatusAndState ¶
func PatchProviderStatusAndState( ctx context.Context, runtimeClient client.Client, infra *extensionsv1alpha1.Infrastructure, status *stackitv1alpha1.InfrastructureStatus, nodesCIDR *string, state *runtime.RawExtension, ) error
PatchProviderStatusAndState patches the infrastructure status with the given provider specific status and state.
func WorkersCIDR ¶
func WorkersCIDR(config *stackitv1alpha1.InfrastructureConfig) string
WorkersCIDR determines the Workers CIDR from the given InfrastructureConfig.
Types ¶
type SNAConfig ¶
SNAConfig contains relevant values for SNA clusters that can be determined using the provided Network ID.