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

[ENHANCE] pingdom: read request headers from environment #598

Closed
dennis-ge opened this issue Jun 24, 2024 · 0 comments · Fixed by #599
Closed

[ENHANCE] pingdom: read request headers from environment #598

dennis-ge opened this issue Jun 24, 2024 · 0 comments · Fixed by #599
Labels
kind/enhancement New feature or request

Comments

@dennis-ge
Copy link
Contributor

dennis-ge commented Jun 24, 2024

Is your feature request related to a problem? Please describe.
Some of our Pingdom Uptime checks use an api token in the request header for authentication. It is possible to add request headers in the EndpointMonitor (see here). However, at the moment these headers are stored in plain text. It would be nice to read these headers from the environment/a secret and not store them in plain text.

Describe the solution you'd like
Reading such information from the environment is already implemented with the postDataEnvVar ( see here). Thus, I would propose to follow the same approach and add a new field called requestHeadersEnvVar to the PingdomConfig:

        // Custom request headers that should be read from an environment variable as it possibly contains sensitive data.
	// An example would be an API token.
	// +optional
	RequestHeadersEnvVar string `json:"requestHeadersEnvVar,omitempty"`

This field should behave in the same way as the normal requestHeaders field, i.e., it needs to be valid json.

Describe alternatives you've considered

We could also let the operator read the data from a secret directly. This is more complex because:

Additional context

I can provide a PR to implement this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant