factory

package
v0.0.6-rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2020 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRemoteWrites

func BuildRemoteWrites(remoteTargets []victoriametricsv1beta1.VMAgentRemoteWriteSpec, rwsBasicAuth map[string]BasicAuthCredentials, rwsTokens map[string]BearerToken) []string

func CreateOrUpdateConfigurationSecret

func CreateOrUpdateConfigurationSecret(ctx context.Context, cr *victoriametricsv1beta1.VMAgent, rclient client.Client, c *conf.BaseOperatorConf) error

func CreateOrUpdateRuleConfigMaps

func CreateOrUpdateRuleConfigMaps(ctx context.Context, cr *victoriametricsv1beta1.VMAlert, rclient client.Client) ([]string, error)

func CreateOrUpdateTlsAssets

func CreateOrUpdateTlsAssets(ctx context.Context, cr *victoriametricsv1beta1.VMAgent, rclient client.Client) error

func CreateOrUpdateVMAgent

func CreateOrUpdateVMAgent(ctx context.Context, cr *victoriametricsv1beta1.VMAgent, rclient client.Client, c *conf.BaseOperatorConf) (reconcile.Result, error)

we assume, that configmaps were created before this function was called

func CreateOrUpdateVMAlert

func CreateOrUpdateVMAlert(ctx context.Context, cr *victoriametricsv1beta1.VMAlert, rclient client.Client, c *conf.BaseOperatorConf, cmNames []string) (reconcile.Result, error)

func CreateOrUpdateVMCluster

func CreateOrUpdateVMCluster(ctx context.Context, cr *v1beta1.VMCluster, rclient client.Client, c *conf.BaseOperatorConf) (string, error)

CreateOrUpdateVMCluster reconciled cluster object with order first we check status of vmStorage and waiting for its readiness then vmSelect and wait for it readiness as well and last one is vmInsert we manually handle statefulsets rolling updates needed in update checked by revesion status its controlled by k8s controller-manager

func CreateOrUpdateVMInsertService

func CreateOrUpdateVMInsertService(ctx context.Context, cr *v1beta1.VMCluster, rclient client.Client, c *conf.BaseOperatorConf) (*corev1.Service, error)

func CreateOrUpdateVMSelectService

func CreateOrUpdateVMSelectService(ctx context.Context, cr *v1beta1.VMCluster, rclient client.Client, c *conf.BaseOperatorConf) (*corev1.Service, error)

func CreateOrUpdateVMStorageService

func CreateOrUpdateVMStorageService(ctx context.Context, cr *v1beta1.VMCluster, rclient client.Client, c *conf.BaseOperatorConf) (*corev1.Service, error)

func CreateVMServiceScrapeFromService

func CreateVMServiceScrapeFromService(ctx context.Context, rclient client.Client, service *v1.Service, filterPortNames ...string) error

func MergePatchContainers

func MergePatchContainers(base, patches []v1.Container) ([]v1.Container, error)

MergePatchContainers adds patches to base using a strategic merge patch and iterating by container name, failing on the first error

func PodIsReady

func PodIsReady(pod corev1.Pod) bool

func SanitizeVolumeName

func SanitizeVolumeName(name string) string

func SelectRules

func SelectRules(ctx context.Context, cr *victoriametricsv1beta1.VMAlert, rclient client.Client) (map[string]string, error)

Types

type BasicAuthCredentials

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

BasicAuthCredentials represents a username password pair to be used with basic http authentication, see https://tools.ietf.org/html/rfc7617.

type BearerToken

type BearerToken string

BearerToken represents a bearer token, see https://tools.ietf.org/html/rfc6750.

Jump to

Keyboard shortcuts

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