Skip to content

Commit

Permalink
OperatorConfig CRD supports more of alertmanager_config
Browse files Browse the repository at this point in the history
  • Loading branch information
pintohutch committed Sep 29, 2021
1 parent 176f5be commit 61d1abd
Show file tree
Hide file tree
Showing 5 changed files with 327 additions and 17 deletions.
1 change: 1 addition & 0 deletions cmd/operator/deploy/operator/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ rules:
- certificatesigningrequests
- rules
- operatorconfigs
- secrets
verbs: ["create", "update", "get", "list", "watch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
2 changes: 1 addition & 1 deletion cmd/operator/deploy/operator/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
serviceAccountName: operator
containers:
- name: operator
image: gcr.io/gpe-test-1/prometheus-engine/operator:bench_20210309_1843
image: gcr.io/gpe-test-1/prometheus-engine/operator:managed
args:
- "--priority-class=gmp-critical"
- "--ca-selfsign=false"
Expand Down
3 changes: 3 additions & 0 deletions cmd/rule-evaluator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ import (
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery"

// Import to enable 'kubernetes_sd_configs' to SD config register.
_ "github.com/prometheus/prometheus/discovery/kubernetes"
"github.com/prometheus/prometheus/notifier"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/promql"
Expand Down
4 changes: 2 additions & 2 deletions pkg/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const (
// ImageConfigReloader = "gcr.io/gke-release-staging/prometheus-engine/gpe-config-reloader:v0.0.0.gke.0"
ImageCollector = "gcr.io/gpe-test-1/prometheus:v2.27.1-gpe.0"
ImageConfigReloader = "gcr.io/gpe-test-1/gpe-config-reloader:v0.0.1"
ImageRuleEvaluator = "gcr.io/gpe-test-1/prometheus-engine/rule-evaluator:bench_20211309_1504"
ImageRuleEvaluator = "gcr.io/gpe-test-1/prometheus-engine/rule-evaluator:managed"
)

var (
Expand Down Expand Up @@ -172,7 +172,7 @@ func New(logger logr.Logger, clientConfig *rest.Config, registry prometheus.Regi
return nil, errors.Wrap(err, "build Kubernetes clientset")
}
// Create temporary directory to store webhook serving cert files.
certDir, err := ioutil.TempDir("", "prometheus-engine-operator-certs")
certDir, err := ioutil.TempDir("", "operator-cert")
if err != nil {
return nil, errors.Wrap(err, "create temporary certificate dir")
}
Expand Down
Loading

0 comments on commit 61d1abd

Please sign in to comment.