-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: moved operatorMode and monitorType to project.yaml
- Loading branch information
Showing
6 changed files
with
82 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
package monitoring | ||
|
||
import ( | ||
prometheusV1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" | ||
prometheusv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" | ||
) | ||
|
||
type Monitor struct { | ||
Interval prometheusV1.Duration `yaml:"interval,omitempty" json:"interval,omitempty"` | ||
Timeout prometheusV1.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"` | ||
Path string `yaml:"path,omitempty" json:"path,omitempty"` | ||
Port string `yaml:"port,omitempty" json:"port,omitempty"` | ||
Scheme string `yaml:"scheme,omitempty" json:"scheme,omitempty"` | ||
OperatorMode bool `yaml:"operatorMode,omitempty" json:"operatorMode,omitempty"` | ||
MonitorType string `yaml:"monitorType,omitempty" json:"monitorType,omitempty"` | ||
Interval prometheusv1.Duration `yaml:"interval,omitempty" json:"interval,omitempty"` | ||
Timeout prometheusv1.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"` | ||
Path string `yaml:"path,omitempty" json:"path,omitempty"` | ||
// Despite what the name suggests, PodMonitor and ServiceMonitor actually | ||
// only accept port names as the input. So in operator mode, this port field | ||
// need to be the user-provided port name. | ||
Port string `yaml:"port,omitempty" json:"port,omitempty"` | ||
Scheme string `yaml:"scheme,omitempty" json:"scheme,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters