Bug 1613224

Summary: [APB] apb tools not support helm registry as it's help description
Product: OpenShift Container Platform Reporter: Zihan Tang <zitang>
Component: Service BrokerAssignee: Dylan Murray <dymurray>
Status: CLOSED ERRATA QA Contact: Zihan Tang <zitang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, chezhang, dymurray
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-11 07:24:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zihan Tang 2018-08-07 09:06:47 UTC
Description of problem:
As apb tools help description, it supports helm type registry,
  -t, --type string          registry type (dockerhub, local_openshift, helm) (default "dockerhub")

but when adding helm registry, apb registry do not flag '--runner'

# apb registry add helm --type helm --url "https://kubernetes-charts.storage.googleapis.com" --runner:"docker.io/automationbroker/helm-runner:latest"  --whitelist  '.*apb$'
....
ERRO unknown flag: --runner:docker.io/automationbroker/helm-runner:latest 

Version-Release number of selected component (if applicable):
# apb version
apb-1.9.0


How reproducible:
always

Steps to Reproduce:
1. Follow guid in doc : 
https://github.com/openshift/ansible-service-broker/blob/master/docs/config.md#helm-chart-repository
add registry to apb: 

# apb registry add helm --type helm --url "https://kubernetes-charts.storage.googleapis.com" --runner:"docker.io/automationbroker/helm-runner:latest"  --whitelist  '.*apb$'

2.
3.

Actual results:
command failed with: 
Error: unknown flag: --runner:docker.io/automationbroker/helm-runner:latest
Usage:
  apb registry add <registry_name> [flags]

Flags:
  -h, --help                 help for add
      --namespaces strings   namespaces for 'local_openshift' adapter to search  (e.g. 'openshift,my-project')
      --org string           organization for 'dockerhub' adapter to search (e.g. 'ansible-playbook-bundle')
  -t, --type string          registry type (dockerhub, local_openshift, helm) (default "dockerhub")
      --url string           URL (e.g. docker.io)
      --whitelist strings    regexes for filtering registry contents (e.g. '.*apb$,.*bundle$')

Global Flags:
      --config string   configuration file (default is $HOME/.apb)
  -v, --verbose         verbose output

ERRO unknown flag: --runner:docker.io/automationbroker/helm-runner:latest 

Expected results:
1. remove the support registry type helm in help if don't plan to support it.
   or
2. support '--runner' for this kind of registry 

Additional info:

Comment 1 Dylan Murray 2018-08-10 20:17:49 UTC
https://github.com/automationbroker/apb/pull/113

Comment 2 Zihan Tang 2018-08-22 06:44:33 UTC
image is ready, change it to ON_QA.

Comment 3 Zihan Tang 2018-08-22 06:46:27 UTC
Verified.
apb-1.9.3

# apb registry add helm --type helm --url "https://kubernetes-charts.storage.googleapis.com" --runner "docker.io/automationbroker/helm-runner:latest"  --whitelist  '.*apb$'

.............
INFO Validating specs...                          
INFO All specs passed validation!                 
INFO Registry helm has 0 valid APBs available from 214 images scanned 
 APB     IMAGE     REGISTRY 
 --- -+- ----- -+- -------- 

# apb registry list
Found registries already in config:
 NAME     TYPE     ORG     URL                                              
 ---- -+- ---- -+- --- -+- ------------------------------------------------ 
 helm  |  helm  |       |  https://kubernetes-charts.storage.googleapis.com

Comment 5 errata-xmlrpc 2018-10-11 07:24:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2652