Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(examples): pass client from main #2308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign the CLA

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