-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
Nikita-Smirnov-Exactpro
commented
Nov 27, 2023
- added logging and secret value check
* added logging and secret value check
src/main/java/com/exactpro/th2/inframgr/repository/RepositoryWatcherService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/exactpro/th2/inframgr/repository/RepositoryWatcherService.java
Outdated
Show resolved
Hide resolved
src/main/java/com/exactpro/th2/inframgr/NamespaceController.java
Outdated
Show resolved
Hide resolved
@@ -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(); |
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.
Why have you started using serverSideApply
instead createOrReplace
? Is there any particular reason for that?
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.
createOrReplace is deprecated, auto-replacing recommends serverSideApply
@@ -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)) { |
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.
Honestly, it looks like this class should have the kubernetes instance as a field