test-infra: Prow plugin local test instruction doesn't work

What happened:

Followed instruction of testing a plugin locally at https://github.com/kubernetes/test-infra/tree/master/prow/cmd/phony#running-a-github-event-manager. But the following command:

go run prow/cmd/hook/main.go
--deck-url=<production deck URL>
--config-path=config/prow/config.yaml
--plugin-config=config/prow/plugins.yaml
--hmac-secret-file=path/to/hmac
--github-token-path=path/to/github-token

failed with error:

{"component":"unset","error":"no dry-run kubernetes client is supported in dry-run mode","file":"/Users/chaodai/go/src/k8s.io/test-infra/prow/cmd/hook/main.go:169","func":"main.main","level":"fatal","msg":"Error getting Kubernetes client for infrastructure cluster.","severity":"fatal","time":"2020-10-30T08:58:14-07:00"}

What you expected to happen:

The command runs without problem

How to reproduce it (as minimally and precisely as possible):

Run the go run command mentioned above

Please provide links to example occurrences, if any:

Anything else we need to know?:

Wondering if it’s necessary to use kubeconfig in hook, since hook doesn’t alter hmac-token secret, can we mount it on hook instead?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (11 by maintainers)

Most upvoted comments

From what I read, the kubeconfig is not just used for accessing the hmac-token, it’s also used by some plugins to access the Prow (or maybe also other) cluster, e.g. the config-updater plugin will use it to update the configmap with the updated Prow config files. So it seems not quite easy to remove it.