Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultDNSConfig() *corev1.PodDNSConfig
- type AlertType
- type ConfigMapList
- type DeleteAlerts
- type DeleteApp
- type DeleteRevision
- type EnsureNamespace
- type HorizontalPodAutoscalerList
- type List
- type ReplicaSetList
- type RetireRevision
- type Revision
- type SLIQuery
- type ScaleRevision
- type SecretList
- type SyncAlerts
- type SyncApp
- type SyncRevision
Constants ¶
View Source
const ( DefaultAlertAfter = "2m" DefaultTagKey = "destination_workload" RuleNameTemplate = "%s-%s-%s" Canary AlertType = "canary" SLI AlertType = "sli" )
View Source
const ( StatusPort = "status" PrometheusScrapeLabel = "prometheus.io/scrape" PrometheusScrapeLabelValue = "true" )
View Source
const (
IstioInjectionLabelName = "istio-injection"
)
Variables ¶
View Source
var ( CanarySLIFailingQueryTemplate = template.Must(template.New("canaryTaggedAlerts"). Parse(`100 * (1 - {{.ErrorQuery}}{ {{.TagKey}}="{{.TagValue}}" } / {{.TotalQuery}}{ {{.TagKey}}="{{.TagValue}}" }) + {{.CanaryAllowance}} < (100 * (1 - sum({{.ErrorQuery}}) / sum({{.TotalQuery}})))`)) SLIFailingQueryTemplate = template.Must(template.New("sliTaggedAlerts"). Parse(`100 * (1 - {{.ErrorQuery}}{ {{.TagKey}}="{{.TagValue}}" } / {{.TotalQuery}}{ {{.TagKey}}="{{.TagValue}}" }) < {{.ObjectivePercent}}`)) )
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 []runtime.Object)
func (*ConfigMapList) GetList ¶
func (s *ConfigMapList) GetList() (r runtime.Object)
type DeleteAlerts ¶
type DeleteRevision ¶
type EnsureNamespace ¶
type HorizontalPodAutoscalerList ¶
type HorizontalPodAutoscalerList struct {
Item *autoscalingv1.HorizontalPodAutoscalerList
}
func NewHorizontalPodAutoscalerList ¶
func NewHorizontalPodAutoscalerList() *HorizontalPodAutoscalerList
func (*HorizontalPodAutoscalerList) GetItems ¶
func (s *HorizontalPodAutoscalerList) GetItems() (r []runtime.Object)
func (*HorizontalPodAutoscalerList) GetList ¶
func (s *HorizontalPodAutoscalerList) GetList() (r runtime.Object)
type ReplicaSetList ¶
type ReplicaSetList struct {
Item *appsv1.ReplicaSetList
}
func NewReplicaSetList ¶
func NewReplicaSetList() *ReplicaSetList
func (*ReplicaSetList) GetItems ¶
func (s *ReplicaSetList) GetItems() (r []runtime.Object)
func (*ReplicaSetList) GetList ¶
func (s *ReplicaSetList) GetList() (r runtime.Object)
type RetireRevision ¶
type ScaleRevision ¶
type SecretList ¶
type SecretList struct {
Item *corev1.SecretList
}
func NewSecretList ¶
func NewSecretList() *SecretList
func (*SecretList) GetItems ¶
func (s *SecretList) GetItems() (r []runtime.Object)
func (*SecretList) GetList ¶
func (s *SecretList) GetList() (r runtime.Object)
type SyncAlerts ¶
type SyncAlerts struct { App string Namespace string Tag string Target string AlertType AlertType ServiceLevelObjectives []picchuv1alpha1.ServiceLevelObjective }
type SyncApp ¶
type SyncApp struct { App string Namespace string Labels map[string]string DefaultDomain string PublicGateway string PrivateGateway string DeployedRevisions []Revision AlertRules []monitoringv1.Rule Ports []picchuv1alpha1.PortInfo TrafficPolicy *istiov1alpha3.TrafficPolicy }
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 ServiceAccountName string // k8s ServiceAccount LivenessProbe *corev1.Probe ReadinessProbe *corev1.Probe MinReadySeconds int32 }
Click to show internal directories.
Click to hide internal directories.