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

Fix #3326: Update Kubernetes Model to Kubernetes v1.22.1 #3452

Merged

Conversation

rohanKanojia
Copy link
Member

@rohanKanojia rohanKanojia commented Sep 8, 2021

Description

Fix #3326

  • Updated Kubernetes Model to Kubernetes v1.22.1

Signed-off-by: Rohan Kumar rohaan@redhat.com

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@rohanKanojia rohanKanojia force-pushed the pr/kubernetes-model-1-22-upgrade branch 2 times, most recently from 68b0191 to d24d2af Compare September 8, 2021 06:53
@rohanKanojia rohanKanojia force-pushed the pr/kubernetes-model-1-22-upgrade branch 4 times, most recently from 642bfaf to cb9e01b Compare September 13, 2021 05:23
@rohanKanojia rohanKanojia marked this pull request as ready for review September 13, 2021 07:07
@manusa manusa added this to the 5.8.0 milestone Sep 13, 2021
@manusa
Copy link
Member

manusa commented Sep 15, 2021

Did you check you added every new API?

I don't see anything related to:

@rohanKanojia
Copy link
Member Author

I'm not able to see any api resource named Eviction when I do kubectl api-resources on a Kubernetes 1.22 cluster.

@manusa
Copy link
Member

manusa commented Sep 15, 2021

Eviction is not a new resource, is the type to represent the request body for:

  • /api/v1/namespaces/{namespace}/pods/{name}/eviction

@manusa manusa added the wip label Sep 16, 2021
@rohanKanojia
Copy link
Member Author

Right now we do have support for Pod eviction via evict() method which was added in #2249 . However, this internally builds up a io.fabric8.kubernetes.api.model.policy.v1beta1.Eviction. I'm keeping it as it is and adding a new DSL method in Evictable interface which will receive policy/v1 Eviction object:

B evict(io.fabric8.kubernetes.api.model.policy.v1.Eviction eviction);

@rohanKanojia
Copy link
Member Author

Tests seem to be failing since we don't have support for policy/v1 Eviction in Kubernetes versions < 1.22.1 . Shall I remove integration test regarding policy/v1 Eviction or shall I try adding Kubernetes 1.22 in CI suite and only run eviction test there?

@manusa
Copy link
Member

manusa commented Sep 17, 2021

Tests seem to be failing since we don't have support for policy/v1 Eviction in Kubernetes versions < 1.22.1 . Shall I remove integration test regarding policy/v1 Eviction or shall I try adding Kubernetes 1.22 in CI suite and only run eviction test there?

The latter (add new CI suite and run test only in 1.22)

@rohanKanojia rohanKanojia force-pushed the pr/kubernetes-model-1-22-upgrade branch 2 times, most recently from 00401de to 1f48d83 Compare September 17, 2021 11:46
@rohanKanojia rohanKanojia force-pushed the pr/kubernetes-model-1-22-upgrade branch 3 times, most recently from 34e796b to 39b3288 Compare September 20, 2021 09:34
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
policy/v1 Eviction was introduced in Kubernetes 1.22.1 . There was
already some work done for eviction API in fabric8io#2249

Right now, we have an evict() DSL method which builds up policy/v1beta1 Eviction
objecti internally.

Adding evict(io.fabric8.kubernetes.api.model.policy.v1.Eviction) method
to Evictable interface in order to allow use of policy/v1 Eviction.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@sonarcloud
Copy link

sonarcloud bot commented Sep 21, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@manusa manusa removed the wip label Sep 21, 2021
@manusa manusa merged commit e8fdf27 into fabric8io:master Sep 21, 2021
@rohanKanojia rohanKanojia deleted the pr/kubernetes-model-1-22-upgrade branch September 21, 2021 12:53
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.

Update APIs for Kubernetes 1.22
3 participants