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

Revisit ResourceVersion usage in resource factories #90

Closed
sergeyshevch opened this issue Mar 27, 2024 · 3 comments · Fixed by #100
Closed

Revisit ResourceVersion usage in resource factories #90

sergeyshevch opened this issue Mar 27, 2024 · 3 comments · Fixed by #100
Assignees

Comments

@sergeyshevch
Copy link
Member

@aobort in #84 (comment) found that resource update correctly works without copying of ResourceVersion to newly generated structure in k8s 1.29+

We need to verify it for different k8s versions and remove if it isn't required

@aobort
Copy link
Collaborator

aobort commented Mar 30, 2024

How many k8s versions prior the latest one do we want to support and need to be tested?

@sircthulhu
Copy link
Member

@aobort according to kubernetes releases, version 1.27 is going to be the end of line in June, 2024. I suppose we need to support all "alive" versions

@aobort aobort assigned aobort and unassigned sergeyshevch Mar 31, 2024
@aobort
Copy link
Collaborator

aobort commented Apr 1, 2024

Removed copying of ResourceVersion to newly generated structure and run tests for k8s versions 1.27.1, 1.28.0, 1.29.0:

for ver in {1.27.1,1.28.0,1.29.0}; do ENVTEST_K8S_VERSION=$ver make test; done
/Users/A117675684/Repos/aenix.io/etcd-operator/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/Users/A117675684/Repos/aenix.io/etcd-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
KUBEBUILDER_ASSETS="/Users/A117675684/Repos/aenix.io/etcd-operator/bin/k8s/1.27.1-darwin-arm64" go test $(go list ./... | grep -v /e2e) -coverprofile cover.out
?       github.com/aenix-io/etcd-operator/cmd   [no test files]
?       github.com/aenix-io/etcd-operator/test/utils    [no test files]
ok      github.com/aenix-io/etcd-operator/api/v1alpha1  4.283s  coverage: 14.0% of statements
ok      github.com/aenix-io/etcd-operator/internal/controller   6.520s  coverage: 50.0% of statements
ok      github.com/aenix-io/etcd-operator/internal/controller/factory   4.564s  coverage: 92.2% of statements
/Users/A117675684/Repos/aenix.io/etcd-operator/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/Users/A117675684/Repos/aenix.io/etcd-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
KUBEBUILDER_ASSETS="/Users/A117675684/Repos/aenix.io/etcd-operator/bin/k8s/1.28.0-darwin-arm64" go test $(go list ./... | grep -v /e2e) -coverprofile cover.out
?       github.com/aenix-io/etcd-operator/cmd   [no test files]
?       github.com/aenix-io/etcd-operator/test/utils    [no test files]
ok      github.com/aenix-io/etcd-operator/api/v1alpha1  4.405s  coverage: 14.0% of statements
ok      github.com/aenix-io/etcd-operator/internal/controller   6.426s  coverage: 50.0% of statements
ok      github.com/aenix-io/etcd-operator/internal/controller/factory   5.115s  coverage: 92.2% of statements
/Users/A117675684/Repos/aenix.io/etcd-operator/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/Users/A117675684/Repos/aenix.io/etcd-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
KUBEBUILDER_ASSETS="/Users/A117675684/Repos/aenix.io/etcd-operator/bin/k8s/1.29.0-darwin-arm64" go test $(go list ./... | grep -v /e2e) -coverprofile cover.out
?       github.com/aenix-io/etcd-operator/cmd   [no test files]
?       github.com/aenix-io/etcd-operator/test/utils    [no test files]
ok      github.com/aenix-io/etcd-operator/api/v1alpha1  4.459s  coverage: 14.0% of statements
ok      github.com/aenix-io/etcd-operator/internal/controller   6.872s  coverage: 50.0% of statements
ok      github.com/aenix-io/etcd-operator/internal/controller/factory   4.785s  coverage: 92.2% of statements

aobort added a commit that referenced this issue Apr 1, 2024
Fixes: #90

Signed-off-by: Artem Bortnikov <artem.bortnikov@telekom.com>
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 a pull request may close this issue.

3 participants