grafana

package
v0.0.0-...-a2a49da Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "grafana"
	Version = "9.3.6"
)

Variables

View Source
var (
	B = terra.Bool
	N = terra.Number
	S = terra.String
)
View Source
var ConfigINI = `` /* 192-byte string literal not displayed */
View Source
var DashboardProviders = `` /* 194-byte string literal not displayed */
View Source
var DataSources = `` /* 140-byte string literal not displayed */
View Source
var DownloadDashboardsSh = `` /* 705-byte string literal not displayed */
View Source
var RoleRules = []rbacv1.PolicyRule{
	{
		APIGroups:     []string{"extensions"},
		ResourceNames: []string{"grafana"},
		Resources:     []string{"podsecuritypolicies"},
		Verbs:         []string{"use"},
	},
}

Functions

func Config

func Config(opts KubeOpts) *corev1.ConfigMap

func DashboardsDefaultCm

func DashboardsDefaultCm(opts KubeOpts) *corev1.ConfigMap

func Deployment

func Deployment(opts KubeOpts) *appsv1.Deployment

func P

func P[T any](t T) *T

func Secret

func Secret(opts KubeOpts) *corev1.Secret

func Service

func Service(opts KubeOpts) *corev1.Service

Types

type AppOpts

type AppOpts struct {
	Name    string `validate:"required"`
	Version string `validate:"required"`
	Env     string `validate:"required"`
}

func (AppOpts) NameEnv

func (a AppOpts) NameEnv() string

type KubeApp

type KubeApp struct {
	kube.App
	Ns                    *corev1.Namespace
	Svc                   *corev1.Service
	Sa                    *corev1.ServiceAccount
	Cm                    *corev1.ConfigMap
	ClusterroleCr         *rbacv1.ClusterRole
	ClusterrolebindingCrb *rbacv1.ClusterRoleBinding
	Rb                    *rbacv1.RoleBinding
	Secret                *corev1.Secret
	DashboardsDefaultCm   *corev1.ConfigMap
	Role                  *rbacv1.Role
	Deploy                *appsv1.Deployment
}

func New

func New(opts AppOpts, kOpts KubeOpts) *KubeApp

type KubeOpts

type KubeOpts struct {
	Name         string
	Namespace    string
	CommonLabels map[string]string

	PostgresHost   string
	PostgresDBName string
	PostgresUser   string
	// TODO: cannot actually store password here...
	PostgresPassword string
}

type RDSOpts

type RDSOpts struct {
	Name             string    `validate:"required"`
	VPCID            string    `validate:"required"`
	EKSSGID          string    `validate:"required"`
	PrivateSubnetIDs [3]string `validate:"required,dive,required"`
	// SnapshotID (optional) to restore the database from
	SnapshotID string
}

type RDSPostgres

type RDSPostgres struct {
	SecurityGroup *aws.SecurityGroup `validate:"required"`
	SubnetGroup   *aws.DbSubnetGroup `validate:"required"`
	Postgres      *aws.DbInstance    `validate:"required"`
}

func NewRDSPostgres

func NewRDSPostgres(
	opts RDSOpts,
) (RDSPostgres, error)

Jump to

Keyboard shortcuts

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