plan

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrometheusScrapeLabel      = "prometheus.io/scrape"
	PrometheusScrapeLabelValue = "true"
)
View Source
const (
	CanaryAppLabel = "app"
	CanaryTagLabel = "tag"
	CanarySLOLabel = "slo"
	CanaryLabel    = "canary"

	CanarySummaryAnnotation = "summary"
	CanaryMessageAnnotation = "message"

	// RuleTypeCanary is the value of the LabelRuleType label for canary rules.
	RuleTypeCanary = "canary"
)
View Source
const (
	IstioInjectionLabelName = "istio-injection"
)
View Source
const (
	// RuleTypeSLO is the value of the LabelRuleType label for SLO rules.
	RuleTypeSLO = "slo"
)

Variables

This section is empty.

Functions

func DefaultDNSConfig

func DefaultDNSConfig() *corev1.PodDNSConfig

Types

type ConfigMapList

type ConfigMapList struct {
	Item *corev1.ConfigMapList
}

func NewConfigMapList

func NewConfigMapList() *ConfigMapList

func (*ConfigMapList) GetItems

func (s *ConfigMapList) GetItems() (r []client.Object)

func (*ConfigMapList) GetList

func (s *ConfigMapList) GetList() (r client.ObjectList)

type DeleteApp

type DeleteApp struct {
	Namespace string
}

func (*DeleteApp) Apply

func (p *DeleteApp) Apply(ctx context.Context, cli client.Client, cluster *picchuv1alpha1.Cluster, log logr.Logger) error

type DeleteCanaryRules

type DeleteCanaryRules struct {
	App       string
	Namespace string
	Tag       string
}

func (*DeleteCanaryRules) Apply

type DeleteRevision

type DeleteRevision struct {
	Labels    map[string]string
	Namespace string
}

func (*DeleteRevision) Apply

func (p *DeleteRevision) Apply(ctx context.Context, cli client.Client, cluster *picchuv1alpha1.Cluster, log logr.Logger) error

type DeleteSLORules

type DeleteSLORules struct {
	App       string
	Namespace string
}

func (*DeleteSLORules) Apply

func (p *DeleteSLORules) Apply(ctx context.Context, cli client.Client, cluster *picchuv1alpha1.Cluster, log logr.Logger) error

type DeleteServiceLevels

type DeleteServiceLevels struct {
	App       string
	Target    string
	Namespace string
}

func (*DeleteServiceLevels) Apply

type DeleteServiceMonitors

type DeleteServiceMonitors struct {
	App       string
	Namespace string
}

func (*DeleteServiceMonitors) Apply

type DeleteTaggedServiceLevels

type DeleteTaggedServiceLevels struct {
	App       string
	Target    string
	Namespace string
	Tag       string
}

func (*DeleteTaggedServiceLevels) Apply

type EnsureNamespace

type EnsureNamespace struct {
	Name      string
	OwnerName string
	OwnerType string
}

func (*EnsureNamespace) Apply

func (p *EnsureNamespace) Apply(ctx context.Context, cli client.Client, cluster *picchuv1alpha1.Cluster, log logr.Logger) error

type HorizontalPodAutoscalerList

type HorizontalPodAutoscalerList struct {
	Item *autoscaling.HorizontalPodAutoscalerList
}

func NewHorizontalPodAutoscalerList

func NewHorizontalPodAutoscalerList() *HorizontalPodAutoscalerList

func (*HorizontalPodAutoscalerList) GetItems

func (s *HorizontalPodAutoscalerList) GetItems() (r []client.Object)

func (*HorizontalPodAutoscalerList) GetList

type List

type List interface {
	GetItems() []client.Object
	GetList() client.ObjectList
}

type ReplicaSetList

type ReplicaSetList struct {
	Item *appsv1.ReplicaSetList
}

func NewReplicaSetList

func NewReplicaSetList() *ReplicaSetList

func (*ReplicaSetList) GetItems

func (s *ReplicaSetList) GetItems() (r []client.Object)

func (*ReplicaSetList) GetList

func (s *ReplicaSetList) GetList() (r client.ObjectList)

type RetireRevision

type RetireRevision struct {
	Tag       string
	Namespace string
}

func (*RetireRevision) Apply

func (p *RetireRevision) Apply(ctx context.Context, cli client.Client, cluster *picchuv1alpha1.Cluster, log logr.Logger) error

type Revision

type Revision struct {
	Tag              string
	Weight           uint32
	TagRoutingHeader string
	TrafficPolicy    *istio.TrafficPolicy
}

type SLOConfig

Receiver pointer functions for SLOConfig can be found next to relevant syncer

type ScaleRevision

type ScaleRevision struct {
	Tag                string
	Namespace          string
	Min                int32
	Max                int32
	Labels             map[string]string
	CPUTarget          *int32
	MemoryTarget       *int32
	RequestsRateMetric string
	RequestsRateTarget *resource.Quantity
	Worker             *picchuv1alpha1.WorkerScaleInfo
}

func (*ScaleRevision) Apply

func (p *ScaleRevision) Apply(ctx context.Context, cli client.Client, cluster *picchuv1alpha1.Cluster, log logr.Logger) error

type SecretList

type SecretList struct {
	Item *corev1.SecretList
}

func NewSecretList

func NewSecretList() *SecretList

func (*SecretList) GetItems

