Propper check for unleash enabled configuration options#285
Open
Starefossen wants to merge 4 commits intomainfrom
Open
Propper check for unleash enabled configuration options#285Starefossen wants to merge 4 commits intomainfrom
Starefossen wants to merge 4 commits intomainfrom
Conversation
Contributor
|
Den feilen skjer ved oppstart, no? Vi byttet til å gjøre discovery av config basert på tilgjengelige ressurser, fremfor å vedlikeholde en liste av booleans. Men ble kanskje ikke helt ryddet opp. Men jeg har egentlig mer lyst å finne ut av den løsningen framfor å ha det som config |
442dd7b to
5ada747
Compare
Member
Author
|
Enig, @thokra-nav! |
thokra-nav
reviewed
Jan 9, 2026
Comment on lines
+82
to
+91
|
|
||
| // Also verify we have permission to list the resource by doing a test list with limit=1 | ||
| // This prevents errors at runtime when the informer tries to watch resources we can't access | ||
| ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) | ||
| defer cancel() | ||
| _, err = c.client.Resource(*gvr).List(ctx, v1.ListOptions{Limit: 1}) | ||
| if err != nil { | ||
| c.log.WithError(err).WithField("resource", gvr.String()).Warn("no permission to list resource, skipping watcher") | ||
| return nil, *gvr, fmt.Errorf("no permission to list resource: %w", err) | ||
| } |
Contributor
There was a problem hiding this comment.
Hvorfor trenger vi dette?
Hvis det er rettigheter som er problemet, så er det fint at vi rett og slett blir spamma imho. Vi kan også fikse rettighetene uten å måtte restarte api etterpå, no?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevents errors like this: