removes logging full resources to omit secret data (#22467)
Closes #22080
This commit is contained in:
parent
6d85ceef25
commit
48a4102c97
1 changed files with 4 additions and 4 deletions
|
@ -24,7 +24,6 @@ import io.fabric8.kubernetes.client.KubernetesClient;
|
||||||
import io.fabric8.kubernetes.client.KubernetesClientException;
|
import io.fabric8.kubernetes.client.KubernetesClientException;
|
||||||
import io.fabric8.kubernetes.client.dsl.base.PatchContext;
|
import io.fabric8.kubernetes.client.dsl.base.PatchContext;
|
||||||
import io.fabric8.kubernetes.client.dsl.base.PatchType;
|
import io.fabric8.kubernetes.client.dsl.base.PatchType;
|
||||||
import io.fabric8.kubernetes.client.utils.Serialization;
|
|
||||||
import io.quarkus.logging.Log;
|
import io.quarkus.logging.Log;
|
||||||
|
|
||||||
import org.keycloak.operator.Constants;
|
import org.keycloak.operator.Constants;
|
||||||
|
@ -79,11 +78,12 @@ public abstract class OperatorManagedResource<T extends HasMetadata> {
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log.debugf("Successfully created or updated resource: %s", resource);
|
Log.debugf("Successfully created or updated resource: %s %s/%s", resource.getKind(), resource.getMetadata().getNamespace(),
|
||||||
|
resource.getMetadata().getName());
|
||||||
return resource;
|
return resource;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.error("Failed to create or update resource");
|
Log.errorf("Failed to create or update resource %s %s/%s", resource.getKind(), resource.getMetadata().getNamespace(),
|
||||||
Log.error(Serialization.asYaml(resource));
|
resource.getMetadata().getName());
|
||||||
throw KubernetesClientException.launderThrowable(e);
|
throw KubernetesClientException.launderThrowable(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue