Skip to content

images: Move kube-cross image building to k/release #1140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 19, 2020

Conversation

justaugustus
Copy link
Member

What type of PR is this?
/kind feature

What this PR does / why we need it:
Part of #1133.

While we've enabled building kube-cross on K8s Infra, we haven't eliminated the manual intra-PR image building/pushing by some human (Googler or otherwise).

The process (yet to be documented) is something like:

  • Propose a PR w/ the golang bump, inferring the eventual location of the new kube-cross image
  • Tweak it until all tests but cross and verify pass
  • Build the image locally from the PR branch
  • Push locally to K8s Infra staging
  • Create a PR for image promotion
  • Retest the open PR

This PR is the first step in proposing we do the following:

  • Propose a k/release PR, updating the golang version in the kube-cross Dockerfile
  • Merge the PR, which would trigger a postsubmit to build/push the image to staging
  • Run canary versions of the pull-kubernetes-cross and pull-kubernetes-verify against the new staging image
  • Promote the image
  • Propose a k/k PR to do the golang bump
  • SUCCESS

/assign @BenTheElder @cblecker @liggitt @dims @listx
cc: @kubernetes/release-engineering
/hold

Does this PR introduce a user-facing change?:

images: Move kube-cross image building to k/release

@k8s-ci-robot
Copy link
Contributor

@justaugustus: Adding label: do-not-merge/blocked-paths because PR changes a protected file.

Reasons for blocking this PR:

[Changes to certain release tools can affect our ability to test, build, and release Kubernetes. This PR must be explicitly approved by SIG Release repo admins.]

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 29, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 29, 2020
@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Feb 29, 2020
@k8s-ci-robot k8s-ci-robot added the do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. label Feb 29, 2020
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. needs-priority 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. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 29, 2020
@k8s-ci-robot k8s-ci-robot added area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. labels Feb 29, 2020
@listx
Copy link

listx commented Mar 7, 2020

The title says it is moving the image building, but how come the diff is purely additive? Is this moving us to a state where there are 2 ways to build (old way untouched) with a future follow-up PR finally deprecating the old process?

Apologies in advance if I'm missing something obvious.

@justaugustus
Copy link
Member Author

@listx -- You haven't missed anything :)
This PR is an RFC (denoted in the title).

I want to get feedback from the people who do go bumps on:

This PR is the first step in proposing we do the following:

* Propose a k/release PR, updating the golang version in the kube-cross Dockerfile

* Merge the PR, which would trigger a postsubmit to build/push the image to staging

* Run canary versions of the `pull-kubernetes-cross` and `pull-kubernetes-verify` against the new staging image

* Promote the image

* Propose a k/k PR to do the golang bump

* SUCCESS

If we agree that that's a reasonable path forward, then I think we'd want to:

  • Create canary versions of the pull-kubernetes-cross and pull-kubernetes-verify tests
  • Write a policy for all of this
  • Remove the kube-cross image build bits from k/k

WDYT?

@justaugustus justaugustus changed the title [WIP][RFC] images: Move kube-cross image building to k/release images: Move kube-cross image building to k/release Mar 19, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 19, 2020
@@ -0,0 +1,79 @@
# Copyright 2016 The Kubernetes Authors.
Copy link
Member

Choose a reason for hiding this comment

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

2020

.

push:
docker push $(STAGING_REGISTRY)/$(IMAGE):$(TAG)
Copy link
Member

Choose a reason for hiding this comment

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

Let's please add a manifest with a single arch (amd64) for now.

	docker push $(STAGING_REGISTRY)/$(IMAGE)-$(ARCH):$(TAG)
	docker push $(STAGING_REGISTRY)/$(IMAGE)-$(ARCH):$(KUBE_CROSS_VERSION)
	docker manifest annotate $(STAGING_REGISTRY)/$(IMAGE) $(STAGING_REGISTRY)/$(IMAGE)-$(ARCH) --arch amd64
	docker manifest push -p $(STAGING_REGISTRY)/$(IMAGE)

This will help folks who end up with issues like kubernetes/kubernetes#78964 and will give us a path to add other arch(es) in the future to support kubernetes/kubernetes#75114 for example.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @dims! Added.

@dims
Copy link
Member

dims commented Mar 19, 2020

/approve
/lgtm

/hold
(please release hold when you need to - looks like the latest change may need to be tested locally)

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 19, 2020
Signed-off-by: Stephen Augustus <[email protected]>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 19, 2020
@justaugustus
Copy link
Member Author

Fixed up the manifest push using v1.13.8-2 as a test version:

$ docker manifest inspect gcr.io/k8s-staging-build-image/kube-cross:v1.13.8-2 
{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 3274,
         "digest": "sha256:9816fc4e6e223d4bca55f233bc78d26ab38272dfbab59776bb082b3d35c31502",
         "platform": {
            "architecture": "amd64",
            "os": "linux"
         }
      }
   ]
}

@dims
Copy link
Member

dims commented Mar 19, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 19, 2020
@BenTheElder
Copy link
Member

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, dims, justaugustus

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@justaugustus
Copy link
Member Author

Thanks y'all!
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 19, 2020
@justaugustus justaugustus removed the do-not-merge/blocked-paths Indicates that a PR should not merge because it touches files in blocked paths. label Mar 19, 2020
@k8s-ci-robot k8s-ci-robot merged commit 9495a5b into kubernetes:master Mar 19, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. 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.

7 participants