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

Grant job patch permission #206

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

yuriipolishchuk
Copy link
Contributor

Hi!

Here's a fix for an issue we found after upgrading from 0.8.0 to 0.9.0 we have an error stating that the operator cannot patch a k8s job:
2024-07-04 15:09:31,955 ERROR [ReconcilerExecutor-locusttestreconciler-480] com.locust.operator.controller.utils.resource.manage.ResourceCreationManager: Exception occurred during Job creation: Failure executing: PATCH at: https://10.100.0.1:443/apis/batch/v1/namespaces/locust/jobs/locust-email-reports-test-worker?fieldManager=fabric8. Message: jobs.batch "locust-email-reports-test-worker" is forbidden: User "system:serviceaccount:locust:locust-operator-locust-k8s-operator" cannot patch resource "jobs" in API group "batch" in the namespace "locust". Received status: Status(apiVersion=v1, code=403, details=StatusDetails(causes=[], group=batch, kind=jobs, name=locust-email-reports-test-worker, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=jobs.batch "locust-email-reports-test-worker" is forbidden: User "system:serviceaccount:locust:locust-operator-locust-k8s-operator" cannot patch resource "jobs" in API group "batch" in the namespace "locust", metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Forbidden, status=Failure, additionalProperties={}).

Copy link

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.13%. Comparing base (0db4f06) to head (4744343).
Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #206   +/-   ##
=========================================
  Coverage     96.13%   96.13%           
  Complexity       89       89           
=========================================
  Files            12       12           
  Lines           414      414           
  Branches         12       12           
=========================================
  Hits            398      398           
  Misses           12       12           
  Partials          4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AbdelrhmanHamouda
Copy link
Owner

Thank you @yuriipolishchuk first, for taking the time and second, for finding this bug and contributing back to the project 🚀

Fix looks good.

@AbdelrhmanHamouda AbdelrhmanHamouda merged commit 594a69e into AbdelrhmanHamouda:master Jul 4, 2024
6 checks passed
@AbdelrhmanHamouda
Copy link
Owner

@yuriipolishchuk, version 0.9.1 has been released and can be directly used.

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

Successfully merging this pull request may close these issues.

None yet

2 participants