Skip to content

Commit

Permalink
Add option --disable-ingress-nginx
Browse files Browse the repository at this point in the history
because it might already be installed in local environment
  • Loading branch information
rgaiacs committed Jan 27, 2025
1 parent 0143110 commit 18f07a7
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def get_config_files(release, config_dir="config"):
return config_files


def deploy(release, name=None, dry_run=False, diff=False, ip_address=None):
def deploy(release, name=None, dry_run=False, diff=False, ip_address=None, disable_ingress_nginx=False):
"""Deploys a federation member to a k8s cluster.
Waits for deployments and daemonsets to become Ready
Expand Down Expand Up @@ -253,6 +253,14 @@ def deploy(release, name=None, dry_run=False, diff=False, ip_address=None):
]
)

if disable_ingress_nginx:
helm.extend(
[
"--set",
f"ingress-nginx.enabled=false",
]
)

check_call(helm, dry_run)
print(
BOLD + GREEN + f"SUCCESS: Helm {helm_commands[0]} for {release} completed" + NC,
Expand Down Expand Up @@ -492,6 +500,11 @@ def main():
default=stages[0],
help="Stage to deploy, default all",
)
argparser.add_argument(
"--disable-ingress-nginx",
action="store_true",
help="Disable the installation of ingress-nginx. Use this is the Kubernetes cluster already has ingress-nginx installed.",
)

args = argparser.parse_args()

Expand Down Expand Up @@ -554,7 +567,7 @@ def main():
if args.stage in ("all", "certmanager") and cluster != "localhost":
setup_certmanager(args.dry_run, args.diff)
if args.stage in ("all", "mybinder"):
deploy(args.release, args.name, args.dry_run, args.diff, args.local_ip)
deploy(args.release, args.name, args.dry_run, args.diff, args.local_ip, args.disable_ingress_nginx)


if __name__ == "__main__":
Expand Down

0 comments on commit 18f07a7

Please sign in to comment.