Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/estafette/estafette-gke-preemptible-killer
/ functions
Functions
64 in github.com/estafette/estafette-gke-preemptible-killer
⨍
Functions
64
◇
Types & classes
8
↓ 8 callers
Method
mergeTimespans
mergeTimespans merges time intervals.
whitelist.go:128
↓ 4 callers
Function
ApplyJitter
ApplyJitter return a random number
helpers.go:12
↓ 4 callers
Function
getDesiredNodeState
getDesiredNodeState define the state of the node, update node annotations if not present
main.go:213
↓ 4 callers
Method
initialize
initializeWhitelistHours initializes data structures by taking command line arguments into account.
whitelist.go:59
↓ 4 callers
Method
parseArguments
()
whitelist.go:64
↓ 4 callers
Method
updateWhitelistSecondCount
updateWhitelistSecondCount adds the difference between two times to an accumulator.
whitelist.go:182
↓ 3 callers
Method
GetNode
GetNode return the node object from given name
kubernetes_client.go:81
↓ 3 callers
Method
SetNodeAnnotation
(ctx context.Context, nodeName string, key string, value string)
kubernetes_client.go:28
↓ 3 callers
Function
filterOutPodByOwnerReferenceKind
filterOutPodByOwnerReferenceKind filter out a list of pods by its owner references kind
kubernetes_client.go:140
↓ 3 callers
Method
processHours
processHours parses time stamps and passes them to mergeTimespans(), direction can be "+" or "-".
whitelist.go:141
↓ 2 callers
Method
DeleteNode
(string)
gcloud.go:20
↓ 2 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
kubernetes_client_mock.go:33
↓ 2 callers
Function
NewMockKubernetesClient
NewMockKubernetesClient creates a new mock instance
kubernetes_client_mock.go:26
↓ 2 callers
Method
evictPods
(ctx context.Context, pods []v1.Pod, stop <-chan bool)
kubernetes_client.go:367
↓ 2 callers
Function
filterOutPodByNode
filterOutPodByNode filters out a list of pods by its node
kubernetes_client.go:153
↓ 2 callers
Function
getCurrentNodeState
getCurrentNodeState return the state of the node by reading its metadata annotations
main.go:201
↓ 1 callers
Method
DrainKubeDNSFromNode
(ctx context.Context, nodeName string, drainTimeout int)
kubernetes_client.go:23
↓ 1 callers
Method
DrainNode
(ctx context.Context, nodeName string, drainTimeout int)
kubernetes_client.go:22
↓ 1 callers
Method
GetPreemptibleNodes
(ctx context.Context, filters map[string]string)
kubernetes_client.go:26
↓ 1 callers
Method
GetProjectIdAndZoneFromNode
(ctx context.Context, nodeName string)
kubernetes_client.go:27
↓ 1 callers
Function
NewGCloudClient
NewGCloudClient return a GCloud client
gcloud.go:24
↓ 1 callers
Function
NewKubernetesClient
NewKubernetesClient return a Kubernetes client
kubernetes_client.go:33
↓ 1 callers
Method
SetUnschedulableState
(ctx context.Context, nodeName string, unschedulable bool)
kubernetes_client.go:29
↓ 1 callers
Method
evictPod
(ctx context.Context, pod v1.Pod, stop <-chan bool)
kubernetes_client.go:416
↓ 1 callers
Method
getExpiryDate
getExpiryDate calculates the expiry date of a node.
whitelist.go:79
↓ 1 callers
Function
processNode
processNode returns the time to delete a node after n minutes
main.go:259
Method
DeleteNode
(ctx context.Context, nodeName string)
kubernetes_client.go:25
Method
DeleteNode
(ctx context.Context, nodeName string)
kubernetes_client.go:90
Method
DeleteNode
DeleteNode mocks base method
kubernetes_client_mock.go:81
Method
DeleteNode
DeleteNode indicates an expected call of DeleteNode
kubernetes_client_mock.go:89
Method
DeleteNode
DeleteNode delete a GCloud instance from a given node name
gcloud.go:50
Method
DrainKubeDNSFromNode
DrainKubeDNSFromNode deletes any kube-dns pods running on the node
kubernetes_client.go:266
Method
DrainKubeDNSFromNode
DrainKubeDNSFromNode mocks base method
kubernetes_client_mock.go:52
Method
DrainKubeDNSFromNode
DrainKubeDNSFromNode indicates an expected call of DrainKubeDNSFromNode
kubernetes_client_mock.go:60
Method
DrainNode
DrainNode delete every pods from a given node and wait that all pods are removed before it succeed it also make sure we don't select DaemonSet because
kubernetes_client.go:165
Method
DrainNode
DrainNode mocks base method
kubernetes_client_mock.go:38
Method
DrainNode
DrainNode indicates an expected call of DrainNode
kubernetes_client_mock.go:46
Method
GetNode
(ctx context.Context, nodeName string)
kubernetes_client.go:24
Method
GetNode
GetNode mocks base method
kubernetes_client_mock.go:66
Method
GetNode
GetNode indicates an expected call of GetNode
kubernetes_client_mock.go:75
Method
GetPreemptibleNodes
GetPreemptibleNodes return a list of preemptible node
kubernetes_client.go:60
Method
GetPreemptibleNodes
GetPreemptibleNodes mocks base method
kubernetes_client_mock.go:95
Method
GetPreemptibleNodes
GetPreemptibleNodes indicates an expected call of GetPreemptibleNodes
kubernetes_client_mock.go:104
Method
GetProjectIdAndZoneFromNode
GetProjectIdAndZoneFromNode returns project id and zone from given node name by getting informations from node spec provider id
kubernetes_client.go:45
Method
GetProjectIdAndZoneFromNode
GetProjectIdAndZoneFromNode mocks base method
kubernetes_client_mock.go:110
Method
GetProjectIdAndZoneFromNode
GetProjectIdAndZoneFromNode indicates an expected call of GetProjectIdAndZoneFromNode
kubernetes_client_mock.go:120
Method
SetNodeAnnotation
SetNodeAnnotation add an annotation (key/value) to a node from a given node name As the nodes are constantly being updated, the k8s client doesn't sup
kubernetes_client.go:102
Method
SetNodeAnnotation
SetNodeAnnotation mocks base method
kubernetes_client_mock.go:126
Method
SetNodeAnnotation
SetNodeAnnotation indicates an expected call of SetNodeAnnotation
kubernetes_client_mock.go:134
Method
SetUnschedulableState
SetUnschedulableState set the unschedulable state of a given node name
kubernetes_client.go:121
Method
SetUnschedulableState
SetUnschedulableState mocks base method
kubernetes_client_mock.go:140
Method
SetUnschedulableState
SetUnschedulableState indicates an expected call of SetUnschedulableState
kubernetes_client_mock.go:148
Function
TestApplyJitter
(t *testing.T)
helpers_test.go:8
Function
TestFilterOutPodByOwnerReferenceKind
(t *testing.T)
kubernetes_client_test.go:10
Function
TestGetCurrentNodeState
(t *testing.T)
main_test.go:15
Function
TestGetDesiredNodeState_BetweenTwelveAndTwentyFour
(t *testing.T)
main_test.go:34
Function
TestGetDesiredNodeState_NotBeforeNow
(t *testing.T)
main_test.go:75
Function
TestMergeTimespans
(t *testing.T)
whitelist_test.go:35
Function
TestProcessHours
(t *testing.T)
whitelist_test.go:88
Function
TestUpdateWhitelistSecondCount
(t *testing.T)
whitelist_test.go:101
Function
init
()
whitelist_test.go:16
Function
init
()
whitelist.go:27
Function
init
()
main.go:88
Function
main
()
main.go:93