George Pollard
George Pollard
> @benbooth493 Is there any workaround for this? Don’t use inline struct types, name every struct type like in https://github.com/kubernetes-sigs/controller-tools/issues/442#issuecomment-698017299
Hi @BarthV, it seems like this is an issue with [the k6 documentation](https://k6.io/blog/running-distributed-tests-on-k8s/)?
Note that the usual entrypoint is to use the overarching [Kubebuilder project](https://book.kubebuilder.io/) which uses `controller-gen` “under the hood”, and when doing this you do not need to call `controller-gen` directly...
Unfortunately, upstream does not use a regexp for validation so it can’t be simply included: https://github.com/kubernetes/apimachinery/blob/3b8fb46ed6f145544bd363fab539decff47c3753/pkg/api/resource/quantity.go#L147
I'd also note that [the documentation of what is permitted](https://github.com/kubernetes/kubernetes/blob/f02682c628c530219966a00ae002d799f0d813dc/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go#L31-L66) is incorrect with regards to what `parseQuantityString` actually allows. (e.g. `n` and `u` are permitted as suffixes)
Here's a first-pass take on a regex that matches upstream: ```go package tests import ( "fmt" "regexp" "testing" ) // copied from: https://github.com/kubernetes/apimachinery/blob/3b8fb46ed6f145544bd363fab539decff47c3753/pkg/api/resource/quantity.go#L31-L49 // ::= 0 | 1 | ......
[Link to upstream issue for linkiness](https://github.com/kubernetes/kubernetes/issues/109839).
/remove-lifecycle rotten it's not rotten, it's floundering
Ideally we'd also rely on [the k8s code](https://github.com/kubernetes/kubernetes/blob/ea0764452222146c47ec826977f49d7001b0ea8c/pkg/apis/rbac/v1/helpers.go) to help enforce requirements on the `PolicyRule` (see `PolicyRuleBuilder`) but importing this requires [a bunch of `replace`s added into `go.mod`](https://github.com/kubernetes-sigs/cloud-provider-huaweicloud/blob/master/go.mod). Is this...
With the PR this simplifies down into: ```yaml - apiGroups: - cluster.x-k8s.io resources: - machinedeployments - machinedeployments/finalizers - machinedeployments/status verbs: - create - delete - get - list - patch...