Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aws/zone-aware-controllers-for-k8s
/ functions
Functions
188 in github.com/aws/zone-aware-controllers-for-k8s
⨍
Functions
188
◇
Types & classes
24
↓ 38 callers
Function
NamespaceFromContext
(ctx context.Context)
e2e/env.go:167
↓ 19 callers
Function
createResources
(label string, replicas int, maxUnavailable int, zones []string)
controllers/zau_controller_test.go:576
↓ 18 callers
Method
updateStatefulSet
(ctx context.Context, zau *opsv1.ZoneAwareUpdate, sts *apps.StatefulSet)
controllers/zau_controller.go:113
↓ 11 callers
Method
GetZdb
(name string)
pkg/test/test_utils.go:64
↓ 11 callers
Function
zauNameFromContext
(ctx context.Context)
e2e/zau/env_test.go:98
↓ 10 callers
Function
IsTerminating
(pod *v1.Pod)
pkg/utils/utils.go:28
↓ 9 callers
Method
DeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
api/v1/zz_generated.deepcopy.go:34
↓ 9 callers
Method
UpdatePodStatus
(pod *v1.Pod, phase v1.PodPhase, condition v1.PodConditionType)
pkg/test/test_utils.go:151
↓ 8 callers
Method
CreatePod
(name string, zone string, label string, phase v1.PodPhase, condition v1.PodConditionType)
pkg/test/test_utils.go:76
↓ 8 callers
Method
CreateStatefulSet
(replicas int32, label string)
pkg/test/test_utils.go:230
↓ 8 callers
Method
GetPod
(podName string)
pkg/test/test_utils.go:184
↓ 8 callers
Method
UpdatePod
(pod *v1.Pod)
pkg/test/test_utils.go:171
↓ 7 callers
Function
evict
(pod *v1.Pod, dryRun bool)
webhooks/eviction_webhook_test.go:104
↓ 7 callers
Function
podName
(label string, num int)
controllers/zdb_controller_test.go:173
↓ 6 callers
Function
createZdb
(label string, disruptionsAllowed map[string]int32, dryRun bool)
webhooks/eviction_webhook_test.go:98
↓ 5 callers
Method
CreateStatefulSetPod
(name string, zone string, phase v1.PodPhase, label string, ss *apps.StatefulSet)
pkg/test/test_utils.go:121
↓ 5 callers
Method
CreateZdb
(maxUnavailable intstr.IntOrString, dryRun bool, label string)
pkg/test/test_utils.go:37
↓ 5 callers
Function
IsPodReady
Methods below were copied/adapted from k8s directly because k8s.io/kubernetes is not intended to be consumed as a module: https://github.com/kubernete
pkg/utils/utils.go:39
↓ 5 callers
Function
assertContainDeletions
(pods []*v1.Pod, expectedTerminated []int)
controllers/zau_controller_test.go:624
↓ 5 callers
Function
statefulSetNameFromContext
(ctx context.Context)
e2e/zau/env_test.go:86
↓ 5 callers
Method
testLabels
(value string)
pkg/test/test_utils.go:33
↓ 5 callers
Function
triggerUpgrade
triggerUpgrade adds a unique label to a statefulset under test so that pods being upgrading
e2e/zau/zau_test.go:347
↓ 5 callers
Method
updateZauStatus
(ctx context.Context, zau *opsv1.ZoneAwareUpdate, sts *apps.StatefulSet, step int32, deletedPods int32, oldPo
controllers/zau_controller.go:262
↓ 5 callers
Function
upgradeToFinish
upgradeToFinish can be used with wait.For to poll until all pods have been updated to
e2e/zau/wait_test.go:20
↓ 5 callers
Function
zauToDeleteReplicas
zauToDeleteReplicas can be used with wait.For to poll until the zau has started deleting StatefulSet replicas
e2e/zau/wait_test.go:35
↓ 4 callers
Function
IsRunningAndReady
(pod *v1.Pod)
pkg/utils/utils.go:24
↓ 4 callers
Function
NewCache
()
pkg/podzone/cache.go:18
↓ 4 callers
Method
UpdateZauStep
(zau *opsv1.ZoneAwareUpdate, step int32, updateRevision string)
pkg/test/test_utils.go:286
↓ 4 callers
Function
ZonesFromContext
ZonesFromContext returns a list of all unique availability zones in the cluster
e2e/env.go:176
↓ 4 callers
Function
expectLastPodInFirstZoneToBeDeleted
(zau *opsv1.ZoneAwareUpdate, pods []*v1.Pod)
controllers/zau_controller_test.go:565
↓ 4 callers
Function
expectNoDeletions
(zau *opsv1.ZoneAwareUpdate, pods []*v1.Pod)
controllers/zau_controller_test.go:558
↓ 4 callers
Method
getPodZone
(ctx context.Context, pod *v1.Pod)
pkg/podzone/helper.go:47
↓ 3 callers
Method
CreateSimplePod
(name string, node *v1.Node)
pkg/test/test_utils.go:96
↓ 3 callers
Method
CreateZau
(statefulset string, maxUnavailable intstr.IntOrString, label string)
pkg/test/test_utils.go:267
↓ 3 callers
Method
DescribeAlarms
(ctx context.Context, params *cloudwatch.DescribeAlarmsInput, optFns ...func(*cloudwatch.Options))
pkg/utils/alarm_status_provider.go:16
↓ 3 callers
Function
DisruptZones
DisruptZones will put a single pod into an unhealthy state in each specified zone and wait until the pods are not ready
e2e/faults.go:25
↓ 3 callers
Method
GetOrCreateNode
(podName string, zone string)
pkg/test/test_utils.go:210
↓ 3 callers
Method
GetZonePodsMap
(ctx context.Context, pods []*v1.Pod)
pkg/podzone/helper.go:21
↓ 3 callers
Method
SetupWithManager
SetupWithManager sets up the controller with the Manager.
controllers/zau_controller.go:388
↓ 3 callers
Function
chooseString
chooseString returns a random string from the given list
e2e/zdb/zdb_test.go:140
↓ 3 callers
Function
compositeAlarmState
compositeAlarmState can be used with wait.For to poll until a composite alarm with the given name enters the given state
e2e/zau/wait_test.go:47
↓ 3 callers
Function
deployImage
deployImage will upgrade the StatefulSet pods to run the given image
e2e/zau/faults_test.go:36
↓ 3 callers
Method
findZauForStatefulSet
(obj client.Object)
controllers/zau_controller.go:442
↓ 3 callers
Function
percentOfReplicasUpgraded
percentOfReplicasUpgraded returns the percentage of replicas in a statefulset that are deployed using the updated revision
e2e/zau/zau_test.go:408
↓ 2 callers
Function
AWSConfigFromContext
(ctx context.Context)
e2e/env.go:215
↓ 2 callers
Method
DeepCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneAwareUpdate.
api/v1/zz_generated.deepcopy.go:43
↓ 2 callers
Function
GetPodZone
GetPodZone returns the zone in which the pod is scheduled
e2e/help.go:14
↓ 2 callers
Method
GetPodZone
(pod *v1.Pod)
pkg/test/test_utils.go:197
↓ 2 callers
Method
GetStatefulSet
(ssName string)
pkg/test/test_utils.go:254
↓ 2 callers
Function
GetZdbForPod
(c client.Client, logger logr.Logger, pod *v1.Pod)
pkg/utils/zdb_utils.go:15
↓ 2 callers
Function
MakeTestEnv
MakeTestEnv creates an e2e test environment using the kubeconfig located at $KUBECONFIG or defaults to an EKS test environment built from environment
e2e/env.go:28
↓ 2 callers
Function
PodZoneFromContext
PodZoneFromContext returns the zone where the pod with the given name is scheduled
e2e/env.go:192
↓ 2 callers
Function
SortMapByValue
https://stackoverflow.com/questions/18695346/how-can-i-sort-a-mapstringint-by-its-values
pkg/utils/sort_map.go:17
↓ 2 callers
Function
assertHaveNoDeletions
(pods []*v1.Pod)
controllers/zau_controller_test.go:628
↓ 2 callers
Function
chooseStrings
chooseStrings returns a random selection of n strings from the given list
e2e/zdb/zdb_test.go:130
↓ 2 callers
Function
controllersToStart
()
main.go:173
↓ 2 callers
Function
deployFaultyImage
deployFaultyImage will upgrade the StatefulSet under test to a container image that will cause a pod failure
e2e/zau/faults_test.go:31
↓ 2 callers
Function
disruptionsAreBreaching
(ctx context.Context, t *testing.T, cfg *envconf.Config)
e2e/zau/zau_test.go:359
↓ 2 callers
Function
evictPod
evictPod creates an eviction object for the given pod it is important that this function preserves errors from the client so that they can be inspect
e2e/zdb/zdb_test.go:113
↓ 2 callers
Method
findZauForPod
(obj client.Object)
controllers/zau_controller.go:405
↓ 2 callers
Function
getEnv
(key, defaultValue string)
e2e/zau/env_test.go:78
↓ 2 callers
Function
getPodStatefulSet
getPodStatefulSet returns the statefulset referenced by the provided controllerRef.
pkg/utils/pod_controller_finder.go:59
↓ 2 callers
Method
getZoneFromCache
(podName string)
pkg/podzone/helper.go:74
↓ 2 callers
Function
matchDeletions
(pods []*v1.Pod, expectedTerminated []int)
controllers/zau_controller_test.go:632
↓ 2 callers
Method
maxPodsToDelete
(maxUnavailable int, updateStep int32, exponentialFactor string)
controllers/zau_controller.go:368
↓ 2 callers
Method
sortPods
Sorting pods so updates are always done in a consistent order. Pod N -> 0
controllers/zau_controller.go:234
↓ 1 callers
Method
AlarmState
(ctx context.Context, alarmName string)
pkg/utils/alarm_status_provider.go:12
↓ 1 callers
Method
AlarmState
(ctx context.Context, alarmName string)
pkg/utils/alarm_status_provider.go:23
↓ 1 callers
Function
ContextWithNamespace
(ctx context.Context, ns string)
e2e/env.go:163
↓ 1 callers
Method
DeepCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneAwareUpdateList.
api/v1/zz_generated.deepcopy.go:75
↓ 1 callers
Method
DeepCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneDisruptionBudget.
api/v1/zz_generated.deepcopy.go:144
↓ 1 callers
Method
DeepCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneDisruptionBudgetList.
api/v1/zz_generated.deepcopy.go:176
↓ 1 callers
Method
DeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
api/v1/zz_generated.deepcopy.go:61
↓ 1 callers
Method
DeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
api/v1/zz_generated.deepcopy.go:93
↓ 1 callers
Method
DeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
api/v1/zz_generated.deepcopy.go:113
↓ 1 callers
Method
DeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
api/v1/zz_generated.deepcopy.go:135
↓ 1 callers
Method
DeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
api/v1/zz_generated.deepcopy.go:162
↓ 1 callers
Method
DeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
api/v1/zz_generated.deepcopy.go:194
↓ 1 callers
Method
DeepCopyInto
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
api/v1/zz_generated.deepcopy.go:219
↓ 1 callers
Method
DeletePod
(pod *v1.Pod)
pkg/test/test_utils.go:298
↓ 1 callers
Function
Finders
Only StatefulSets are supported for now!! TODO Implement finders of other controler types (e.g Deployment, ReplicaSet)
pkg/utils/pod_controller_finder.go:50
↓ 1 callers
Function
GetPodCondition
GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the in
pkg/utils/utils.go:58
↓ 1 callers
Function
GetPodConditionFromList
GetPodConditionFromList extracts the provided condition from the given list of condition and returns the index of the condition and the condition. Ret
pkg/utils/utils.go:67
↓ 1 callers
Function
GetPodReadyCondition
GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.
pkg/utils/utils.go:51
↓ 1 callers
Method
GetSortedZonesFromMap
(zonePodsMap map[string][]*v1.Pod)
pkg/podzone/helper.go:38
↓ 1 callers
Function
IsPodReadyConditionTrue
IsPodReadyConditionTrue returns true if a pod is ready; false otherwise.
pkg/utils/utils.go:44
↓ 1 callers
Function
PublishEvictionStatusMetrics
(response admission.Response, reason string)
pkg/metrics/metrics.go:150
↓ 1 callers
Function
PublishZauStatusMetrics
(zau *opsv1.ZoneAwareUpdate)
pkg/metrics/metrics.go:158
↓ 1 callers
Function
PublishZdbStatusMetrics
(zdb *opsv1.ZoneDisruptionBudget)
pkg/metrics/metrics.go:119
↓ 1 callers
Method
UpdateStatefulSetStatus
(ss *apps.StatefulSet)
pkg/test/test_utils.go:293
↓ 1 callers
Method
UpdateZdbDisruptions
(zdb *opsv1.ZoneDisruptionBudget, disruptionsAllowed map[string]int32)
pkg/test/test_utils.go:57
↓ 1 callers
Function
ZonePodsFromContext
ZonePodsFromContext returns a grouping of pods by zone
e2e/env.go:198
↓ 1 callers
Method
buildDisruptedPodMap
Adapted from `DisruptionController.buildDisruptedPodMap()`: https://github.com/kubernetes/kubernetes/blob/d7123a65248/pkg/controller/disruption/disrup
controllers/zdb_controller.go:210
↓ 1 callers
Function
canIgnoreZDB
(pod *v1.Pod)
webhooks/eviction_webhook.go:251
↓ 1 callers
Method
checkAndDecrement
(ctx context.Context, pod *v1.Pod, zdb *opsv1.ZoneDisruptionBudget, dryRun bool)
webhooks/eviction_webhook.go:184
↓ 1 callers
Function
configurePauseAlarm
configurePauseAlarm updates zdb.Spec.pauseRolloutAlarm
e2e/zau/faults_test.go:17
↓ 1 callers
Function
contains
(s []int, e int)
controllers/zau_controller_test.go:615
↓ 1 callers
Function
contextWithAWSConfig
(ctx context.Context, config aws.Config)
e2e/env.go:211
↓ 1 callers
Function
contextWithPodZoneMap
(ctx context.Context, podZoneMap map[string]string)
e2e/env.go:171
↓ 1 callers
Function
contextWithStatefulSetName
(ctx context.Context, name string)
e2e/zdb/env_test.go:71
next →
1–100 of 188, ranked by callers