Skip to content
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

Add kubebuilder image build #28803

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions config/jobs/image-pushing/k8s-staging-kubebuilder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
postsubmits:

kubernetes-sigs/kubebuilder:
- name: post-kubebuilder-push-images
cluster: k8s-infra-prow-build-trusted
annotations:
testgrid-dashboards: sig-api-machinery-kubebuilder
Copy link
Contributor

Choose a reason for hiding this comment

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

@yashsingh74 from where did you find this value?

Copy link
Member Author

Choose a reason for hiding this comment

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

decorate: true
branches:
- ^master$
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to use master?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ohh it is not required.
Also, do we need to check against the Tag like mentioned here -https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/k8s-staging-ingress-nginx.yaml#L10

Choose a reason for hiding this comment

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

Yes it should be just against the tag. I don't think any changes in the branch need to trigger. @camilamacedo86 could you confirm?

Copy link
Contributor

Choose a reason for hiding this comment

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

We do not trigger change anything on the master to build the proxy image. Only its own branch.

- ^kube-rbac-proxy-releases$
spec:
serviceAccountName: gcb-builder
containers:
- image: gcr.io/k8s-staging-test-infra/image-builder:v20230111-cd1b3caf9c
command:
- /run.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

It should build the proxy image right?

To build today we call: https://github.com/kubernetes-sigs/kubebuilder/blob/kube-rbac-proxy-releases/build/cloudbuild_kube-rbac-proxy.yaml

Which will call https://github.com/kubernetes-sigs/kubebuilder/blob/kube-rbac-proxy-releases/build/build.sh passing the tag version to do the job.

So, what this run.sh does?
What is the expected outcome when this PR get merged?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought the run.sh will run initially which is present inside the image-builder.

Choose a reason for hiding this comment

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

To build today we call: https://github.com/kubernetes-sigs/kubebuilder/blob/kube-rbac-proxy-releases/build/cloudbuild_kube-rbac-proxy.yaml

To be non-disruptive, do we need to create another cloudbuild.yaml as here? Not entirely sure so keeping the PR as a draft (kubernetes-sigs/kubebuilder#3246). cc: @camilamacedo86

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @varshaprasad96,

To be non-disruptive, do we need to create another cloudbuild.yaml as here? Not entirely sure so keeping the PR as a draft (kubernetes-sigs/kubebuilder#3246). cc: @camilamacedo86

I do not think that we need to have other cloudbuild.yaml
See that it is only a config file like gorelease one. We can call the same.

However, the new infra should build the images to the new registry
See that we inform the image registry in the build.sh: https://github.com/kubernetes-sigs/kubebuilder/blob/kube-rbac-proxy-releases/build/build.sh#L25

So, we need to change that to receive this info as an ARG OR just create another for the new infra.

args:
- --project=k8s-staging-kubebuilder
- --scratch-bucket=gs://k8s-staging-kubebuilder-gcb
- --env-passthrough=PULL_BASE_REF
- --with-git-dir
- .

Choose a reason for hiding this comment

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

do we need the build-dir?