cli: Remove dry-run flag
Armada's dry-run option is incomplete, no longer maintained, and offers little value for the complexity required to maintain it. This commit is the second in a series of changes to remove the dry-run feature. Specifically, this change removes the flag as an option for the CLI. Story: 2005121 Change-Id: If0b512dcf5520e8a53521fbb5e4e83e06984c889 Signed-off-by: Drew Walters <andrew.walters@att.com>
This commit is contained in:
parent
d6ad0e5e46
commit
df97ff59a6
@ -79,8 +79,6 @@ SHORT_DESC = "Command installs manifest charts."
|
||||
'--disable-update-pre',
|
||||
help="Disable pre-update Tiller operations.",
|
||||
is_flag=True)
|
||||
@click.option(
|
||||
'--dry-run', help="Run charts without installing them.", is_flag=True)
|
||||
@click.option(
|
||||
'--enable-chart-cleanup', help="Clean up unmanaged charts.", is_flag=True)
|
||||
@click.option(
|
||||
@ -142,13 +140,13 @@ SHORT_DESC = "Command installs manifest charts."
|
||||
@click.option('--debug', help="Enable debug logging.", is_flag=True)
|
||||
@click.pass_context
|
||||
def apply_create(
|
||||
ctx, locations, api, disable_update_post, disable_update_pre, dry_run,
|
||||
ctx, locations, api, disable_update_post, disable_update_pre,
|
||||
enable_chart_cleanup, metrics_output, use_doc_ref, set, tiller_host,
|
||||
tiller_port, tiller_namespace, timeout, values, wait, target_manifest,
|
||||
bearer_token, debug):
|
||||
CONF.debug = debug
|
||||
ApplyManifest(
|
||||
ctx, locations, api, disable_update_post, disable_update_pre, dry_run,
|
||||
ctx, locations, api, disable_update_post, disable_update_pre,
|
||||
enable_chart_cleanup, metrics_output, use_doc_ref, set, tiller_host,
|
||||
tiller_port, tiller_namespace, timeout, values, wait, target_manifest,
|
||||
bearer_token).safe_invoke()
|
||||
@ -157,7 +155,7 @@ def apply_create(
|
||||
class ApplyManifest(CliAction):
|
||||
def __init__(
|
||||
self, ctx, locations, api, disable_update_post, disable_update_pre,
|
||||
dry_run, enable_chart_cleanup, metrics_output, use_doc_ref, set,
|
||||
enable_chart_cleanup, metrics_output, use_doc_ref, set,
|
||||
tiller_host, tiller_port, tiller_namespace, timeout, values, wait,
|
||||
target_manifest, bearer_token):
|
||||
super(ApplyManifest, self).__init__()
|
||||
@ -167,7 +165,6 @@ class ApplyManifest(CliAction):
|
||||
self.api = api
|
||||
self.disable_update_post = disable_update_post
|
||||
self.disable_update_pre = disable_update_pre
|
||||
self.dry_run = dry_run
|
||||
self.enable_chart_cleanup = enable_chart_cleanup
|
||||
self.metrics_output = metrics_output
|
||||
self.use_doc_ref = use_doc_ref
|
||||
@ -216,8 +213,7 @@ class ApplyManifest(CliAction):
|
||||
with Tiller(tiller_host=self.tiller_host,
|
||||
tiller_port=self.tiller_port,
|
||||
tiller_namespace=self.tiller_namespace,
|
||||
bearer_token=self.bearer_token,
|
||||
dry_run=self.dry_run) as tiller:
|
||||
bearer_token=self.bearer_token) as tiller:
|
||||
|
||||
try:
|
||||
resp = self.handle(documents, tiller)
|
||||
@ -238,7 +234,6 @@ class ApplyManifest(CliAction):
|
||||
query = {
|
||||
'disable_update_post': self.disable_update_post,
|
||||
'disable_update_pre': self.disable_update_pre,
|
||||
'dry_run': self.dry_run,
|
||||
'enable_chart_cleanup': self.enable_chart_cleanup,
|
||||
'tiller_host': self.tiller_host,
|
||||
'tiller_port': self.tiller_port,
|
||||
@ -263,7 +258,6 @@ class ApplyManifest(CliAction):
|
||||
disable_update_pre=self.disable_update_pre,
|
||||
disable_update_post=self.disable_update_post,
|
||||
enable_chart_cleanup=self.enable_chart_cleanup,
|
||||
dry_run=self.dry_run,
|
||||
set_ovr=self.set,
|
||||
force_wait=self.wait,
|
||||
timeout=self.timeout,
|
||||
|
@ -50,7 +50,6 @@ SHORT_DESC = "Command performs a release rollback."
|
||||
"previous release",
|
||||
type=int,
|
||||
default=0)
|
||||
@click.option('--dry-run', help="Perform a dry-run rollback.", is_flag=True)
|
||||
@click.option('--tiller-host', help="Tiller host IP.", default=None)
|
||||
@click.option(
|
||||
'--tiller-port', help="Tiller host port.", type=int, default=None)
|
||||
@ -82,26 +81,23 @@ SHORT_DESC = "Command performs a release rollback."
|
||||
@click.option('--debug', help="Enable debug logging.", is_flag=True)
|
||||
@click.pass_context
|
||||
def rollback_charts(
|
||||
ctx, release, version, dry_run, tiller_host, tiller_port,
|
||||
tiller_namespace, timeout, wait, force, recreate_pods, bearer_token,
|
||||
debug):
|
||||
ctx, release, version, tiller_host, tiller_port, tiller_namespace,
|
||||
timeout, wait, force, recreate_pods, bearer_token, debug):
|
||||
CONF.debug = debug
|
||||
Rollback(
|
||||
ctx, release, version, dry_run, tiller_host, tiller_port,
|
||||
tiller_namespace, timeout, wait, force, recreate_pods,
|
||||
bearer_token).safe_invoke()
|
||||
ctx, release, version, tiller_host, tiller_port, tiller_namespace,
|
||||
timeout, wait, force, recreate_pods, bearer_token).safe_invoke()
|
||||
|
||||
|
||||
class Rollback(CliAction):
|
||||
def __init__(
|
||||
self, ctx, release, version, dry_run, tiller_host, tiller_port,
|
||||
self, ctx, release, version, tiller_host, tiller_port,
|
||||
tiller_namespace, timeout, wait, force, recreate_pods,
|
||||
bearer_token):
|
||||
super(Rollback, self).__init__()
|
||||
self.ctx = ctx
|
||||
self.release = release
|
||||
self.version = version
|
||||
self.dry_run = dry_run
|
||||
self.tiller_host = tiller_host
|
||||
self.tiller_port = tiller_port
|
||||
self.tiller_namespace = tiller_namespace
|
||||
@ -114,8 +110,7 @@ class Rollback(CliAction):
|
||||
def invoke(self):
|
||||
with Tiller(tiller_host=self.tiller_host, tiller_port=self.tiller_port,
|
||||
tiller_namespace=self.tiller_namespace,
|
||||
bearer_token=self.bearer_token,
|
||||
dry_run=self.dry_run) as tiller:
|
||||
bearer_token=self.bearer_token) as tiller:
|
||||
|
||||
response = self.handle(tiller)
|
||||
|
||||
@ -132,6 +127,4 @@ class Rollback(CliAction):
|
||||
recreate_pods=self.recreate_pods)
|
||||
|
||||
def output(self, response):
|
||||
self.logger.info(
|
||||
('(dry run) ' if self.dry_run else '')
|
||||
+ 'Rollback of %s complete.', self.release)
|
||||
self.logger.info('Rollback of %s complete.', self.release)
|
||||
|
@ -35,7 +35,6 @@ Commands
|
||||
--api Contacts service endpoint.
|
||||
--disable-update-post Disable post-update Tiller operations.
|
||||
--disable-update-pre Disable pre-update Tiller operations.
|
||||
--dry-run Run charts without installing them.
|
||||
--enable-chart-cleanup Clean up unmanaged charts.
|
||||
--metrics-output TEXT The output path for metric data
|
||||
--use-doc-ref Use armada manifest file reference.
|
||||
|
@ -16,7 +16,6 @@ Commands
|
||||
$ armada rollback --release my_release
|
||||
|
||||
Options:
|
||||
--dry-run Perform a dry-run rollback.
|
||||
--release TEXT Release to rollback.
|
||||
--tiller-host TEXT Tiller Host IP
|
||||
--tiller-port INTEGER Tiller Host Port
|
||||
|
Loading…
Reference in New Issue
Block a user