argocd-extension-metrics
argocd-extension-metrics copied to clipboard
Publish/Validate the jsonschema for the config.json
The metrics extension depends on a complex json object that should be added as a string field named as config.json
in the configmap argocd-metrics-server-configmap
. As today the expected json format isn't documented anywhere, it makes it hard for users to craft it correctly.
As part of this issue, we should publish the jsonschema based on the json struct defined in the Go code:
type O11yConfig struct {
Prometheus *MetricsConfigProvider `json:"prometheus"`
Wavefront *MetricsConfigProvider `json:"wavefront"`
}
The same published jsonschema should be used to validate the config.json
in the configmap during application bootstrap.
Suggested library that could be used to generate the jsonschema:
- https://github.com/invopop/jsonschema