Skip to content

Commit

Permalink
Add prometheus.io/operator alias for coreos-operator (#24)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Dec 9, 2019
1 parent 1eac40b commit 25b3711
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion agents/agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

func New(at api.AgentType, k8sClient kubernetes.Interface, extClient ecs.ApiextensionsV1beta1Interface, promClient prom.MonitoringV1Interface) api.Agent {
switch at {
case api.AgentCoreOSPrometheus, api.DeprecatedAgentCoreOSPrometheus:
case api.AgentPrometheusOperator, api.AgentCoreOSPrometheus, api.DeprecatedAgentCoreOSPrometheus:
return coreosprometheusoperator.New(at, k8sClient, extClient, promClient)
case api.AgentPrometheusBuiltin:
return prometheusbuiltin.New(k8sClient)
Expand Down
8 changes: 5 additions & 3 deletions api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ const (
KeyAgent = "monitoring.appscode.com/agent"
KeyService = "monitoring.appscode.com/service"

VendorPrometheus = "prometheus.io"
AgentPrometheusBuiltin AgentType = VendorPrometheus + "/builtin"
AgentCoreOSPrometheus AgentType = VendorPrometheus + "/coreos-operator"
VendorPrometheus = "prometheus.io"
AgentPrometheusBuiltin AgentType = VendorPrometheus + "/builtin"
AgentPrometheusOperator AgentType = VendorPrometheus + "/operator"
// Deprecated
AgentCoreOSPrometheus AgentType = VendorPrometheus + "/coreos-operator"
// Deprecated
DeprecatedAgentCoreOSPrometheus AgentType = "coreos-prometheus-operator"
)
Expand Down

0 comments on commit 25b3711

Please sign in to comment.