Skip to content

Conversation

@j1m-ryan
Copy link

@j1m-ryan j1m-ryan commented Jan 23, 2024

Proposed changes

Fixes #4951

nginx -T before

upstream vs_default_cafe_coffee {
    zone vs_default_cafe_coffee 512k;random two least_conn;
    server 10.244.0.4:8080 max_fails=1 fail_timeout=10s max_conns=0;
    server 10.244.0.5:8080 max_fails=1 fail_timeout=10s max_conns=0;

    
}

upstream vs_default_cafe_tea {
    zone vs_default_cafe_tea 512k;random two least_conn;
    server 10.244.0.6:8080 max_fails=1 fail_timeout=10s max_conns=0;

    
}


server {
    listen 80;
    listen [::]:80;


    server_name cafe.example.com;
    status_zone cafe.example.com;
    set $resource_type "virtualserver";
    set $resource_name "cafe";
    set $resource_namespace "default";
    listen 443 ssl;
    listen [::]:443 ssl;

    ssl_certificate $secret_dir_path/default-cafe-secret;
        ssl_certificate_key $secret_dir_path/default-cafe-secret;

nginx -T after

upstream vs_default_cafe_coffee {
    zone vs_default_cafe_coffee 512k;
    random two least_conn;
    server 10.244.0.4:8080 max_fails=1 fail_timeout=10s max_conns=0;
    server 10.244.0.5:8080 max_fails=1 fail_timeout=10s max_conns=0;

    
}

upstream vs_default_cafe_tea {
    zone vs_default_cafe_tea 512k;
    random two least_conn;
    server 10.244.0.6:8080 max_fails=1 fail_timeout=10s max_conns=0;

    
}


server {
    listen 80;
    listen [::]:80;


    server_name cafe.example.com;
    status_zone cafe.example.com;
    set $resource_type "virtualserver";
    set $resource_name "cafe";
    set $resource_namespace "default";
    listen 443 ssl;
    listen [::]:443 ssl;

    ssl_certificate $secret_dir_path/default-cafe-secret;
    ssl_certificate_key $secret_dir_path/default-cafe-secret;

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@j1m-ryan j1m-ryan requested a review from a team as a code owner January 23, 2024 09:49
@netlify
Copy link

netlify bot commented Jan 23, 2024

👷 Deploy request for nginx-kubernetes-ingress pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit a69ec79

Copy link
Contributor

@jjngx jjngx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@j1m-ryan j1m-ryan merged commit d6f5fe3 into nginx:main Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indentation discrepancies in output of nginx.conf (nginx -T)

3 participants