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

fix: allow long annotations #421

Merged

Conversation

scirner22
Copy link
Contributor

Problem

With the following podTemplate:

podTemplate:
  metadata:
    annotations:
      ad.datadoghq.com/node.checks: |
        {
          "openmetrics": {
            "init_config": {},
            "instances": [
              {
                "histogram_buckets_as_distributions": true,
                "collect_counters_with_distributions": false,
                "openmetrics_endpoint": "http://%%host%%:26660/metrics",
                "namespace": "chain",
                "metrics": [
                  "cometbft_consensus_height",
                  "cometbft_p2p_peers",
                  "cometbft_consensus_step_duration_seconds",
                  "cometbft_state_block_processing_time",
                  "go_gc_duration_seconds"
                ]
              }
            ]
          }
        }

A pod is produced like so:

apiVersion: v1
kind: Pod
metadata:
  annotations:
    ad.datadoghq.com/node.checks: |
      {
        "openmetrics": {
          "init_"
              ]
            }
          ]
        }
      }

Solution

Removing the trimming functionality related to annotations. Based on the k8s docs It seems like annotation values are not limited in length at all.

internal/test/metadata.go Outdated Show resolved Hide resolved
@vimystic vimystic requested review from vimystic and removed request for mikroskeem October 7, 2024 18:21
@agouin agouin merged commit 20b4d27 into strangelove-ventures:main Oct 11, 2024
3 checks passed
@scirner22 scirner22 deleted the scirner22/fix-annotation-validation branch October 23, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants