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: Always Steps to Reproduce: N/A 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:
PR: https://github.com/openshift/origin/pull/12862
Kudos to @mfojtik.
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 172.30.238.137:5000/lgproj/deployment-example latest 43 seconds ago [root@ip-172-18-8-87 master]# oc get is deployment-example -o yaml apiVersion: v1 kind: ImageStream ................. .... referencePolicy: type: Local status: # oc new-app --image-stream=deployment-example:latest # oc get dc deployment-example -o yaml apiVersion: v1 kind: DeploymentConfig ......... spec: containers: - image: 172.xx.xx.xx:5000/lgproj/deployment-example@sha256:ea9135488f323060cb18ab3ec06286cd49e4b3a611fce1a6a442651ecf421f99 imagePullPolicy: Always ................
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
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: https://bugzilla.redhat.com/show_bug.cgi?id=1420976 and the doc issues in comment 4, I will verified it all together with bug 1420976