Skip to content

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

Merged
hc-github-team-consul-core merged 1 commit into
release/1.16.xfrom
backport/docs/fix-example-controlplanerequestlimit-hcl-json/virtually-singular-goblin
Oct 17, 2023
Merged

Backport of docs: Fix example control-plane-request-limit HCL and JSON into release/1.16.x#19254
hc-github-team-consul-core merged 1 commit into
release/1.16.xfrom
backport/docs/fix-example-controlplanerequestlimit-hcl-json/virtually-singular-goblin

Conversation

@hc-github-team-consul-core
Copy link
Copy Markdown
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 requested a review from a team as a code owner 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 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
Copy Markdown
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
@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