Skip to content

Commit ae37cee

Browse files
chore(examples): pass client from main
small nit -- the other 2 functions also accept client
1 parent 98a5be8 commit ae37cee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/ingress_create.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ def create_deployment(apps_v1_api):
5151
)
5252

5353

54-
def create_service():
55-
core_v1_api = client.CoreV1Api()
54+
def create_service(core_v1_api):
5655
body = client.V1Service(
5756
api_version="v1",
5857
kind="Service",
@@ -111,10 +110,11 @@ def main():
111110
# Fetching and loading local Kubernetes Information
112111
config.load_kube_config()
113112
apps_v1_api = client.AppsV1Api()
113+
core_v1_api = client.CoreV1Api()
114114
networking_v1_api = client.NetworkingV1Api()
115115

116116
create_deployment(apps_v1_api)
117-
create_service()
117+
create_service(core_v1_api)
118118
create_ingress(networking_v1_api)
119119

120120

0 commit comments

Comments
 (0)