Skip to content

revert: "add logging to help identify issue with failing e2e test " #2125

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

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}


}