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

Manual backport of #2905 into release/1.2.x #2923

Merged
merged 4 commits into from
Sep 11, 2023

Conversation

Ganeshrockz
Copy link
Contributor

Backport

This PR is manually backported from the #2905 and raised against 1.2.x.

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


Changes proposed in this PR:

  • Fixes a bug in parsing the following audit log helm configuration
server:
  auditLogs:
      enabled: true
      sinks:
        - name: My Sink
          type: file
          format: json
          path: /tmp/audit.json
          delivery_guarantee: best-effort
          rotate_duration: 24h
          rotate_max_files: 15
          rotate_bytes: 25165824

where rotate_max_files and rotate_bytes get passed as string inputs to the server configuration file. This PR makes sure to perform special handling for rotate_max_files and rotate_bytes where they don't get passed with quotes.

Generated config (Before the fix)

    {
      "audit": {
        "enabled": true,
        "sink": {
          "MySink": {
              "delivery_guarantee": "best-effort",
              "format": "json",
              "path": "/tmp/audit.json",
              "rotate_bytes": "12455355", // note the presence of braces here
              "rotate_duration": "24h",
              "rotate_max_files": "20",
              "type": "file"
          }
        }
      }
    }

Generated config (After the fix)

    {
      "audit": {
        "enabled": true,
        "sink": {
          "MySink": {
              "delivery_guarantee": "best-effort",
              "format": "json",
              "path": "/tmp/audit.json",
              "rotate_bytes": 12455355, // note the absence of braces here
              "rotate_duration": "24h",
              "rotate_max_files": 20,
              "type": "file"
          }
        }
      }
    }

How I've tested this PR:

  1. CI
  2. Verified manually that the server no longer crashes with this issue.

How I expect reviewers to test this PR:

👀

Checklist:


@Ganeshrockz Ganeshrockz added the pr/no-backport signals that a PR will not contain a backport label label Sep 8, 2023
@Ganeshrockz Ganeshrockz merged commit 1372b85 into release/1.2.x Sep 11, 2023
47 of 48 checks passed
@Ganeshrockz Ganeshrockz deleted the backport/net-5513/release-1.2.x branch September 11, 2023 05:45
@Ganeshrockz Ganeshrockz added the consul-india PRs/Issues assigned to Consul India team label Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consul-india PRs/Issues assigned to Consul India team pr/no-backport signals that a PR will not contain a backport label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants