Skip to content
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

Support for custom cmdArgs to enable log rotation for envoy access log #6753

Open
izturn opened this issue Nov 8, 2024 · 0 comments
Open
Assignees
Labels
area/gateway-provisioner Issues or PRs related to the Gateway provisioner kind/feature Categorizes issue or PR as related to a new feature.

Comments

@izturn
Copy link
Member

izturn commented Nov 8, 2024

Our team recently encountered an issue where access logs in Envoy containers were expanding rapidly.

The envoy team recommends using logrotate to manage log size. However, we noticed that the cmd & args for envoy containers generated by the contour provisioner are currently hardcoded, as follows:

Command: []string{
	"envoy",
},
Args: []string{
	"-c",
	filepath.Join("/", envoyCfgVolMntDir, envoyCfgFileName),
	fmt.Sprintf("--service-cluster $(%s)", envoyNsEnvVar),
	fmt.Sprintf("--service-node $(%s)", envoyPodEnvVar),
	fmt.Sprintf("--log-level %s", contour.Spec.EnvoyLogLevel),
	fmt.Sprintf("--base-id %d", contour.Spec.EnvoyBaseID),
},

limiting the ability to configure logrotate.

To address this, we modified the code to allow custom them.

I’d like to ask if others have faced similar issues, and if so, what solutions were implemented?

Would it be helpful if we submitted a PR for this change?

@izturn izturn added kind/feature Categorizes issue or PR as related to a new feature. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. area/gateway-provisioner Issues or PRs related to the Gateway provisioner and removed lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. labels Nov 8, 2024
@izturn izturn changed the title Support for custom cmd parameters to enable log rotation for envoy access logs Support for custom cmdArgs to enable log rotation for envoy access log Nov 8, 2024
@izturn izturn self-assigned this Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway-provisioner Issues or PRs related to the Gateway provisioner kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant