-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Upgrade the fabric client to support newer versions of k8s #13804
Closed
Closed
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b7f8422
Upgrade the fabric client to support newer versions of k8s, add abili…
churromorales ae4248f
Fix dependencies check in build
churromorales c77cb94
Have to remove the concrete dependency and keep the api
churromorales 922afaa
Forgot to update the expected file in this commit
churromorales e655777
Adding code coverage, fixing some inspections
churromorales 9d14e46
Made a mistake on which mocks to call verify on
churromorales 9be2a23
Have to add the client back as a runtime dependency, otherwise we get…
churromorales 4d76e5f
Last change and some log fixes to work with k8s 1.25
churromorales 1e97768
Update docs/development/extensions-contrib/k8s-jobs.md
churromorales 55875f2
Changes per PR review
churromorales 4b836f3
Merge branch 'master' into k8s-mm-less-fixes
churromorales 4e8bb9d
Update docs/development/extensions-contrib/k8s-jobs.md
churromorales c28d260
Small fix to make the config match the docs and fixed a typo in the t…
churromorales 79c1e6b
Merge branch 'master' into k8s-mm-less-fixes
churromorales 82e316a
Removing the un-needed code coverage happy test
churromorales 2871150
Merge conflicts due to the PodTemplateTaskAdapter commit
churromorales File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
...rd-extensions/src/main/java/org/apache/druid/k8s/overlord/common/LogWatchInputStream.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.apache.druid.k8s.overlord.common; | ||
|
||
import io.fabric8.kubernetes.client.KubernetesClient; | ||
import io.fabric8.kubernetes.client.dsl.LogWatch; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
|
||
/** | ||
* This wraps the InputStream for k8s client | ||
* When you call close on the stream, it will also close the open | ||
* http connections and the client | ||
*/ | ||
public class LogWatchInputStream extends InputStream | ||
churromorales marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
|
||
private final KubernetesClient client; | ||
private final LogWatch logWatch; | ||
|
||
public LogWatchInputStream(KubernetesClient client, LogWatch logWatch) | ||
{ | ||
this.client = client; | ||
this.logWatch = logWatch; | ||
} | ||
|
||
@Override | ||
public int read() throws IOException | ||
{ | ||
return logWatch.getOutput().read(); | ||
} | ||
|
||
@Override | ||
public void close() | ||
{ | ||
logWatch.close(); | ||
client.close(); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nit: It would be useful to mention this property in the extension specific docs as well.