Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmartState: Make docker registry & repo configurable for 'image-inspector'. #8439

Merged
merged 1 commit into from
Feb 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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