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

infra/gcp/aaa: add k8s-infra-prow #2235

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

ameukam
Copy link
Member

@ameukam ameukam commented Jun 16, 2021

Deploy k8s-infra prow instance for configuration focused on k8s.io repo.

Signed-off-by: Arnaud Meukam [email protected]

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. wg/k8s-infra labels Jun 16, 2021
@k8s-ci-robot k8s-ci-robot requested review from dims and spiffxp June 16, 2021 21:58
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 16, 2021
@ameukam ameukam force-pushed the aaa-k8s-infra-prow branch 3 times, most recently from 30b4b55 to 1376465 Compare June 20, 2021 13:00
@ameukam ameukam force-pushed the aaa-k8s-infra-prow branch from 1376465 to eb9c129 Compare July 21, 2021 22:54
@k8s-ci-robot k8s-ci-robot added the sig/testing Categorizes an issue or PR as relevant to SIG Testing. label Jul 21, 2021
@ameukam ameukam changed the title [WIP] infra/gcp/aaa: add k8s-infra-prow infra/gcp/aaa: add k8s-infra-prow Jul 21, 2021
@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 Jul 21, 2021
@ameukam ameukam force-pushed the aaa-k8s-infra-prow branch from eb9c129 to 63aa983 Compare July 21, 2021 23:07
@ameukam
Copy link
Member Author

ameukam commented Jul 22, 2021

/test pull-k8sio-verify

@ameukam ameukam force-pushed the aaa-k8s-infra-prow branch 2 times, most recently from 6dd07f9 to c0cefd5 Compare July 22, 2021 20:08
@k8s-ci-robot k8s-ci-robot added area/access Define who has access to what via IAM bindings, role bindings, policy, etc. sig/security Categorizes an issue or PR as relevant to SIG Security. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 22, 2021
@ameukam ameukam force-pushed the aaa-k8s-infra-prow branch from b7e7710 to b691f90 Compare July 26, 2021 20:52
@spiffxp spiffxp force-pushed the aaa-k8s-infra-prow branch from e3f8856 to f2d5f65 Compare July 27, 2021 00:43
Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

I feel like maybe you grabbed a copy from or were at least inspired by my attempts at setting up github.com/bashfire/prow-config. The problem is that's fallen way stale at this point. I would recommend a refresh from https://github.com/kubernetes/test-infra/tree/master/config/prow just to be sure

I dropped some notes to self that I'll try and answer as followup

apps/prow/cluster/deck_deployment.yaml Outdated Show resolved Hide resolved
apps/prow/cluster/prow-externalsecrets.yaml Show resolved Hide resolved
apps/prow/cluster/prow_ingress.yaml Show resolved Hide resolved
apps/prow/cluster/sinker_deployment.yaml Show resolved Hide resolved
apps/prow/config.yaml Outdated Show resolved Hide resolved
apps/prow/config.yaml Show resolved Hide resolved
apps/prow/plugins.yaml Show resolved Hide resolved
@@ -0,0 +1,23 @@
periodics:
Copy link
Member

Choose a reason for hiding this comment

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

nit: I am more used to seeing apps/prow/jobs/{org}/{repo}

we're gonna want to move this to be top-level or easy to find anyway, so maybe the particular name right now doesn't matter as much

Copy link
Member Author

Choose a reason for hiding this comment

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

We'll update location when I'll add prow self-maintenance jobs.

apps/prow/plugins.yaml Outdated Show resolved Hide resolved
@ameukam ameukam force-pushed the aaa-k8s-infra-prow branch from f2d5f65 to e943787 Compare August 4, 2021 22:48
@k8s-ci-robot k8s-ci-robot added area/apps Application management, code in apps/ area/apps/prow k8s-infra-prow.k8s.io, code in apps/prow/ labels Aug 4, 2021
@k8s-ci-robot k8s-ci-robot added the area/infra Infrastructure management, infrastructure design, code in infra/ label Aug 4, 2021
Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

one nit, just the one, otherwise it LGTM

Comment on lines 26 to 27
default_org: "kubernetes"
default_repo: "k8s.io"
Copy link
Member

Choose a reason for hiding this comment

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

I edited the suggestion to remove these two lines, I'd like to see this change accepted before lgtm

Add kubernetes manifests for k8s-infra-prow
Move ghproxy to cluster folder
Add configuration for k8s-infra-prow
Add plugins configuration for k8s-infra-prow
Ensure deploy.sh targets cluster folder
Add ingress and GKE managed certificate
Add a Makefile for prow config and plugins deployments.
Add a Makefile with commands allowing to update prow config and plugins
once changes are merged.
Create and Add Github HMAC Token to GCP Secrets Manager of project
kubernetes-public.
Create Github OAuth config and add it to GCP Secrets Manager.
Fix yamllint
@ameukam ameukam force-pushed the aaa-k8s-infra-prow branch from e943787 to d68d628 Compare August 6, 2021 07:02
@ameukam
Copy link
Member Author

ameukam commented Aug 6, 2021

one nit, just the one, otherwise it LGTM

@spiffxp removed the lines.

Copy link
Member

