-
Notifications
You must be signed in to change notification settings - Fork 55
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
Update Kubernetes Client to 6.X.X #532
Conversation
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.
comments in code, please fix all deletes in OpenShift.java
, I commented only few of them
core/src/main/java/cz/xtf/core/openshift/ClusterVersionInfo.java
Outdated
Show resolved
Hide resolved
test-helpers/src/main/java/cz/xtf/testhelpers/image/ImageMetadata.java
Outdated
Show resolved
Hide resolved
ef875c4
to
02490fd
Compare
@RoyalKarma thanks, we will need CI run with EAP Openshift TS before this gets merged. |
@@ -60,9 +60,9 @@ | |||
private IntOrString getPort() { | |||
IntOrStringBuilder builder = new IntOrStringBuilder(); | |||
if (StringUtils.isNumeric(port)) { | |||
builder.withIntVal(Integer.valueOf(port)); | |||
builder.withValue(Integer.valueOf(port)); |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException Note
fe8dfa8
to
73d9f1d
Compare
…lient Relevant XTF changes [1]. Kubernetes Client migration guide [2]. [1] xtf-cz/xtf#532 [2] https://github.com/fabric8io/kubernetes-client/blob/v6.0.0/doc/MIGRATION-v6.md
…lient Relevant XTF changes [1]. Kubernetes Client migration guide [2]. [1] xtf-cz/xtf#532 [2] https://github.com/fabric8io/kubernetes-client/blob/v6.0.0/doc/MIGRATION-v6.md
b1fbb8e
to
bae27db
Compare
bae27db
to
8593c7b
Compare
8593c7b
to
b264a47
Compare
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.
LGTM, only question to update to latest version.
…lient Relevant XTF changes [1]. Kubernetes Client migration guide [2]. Some inspiration taken from [3]. [1] xtf-cz/xtf#532 [2] https://github.com/fabric8io/kubernetes-client/blob/v6.0.0/doc/MIGRATION-v6.md [3] https://gitlab.hosts.mwqe.eng.bos.redhat.com/atucek/openshift-eap-tests/-/compare/master...update_kn_client?from_project_id=2043&straight=false
…lient Relevant XTF changes [1]. Kubernetes Client migration guide [2]. [1] xtf-cz/xtf#532 [2] https://github.com/fabric8io/kubernetes-client/blob/v6.0.0/doc/MIGRATION-v6.md
@@ -85,7 +85,7 @@ | |||
String tempName = image.getRepo() + "-" + randomString(); | |||
ImageStream imageStream = image.getImageStream(tempName); | |||
imageStream.getMetadata().setName(tempName); | |||
openShift.imageStreams().createOrReplace(imageStream); | |||
openShift.imageStreams().resource(imageStream).createOrReplace(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
CreateOrReplaceable.createOrReplace
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.
This seems to be working for Intersmash.
As a side note, projects depending on strimzi for Kafka would have issues since their latest release (0.36.1) supports Fabric8 Kubernetes client v. 6.7.2, which is not compatible with 6.8.1 (planned for 0.37).
Anyway, this is just a side note, as it's related to other projects' dependency configuration, rather than to the changes in this PR.
TS run after update to 6.8.1 |
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.
please squash commits
bf5cd0c
to
71ea7a3
Compare
.withData(Collections.singletonMap(".dockerconfigjson", Base64.getEncoder().encodeToString(secret.getBytes()))) | ||
.build(); | ||
secrets().createOrReplace(pullSecret); | ||
secrets().resource(pullSecret).createOrReplace(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
CreateOrReplaceable.createOrReplace
@@ -729,12 +735,13 @@ | |||
} | |||
|
|||
private boolean deleteReplicationController(ReplicationController replicationController) { | |||
return replicationControllers().withName(replicationController.getMetadata().getName()).cascading(false).delete(); | |||
return !replicationControllers().withName(replicationController.getMetadata().getName()).cascading(false).delete() |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
Resource.cascading
@@ -759,7 +766,7 @@ | |||
} | |||
|
|||
public DeploymentConfig updateDeploymentconfig(DeploymentConfig deploymentConfig) { | |||
return deploymentConfigs().withName(deploymentConfig.getMetadata().getName()).replace(deploymentConfig); | |||
return deploymentConfigs().withName(deploymentConfig.getMetadata().getName()).replace(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
Replaceable.replace
@@ -787,7 +794,7 @@ | |||
} | |||
|
|||
public boolean deleteDeploymentConfig(DeploymentConfig deploymentConfig, boolean cascading) { | |||
return deploymentConfigs().withName(deploymentConfig.getMetadata().getName()).cascading(cascading).delete(); | |||
return !deploymentConfigs().withName(deploymentConfig.getMetadata().getName()).cascading(cascading).delete().isEmpty(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
Resource.cascading
@@ -869,7 +876,7 @@ | |||
} | |||
|
|||
public BuildConfig updateBuildConfig(BuildConfig buildConfig) { | |||
return buildConfigs().withName(buildConfig.getMetadata().getName()).replace(buildConfig); | |||
return buildConfigs().withName(buildConfig.getMetadata().getName()).replace(); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
Adding compatibility with Kubernetes Client 6.X.X.