You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add init container for setting up base config (#2649)
Problem: We are starting to introduce configuration options that exist in the main context. However, that
configuration won't be written until the control plane writes it to nginx, meaning it doesn't exist on
nginx startup. Therefore nginx uses its default configuration for a brief time, which is incorrect.
We want to be able to provide this configuration on startup.
Solution: Using an init container, we can mount a ConfigMap containing the dynamic base config, and copy it
to the proper location in the filesystem before nginx starts. We can't mount the ConfigMap directly to the proper location
because it would be read-only, preventing our control plane from writing to it.
This allows us to bootstrap the user config into nginx on startup, while also allowing our control plane to overwrite it
if the user ever changes the config after the fact.
Removed logic that cleared out nginx files on startup because it would erase this bootstrap config, and it wasn't really
needed since we delete nginx files when we write config anyway.
Also fixed an issue where the log level was not honored when no Gateway resources existed.
0 commit comments