v1.4.4 Latest Latest

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 0




View Source
const (
	DeploymentName     = "vpc-resource-local-controller"
	Namespace          = "kube-system"
	LeaderLeaseMapName = "cp-vpc-resource-controller"

	PodLabelKey = "app"
	PodLabelVal = "vpc-resource-controller"

	ClusterRoleName = "vpc-resource-controller-role"


This section is empty.


func ForcefullyKillControllerPods

func ForcefullyKillControllerPods(ctx context.Context, manager Manager, podManager pod.Manager) string

func GetNewPodWithLeaderLease

func GetNewPodWithLeaderLease(ctx context.Context, manager Manager) string

func PatchClusterRole

func PatchClusterRole(rbac rbac.Manager, resourceName string, verbs []string)

PatchClusterRole patches the cluster Role with a given set of verbs and stores the existing state in variable, so the original state can be later recovered

func RestartController

func RestartController(ctx context.Context, manager Manager, depManager deployment.Manager) string

func RevertClusterRoleChanges

func RevertClusterRoleChanges(rbac rbac.Manager)

RevertClusterRoleChanges reverts the RBAC cluster role to the older known state

func ScaleControllerDeployment

func ScaleControllerDeployment(ctx context.Context, deploymentManager deployment.Manager, replica int)

func VerifyLeaseHolderIsSame

func VerifyLeaseHolderIsSame(ctx context.Context, manager Manager,
	previousLeaseHolder string)


type LeaderLease

type LeaderLease struct {
	HolderIdentity string

type Manager

type Manager interface {
	WaitTillControllerHasLeaderLease(ctx context.Context) (string, error)

func NewManager

func NewManager(k8sClient client.Client) Manager

Jump to

Keyboard shortcuts

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