@spiffxp spiffxp left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 6, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ameukam, spiffxp

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2021
@k8s-ci-robot k8s-ci-robot merged commit 931fb05 into kubernetes:main Aug 6, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Aug 6, 2021
@spiffxp
Copy link
Member

spiffxp commented Aug 6, 2021

@spiffxp
Copy link
Member

spiffxp commented Aug 6, 2021

Retriggered job via re-run button https://prow.k8s.io/?job=post-k8sio-deploy-app-prow

@spiffxp
Copy link
Member

spiffxp commented Aug 6, 2021

OK I think the remaining errors are token / typo related https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/post-k8sio-deploy-app-prow/1423707644174012416

will leave to @ameukam to fix for now

ameukam added a commit to ameukam/k8s.io that referenced this pull request Aug 6, 2021
ameukam added a commit to ameukam/k8s.io that referenced this pull request Aug 6, 2021
Fix typos and mistakes found during deployment of :
kubernetes#2235
@ameukam
Copy link
Member Author

ameukam commented Aug 6, 2021

Some issues we have post-deployment :

  • sinker & prow-controller-manager:
E0807 22:07:54.495104       1 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Pod: failed to list *v1.Pod: pods is forbidden: User "system:serviceaccount:prow:sinker" cannot list resource "pods" in API group "" in the namespace "k8s-infra-test-pods"
  • deck need to allowed to push objects on gs://k8s-testgrid:
kubectl -n prow logs -l app=deck
...
{"component":"deck","error":"Get \"https://storage.googleapis.com/k8s-testgrid/config\": compute: Received 403 `Unable to generate access token; IAM returned 403 Forbidden: The caller does not have permission\nThis error could be caused by a missing IAM policy binding on the target IAM service account.\nFor more information, refer to the Workload Identity documentation:\n\thttps://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#authenticating_to\n\n`","file":"prow/spyglass/testgrid.go:50","func":"k8s.io/test-infra/prow/spyglass.(*TestGrid).Start.func1","level":"error","msg":"Couldn't update TestGrid config.","path":"gs://k8s-testgrid/config","severity":"error","time":"2021-08-06T21:50:08Z"}

@spiffxp I believe this is under a Google GCP Org. IAM binding may need to be done by Googlers.

  • tide need to push objects to gs://k8s-infra-prow-results.
{"component":"tide","error":"error initializing history client from \"gs://k8s-infra-prow-results/tide-history.json\": open: Get \"https://storage.googleapis.com/k8s-infra-prow-results/tide-history.json\": compute: Received 403 `Unable to generate access token; IAM returned 403 Forbidden: The caller does not have permission\nThis error could be caused by a missing IAM policy binding on the target IAM service account.\nFor more information, refer to the Workload Identity documentation:\n\thttps://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#authenticating_to\n\n`","file":"prow/cmd/tide/main.go:176","func":"main.main","level":"fatal","msg":"Error creating Tide controller.","severity":"fatal","time":"2021-08-06T22:55:38Z"}

ameukam added a commit to ameukam/k8s.io that referenced this pull request Aug 6, 2021
Fix typos and mistakes found during deployment of :
kubernetes#2235
ameukam added a commit to ameukam/k8s.io that referenced this pull request Aug 7, 2021
Fix typos and mistakes found during deployment of :
kubernetes#2235
@ameukam
Copy link
Member Author

ameukam commented Aug 8, 2021

Ref: #1394

ameukam added a commit to ameukam/k8s.io that referenced this pull request Aug 9, 2021
Followup of kubernetes#2235.
Ref: kubernetes#1394.

sinker & prow-controller-manager require a namespace is present and they
can list and update the pods presents in this namespace:

```shell
E0807 22:07:54.495104       1 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Pod: failed to list *v1.Pod: pods is forbidden: User "system:serviceaccount:prow:sinker" cannot list resource "pods" in API group "" in the namespace "k8s-infra-test-pods"
```

Signed-off-by: Arnaud Meukam <[email protected]>
ameukam added a commit to ameukam/k8s.io that referenced this pull request Aug 9, 2021
Followup of kubernetes#2235.
Ref: kubernetes#1394.

sinker & prow-controller-manager require a namespace is present and they
can list and update the pods presents in this namespace:

```shell
E0807 22:07:54.495104       1 reflector.go:138] external/io_k8s_client_go/tools/cache/reflector.go:167: Failed to watch *v1.Pod: failed to list *v1.Pod: pods is forbidden: User "system:serviceaccount:prow:sinker" cannot list resource "pods" in API group "" in the namespace "k8s-infra-test-pods"
```

Signed-off-by: Arnaud Meukam <[email protected]>
@ameukam ameukam mentioned this pull request Aug 11, 2021
9 tasks
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/access Define who has access to what via IAM bindings, role bindings, policy, etc. area/apps/prow k8s-infra-prow.k8s.io, code in apps/prow/ area/apps Application management, code in apps/ area/bash Bash scripts, testing them, writing less of them, code in infra/gcp/ area/groups Google Groups management, code in groups/ area/infra Infrastructure management, infrastructure design, code in infra/ cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/security Categorizes an issue or PR as relevant to SIG Security. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants