Permalink
Browse files

Make registry & repo configurable for 'image-inspector'

Tag (:2.1) deliberately left non-configurable as we depend on a
specific version's interface.
(Minor 2.1.z versions will be activated simply by re-pointing the 2.1 tag.)

https://bugzilla.redhat.com/show_bug.cgi?id=1378007
  • Loading branch information...
dtrieu80 authored and cben committed Feb 20, 2017
1 parent 05d9b6e commit 63b46caf7dd170b752cd233daae824acd2e79fd5
@@ -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
@@ -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: {}

0 comments on commit 63b46ca

Please sign in to comment.