-
Notifications
You must be signed in to change notification settings - Fork 1.6k
K8s Java client upgrade #3075
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
K8s Java client upgrade #3075
Conversation
azkaban-common/src/main/java/azkaban/executor/container/KubernetesContainerizedImpl.java
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/KubernetesContainerizedImpl.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/watch/KubernetesWatch.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/watch/KubernetesWatch.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #3075 +/- ##
============================================
+ Coverage 41.58% 41.59% +0.01%
+ Complexity 4658 4657 -1
============================================
Files 596 596
Lines 40094 40117 +23
Branches 4662 4665 +3
============================================
+ Hits 16672 16687 +15
- Misses 22038 22044 +6
- Partials 1384 1386 +2
Continue to review full report at Codecov.
|
… / fixed indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this change Utkarsh!
- Could you please add more context as we discussed offline?
- Can we test the functional use cases manually, and call out the use cases tested?
- Please call out the contract changes like RestartPolicyEnum, and the need for OffsetDateTime to inform the readers of this PR.
azkaban-common/src/main/java/azkaban/executor/container/watch/KubernetesWatch.java
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/container/models/AzKubernetesV1SpecBuilder.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/KubernetesContainerizedImpl.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/KubernetesContainerizedImpl.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/KubernetesContainerizedImpl.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/watch/AzPodStatusExtractor.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/watch/KubernetesWatch.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on the client upgrade. Overall the code looks good. I have left a few comments. Please address those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for taking this up!
azkaban-common/src/main/java/azkaban/executor/container/KubernetesContainerizedImpl.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/KubernetesContainerizedImpl.java
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/watch/KubernetesWatch.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/watch/KubernetesWatch.java
Outdated
Show resolved
Hide resolved
8000
azkaban-common/src/main/java/azkaban/executor/container/watch/KubernetesWatch.java
Outdated
Show resolved
Hide resolved
azkaban-common/src/main/java/azkaban/executor/container/watch/KubernetesWatch.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking care of these. Due to the nature of the changes, please give them extra soak-time on test/dev setups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for all the hard work to fix this issue.
* K8s Java client upgrade * Removed unused imports * Marked watch in listNamespacedPodCall back to true * Changed label value in listNamespacedPod back to original label value / fixed indentation * Using GenericKubernetesApi for service deletion and adding config values for K8s watch timeout * Removing extra log lines used for testing * Addressing all comments on PR (cherry-picked from commit 3233a2d) PR Link : #3075 RB=3331598
Upgrading K8s Java client:
Why this change was required?
AKS and On-Prem K8s cluster upgrades are imminent and we will have breaking API compatibility as mentioned here,
https://github.com/kubernetes-client/java/wiki/2.-Versioning-and-Compatibility
Issues that triggered this investigation
K8s watch events were not being received after a few days on AKS.
After looking through the following issues kubernetes-client/java#1370 we realized our client version might become incompatible soon.
We still plan to keep the call/read/connect timeouts to the watch server.
High-level Changes :
Gotchas::
We are now using the GenericKubernetesApi instead of CoreV1APi for service deletion due to :
https://github.com/kubernetes-client/java/wiki/6.-Known-Issues