Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- func GeneratePassword(n int) (string, error)
- func PopulateAffinityRule(affinity *corev1.Affinity) string
- func PopulateSessionProxySecret() string
- func SkipGrafanaServiceAccount() string
- type KubeHelperImpl
- type Parameters
- type ReconcileApplicationMonitoring
- type ResourceHelper
- type TemplateHelper
Constants ¶
const ( PhaseInstallPrometheusOperator int = iota PhaseWaitForOperator PhaseCreatePrometheusCRs PhaseCreateAlertManagerCrs PhaseCreateAux PhaseInstallGrafanaOperator PhaseCreateGrafanaCR PhaseFinalizer PhaseDone PhaseReconcileConfig )
Constants used for the operator phases
const ( ApplicationMonitoringName = "application-monitoring" GrafanaCrName = "grafana" GrafanaOperatorName = "grafana-operator" GrafanaOperatorRoleName = "grafana-operator-role" GrafanaOperatorRoleBindingName = "grafana-operator-role-binding" GrafanaOperatorServiceAccountName = "grafana-operator-service-account" GrafanaDataSourceName = "grafana-datasource" GrafanaRouteName = "grafana-route" GrafanaProxySecretName = "grafana-proxy-secret" PrometheusOperatorName = "prometheus-operator" PrometheusOperatorServiceAccountName = "prometheus-operator-service-account" PrometheusCrName = "prometheus" PrometheusRouteName = "prometheus-route" PrometheusProxySecretsName = "prometheus-proxy-secret" PrometheusServiceAccountName = "prometheus-service-account" PrometheusServiceName = "prometheus-service" PrometheusServiceMonitorName = "prometheus-servicemonitor" PrometheusRuleName = "prometheus-rule" AlertManagerProxySecretsName = "alertmanager-proxy-secret" AlertManagerServiceAccountName = "alertmanager-service-account" AlertManagerCrName = "alertmanager" AlertManagerServiceName = "alertmanager-service" AlertManagerSecretName = "alertmanager-secret" AlertManagerRouteName = "alertmanager-route" GrafanaServiceMonitorName = "grafana-servicemonitor" GrafanaServiceName = "grafana-service" BlackboxExporterConfigmapName = "blackbox-exporter-config" BlackboxExporterJobName = "blackbox-exporter-job" ScrapeConfigSecretName = "additional-scrape-configs" )
const MonitoringFinalizerName = "monitoring.cleanup"
MonitoringFinalizerName the name of the finalizer
const ReconcilePauseSeconds = 30
ReconcilePauseSeconds the number of seconds to wait before running the reconcile loop
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add creates a new ApplicationMonitoring Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.
func GeneratePassword ¶
GeneratePassword returns a base64 encoded securely random bytes.
func PopulateAffinityRule ¶
PopulateAffinityRule returns the yaml representation of the affinity scheduling rule
func PopulateSessionProxySecret ¶
func PopulateSessionProxySecret() string
PopulateSessionProxySecret generates a session secret
func SkipGrafanaServiceAccount ¶ added in v1.8.0
func SkipGrafanaServiceAccount() string
Types ¶
type KubeHelperImpl ¶
type KubeHelperImpl struct {
// contains filtered or unexported fields
}
func NewKubeHelper ¶
func NewKubeHelper() *KubeHelperImpl
type Parameters ¶
type Parameters struct { ApplicationMonitoringName string PrometheusOperatorName string Namespace string GrafanaOperatorName string GrafanaCrName string GrafanaOperatorRoleName string GrafanaOperatorRoleBindingName string GrafanaSessionSecret string GrafanaProxySecretName string GrafanaRouteName string SkipGrafanaServiceAccount string PrometheusCrName string PrometheusRouteName string PrometheusServiceName string PrometheusServiceAccountName string PrometheusSessionSecret string AlertManagerSessionSecret string AlertManagerServiceAccountName string AlertManagerCrName string AlertManagerServiceName string AlertManagerRouteName string GrafanaServiceMonitorName string PrometheusServiceMonitorName string MonitoringKey string GrafanaServiceName string BlackboxExporterConfigmapName string ScrapeConfigSecretName string ImageAlertManager string ImageTagAlertManager string ImageOAuthProxy string ImageTagOAuthProxy string ImageGrafana string ImageTagGrafana string ImageGrafanaOperator string ImageTagGrafanaOperator string ImageConfigMapReloader string ImageTagConfigMapReloader string ImagePrometheusConfigReloader string ImageTagPrometheusConfigReloader string ImagePrometheusOperator string ImageTagPrometheusOperator string ImagePrometheus string ImageTagPrometheus string ImageBlackboxExporter string ImageTagBlackboxExporter string BlackboxTargets []applicationmonitoring.BlackboxtargetData PriorityClassName string PrometheusRetention string PrometheusStorageRequest string PrometheusInstanceNamespaces string AlertmanagerInstanceNamespaces string Affinity string PrometheusVersion string ExtraParams map[string]string }
type ReconcileApplicationMonitoring ¶
type ReconcileApplicationMonitoring struct {
// contains filtered or unexported fields
}
ReconcileApplicationMonitoring reconciles a ApplicationMonitoring object
func (*ReconcileApplicationMonitoring) Reconcile ¶
func (r *ReconcileApplicationMonitoring) Reconcile(request reconcile.Request) (reconcile.Result, error)
Reconcile reads that state of the cluster for a ApplicationMonitoring object and makes changes based on the state read and what is in the ApplicationMonitoring.Spec TODO(user): Modify this Reconcile function to implement your Controller logic. This example creates a Pod as an example Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
type ResourceHelper ¶
type ResourceHelper struct {
// contains filtered or unexported fields
}
type TemplateHelper ¶
type TemplateHelper struct { Parameters Parameters TemplatePath string }