diff --git a/app/models/manageiq/providers/kubernetes/container_manager/scanning/job.rb b/app/models/manageiq/providers/kubernetes/container_manager/scanning/job.rb index 491b5b905a5..f1ce5c612aa 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager/scanning/job.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager/scanning/job.rb @@ -3,7 +3,7 @@ class ManageIQ::Providers::Kubernetes::ContainerManager::Scanning::Job < Job PROVIDER_CLASS = ManageIQ::Providers::Kubernetes::ContainerManager - INSPECTOR_NAMESPACE_FALLBACK = 'management-infra' + INSPECTOR_IMAGE_TAG = '2.1'.freeze INSPECTOR_PORT = 8080 DOCKER_SOCKET = '/var/run/docker.sock' SCAN_CATEGORIES = %w(system software) @@ -48,7 +48,6 @@ def start return queue_signal(:abort_job, "cannot analyze non docker images", "error") unless image.docker_id namespace = ::Settings.ems.ems_kubernetes.miq_namespace - namespace = INSPECTOR_NAMESPACE_FALLBACK if namespace.blank? update!(:options => options.merge( :docker_image_id => image.docker_id, @@ -419,7 +418,9 @@ def add_secret_to_pod_def(pod_def, inspector_admin_secret_name) end def inspector_image - 'docker.io/openshift/image-inspector:2.1' + registry = ::Settings.ems.ems_kubernetes.image_inspector_registry + repo = ::Settings.ems.ems_kubernetes.image_inspector_repository + "#{registry}/#{repo}:#{INSPECTOR_IMAGE_TAG}" end def inspector_proxy_env_variables diff --git a/config/settings.yml b/config/settings.yml index 96b8e06ef98..96cc11a4098 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -102,6 +102,8 @@ :read_timeout: 1.hour :ems_kubernetes: :miq_namespace: management-infra + :image_inspector_registry: docker.io + :image_inspector_repository: openshift/image-inspector :ems_azure: :disabled_regions: [] :additional_regions: {}