sfprometheus

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package sfprometheus manages a basic prometheus instance for monitoring.

Index

Constants

This section is empty.

Variables

View Source
var PrometheusCmd = &cobra.Command{
	Use:   "prometheus",
	Short: "Deploy a demo prometheus instance for service monitoring",
	Long: `This command can be used to deploy a prometheus instance in the sf
namespace. It will first install the prometheus operator in the operators namespace
if required.

The sf namespace must exist prior to running this command.

The prometheus dashboard will be accessible at https://prometheus.<fqdn>.`,
	Run: func(cmd *cobra.Command, args []string) {
		fqdn, _ := cmd.Flags().GetString("fqdn")
		skipOperator, _ := cmd.Flags().GetBool("skip-operator-setup")

		cl := utils.CreateKubernetesClientOrDie("")
		ctx := context.Background()
		env := utils.ENV{
			Cli: cl,
			Ns:  ns,
			Ctx: ctx,
		}
		EnsurePrometheus(&env, fqdn, skipOperator)
	},
}

PrometheusCmd represents the prometheus command

Functions

func EnsurePrometheus

func EnsurePrometheus(env *utils.ENV, fqdn string, skipOperator bool)

func EnsurePrometheusInstance

func EnsurePrometheusInstance(env *utils.ENV)

func EnsurePrometheusInstanceCRBinding

func EnsurePrometheusInstanceCRBinding(env *utils.ENV)

func EnsurePrometheusInstanceClusterRole

func EnsurePrometheusInstanceClusterRole(env *utils.ENV)

func EnsurePrometheusInstanceServiceAccount

func EnsurePrometheusInstanceServiceAccount(env *utils.ENV)

func EnsurePrometheusOperator

func EnsurePrometheusOperator(env *utils.ENV) error

func EnsurePrometheusService

func EnsurePrometheusService(env *utils.ENV)

Types

type PromCMDContext

type PromCMDContext struct {
	// contains filtered or unexported fields
}

func (*PromCMDContext) EnsurePrometheusRoute

func (p *PromCMDContext) EnsurePrometheusRoute()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL