Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Convert registry to k8s.gcr.io #2814

Merged
merged 2 commits into from
Feb 2, 2018

Conversation

thockin
Copy link
Contributor

@thockin thockin commented Dec 22, 2017

This PR was auto-generated. Please apply human expertise to review for correctness.

Followup to kubernetes/kubernetes#54174 and kubernetes/kubernetes#57824

xref kubernetes/release#281

@k8s-reviewable
Copy link

This change is Reviewable

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 22, 2017
@bowei
Copy link
Contributor

bowei commented Dec 22, 2017

lgtm

Copy link
Contributor

@MrHohn MrHohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 27, 2017
Copy link
Contributor

@porridge porridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but this does not work.
I can push to the old location but not the new one:

porridge@kielonek:~/projects/go/src/k8s.io/contrib/perfdash$ gcloud docker -- tag gcr.io/google_containers/perfdash:0.8 k8s.gcr.io/perfdash:0.8
porridge@kielonek:~/projects/go/src/k8s.io/contrib/perfdash$ gcloud docker -- push  k8s.gcr.io/perfdash:0.8
The push refers to a repository [k8s.gcr.io/perfdash]
45f4f6715eed: Pushing [==================================================>] 137.2 kB
eacb8c6cad16: Pushing [==========================>                        ] 2.819 MB/5.321 MB
df6868d54704: Pushing [=====================>                             ] 2.805 MB/6.572 MB
8880784f79cf: Pushing [====>                                              ] 3.518 MB/36.78 MB
46ecc6c4543a: Pushing [>                                                  ] 2.126 MB/163.5 MB
5f70bf18a086: Waiting 
unexpected EOF
# (The above retries several times before failing)
porridge@kielonek:~/projects/go/src/k8s.io/contrib/perfdash$ gcloud docker -- tag gcr.io/google_containers/perfdash:0.8 gcr.io/google_containers/perfdash:0.8-test
porridge@kielonek:~/projects/go/src/k8s.io/contrib/perfdash$ gcloud docker -- push  gcr.io/google_containers/perfdash:0.8-test
The push refers to a repository [gcr.io/google_containers/perfdash]
45f4f6715eed: Layer already exists 
eacb8c6cad16: Layer already exists 
df6868d54704: Layer already exists 
8880784f79cf: Layer already exists 
46ecc6c4543a: Layer already exists 
5f70bf18a086: Layer already exists 
0.8-test: digest: sha256:b1ed038f1e032ea33fb48672d779f96a4c225140381ec8ba7ee29648dae2981f size: 1783

@thockin
Copy link
Contributor Author

thockin commented Dec 28, 2017

@dekkagaijin I, too, am experiencing issues. This all worked at some point.

thockin@freakshow2 kubernetes gcr-vanity /$ docker images | egrep '(pause|thtest)'

thockin@freakshow2 kubernetes gcr-vanity /$ docker pull gcr.io/google_containers/pause
Using default tag: latest
latest: Pulling from google_containers/pause
a3ed95caeb02: Pull complete 
4964c72cd024: Pull complete 
Digest: sha256:a78c2d6208eff9b672de43f880093100050983047b7b0afe0217d3656e1b0d5f
Status: Downloaded newer image for gcr.io/google_containers/pause:latest

thockin@freakshow2 kubernetes gcr-vanity /$ docker images | egrep '(pause|thtest)'
gcr.io/google_containers/pause                   latest                        350b164e7ae1        3 years ago         239.8 kB

thockin@freakshow2 kubernetes gcr-vanity /$ docker tag gcr.io/google_containers/pause k8s.gcr.io/thtest:thtest 

thockin@freakshow2 kubernetes gcr-vanity /$ docker images | egrep '(pause|thtest)'
gcr.io/google_containers/pause                   latest                        350b164e7ae1        3 years ago         239.8 kB
k8s.gcr.io/thtest                                thtest                        350b164e7ae1        3 years ago         239.8 kB

thockin@freakshow2 kubernetes gcr-vanity /$ gcloud docker -- push k8s.gcr.io/thtest:thtest
The push refers to a repository [k8s.gcr.io/thtest]
5f70bf18a086: Layer already exists 
e16a89738269: Pushing [==================================================>] 241.7 kB
unexpected EOF

@dekkagaijin
Copy link

dekkagaijin commented Dec 28, 2017

2 possible solutions:

  • update gcloud to >= 183.0.0 (where k8s.gcr.io was added as a default domain)
  • use gcloud docker -s k8s.gcr.io -- push ...

@thockin
Copy link
Contributor Author

thockin commented Dec 28, 2017 via email

Copy link
Contributor

@porridge porridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -s flag worked as well.
/lgtm

@mikedanese
Copy link
Contributor

/approve

@k8s-github-robot
Copy link

@thockin PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2018
@mikedanese
Copy link
Contributor

/approve

@@ -3,10 +3,10 @@ all: push
# 0.0 shouldn't clobber any released builds
# current latest is 0.5
TAG = 0.0
PREFIX = gcr.io/google_containers/leader-elector
PREFIX = k8s.gcr.io/leader-elector

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PREFIX = staging-k8s.gcr.io/leader-elector


NODEJS_TAG = 0.1
NODEJS_PREFIX = gcr.io/google_containers/nodejs-election-client
NODEJS_PREFIX = k8s.gcr.io/nodejs-election-client

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NODEJS_PREFIX = staging-k8s.gcr.io/nodejs-election-client


NODEJS_TAG = 0.1
NODEJS_PREFIX = gcr.io/google_containers/nodejs-election-client
NODEJS_PREFIX = k8s.gcr.io/nodejs-election-client

server:
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' -o server example/main.go

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

push below will need to be modified to:
gcloud docker -s staging-k8s.gcr.io -- push ...

Might be good to have a REGISTRY var

@@ -19,7 +19,7 @@ BIN := exechealthz
PKG := k8s.io/contrib/exec-healthz

# Where to push the docker image.
REGISTRY ?= gcr.io/google_containers
REGISTRY ?= k8s.gcr.io

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REGISTRY ?= staging-k8s.gcr.io

and...

push:
...
@gcloud docker -s $(REGISTRY) -- push $(IMAGE):$(VERSION)

@@ -12,19 +12,19 @@ How to build and push all images:
# Build for linux/amd64 (default)
$ make push TAG=1.0
$ make push TAG=1.0 ARCH=amd64
# ---> gcr.io/google_containers/exechealthz-amd64:1.0
# ---> k8s.gcr.io/exechealthz-amd64:1.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

staging-k8s.gcr.io all the way down

@@ -3,7 +3,7 @@ all: push
# See pod.yaml for the version currently running-- bump this ahead before rebuilding!
TAG = v0.3

REPO = gcr.io/google_containers
REPO = k8s.gcr.io

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REGISTRY = staging-k8s.gcr.io
REPO = $(REGISTRY)

...

push: container
	gcloud docker -s $(REGISTRY) -- push $(REPO)/node-perf-dash:$(TAG)

@@ -15,7 +15,7 @@
all: push

TAG = 0.1
PREFIX = gcr.io/google_containers/peer-finder
PREFIX = k8s.gcr.io/peer-finder

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REGISTRY = staging-k8s.gcr.io
PREFIX = $(REGISTRY)/peer-finder

...

push: container
	gcloud docker -s $(REGISTRY) -- push $(PREFIX):$(TAG)

@@ -3,16 +3,16 @@ all: push
# See pod.yaml for the version currently running-- bump this ahead before rebuilding!
TAG = 0.8

PROJ = google_containers
REPO = k8s.gcr.io

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REGISTRY = staging-k8s.gcr.io
REPO = $(REGISTRY)

...

push: container
gcloud docker -s $(REGISTRY) -- push $(REPO)/perfdash:$(TAG)


push: container
gcloud docker -- push gcr.io/google_containers/loader:$(TAG)
gcloud docker -- push k8s.gcr.io/loader:$(TAG)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gcloud docker -s staging-k8s.gcr.io -- push staging-k8s.gcr.io/loader:$(TAG)

@@ -2,7 +2,7 @@ all: push

# 0.0 shouldn't clobber any released builds
TAG ?= 0.4
PREFIX ?= gcr.io/google_containers/servicelb
PREFIX ?= k8s.gcr.io/servicelb

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REGISTRY ?= staging-k8s.gcr.io
PREFIX ?= $(REGISTRY)/servicelb

...

push: container
	$(GCLOUD) docker -s $(REGISTRY) -- push $(PREFIX):$(TAG)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mikedanese, MrHohn, porridge, thockin
We suggest the following additional approver: eparis

Assign the PR to them by writing /assign @eparis in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

/lgtm cancel //PR changed after LGTM, removing LGTM. @MrHohn @caesarxuchao @eparis @porridge @thockin

@k8s-github-robot k8s-github-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 17, 2018
@k8s-github-robot
Copy link

@thockin PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 1, 2018
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 2, 2018
@thockin thockin merged commit 2153035 into kubernetes-retired:master Feb 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.