Skip to content

Commit

Permalink
Merge pull request #57 from netfoundry/feature/add_skip_checks_flag
Browse files Browse the repository at this point in the history
add skipChecks flag to allow skipping controller checks
  • Loading branch information
emoscardini authored Sep 18, 2024
2 parents 448c1b2 + bc1f7db commit 1567aee
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.6.2] - 2024-09-18

### Added

- Add --skip-checks flag to allow skipping controller checks(port/certificate)


## [1.6.1] - 2024-08-15

Expand Down
15 changes: 13 additions & 2 deletions router_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def create_parser():
:return: A Namespace containing arguments
"""
__version__ = '1.6.1'
__version__ = '1.6.2'
parser = argparse.ArgumentParser()

mgroup = parser.add_mutually_exclusive_group(required=True)
Expand Down Expand Up @@ -331,6 +331,10 @@ def create_parser():
action='store_false',
help='Skip applying fw rules',
default=True)
parser.add_argument('--skipChecks',
action='store_true',
default=False,
help='Skip all controller checks - port/certificate')
parser.add_argument('--haEnabled',
action='store_true',
help='Specify haEnabled flag in configuration',
Expand Down Expand Up @@ -1037,8 +1041,15 @@ def main():
router_info = process_manual_registration_arguments(args)
registration_endpoint = None

# skip controller checks if proxy is used or specifically skipped
if args.proxyAddress or args.skipChecks:
logging.info("Skipping controller checks")
do_checks = False
else:
do_checks = True

# check controller communications
if not args.proxyAddress:
if do_checks:
check_controller(router_info['networkControllerHost'])

# handle ziti_router_auto_enroll
Expand Down

0 comments on commit 1567aee

Please sign in to comment.