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

Remove trailing blank lines in vs/vsr snippets #1078

Merged
merged 1 commit into from
Jul 29, 2020
Merged

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: 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