openshift / ansible-service-broker

Ansible Service Broker
Apache License 2.0
228 stars 84 forks source link

Whitelist item must contain org to filter image ? #379

Closed mdshuai closed 7 years ago

mdshuai commented 7 years ago

What happened: In whitelist I must contain org, not sure if this is by design. But in the doc example. I don't see it

  1. Configure whitelist like below, mediawiki123-apb doesn't math whitelist, I must use ^ansibleplaybookbundle/mediawiki123-apb$
    registry:
      -
        name: apb
        org: ansibleplaybookbundle
        pass: ""
        type: dockerhub
        url: "https://registry.hub.docker.com"
        fail_on_error: true
        user: ""
        white_list:
          - "hello.*-apb$"
          - "^mediawiki123-apb$"
jmrodri commented 7 years ago

The example shows "^mediawiki123-apb$" which by regex rules means it starts with m because of the ^ and ends with apb because of the $.

If you simply want to match mediawiki-apb then remove the ^.

jmrodri commented 7 years ago

@eriknelson let's add documentation that mentions regex.

eriknelson commented 7 years ago

@jmrodri documented here: https://github.com/openshift/ansible-service-broker/blob/master/docs/filtering_apbs.md#filter-behavior

Wonder if there's a better way to surface this?

jmrodri commented 7 years ago

Closing as the behavior has been documented.