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

OperatorConfig CRD supports more of alertmanager_config #47

Merged
merged 4 commits into from
Oct 13, 2021

Conversation

pintohutch
Copy link
Collaborator

This is the bulk of Alertmanager support for our CRD as it pertains to setting up the managed rule-evaluator.

  • operator_config.go now supports most of the rest of the alertmanger_config fields, including:
    • authorization via pulling the credentials payload from a secret selector.
    • tls_config via pulling ca_file, cert_file, key_file fields from configmap/secret selectors (in other namespaces). For tls_config in particular, we have to mirror the provided secrets to our namespace and mount them as files to the rule-evaluator deployment. This is because:
      1. tls_config uses filepaths to configure client TLS connections instead of raw bytes or strings.
      2. Secrets can only be accessed by pods in the same namespace.
    • kubernetes_sd_configs to permit the rule-evaluator to use Kubernetes service-discovery to discover any configured Alertmanager endpoints. prometheus-operator inspired the changes here. Note: no authorization configuration to the K8s apiserver is provided at this time, so this will only be supported on GKE for the time being.
    • relabel_configs to filter only the specified Alertmanagers in the CRD (i.e. if there are other Alertmanagers discovered in the K8s cluster). prometheus-operator inspired the changes here.
  • Add support for user-provided alertmanager_configs via configmap/secret selectors.
  • Operator ClusterRole needs Secrets resource access to read and create secrets (e.g. for Alertmanager TLS secrets).
  • Add unused import to rule-evaluator so it can support kubernetes_sd_config configuration field. See this comment and the imported init.
  • Add new image tags with code changes.

pkg/operator/operator.go Outdated Show resolved Hide resolved
cmd/operator/deploy/operator/clusterrole.yaml Show resolved Hide resolved
pkg/operator/operator_config.go Outdated Show resolved Hide resolved
cmd/operator/deploy/operator/operator.yaml Outdated Show resolved Hide resolved
pkg/operator/operator_config.go Outdated Show resolved Hide resolved
pkg/operator/operator_config.go Outdated Show resolved Hide resolved
pkg/operator/operator_config.go Outdated Show resolved Hide resolved
pkg/operator/operator_config.go Outdated Show resolved Hide resolved
pkg/operator/operator_config.go Outdated Show resolved Hide resolved
pkg/operator/operator_config.go Show resolved Hide resolved
@pintohutch pintohutch force-pushed the pintohutch/static-res-5 branch from 176f5be to 7b4046a Compare October 11, 2021 19:05
Base automatically changed from pintohutch/static-res-5 to main October 11, 2021 19:53
@pintohutch pintohutch force-pushed the pintohutch/static-res-6 branch from 61d1abd to 2f040ba Compare October 11, 2021 20:03
@pintohutch pintohutch merged commit 5c3d0cf into main Oct 13, 2021
@pintohutch pintohutch deleted the pintohutch/static-res-6 branch October 14, 2021 21:22
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