You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor all e2e test code to create Kubernetes clients once at test setup and pass them through the call chain, instead of recreating clients on every YAML apply operation.
Current State:
The e2e test utilities have two patterns for applying YAML resources:
Convenience functions (ApplyYAMLData, ApplyYAMLFile) - Create new dynamic.Interface and meta.RESTMapper clients on every call
What you would like to be added?
Refactor all e2e test code to create Kubernetes clients once at test setup and pass them through the call chain, instead of recreating clients on every YAML apply operation.
Current State:
The e2e test utilities have two patterns for applying YAML resources:
ApplyYAMLData,ApplyYAMLFile) - Create newdynamic.Interfaceandmeta.RESTMapperclients on every callApplyYAMLDataWithClients,CreateKubernetesClients) - Accept pre-created clients, introduced in PR Support external certificate management for webhooks #344Proposed Changes:
ApplyYAMLFileWithClients()function tooperator/e2e/utils/k8s_client.gooperator/e2e/tests/setup.goto accept/use clientsoperator/e2e/setup/kai_scheduler.goto use client-based functionsoperator/e2e/tests/*.goto create clients once and pass them throughApplyYAMLDataandApplyYAMLFileas deprecatedWhy is this needed?
The convenience functions recreate Kubernetes clients on every invocation, which:
ScalePodCliqueSetWithClient)Benefits: