Skip to content

Commit

Permalink
Revert "add logging to help identify issue with failing e2e test (#2095
Browse files Browse the repository at this point in the history
…)" (#2125)

This reverts commit 1e5e03e.

Signed-off-by: Attila Mészáros <[email protected]>
  • Loading branch information
csviri committed Nov 20, 2023
1 parent dcebe80 commit c757153
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ public void onAdd(R newResource) {

@Override
public void onUpdate(R oldObject, R newObject) {
log.debug("On updated with old: {} \n new: {}", oldObject, newObject);
if (log.isDebugEnabled()) {
log.debug(
"On update event received for resource id: {} type: {} version: {} old version: {} ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ public UpdateControl<WebPage> reconcile(WebPage webPage, Context<WebPage> contex
ns);
var res = kubernetesClient.configMaps().inNamespace(ns).resource(desiredHtmlConfigMap)
.createOr(Replaceable::update);
log.debug("Updated config map: {}", res);
}

var existingDeployment = context.getSecondaryResource(Deployment.class).orElse(null);
Expand Down Expand Up @@ -184,14 +183,10 @@ private boolean match(Service desiredService, Service service) {
}

private boolean match(ConfigMap desiredHtmlConfigMap, ConfigMap existingConfigMap) {
log.debug("Actual config map: {}, desired configMap: {}", existingConfigMap,
desiredHtmlConfigMap);
if (existingConfigMap == null) {
return false;
} else {
var matched = desiredHtmlConfigMap.getData().equals(existingConfigMap.getData());
log.debug("Matched config map: {}", matched);
return matched;
return desiredHtmlConfigMap.getData().equals(existingConfigMap.getData());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import java.util.HashMap;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.fabric8.kubernetes.api.model.ConfigMap;
import io.fabric8.kubernetes.api.model.ConfigMapBuilder;
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
Expand All @@ -22,15 +19,12 @@
public class ConfigMapDependentResource
extends CRUDKubernetesDependentResource<ConfigMap, WebPage> {

private static final Logger log = LoggerFactory.getLogger(ConfigMapDependentResource.class);

public ConfigMapDependentResource() {
super(ConfigMap.class);
}

@Override
protected ConfigMap desired(WebPage webPage, Context<WebPage> context) {
log.debug("Web page spec: {}", webPage.getSpec().getHtml());
Map<String, String> data = new HashMap<>();
data.put("index.html", webPage.getSpec().getHtml());
Map<String, String> labels = new HashMap<>();
Expand All @@ -45,15 +39,4 @@ protected ConfigMap desired(WebPage webPage, Context<WebPage> context) {
.withData(data)
.build();
}

@Override
public Result<ConfigMap> match(ConfigMap actualResource, WebPage primary,
Context<WebPage> context) {
var matched = super.match(actualResource, primary, context);
log.debug("Match for config map {} res: {}", actualResource.getMetadata().getName(),
matched.matched());
return matched;
}


}

0 comments on commit c757153

Please sign in to comment.