Documentation ¶
Index ¶
- Constants
- func NewPromAPI(f *framework.Framework, ns *corev1.Namespace) (promv1.API, error)
- type PatchSpec
- type Prom
- type Resources
- func (r *Resources) ExpectCleanupSuccessful(ctx context.Context, f *framework.Framework, ns *corev1.Namespace)
- func (r *Resources) ExpectDaemonsetUpdateSuccessful(ctx context.Context, f *framework.Framework, ns *corev1.Namespace)
- func (r *Resources) ExpectDeploySuccessful(ctx context.Context, f *framework.Framework, timeout time.Duration, ...)
- func (r *Resources) ExpectDeploymentScaleSuccessful(ctx context.Context, f *framework.Framework, timeout time.Duration, ...)
- func (r *Resources) ExpectServicesSuccessful(ctx context.Context, f *framework.Framework, ns *corev1.Namespace, ...)
Constants ¶
const ( PromDeploymentName = "prometheus" PromServiceName = "prometheus" PromImage = "prom/prometheus:v2.1.0" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PatchSpec ¶
type PatchSpec struct { Op string `json:"op"` Path string `json:"path"` Value int32 `json:"value"` }
PatchSpec is for Kubernetes patching
type Prom ¶
Prom holds the created prom v1 API and the time the test runs
func (*Prom) QueryPercent ¶
func (p *Prom) QueryPercent(requests string, failures string, testTime time.Time) (model.SampleValue, error)
QueryPercent returns the percentage value for a Prometheus query
type Resources ¶
type Resources struct { Daemonset *appsv1.DaemonSet Deployment *appsv1.Deployment Services []*corev1.Service }
Resources is a grouping of Kubernetes resources
func NewNginxResources ¶
NewNginxResources creates new Kubernetes nginx resources and takes in a namespace, the node name to run on, and replica count
func NewPromResources ¶
NewPromResources creates new prometheus Kubernetes resources and takes in a namespace, the node name to run on, and replica count
func NewTestpodResources ¶
NewTestpodResources creates new Kubernetes resources with image exported as env TESTPOD_IMAGE_URI. Build the image at https://github.com/aws/amazon-vpc-cni-k8s/ with `make build-docker-testpod`
func (*Resources) ExpectCleanupSuccessful ¶
func (r *Resources) ExpectCleanupSuccessful(ctx context.Context, f *framework.Framework, ns *corev1.Namespace)
ExpectCleanupSuccessful expects cleaning up services and deployments to be successful
func (*Resources) ExpectDaemonsetUpdateSuccessful ¶
func (r *Resources) ExpectDaemonsetUpdateSuccessful(ctx context.Context, f *framework.Framework, ns *corev1.Namespace)
ExpectDaemonsetUpdateSuccessful expects updating a daemonset to be successful
func (*Resources) ExpectDeploySuccessful ¶
func (r *Resources) ExpectDeploySuccessful(ctx context.Context, f *framework.Framework, timeout time.Duration, ns *corev1.Namespace)
ExpectDeploySuccessful expects a deployment and any services to be successful