yq eval -i '.metadata.namespace |= "argo"' "${FILE}"yq eval -i 'select(.kind == "Service") |= .spec.ports[] |= select(has("protocol") | not) |= .protocol="TCP" ' ${FILE}| apiVersion: sloth.slok.dev/v1 | |
| kind: PrometheusServiceLevel | |
| metadata: | |
| name: big-slo-service | |
| namespace: test-ns | |
| spec: | |
| labels: | |
| an: example | |
| big: files | |
| this: is |
| package plugin | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "github.com/slok/sloth/pkg/common/conventions" | |
| utilsdata "github.com/slok/sloth/pkg/common/utils/data" | |
| pluginslov1 "github.com/slok/sloth/pkg/prometheus/plugin/slo/v1" | |
| ) |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "log/slog" | |
| "net/http" | |
| "net/url" | |
| "os" | |
| "os/signal" |
| version: "prometheus/v1" | |
| service: "myservice" | |
| labels: | |
| owner: "myteam" | |
| tier: "2" | |
| slos: | |
| # We allow failing (5xx and 429) 1 request every 1000 requests (99.9%). | |
| - name: "requests-availability" | |
| objective: 99.9 | |
| description: "Common SLO based on availability for HTTP request responses." |
| package k8sunstructured_test | |
| import ( | |
| "bytes" | |
| "testing" | |
| "github.com/stretchr/testify/assert" | |
| "github.com/stretchr/testify/require" | |
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
| "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" |
| package main | |
| import ( | |
| "os" | |
| "path/filepath" | |
| "time" | |
| corev1 "k8s.io/api/core/v1" | |
| metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
| "k8s.io/apimachinery/pkg/runtime" |
| $ time vgo build | |
| vgo: finding github.com/google/cadvisor v0.0.0-20170309230114-17543becf905 | |
| vgo: finding gopkg.in/olivere/elastic.v2 v2.0.0-20151008152123-3cfe88295d20 | |
| vgo: finding golang.org/x/oauth2 v0.0.0-20150321034511-ca8a464d23d5 | |
| vgo: finding golang.org/x/net v0.0.0-20151120032300-5627bad10b82 | |
| vgo: finding github.com/influxdb/influxdb v0.0.0-20151125225445-9eab56311373 | |
| vgo: finding github.com/go-ini/ini v0.0.0-20160207163330-193d1ecb466b | |
| vgo: finding github.com/eapache/queue v0.0.0-20150606115303-ded5959c0d4e | |
| vgo: finding github.com/coreos/rkt v0.0.0-20160513154944-14437382a98e | |
| FindRepo: Get https://speter.net/go/exp/math/dec/inf?go-get=1: x509: certificate signed by unknown authority |