Browse Source

router - depricate -expose-metrics --metrics-image

This removes menton of the deprecated expose-metrics and metrics-image
options.

bug 1499026
https://bugzilla.redhat.com/show_bug.cgi?id=1499026
1499026 - Deprecate oc adm router --expose-metrics and --metrics-image

This blocks origin PR 19432

Signed-off-by: Phil Cameron <pcameron@redhat.com>
Phil Cameron 7 years ago
parent
commit
893277b82f

+ 0 - 20
roles/lib_openshift/library/oc_adm_router.py

@@ -190,21 +190,6 @@ options:
     required: false
     default: None
     aliases: []
-  expose_metrics:
-    description:
-    - This is a hint to run an extra container in the pod to expose metrics - the image
-    - will either be set depending on the router implementation or provided with --metrics-image.
-    required: false
-    default: False
-    aliases: []
-  metrics_image:
-    description:
-    - If expose_metrics is specified this is the image to use to run a sidecar container
-    - in the pod exposing metrics. If not set and --expose-metrics is true the image will
-    - depend on router implementation.
-    required: false
-    default: None
-    aliases: []
 author:
 - "Kenny Woodson <kwoodson@redhat.com>"
 extends_documentation_fragment:
@@ -3105,8 +3090,6 @@ class Router(OpenShiftCLI):
                                                            'include': True},
                                 'external_host_private_key': {'value': params['external_host_private_key'],
                                                               'include': True},
-                                'expose_metrics': {'value': params['expose_metrics'], 'include': True},
-                                'metrics_image': {'value': params['metrics_image'], 'include': True},
                                 'stats_user': {'value': params['stats_user'], 'include': True},
                                 'stats_password': {'value': params['stats_password'], 'include': True},
                                 'stats_port': {'value': params['stats_port'], 'include': True},
@@ -3217,9 +3200,6 @@ def main():
             external_host_username=dict(default=None, type='str'),
             external_host_password=dict(default=None, type='str', no_log=True),
             external_host_private_key=dict(default=None, type='str', no_log=True),
-            # Metrics
-            expose_metrics=dict(default=False, type='bool'),
-            metrics_image=dict(default=None, type='str'),
             # Stats
             stats_user=dict(default=None, type='str'),
             stats_password=dict(default=None, type='str', no_log=True),

+ 0 - 3
roles/lib_openshift/src/ansible/oc_adm_router.py

@@ -36,9 +36,6 @@ def main():
             external_host_username=dict(default=None, type='str'),
             external_host_password=dict(default=None, type='str', no_log=True),
             external_host_private_key=dict(default=None, type='str', no_log=True),
-            # Metrics
-            expose_metrics=dict(default=False, type='bool'),
-            metrics_image=dict(default=None, type='str'),
             # Stats
             stats_user=dict(default=None, type='str'),
             stats_password=dict(default=None, type='str', no_log=True),

+ 0 - 2
roles/lib_openshift/src/class/oc_adm_router.py

@@ -425,8 +425,6 @@ class Router(OpenShiftCLI):
                                                            'include': True},
                                 'external_host_private_key': {'value': params['external_host_private_key'],
                                                               'include': True},
-                                'expose_metrics': {'value': params['expose_metrics'], 'include': True},
-                                'metrics_image': {'value': params['metrics_image'], 'include': True},
                                 'stats_user': {'value': params['stats_user'], 'include': True},
                                 'stats_password': {'value': params['stats_password'], 'include': True},
                                 'stats_port': {'value': params['stats_port'], 'include': True},

+ 0 - 15
roles/lib_openshift/src/doc/router

@@ -137,21 +137,6 @@ options:
     required: false
     default: None
     aliases: []
-  expose_metrics:
-    description:
-    - This is a hint to run an extra container in the pod to expose metrics - the image
-    - will either be set depending on the router implementation or provided with --metrics-image.
-    required: false
-    default: False
-    aliases: []
-  metrics_image:
-    description:
-    - If expose_metrics is specified this is the image to use to run a sidecar container
-    - in the pod exposing metrics. If not set and --expose-metrics is true the image will
-    - depend on router implementation.
-    required: false
-    default: None
-    aliases: []
 author:
 - "Kenny Woodson <kwoodson@redhat.com>"
 extends_documentation_fragment:

+ 1 - 3
roles/lib_openshift/src/test/unit/test_oc_adm_router.py

@@ -321,8 +321,6 @@ class RouterTest(unittest.TestCase):
                   'external_host_username': None,
                   'external_host_password': None,
                   'external_host_private_key': None,
-                  'expose_metrics': False,
-                  'metrics_image': None,
                   'stats_user': None,
                   'stats_password': None,
                   'stats_port': 1936,
@@ -362,7 +360,7 @@ class RouterTest(unittest.TestCase):
             mock.call(['oc', 'get', 'sa', 'router', '-o', 'json', '-n', 'default'], None),
             mock.call(['oc', 'get', 'secret', 'router-certs', '-o', 'json', '-n', 'default'], None),
             mock.call(['oc', 'get', 'clusterrolebinding', 'router-router-role', '-o', 'json', '-n', 'default'], None),
-            mock.call(['oc', 'adm', 'router', 'router', '--expose-metrics=False', '--external-host-insecure=False',
+            mock.call(['oc', 'adm', 'router', 'router', '--external-host-insecure=False',
                        "--labels=another-label=val,router=router",
                        '--ports=80:80,443:443', '--replicas=2', '--selector=type=infra', '--service-account=router',
                        '--stats-port=1936', '--dry-run=True', '-o', 'json', '-n', 'default'], None),