outposts: fix log level

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-08-18 17:21:33 +02:00
parent dd2facdc57
commit 1ad4c8fc29
1 changed files with 4 additions and 4 deletions

View File

@ -239,12 +239,12 @@ def _outpost_single_update(outpost: Outpost, layer=None):
def outpost_local_connection(): def outpost_local_connection():
"""Checks the local environment and create Service connections.""" """Checks the local environment and create Service connections."""
if not CONFIG.y_bool("outposts.discover"): if not CONFIG.y_bool("outposts.discover"):
LOGGER.debug("Outpost integration discovery is disabled") LOGGER.info("Outpost integration discovery is disabled")
return return
# Explicitly check against token filename, as that's # Explicitly check against token filename, as that's
# only present when the integration is enabled # only present when the integration is enabled
if Path(SERVICE_TOKEN_FILENAME).exists(): if Path(SERVICE_TOKEN_FILENAME).exists():
LOGGER.debug("Detected in-cluster Kubernetes Config") LOGGER.info("Detected in-cluster Kubernetes Config")
if not KubernetesServiceConnection.objects.filter(local=True).exists(): if not KubernetesServiceConnection.objects.filter(local=True).exists():
LOGGER.debug("Created Service Connection for in-cluster") LOGGER.debug("Created Service Connection for in-cluster")
KubernetesServiceConnection.objects.create( KubernetesServiceConnection.objects.create(
@ -253,7 +253,7 @@ def outpost_local_connection():
# For development, check for the existence of a kubeconfig file # For development, check for the existence of a kubeconfig file
kubeconfig_path = Path(KUBE_CONFIG_DEFAULT_LOCATION).expanduser() kubeconfig_path = Path(KUBE_CONFIG_DEFAULT_LOCATION).expanduser()
if kubeconfig_path.exists(): if kubeconfig_path.exists():
LOGGER.debug("Detected kubeconfig") LOGGER.info("Detected kubeconfig")
kubeconfig_local_name = f"k8s-{gethostname()}" kubeconfig_local_name = f"k8s-{gethostname()}"
if not KubernetesServiceConnection.objects.filter(name=kubeconfig_local_name).exists(): if not KubernetesServiceConnection.objects.filter(name=kubeconfig_local_name).exists():
LOGGER.debug("Creating kubeconfig Service Connection") LOGGER.debug("Creating kubeconfig Service Connection")
@ -265,7 +265,7 @@ def outpost_local_connection():
unix_socket_path = urlparse(DEFAULT_UNIX_SOCKET).path unix_socket_path = urlparse(DEFAULT_UNIX_SOCKET).path
socket = Path(unix_socket_path) socket = Path(unix_socket_path)
if socket.exists() and access(socket, R_OK): if socket.exists() and access(socket, R_OK):
LOGGER.debug("Detected local docker socket") LOGGER.info("Detected local docker socket")
if len(DockerServiceConnection.objects.filter(local=True)) == 0: if len(DockerServiceConnection.objects.filter(local=True)) == 0:
LOGGER.debug("Created Service Connection for docker") LOGGER.debug("Created Service Connection for docker")
DockerServiceConnection.objects.create( DockerServiceConnection.objects.create(