Skip to content

Conversation

@pleshakov
Copy link
Contributor

@pleshakov pleshakov commented Mar 17, 2022

This PR adds a new component - Generator - for generating NGINX
config.

UPDATE: example log output:

{"level":"info","ts":1647553393.865566,"logger":"eventLoop","msg":"Processing a change","host":"cafe.example.com"}
{Op:1 Host:{Value:cafe.example.com PathRouteGroups:[{Path:/ Routes:[{MatchIdx:0 RuleIdx:0 Source:0xc0002e2480}]} {Path:/coffee Routes:[{MatchIdx:0 RuleIdx:0 Source:0xc00040c780}]} {Path:/tea Routes:[{MatchIdx:0 RuleIdx:0 Source:0xc00040d380}]}]}}
server {
        server_name cafe.example.com;


        location / {
                proxy_set_header Host $host;
                proxy_pass http://unix:/var/lib/nginx/nginx-502-server.sock;
        }

        location /coffee {
                proxy_set_header Host $host;
                proxy_pass http://10.96.114.34:80;
        }

        location /tea {
                proxy_set_header Host $host;
                proxy_pass http://10.96.239.145:80;
        }

}

This commit adds a new component - Generator - for generating NGINX
config.
@pleshakov
Copy link
Contributor Author

example of reported warning:

{"level":"info","ts":1648080976.7375154,"logger":"eventLoop","msg":"got warning while generating config","kind":"HTTPRoute","namespace":"default","name":"cafe","warning":"service default/main cannot be resolved: service default/main doesn't exist"}

@pleshakov pleshakov merged commit fe0175f into main Mar 25, 2022
@pleshakov pleshakov deleted the config-generation branch March 25, 2022 18:25
@pammecrandall pammecrandall added the enhancement New feature or request label Aug 9, 2022
miledxz added a commit to miledxz/nginx-gateway-fabric that referenced this pull request Jan 14, 2025
This commit adds a new component - Generator - for generating NGINX
config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants