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

Kubernetes set-up without impersonate doesn't work #332

Open
klepiz opened this issue Nov 19, 2021 · 1 comment
Open

Kubernetes set-up without impersonate doesn't work #332

klepiz opened this issue Nov 19, 2021 · 1 comment

Comments

@klepiz
Copy link

klepiz commented Nov 19, 2021

I'm tying to set marge-bot on kubernetes cluster like this
ktmpl ./deploy.yml
--parameter APP_NAME "marge-bot"
--parameter APP_IMAGE "smarkets/marge-bot"
--parameter KUBE_NAMESPACE "marge-bot"
--parameter MARGE_GITLAB_URL 'https://our-git-url'
--parameter MARGE_AUTH_TOKEN "$(cat marge-bot.token)"
--parameter MARGE_SSH_KEY "$(cat marge-bot-ssh-key)"
--parameter MARGE_ADD_PART_OF "true"
--parameter MARGE_ADD_TESTED "true"
--parameter MARGE_CI_TIMEOUT "120min"
--parameter MARGE_GIT_TIMEOUT "3600s"
--parameter MARGE_BATCH "true"
--parameter MARGE_IMPERSONATE_APPROVERS 'false'
--parameter MARGE_ADD_REVIEWERS 'false'
--parameter REPLICA_COUNT 1 | kubectl --namespace=marge-bot apply --force -f -
and the pod is returning:

Traceback (most recent call last):
  File "/nix/store/0ljil4j1g16cr8i3f2viha9rdjhcvyb7-python3.6-marge-0.10.0/bin/.marge.app-wrapped", line 6, in <module>
    marge.app.main()
  File "/nix/store/0ljil4j1g16cr8i3f2viha9rdjhcvyb7-python3.6-marge-0.10.0/lib/python3.6/site-packages/marge/app.py", line 350, in main
    marge_bot = bot.Bot(api=api, config=config)
  File "/nix/store/0ljil4j1g16cr8i3f2viha9rdjhcvyb7-python3.6-marge-0.10.0/lib/python3.6/site-packages/marge/bot.py", line 27, in __init__
    "{0.username} is not an admin, can't impersonate!".format(user)
AssertionError: robot is not an admin, can't impersonate!```

Am I missing something or is it a bug?

@klepiz
Copy link
Author

klepiz commented Nov 22, 2021

I find out that you are hardcoded the flags to use on kubernetes, is there a way to be able to custumize the flags on k8s without change deploy.yaml?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant