E53D Remove trailing blank lines in vs/vsr snippets by Dean-Coakley · Pull Request #1078 · nginx/kubernetes-ingress · GitHub
[go: up one dir, main page]

Skip to content

Conversation

Dean-Coakley
Copy link
Contributor
@Dean-Coakley Dean-Coakley commented Jul 28, 2020

Proposed changes

Fixes: #1074

Remove trailing blank lines in vs/vsr snippets. Applies to all snippets(http,server,location)

Example VirtualServer input

apiVersion: k8s.nginx.org/v1
kind: VirtualServer
metadata:
  name: cafe
  namespace: default
spec:
  http-snippets: |
    limit_req_zone $binary_remote_addr zone=mylimit:10m rate=1r/s;
    proxy_cache_path /tmp keys_zone=one:10m;
  host: cafe.example.com
  tls:
    secret: cafe-secret
  upstreams:
  - name: tea
    service: tea-svc
    port: 
F19C
80
  routes:
  - path: /tea
    action:
      pass: tea

Generated config before change

limit_req_zone $binary_remote_addr zone=mylimit:10m rate=1r/s;

proxy_cache_path /tmp keys_zone=one:10m;

Generated config after change

limit_req_zone $binary_remote_addr zone=mylimit:10m rate=1r/s;
proxy_cache_path /tmp keys_zone=one:10m;

Checklist

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

  • I have read the CONTRIBUTING doc
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch from my own fork

@Dean-Coakley Dean-Coakley added the enhancement Pull requests for new features/feature enhancements label Jul 28, 2020
@Dean-Coakley Dean-Coakley self-assigned this Jul 28, 2020
@Dean-Coakley Dean-Coakley merged commit dea6235 into master Jul 29, 2020
@Dean-Coakley Dean-Coakley deleted the fix-snippet-tmpl branch July 29, 2020 07:01
@Dean-Coakley Dean-Coakley changed the title Fix trailing blank lines in vs/vsr snippets Remove trailing blank lines in vs/vsr snippets Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove extra lines in vs/vsr snippets
3 participants
0