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

[TH2-5132] behaviour.permittedToRemoveNamespace option #92

Merged
merged 18 commits into from
Apr 17, 2024

Conversation

Nikita-Smirnov-Exactpro
Copy link
Member

  • added logging and secret value check

* added logging and secret value check
@@ -113,7 +114,7 @@ public Set<String> deleteSecrets(String schemaName, Set<String> secretEntries) {
}
secret.setData(data);
try {
kubernetesClient.resource(secret).inNamespace(namespace).createOrReplace();
kubernetesClient.resource(secret).inNamespace(namespace).serverSideApply();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why have you started using serverSideApply instead createOrReplace? Is there any particular reason for that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

createOrReplace is deprecated, auto-replacing recommends serverSideApply

@Nikita-Smirnov-Exactpro Nikita-Smirnov-Exactpro marked this pull request as ready for review November 29, 2023 08:27
src/main/java/com/exactpro/th2/inframgr/Config.java Outdated Show resolved Hide resolved
@@ -72,30 +73,31 @@ private void startInformers() {
}

logger.info("Creating informers");
Kubernetes kube = new Kubernetes(config.getBehaviour(), config.getKubernetes(), null);
cache = K8sResourceCache.INSTANCE;
try (Kubernetes kube = new Kubernetes(config.getBehaviour(), config.getKubernetes(), null)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, it looks like this class should have the kubernetes instance as a field

@Nikita-Smirnov-Exactpro Nikita-Smirnov-Exactpro merged commit afd2330 into master Apr 17, 2024
8 of 9 checks passed
@Nikita-Smirnov-Exactpro Nikita-Smirnov-Exactpro deleted the TH2-5132 branch April 17, 2024 08:37
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.

2 participants