-
Notifications
You must be signed in to change notification settings - Fork 1
increase timeout and added some log lines #197
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ public Optional<V1DeploymentSpec> getDeploymentSpec(String serviceLabel, Kuberne | |
| try | ||
| { | ||
| String labelSelector = String.format("%s=%s", serviceLabel, service); | ||
| log.debug("Filtering deployment {} using selector {}", resource, labelSelector); | ||
| log.debug("Filtering resource {} using selector {}", resource, labelSelector); | ||
| var deployments = createAppsV1Api(client).listNamespacedDeployment( | ||
| K8S_DEFAULT_NAMESPACE, | ||
| K8S_PRETTY_OUTPUT, | ||
|
|
@@ -65,9 +65,10 @@ public Optional<V1DeploymentSpec> getDeploymentSpec(String serviceLabel, Kuberne | |
| } | ||
| catch (ApiException ex) | ||
| { | ||
| log.error(ex.getMessage(), ex); | ||
| log.error("getDeploymentSpec failed '{}'", ex.getMessage(), ex); | ||
| } | ||
|
|
||
| log.warn("No deployment returned for service '{}'", service); | ||
|
||
| return Optional.empty(); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ public final class KubernetesConstants | |
| { | ||
| public static final String K8S_DEFAULT_NAMESPACE = "default"; | ||
|
|
||
| public static final int K8S_API_TIMEOUT_SECONDS = 5; | ||
| public static final int K8S_API_TIMEOUT_SECONDS = 30; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’m not sure if you noticed, but the timeout is only happening in the |
||
|
|
||
| public static final String K8S_PRETTY_OUTPUT = Boolean.FALSE.toString(); | ||
| } | ||
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.
I think we could keep it as
Filtering deploymentfor consistency with other logs and because we actually filtering data from deployments....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.
I see but it's logging like this
Filtering deployment DEPLOYMENT using selector. Actually argumentKubernetesResources resourceis representing the resource type which in this function is Deployment.There are another resource type defined : https://github.com/freenowtech/sauron/blob/main/plugins/kubernetesapi-report/src/main/java/com/freenow/sauron/plugins/utils/KubernetesResources.java#L5