MCPcopy Create free account

hub / github.com/aws/zone-aware-controllers-for-k8s / functions

Functions188 in github.com/aws/zone-aware-controllers-for-k8s

↓ 38 callersFunctionNamespaceFromContext
(ctx context.Context)
e2e/env.go:167
↓ 19 callersFunctioncreateResources
(label string, replicas int, maxUnavailable int, zones []string)
controllers/zau_controller_test.go:576
↓ 18 callersMethodupdateStatefulSet
(ctx context.Context, zau *opsv1.ZoneAwareUpdate, sts *apps.StatefulSet)
controllers/zau_controller.go:113
↓ 11 callersMethodGetZdb
(name string)
pkg/test/test_utils.go:64
↓ 11 callersFunctionzauNameFromContext
(ctx context.Context)
e2e/zau/env_test.go:98
↓ 10 callersFunctionIsTerminating
(pod *v1.Pod)
pkg/utils/utils.go:28
↓ 9 callersMethodDeepCopyInto
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 callersMethodUpdatePodStatus
(pod *v1.Pod, phase v1.PodPhase, condition v1.PodConditionType)
pkg/test/test_utils.go:151
↓ 8 callersMethodCreatePod
(name string, zone string, label string, phase v1.PodPhase, condition v1.PodConditionType)
pkg/test/test_utils.go:76
↓ 8 callersMethodCreateStatefulSet
(replicas int32, label string)
pkg/test/test_utils.go:230
↓ 8 callersMethodGetPod
(podName string)
pkg/test/test_utils.go:184
↓ 8 callersMethodUpdatePod
(pod *v1.Pod)
pkg/test/test_utils.go:171
↓ 7 callersFunctionevict
(pod *v1.Pod, dryRun bool)
webhooks/eviction_webhook_test.go:104
↓ 7 callersFunctionpodName
(label string, num int)
controllers/zdb_controller_test.go:173
↓ 6 callersFunctioncreateZdb
(label string, disruptionsAllowed map[string]int32, dryRun bool)
webhooks/eviction_webhook_test.go:98
↓ 5 callersMethodCreateStatefulSetPod
(name string, zone string, phase v1.PodPhase, label string, ss *apps.StatefulSet)
pkg/test/test_utils.go:121
↓ 5 callersMethodCreateZdb
(maxUnavailable intstr.IntOrString, dryRun bool, label string)
pkg/test/test_utils.go:37
↓ 5 callersFunctionIsPodReady
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 callersFunctionassertContainDeletions
(pods []*v1.Pod, expectedTerminated []int)
controllers/zau_controller_test.go:624
↓ 5 callersFunctionstatefulSetNameFromContext
(ctx context.Context)
e2e/zau/env_test.go:86
↓ 5 callersMethodtestLabels
(value string)
pkg/test/test_utils.go:33
↓ 5 callersFunctiontriggerUpgrade
triggerUpgrade adds a unique label to a statefulset under test so that pods being upgrading
e2e/zau/zau_test.go:347
↓ 5 callersMethodupdateZauStatus
(ctx context.Context, zau *opsv1.ZoneAwareUpdate, sts *apps.StatefulSet, step int32, deletedPods int32, oldPo
controllers/zau_controller.go:262
↓ 5 callersFunctionupgradeToFinish
upgradeToFinish can be used with wait.For to poll until all pods have been updated to
e2e/zau/wait_test.go:20
↓ 5 callersFunctionzauToDeleteReplicas
zauToDeleteReplicas can be used with wait.For to poll until the zau has started deleting StatefulSet replicas
e2e/zau/wait_test.go:35
↓ 4 callersFunctionIsRunningAndReady
(pod *v1.Pod)
pkg/utils/utils.go:24
↓ 4 callersFunctionNewCache
()
pkg/podzone/cache.go:18
↓ 4 callersMethodUpdateZauStep
(zau *opsv1.ZoneAwareUpdate, step int32, updateRevision string)
pkg/test/test_utils.go:286
↓ 4 callersFunctionZonesFromContext
ZonesFromContext returns a list of all unique availability zones in the cluster
e2e/env.go:176
↓ 4 callersFunctionexpectLastPodInFirstZoneToBeDeleted
(zau *opsv1.ZoneAwareUpdate, pods []*v1.Pod)
controllers/zau_controller_test.go:565
↓ 4 callersFunctionexpectNoDeletions
(zau *opsv1.ZoneAwareUpdate, pods []*v1.Pod)
controllers/zau_controller_test.go:558
↓ 4 callersMethodgetPodZone
(ctx context.Context, pod *v1.Pod)
pkg/podzone/helper.go:47
↓ 3 callersMethodCreateSimplePod
(name string, node *v1.Node)
pkg/test/test_utils.go:96
↓ 3 callersMethodCreateZau
(statefulset string, maxUnavailable intstr.IntOrString, label string)
pkg/test/test_utils.go:267
↓ 3 callersMethodDescribeAlarms
(ctx context.Context, params *cloudwatch.DescribeAlarmsInput, optFns ...func(*cloudwatch.Options))
pkg/utils/alarm_status_provider.go:16
↓ 3 callersFunctionDisruptZones
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 callersMethodGetOrCreateNode
(podName string, zone string)
pkg/test/test_utils.go:210
↓ 3 callersMethodGetZonePodsMap
(ctx context.Context, pods []*v1.Pod)
pkg/podzone/helper.go:21
↓ 3 callersMethodSetupWithManager
SetupWithManager sets up the controller with the Manager.
controllers/zau_controller.go:388
↓ 3 callersFunctionchooseString
chooseString returns a random string from the given list
e2e/zdb/zdb_test.go:140
↓ 3 callersFunctioncompositeAlarmState
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 callersFunctiondeployImage
deployImage will upgrade the StatefulSet pods to run the given image
e2e/zau/faults_test.go:36
↓ 3 callersMethodfindZauForStatefulSet
(obj client.Object)
controllers/zau_controller.go:442
↓ 3 callersFunctionpercentOfReplicasUpgraded
percentOfReplicasUpgraded returns the percentage of replicas in a statefulset that are deployed using the updated revision
e2e/zau/zau_test.go:408
↓ 2 callersFunctionAWSConfigFromContext
(ctx context.Context)
e2e/env.go:215
↓ 2 callersMethodDeepCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneAwareUpdate.
api/v1/zz_generated.deepcopy.go:43
↓ 2 callersFunctionGetPodZone
GetPodZone returns the zone in which the pod is scheduled
e2e/help.go:14
↓ 2 callersMethodGetPodZone
(pod *v1.Pod)
pkg/test/test_utils.go:197
↓ 2 callersMethodGetStatefulSet
(ssName string)
pkg/test/test_utils.go:254
↓ 2 callersFunctionGetZdbForPod
(c client.Client, logger logr.Logger, pod *v1.Pod)
pkg/utils/zdb_utils.go:15
↓ 2 callersFunctionMakeTestEnv
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 callersFunctionPodZoneFromContext
PodZoneFromContext returns the zone where the pod with the given name is scheduled
e2e/env.go:192
↓ 2 callersFunctionSortMapByValue
https://stackoverflow.com/questions/18695346/how-can-i-sort-a-mapstringint-by-its-values
pkg/utils/sort_map.go:17
↓ 2 callersFunctionassertHaveNoDeletions
(pods []*v1.Pod)
controllers/zau_controller_test.go:628
↓ 2 callersFunctionchooseStrings
chooseStrings returns a random selection of n strings from the given list
e2e/zdb/zdb_test.go:130
↓ 2 callersFunctioncontrollersToStart
()
main.go:173
↓ 2 callersFunctiondeployFaultyImage
deployFaultyImage will upgrade the StatefulSet under test to a container image that will cause a pod failure
e2e/zau/faults_test.go:31
↓ 2 callersFunctiondisruptionsAreBreaching
(ctx context.Context, t *testing.T, cfg *envconf.Config)
e2e/zau/zau_test.go:359
↓ 2 callersFunctionevictPod
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 callersMethodfindZauForPod
(obj client.Object)
controllers/zau_controller.go:405
↓ 2 callersFunctiongetEnv
(key, defaultValue string)
e2e/zau/env_test.go:78
↓ 2 callersFunctiongetPodStatefulSet
getPodStatefulSet returns the statefulset referenced by the provided controllerRef.
pkg/utils/pod_controller_finder.go:59
↓ 2 callersMethodgetZoneFromCache
(podName string)
pkg/podzone/helper.go:74
↓ 2 callersFunctionmatchDeletions
(pods []*v1.Pod, expectedTerminated []int)
controllers/zau_controller_test.go:632
↓ 2 callersMethodmaxPodsToDelete
(maxUnavailable int, updateStep int32, exponentialFactor string)
controllers/zau_controller.go:368
↓ 2 callersMethodsortPods
Sorting pods so updates are always done in a consistent order. Pod N -> 0
controllers/zau_controller.go:234
↓ 1 callersMethodAlarmState
(ctx context.Context, alarmName string)
pkg/utils/alarm_status_provider.go:12
↓ 1 callersMethodAlarmState
(ctx context.Context, alarmName string)
pkg/utils/alarm_status_provider.go:23
↓ 1 callersFunctionContextWithNamespace
(ctx context.Context, ns string)
e2e/env.go:163
↓ 1 callersMethodDeepCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneAwareUpdateList.
api/v1/zz_generated.deepcopy.go:75
↓ 1 callersMethodDeepCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneDisruptionBudget.
api/v1/zz_generated.deepcopy.go:144
↓ 1 callersMethodDeepCopy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneDisruptionBudgetList.
api/v1/zz_generated.deepcopy.go:176
↓ 1 callersMethodDeepCopyInto
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 callersMethodDeepCopyInto
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 callersMethodDeepCopyInto
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 callersMethodDeepCopyInto
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 callersMethodDeepCopyInto
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 callersMethodDeepCopyInto
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 callersMethodDeepCopyInto
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 callersMethodDeletePod
(pod *v1.Pod)
pkg/test/test_utils.go:298
↓ 1 callersFunctionFinders
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 callersFunctionGetPodCondition
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 callersFunctionGetPodConditionFromList
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 callersFunctionGetPodReadyCondition
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 callersMethodGetSortedZonesFromMap
(zonePodsMap map[string][]*v1.Pod)
pkg/podzone/helper.go:38
↓ 1 callersFunctionIsPodReadyConditionTrue
IsPodReadyConditionTrue returns true if a pod is ready; false otherwise.
pkg/utils/utils.go:44
↓ 1 callersFunctionPublishEvictionStatusMetrics
(response admission.Response, reason string)
pkg/metrics/metrics.go:150
↓ 1 callersFunctionPublishZauStatusMetrics
(zau *opsv1.ZoneAwareUpdate)
pkg/metrics/metrics.go:158
↓ 1 callersFunctionPublishZdbStatusMetrics
(zdb *opsv1.ZoneDisruptionBudget)
pkg/metrics/metrics.go:119
↓ 1 callersMethodUpdateStatefulSetStatus
(ss *apps.StatefulSet)
pkg/test/test_utils.go:293
↓ 1 callersMethodUpdateZdbDisruptions
(zdb *opsv1.ZoneDisruptionBudget, disruptionsAllowed map[string]int32)
pkg/test/test_utils.go:57
↓ 1 callersFunctionZonePodsFromContext
ZonePodsFromContext returns a grouping of pods by zone
e2e/env.go:198
↓ 1 callersMethodbuildDisruptedPodMap
Adapted from `DisruptionController.buildDisruptedPodMap()`: https://github.com/kubernetes/kubernetes/blob/d7123a65248/pkg/controller/disruption/disrup
controllers/zdb_controller.go:210
↓ 1 callersFunctioncanIgnoreZDB
(pod *v1.Pod)
webhooks/eviction_webhook.go:251
↓ 1 callersMethodcheckAndDecrement
(ctx context.Context, pod *v1.Pod, zdb *opsv1.ZoneDisruptionBudget, dryRun bool)
webhooks/eviction_webhook.go:184
↓ 1 callersFunctionconfigurePauseAlarm
configurePauseAlarm updates zdb.Spec.pauseRolloutAlarm
e2e/zau/faults_test.go:17
↓ 1 callersFunctioncontains
(s []int, e int)
controllers/zau_controller_test.go:615
↓ 1 callersFunctioncontextWithAWSConfig
(ctx context.Context, config aws.Config)
e2e/env.go:211
↓ 1 callersFunctioncontextWithPodZoneMap
(ctx context.Context, podZoneMap map[string]string)
e2e/env.go:171
↓ 1 callersFunctioncontextWithStatefulSetName
(ctx context.Context, name string)
e2e/zdb/env_test.go:71
next →1–100 of 188, ranked by callers