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

Backport of docs: Fix example control-plane-request-limit HCL and JSON into release/1.16.x #19254

Conversation

hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #19105 to be assessed for backporting due to the inclusion of the label backport/1.16.

The below text is copied from the body of the original PR.


Description

The control-plane-request-limit config entry does not support specifying parameter names in snake case format.

This commit updates the HCL and JSON examples to use the supported camel case key format.

Testing & Reproduction steps

  1. Create control-plane-request-limit-snake_case.hcl with the following configuration.

    kind = "control-plane-request-limit"
    name = "global-limits"
    
    mode = "permissive"
    
    read_rate =  100
    write_rate = 100
    
    kv = {
      read_rate =  100
      write_rate = 100
    }
    
    acl = {
      read_rate =  100
      write_rate = 100
    }
    
    catalog = {
      read_rate =  100
      write_rate = 100
    }
  2. Attempt to save the configuration using consul config write.

    $ consul config write control-plane-request-limit-snake_case.hcl
    Failed to decode config entry input: 8 errors occurred:
     * invalid config key "ACL.read_rate"
     * invalid config key "ACL.write_rate"
     * invalid config key "Catalog.read_rate"
     * invalid config key "Catalog.write_rate"
     * invalid config key "KV.read_rate"
     * invalid config key "KV.write_rate"
     * invalid config key "read_rate"
     * invalid config key "write_rate"
    
  3. Create control-plane-request-limit-CamelCase.hcl with the following configuration.

    kind = "control-plane-request-limit"
    name = "global-limits"
    
    mode = "permissive"
    
    ReadRate =  100
    WriteRate = 100
    
    kv = {
      ReadRate =  100
      WriteRate = 100
    }
    
    acl = {
      ReadRate =  100
      WriteRate = 100
    }
    
    catalog = {
      ReadRate =  100
      WriteRate = 100
    }
  4. Attempt to save the configuration using consul config write.

    $ consul config write control-plane-request-limit-CamelCase.hcl
    Config entry written: control-plane-request-limit/global-limits
    

Links

PR Checklist

  • updated test coverage
  • external facing docs updated
  • appropriate backport labels added
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/docs/fix-example-controlplanerequestlimit-hcl-json/virtually-singular-goblin branch from 4617e0a to b05e920 Compare October 17, 2023 19:50
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/docs/fix-example-controlplanerequestlimit-hcl-json/virtually-singular-goblin branch from 06f4281 to 9c70e9c Compare October 17, 2023 19:50
@github-actions github-actions bot added the type/docs Documentation needs to be created/updated/clarified label Oct 17, 2023
Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@hc-github-team-consul-core hc-github-team-consul-core merged commit 4858db0 into release/1.16.x Oct 17, 2023
49 of 50 checks passed
@hc-github-team-consul-core hc-github-team-consul-core deleted the backport/docs/fix-example-controlplanerequestlimit-hcl-json/virtually-singular-goblin branch October 17, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/docs Documentation needs to be created/updated/clarified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants