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

Replace Name with GlobalRoleName in GlobalRoleBinding log #598

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

JonCrowther
Copy link
Contributor

Issue: Found while testing rancher/rancher#47875

Problem

When attempting to create a Global Role Binding when the Global Role doesn't exist, the error message looks like this:

apiVersion: management.cattle.io/v3
kind: GlobalRoleBinding
metadata:
  name: test-grb1
globalRoleName: restricted-admin
userName: u-tdsgc

Error from server (BadRequest): error when creating "test.yaml": admission webhook "rancher.cattle.io.globalrolebindings.management.cattle.io" denied the request: globalrolebinding.globalRoleName: Not found: "test-grb1"

Solution

The error message was using the GRB.Name when it should be GRB.GlobalRoleName. Changed it.

CheckList

  • Test
  • Docs

@JonCrowther JonCrowther requested a review from joesims22 January 22, 2025 20:35
@JonCrowther JonCrowther self-assigned this Jan 22, 2025
@JonCrowther JonCrowther requested a review from a team as a code owner January 22, 2025 20:35
@JonCrowther JonCrowther merged commit d255932 into main Jan 23, 2025
2 checks passed
@JonCrowther JonCrowther deleted the fix-grb-validator-name-log branch January 23, 2025 13:30
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.

3 participants