Skip to content

Commit

Permalink
feat: set meshConfig.accessLogFile configuration for exposing logs (#371
Browse files Browse the repository at this point in the history
)

* feat: set meshConfig.accessLogFile configuration for exposing logs

This setting allow users to access debug logs.

Fixes #370
  • Loading branch information
DnPlas authored and kimwnasptd committed Jul 4, 2024
1 parent b33849f commit e65aff2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charms/istio-pilot/src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def _istioctl_extra_flags(self):

# Extra flags to pass to the istioctl install command
# These flags will configure the container images used by the control plane
# As well as set the access log files for help during debugging
extra_flags = [
"--set",
f"values.pilot.image={pilot_image}",
Expand All @@ -222,6 +223,8 @@ def _istioctl_extra_flags(self):
f"values.global.proxy.image={global_proxy_image}",
"--set",
f"values.global.proxy_init.image={global_proxy_init_image}",
"--set",
"meshConfig.accessLogFile=/dev/stdout",
]

# The following are a set of flags that configure the CNI behaviour
Expand Down
2 changes: 2 additions & 0 deletions charms/istio-pilot/tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,8 @@ def test_upgrade_successful(
"values.global.proxy.image=proxyv2",
"--set",
"values.global.proxy_init.image=proxyv2",
"--set",
"meshConfig.accessLogFile=/dev/stdout",
],
)
mocked_istioctl.upgrade.assert_called_with()
Expand Down

0 comments on commit e65aff2

Please sign in to comment.