func (s *SecretList) GetItems() (r []client.Object)

func (*SecretList) GetList

func (s *SecretList) GetList() (r client.ObjectList)

type SyncApp

type SyncApp struct {
	App                  string
	Target               string
	Fleet                string
	Namespace            string
	Labels               map[string]string
	DeployedRevisions    []Revision
	AlertRules           []monitoringv1.Rule
	Ports                []picchuv1alpha1.PortInfo
	HTTPPortFaults       []picchuv1alpha1.HTTPPortFault
	IstioSidecarConfig   *picchuv1alpha1.IstioSidecar
	DefaultIngressPorts  map[string]string
	DevRoutesServiceHost string
	DevRoutesServicePort int
}

func (*SyncApp) Apply

func (p *SyncApp) Apply(
	ctx context.Context,
	cli client.Client,
	cluster *picchuv1alpha1.Cluster,
	log logr.Logger,
) error

type SyncCanaryRules

type SyncCanaryRules struct {
	App                         string
	Namespace                   string
	Tag                         string
	Labels                      map[string]string
	ServiceLevelObjectiveLabels picchuv1alpha1.ServiceLevelObjectiveLabels
	ServiceLevelObjectives      []*picchuv1alpha1.ServiceLevelObjective
}

func (*SyncCanaryRules) Apply

func (p *SyncCanaryRules) Apply(ctx context.Context, cli client.Client, cluster *picchuv1alpha1.Cluster, log logr.Logger) error

type SyncRevision

type SyncRevision struct {
	App                string
	Tag                string
	Namespace          string
	Labels             map[string]string // Labels applied to all resources
	Configs            []runtime.Object  // Secret and ConfigMap objects supported and mapped to environment
	Ports              []picchuv1alpha1.PortInfo
	Replicas           int32
	Image              string
	Resources          corev1.ResourceRequirements
	IAMRole            string            // AWS iam role
	PodAnnotations     map[string]string // metadata.annotations in the Pod template
	ServiceAccountName string            // k8s ServiceAccount
	LivenessProbe      *corev1.Probe
	ReadinessProbe     *corev1.Probe
	MinReadySeconds    int32
	Worker             *picchuv1alpha1.WorkerScaleInfo
	Lifecycle          *corev1.Lifecycle
	Affinity           *corev1.Affinity
	Tolerations        []corev1.Toleration
	EnvVars            []corev1.EnvVar
	Sidecars           []corev1.Container // Additional sidecar containers.
	VolumeMounts       []corev1.VolumeMount
	Volumes            []corev1.Volume
}

func (*SyncRevision) Apply

func (p *SyncRevision) Apply(ctx context.Context, cli client.Client, cluster *picchuv1alpha1.Cluster, log logr.Logger) error

func (*SyncRevision) Printable

func (p *SyncRevision) Printable() interface{}

type SyncSLORules

type SyncSLORules struct {
	App                         string
	Namespace                   string
	Labels                      map[string]string
	ServiceLevelObjectiveLabels picchuv1alpha1.ServiceLevelObjectiveLabels
	ServiceLevelObjectives      []*picchuv1alpha1.ServiceLevelObjective
}

func (*SyncSLORules) Apply

func (p *SyncSLORules) Apply(ctx context.Context, cli client.Client, cluster *picchuv1alpha1.Cluster, log logr.Logger) error

func (*SyncSLORules) SLORules

func (p *SyncSLORules) SLORules() ([]monitoringv1.PrometheusRule, error)

SLORules returns a PrometheusRuleList of recording rules to support tracking of the ServiceLevelObjectives

type SyncServiceLevels

type SyncServiceLevels struct {
	App                         string
	Target                      string
	Namespace                   string
	Labels                      map[string]string
	ServiceLevelObjectiveLabels picchuv1alpha1.ServiceLevelObjectiveLabels
	ServiceLevelObjectives      []*picchuv1alpha1.ServiceLevelObjective
}

func (*SyncServiceLevels) Apply

type SyncServiceMonitors

type SyncServiceMonitors struct {
	App                    string
	Namespace              string
	Labels                 map[string]string
	ServiceMonitors        []*picchuv1alpha1.ServiceMonitor
	ServiceLevelObjectives []*picchuv1alpha1.ServiceLevelObjective
}

func (*SyncServiceMonitors) Apply

type SyncTaggedServiceLevels

type SyncTaggedServiceLevels struct {
	App                         string
	Target                      string
	Namespace                   string
	Tag                         string
	Labels                      map[string]string
	ServiceLevelObjectiveLabels picchuv1alpha1.ServiceLevelObjectiveLabels
	ServiceLevelObjectives      []*picchuv1alpha1.ServiceLevelObjective
}

func (*SyncTaggedServiceLevels) Apply

type WorkerPodAutoscalerList

type WorkerPodAutoscalerList struct {
	Item *wpav1.WorkerPodAutoScalerList
}

func NewWorkerPodAutoscalerList

func NewWorkerPodAutoscalerList() *WorkerPodAutoscalerList

func (*WorkerPodAutoscalerList) GetItems

func (s *WorkerPodAutoscalerList) GetItems() (r []client.Object)

func (*WorkerPodAutoscalerList) GetList

func (s *WorkerPodAutoscalerList) GetList() (r client.ObjectList)

Jump to

Keyboard shortcuts

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