-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
bundle validate incorrectly flags PodDisruptionBudget as removed #6237
Comments
@burmanm Thanks for raising this issue! This is something that is in the process of being resolved. There was an issue in the validation logic with operator-framework/api that didn't check the groups and only the resource names for permissions. This should have been resolved in the api repo as of operator-framework/api@f1b7296 and we just need to update our dependency on it in Operator SDK (PR #6227 updated the master branch). I'm hoping to get this included in a |
Sounds good. I'll wait until 1.27 until I try to enforce those warnings as failures. |
Since this issue is technically resolved as of #6227 I am going to close this issue |
@everettraven I think I'm still hitting this issue even with operator-sdk v1.26.1 (which appears to have the fix from #6227). I also tried with 1.27.0 but got the same warning. The changelog for v1.26.1 mentions this:
However I think the issue here is that we have a rule that has the same group and kind but has a different version. kubebuilder line:
And resulting rule:
Neither of these mentions v1beta1 but I still get the validation warning:
|
Bug Report
What did you do?
Ran:
What did you expect to see?
Well, nothing. PodDisruptionBudget policy/v1beta1 was deprecated, but not policy/v1.
What did you see instead? Under which circumstances?
Coming from this rule:
This is generated by the kubebuilder line:
// +kubebuilder:rbac:groups=policy,namespace=cass-operator,resources=poddisruptionbudgets,verbs=get;list;watch;create;update;patch;delete
With controller-tools 0.10.0. policy/v1 PodDisruptionBudget is used in the project (which was introduced in 1.21 and is definitely available in 1.25). This works fine. The validation does not seem to understand the difference between versions.
Environment
Operator type:
/language go
Kubernetes cluster type:
kind, 1.25.2 (not that it matters)
$ operator-sdk version
operator-sdk version: "v1.26.0", commit: "cbeec475e4612e19f1047ff7014342afe93f60d2", kubernetes version: "v1.25.0", go version: "go1.19.4", GOOS: "darwin", GOARCH: "amd64"
$ go version
(if language is Go)1.19
$ kubectl version
1.25.2
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: