Bug 1412050 - [platformmanagement_public_852]RreferencePolicy type: Source/Local requires to provide options parameters in command
Summary: [platformmanagement_public_852]RreferencePolicy type: Source/Local requires t...
Alias: None
Product: OKD
Classification: Red Hat
Component: Image Registry
Version: 3.x
Hardware: x86_64
OS: Linux
Target Milestone: ---
: 3.x
Assignee: Michal Fojtik
QA Contact: Wei Sun
Depends On:
TreeView+ depends on / blocked
Reported: 2017-01-11 04:38 UTC by ge liu
Modified: 2017-05-30 12:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2017-05-30 12:48:45 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description ge liu 2017-01-11 04:38:45 UTC
Description of problem:
Regrading to referencePolicy type(Source/Local), we should provide a special options for customer to define it in command(such as: 'oc tag' or 'import-image'), I suppose it should work like this: "oc tag --source=xxxx deployment-example:latest --TagreferencePolicy=Local", anyway, "--TagreferencePolicy=Local"
could be named with any one, currently, there is not this option parameter exist.

Version-Release number of selected component (if applicable):
openshift v1.5.0-alpha.1+ef2f635-67
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

How reproducible:

Steps to Reproduce:
Actual results:
there is not this option parameter for referencePolicy type(Source/Local)
Expected results:
add referencePolicy type(Source/Local) options into some command(such as: 'oc tag' or 'import-image')

Additional info:

Comment 1 Michal Fojtik 2017-02-08 11:57:18 UTC
PR: https://github.com/openshift/origin/pull/12862

Comment 2 Michal Minar 2017-02-08 15:12:01 UTC
Kudos to @mfojtik.

Comment 3 ge liu 2017-02-10 02:40:50 UTC
Verified in env:

# openshift version
openshift v1.5.0-alpha.2+98ad752-493
kubernetes v1.5.2+43a9be4
etcd 3.1.0

# oc tag -h
Tag existing images into image streams 
 --reference-policy='source': Allow to request pull-trough for external image when set to 'local'. Defaults to 'source'.

# oc tag  --source=docker openshift/deployment-example deployment-example:latest --reference-policy='local'
Tag deployment-example:latest set to openshift/deployment-example.

# oc get is
NAME                 DOCKER REPO                                     TAGS      UPDATED
deployment-example   latest    43 seconds ago
[root@ip-172-18-8-87 master]# oc get is deployment-example -o yaml
apiVersion: v1
kind: ImageStream
      type: Local

#  oc new-app --image-stream=deployment-example:latest
# oc get dc deployment-example -o yaml
apiVersion: v1
kind: DeploymentConfig
      - image: 172.xx.xx.xx:5000/lgproj/deployment-example@sha256:ea9135488f323060cb18ab3ec06286cd49e4b3a611fce1a6a442651ecf421f99
        imagePullPolicy: Always

Comment 4 ge liu 2017-02-10 02:53:50 UTC
Regarding to the doc, there are several typo with 'pull-trough':

oc_by_example_content.adoc: line 2941  # Tag an external Docker image and request pull-trough for it.
docs/man/man1/oc-tag.1: line 44     Allow to request pull\-trough for external image when set to 'local'. 
                        line 143  # Tag an external Docker image and request pull\-trough for it.
pkg/cmd/cli/cmd/tag.go: line 70   # Tag an external Docker image and request pull-trough for it.
                        line 105   "Allow to request pull-trough for external image when set

Comment 5 ge liu 2017-02-10 04:24:41 UTC
The option added to 'oc tag', if fixed the dc, but also need to add the option to 'import-image' to fix bc issue, so I opened a new bug to trace this situation:

and the doc issues in comment 4, I will verified it all together with bug 1420976

Note You need to log in before you can comment on or make changes to this bug.