Skip to content

Commit

Permalink
chore(examples): pass client from main
Browse files Browse the repository at this point in the history
small nit -- the other 2 functions also accept client
  • Loading branch information
BozhidarManev authored Nov 28, 2024
1 parent 98a5be8 commit ae37cee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/ingress_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ def create_deployment(apps_v1_api):
)


def create_service():
core_v1_api = client.CoreV1Api()
def create_service(core_v1_api):
body = client.V1Service(
api_version="v1",
kind="Service",
Expand Down Expand Up @@ -111,10 +110,11 @@ def main():
# Fetching and loading local Kubernetes Information
config.load_kube_config()
apps_v1_api = client.AppsV1Api()
core_v1_api = client.CoreV1Api()
networking_v1_api = client.NetworkingV1Api()

create_deployment(apps_v1_api)
create_service()
create_service(core_v1_api)
create_ingress(networking_v1_api)


Expand Down

0 comments on commit ae37cee

Please # to comment.