Prow infra for kubecoins
Download 1Password CLI
Signin in to 1password for example:
eval $(op signin companyabc someone@somewhere.com)
Instead of supplying command line args you can set the following environment variables:
OP_SIGNIN_ADDRESS
OP_EMAIL_ADDRESS
OP_SECRET_KEY
OP_MASTER_KEY
Create config/clusters/local.tfvars
which any sensitive values. For eaxmple:
eks_groups = [
{
rolearn = "arn
iam:
role/AdministratorAccess"
username = "cx-admins"
groups = ["system:masters"]
},
]
Apply the clusters TF
make tf-apply
Create access key for kubecoins-prow-s3 users
create config/prow/service-account.json
with the format defined here:
https://github.com/kubernetes/test-infra/blob/master/prow/io/providers/providers.go#L49
// {
// “region”: “us-east-1”,
// “s3_force_path_style”: true,
// “access_key”: “access_key”,
// “secret_key”: “secret_key”
// }
make prow-s3-credentials
kubectl apply -k “github.com/kubernetes-sigs/aws-ebs-csi-driver/deploy/kubernetes/overlays/stable/?ref=master”
prow/github_oauth
is the GitHib OAuth settings fileprow/cookie
is the cookie filemake cookie
make github-oauth
config/prow/oauth_token
. It must have the following scopes:make oauth-token
make plugins
make update-config
Create jobs config
kubectl create cm jobs-config
make update-jobs
Get the LB address from the ingress:
kubectl get ingress ing
Using the bot account go to the test-infra repo settings and add a webhook:
Payload URL: http://LB_ADDR_FROM_ING:8888/hook
Content Type: application/json
Secret: <
Send me eveything
Install Prow:
make prow
(you may need to get the eks kubeconfig make kubeconfig)
Get the external IP of deck:
kubectl get svc deck
Set the alias for prow.kubecoins.com in Route53 to the LB created for Deck
This is done via https://github.com/kubernetes/test-infra/tree/master/prow/cmd/peribolos
You can initially seed the config file from an existing org by doing the following:
Clone upstream test-infra:
git clone https://github.com/kubernetes/test-infra
Run the following from the root of the cloned repo
bazel run //prow/cmd/peribolos — —dump kubecoins —github-token-path <
Job:
Based on the test-infra from Kubernetes and associated Falco security work: https://github.com/falcosecurity/test-infra
And associated AWS article:
https://aws.amazon.com/blogs/opensource/how-falco-uses-prow-on-aws-for-open-source-testing/