Skip to content

Commit

Permalink
Make registry & repo configurable for 'image-inspector'
Browse files Browse the repository at this point in the history
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 63b46ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions config/settings.yml
Expand Up @@ -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: {}
Expand Down

0 comments on commit 63b46ca

Please sign in to comment.