diff --git a/CHANGELOG.md b/CHANGELOG.md index a6126a63..0e24d724 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,14 @@ ## [Unreleased] +## [v0.11.0] - 2022-10-22 + ### Changed -- Optimized SLI recording rules now have the same labels as the non-optimized ones. -- Update to Go 1.19 -- Update to Kubernetes v1.25 +- Optimized SLI recording rules now have the same labels as the non-optimized ones, avoiding promtool check warnings. +- Update to Go 1.19. +- Update to Kubernetes v1.25. +- `sloth_window` is ignored in alerts reducing the noise of refiring alerts. ## [v0.10.0] - 2022-03-22 @@ -159,7 +162,8 @@ - Support raw query based SLI. - Kubernetes (prometheus-operator) CRD generation support. -[unreleased]: https://github.com/slok/sloth/compare/v0.10.0...HEAD +[unreleased]: https://github.com/slok/sloth/compare/v0.11.0...HEAD +[v0.11.0]: https://github.com/slok/sloth/compare/v0.10.0...v0.11.0 [v0.10.0]: https://github.com/slok/sloth/compare/v0.9.0...v0.10.0 [v0.9.0]: https://github.com/slok/sloth/compare/v0.8.0...v0.9.0 [v0.8.0]: https://github.com/slok/sloth/compare/v0.7.0...v0.8.0 diff --git a/deploy/kubernetes/helm/sloth/Chart.yaml b/deploy/kubernetes/helm/sloth/Chart.yaml index 9df03750..fe31da40 100644 --- a/deploy/kubernetes/helm/sloth/Chart.yaml +++ b/deploy/kubernetes/helm/sloth/Chart.yaml @@ -4,4 +4,4 @@ description: Base chart for Sloth. type: application home: https://github.com/slok/sloth kubeVersion: ">= 1.19.0-0" -version: 0.5.2 +version: 0.6.0 diff --git a/deploy/kubernetes/helm/sloth/crds/sloth.slok.dev_prometheusservicelevels.yaml b/deploy/kubernetes/helm/sloth/crds/sloth.slok.dev_prometheusservicelevels.yaml index 2bc1a778..7283e667 100644 --- a/deploy/kubernetes/helm/sloth/crds/sloth.slok.dev_prometheusservicelevels.yaml +++ b/deploy/kubernetes/helm/sloth/crds/sloth.slok.dev_prometheusservicelevels.yaml @@ -1,4 +1,3 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -261,9 +260,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/deploy/kubernetes/helm/sloth/tests/testdata/output/deployment_custom.yaml b/deploy/kubernetes/helm/sloth/tests/testdata/output/deployment_custom.yaml index 9352e5ae..ba18e1cb 100644 --- a/deploy/kubernetes/helm/sloth/tests/testdata/output/deployment_custom.yaml +++ b/deploy/kubernetes/helm/sloth/tests/testdata/output/deployment_custom.yaml @@ -59,7 +59,7 @@ spec: cpu: 5m memory: 75Mi - name: git-sync-plugins - image: k8s.gcr.io/git-sync/git-sync:v3.3.4 + image: k8s.gcr.io/git-sync/git-sync:v3.6.1 args: - --repo=https://github.com/slok/sloth-test-common-sli-plugins - --branch=main diff --git a/deploy/kubernetes/helm/sloth/tests/testdata/output/deployment_default.yaml b/deploy/kubernetes/helm/sloth/tests/testdata/output/deployment_default.yaml index 49802fbe..74a31bee 100644 --- a/deploy/kubernetes/helm/sloth/tests/testdata/output/deployment_default.yaml +++ b/deploy/kubernetes/helm/sloth/tests/testdata/output/deployment_default.yaml @@ -32,7 +32,7 @@ spec: serviceAccountName: sloth containers: - name: sloth - image: ghcr.io/slok/sloth:v0.10.0 + image: ghcr.io/slok/sloth:v0.11.0 args: - kubernetes-controller - --sli-plugins-path=/plugins @@ -50,7 +50,7 @@ spec: cpu: 5m memory: 75Mi - name: git-sync-plugins - image: k8s.gcr.io/git-sync/git-sync:v3.3.4 + image: k8s.gcr.io/git-sync/git-sync:v3.6.1 args: - --repo=https://github.com/slok/sloth-common-sli-plugins - --branch=main diff --git a/deploy/kubernetes/helm/sloth/values.yaml b/deploy/kubernetes/helm/sloth/values.yaml index 9ccf55fc..011f64bb 100644 --- a/deploy/kubernetes/helm/sloth/values.yaml +++ b/deploy/kubernetes/helm/sloth/values.yaml @@ -2,7 +2,7 @@ labels: {} image: repository: ghcr.io/slok/sloth - tag: v0.10.0 + tag: v0.11.0 sloth: resyncInterval: "" # The controller resync interval duration (e.g 15m). @@ -19,7 +19,7 @@ commonPlugins: enabled: true image: repository: k8s.gcr.io/git-sync/git-sync - tag: v3.3.4 + tag: v3.6.1 gitRepo: url: https://github.com/slok/sloth-common-sli-plugins branch: main diff --git a/deploy/kubernetes/raw/sloth-with-common-plugins.yaml b/deploy/kubernetes/raw/sloth-with-common-plugins.yaml index 52770bfc..a0b6cf39 100644 --- a/deploy/kubernetes/raw/sloth-with-common-plugins.yaml +++ b/deploy/kubernetes/raw/sloth-with-common-plugins.yaml @@ -6,7 +6,7 @@ metadata: name: sloth namespace: monitoring labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -18,7 +18,7 @@ kind: ClusterRole metadata: name: sloth labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -38,7 +38,7 @@ kind: ClusterRoleBinding metadata: name: sloth labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -59,7 +59,7 @@ metadata: name: sloth namespace: monitoring labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -74,7 +74,7 @@ spec: template: metadata: labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -85,7 +85,7 @@ spec: serviceAccountName: sloth containers: - name: sloth - image: ghcr.io/slok/sloth:v0.10.0 + image: ghcr.io/slok/sloth:v0.11.0 args: - kubernetes-controller - --sli-plugins-path=/plugins @@ -103,7 +103,7 @@ spec: cpu: 5m memory: 75Mi - name: git-sync-plugins - image: k8s.gcr.io/git-sync/git-sync:v3.3.4 + image: k8s.gcr.io/git-sync/git-sync:v3.6.1 args: - --repo=https://github.com/slok/sloth-common-sli-plugins - --branch=main @@ -130,7 +130,7 @@ metadata: name: sloth namespace: monitoring labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth diff --git a/deploy/kubernetes/raw/sloth.yaml b/deploy/kubernetes/raw/sloth.yaml index df4a5e8b..f3d14f58 100644 --- a/deploy/kubernetes/raw/sloth.yaml +++ b/deploy/kubernetes/raw/sloth.yaml @@ -6,7 +6,7 @@ metadata: name: sloth namespace: monitoring labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -18,7 +18,7 @@ kind: ClusterRole metadata: name: sloth labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -38,7 +38,7 @@ kind: ClusterRoleBinding metadata: name: sloth labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -59,7 +59,7 @@ metadata: name: sloth namespace: monitoring labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -74,7 +74,7 @@ spec: template: metadata: labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth @@ -85,7 +85,7 @@ spec: serviceAccountName: sloth containers: - name: sloth - image: ghcr.io/slok/sloth:v0.10.0 + image: ghcr.io/slok/sloth:v0.11.0 args: - kubernetes-controller ports: @@ -106,7 +106,7 @@ metadata: name: sloth namespace: monitoring labels: - helm.sh/chart: sloth-0.4.2 + helm.sh/chart: sloth-0.6.0 app.kubernetes.io/managed-by: Helm app: sloth app.kubernetes.io/name: sloth diff --git a/examples/_gen/getting-started.yml b/examples/_gen/getting-started.yml index b3e1d1a2..8fb10d75 100644 --- a/examples/_gen/getting-started.yml +++ b/examples/_gen/getting-started.yml @@ -110,7 +110,14 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"}[30d]) labels: + cmd: examplesgen.sh + owner: myteam + repo: myorg/myservice + sloth_id: myservice-requests-availability + sloth_service: myservice + sloth_slo: requests-availability sloth_window: 30d + tier: "2" - name: sloth-slo-meta-recordings-myservice-requests-availability rules: - record: slo:objective:ratio @@ -201,7 +208,7 @@ groups: ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -223,7 +230,7 @@ groups: ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) ) or ( diff --git a/examples/_gen/home-wifi.yml b/examples/_gen/home-wifi.yml index 057a6f58..bfa3a663 100644 --- a/examples/_gen/home-wifi.yml +++ b/examples/_gen/home-wifi.yml @@ -110,6 +110,13 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"}[30d]) labels: + cluster: valhalla + cmd: examplesgen.sh + component: ubiquiti + context: home + sloth_id: home-wifi-good-wifi-client-satisfaction + sloth_service: home-wifi + sloth_slo: good-wifi-client-satisfaction sloth_window: 30d - name: sloth-slo-meta-recordings-home-wifi-good-wifi-client-satisfaction rules: @@ -201,7 +208,7 @@ groups: ( max(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (14.4 * 0.05)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (14.4 * 0.05))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (14.4 * 0.05)) without (sloth_window) ) or ( @@ -222,7 +229,7 @@ groups: ( max(slo:sli_error:ratio_rate2h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (3 * 0.05)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (3 * 0.05))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (3 * 0.05)) without (sloth_window) ) or ( @@ -344,6 +351,13 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"}[30d]) labels: + cluster: valhalla + cmd: examplesgen.sh + component: ubiquiti + context: home + sloth_id: home-wifi-risk-wifi-client-satisfaction + sloth_service: home-wifi + sloth_slo: risk-wifi-client-satisfaction sloth_window: 30d - name: sloth-slo-meta-recordings-home-wifi-risk-wifi-client-satisfaction rules: @@ -435,7 +449,7 @@ groups: ( max(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (14.4 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (14.4 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (14.4 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -456,7 +470,7 @@ groups: ( max(slo:sli_error:ratio_rate2h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (3 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (3 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (3 * 0.0009999999999999432)) without (sloth_window) ) or ( diff --git a/examples/_gen/k8s-getting-started.yml b/examples/_gen/k8s-getting-started.yml index f4a9a546..de14e579 100644 --- a/examples/_gen/k8s-getting-started.yml +++ b/examples/_gen/k8s-getting-started.yml @@ -119,7 +119,14 @@ spec: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"}[30d]) labels: + cmd: examplesgen.sh + owner: myteam + repo: myorg/myservice + sloth_id: myservice-requests-availability + sloth_service: myservice + sloth_slo: requests-availability sloth_window: 30d + tier: "2" record: slo:sli_error:ratio_rate30d - name: sloth-slo-meta-recordings-myservice-requests-availability rules: @@ -215,7 +222,7 @@ spec: ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -237,7 +244,7 @@ spec: ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) ) or ( diff --git a/examples/_gen/k8s-home-wifi.yml b/examples/_gen/k8s-home-wifi.yml index 58ac7187..1927ed78 100644 --- a/examples/_gen/k8s-home-wifi.yml +++ b/examples/_gen/k8s-home-wifi.yml @@ -122,6 +122,13 @@ spec: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"}[30d]) labels: + cluster: valhalla + cmd: examplesgen.sh + component: ubiquiti + context: home + sloth_id: home-wifi-good-wifi-client-satisfaction + sloth_service: home-wifi + sloth_slo: good-wifi-client-satisfaction sloth_window: 30d record: slo:sli_error:ratio_rate30d - name: sloth-slo-meta-recordings-home-wifi-good-wifi-client-satisfaction @@ -219,7 +226,7 @@ spec: ( max(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (14.4 * 0.05)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (14.4 * 0.05))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (14.4 * 0.05)) without (sloth_window) ) or ( @@ -240,7 +247,7 @@ spec: ( max(slo:sli_error:ratio_rate2h{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (3 * 0.05)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (3 * 0.05))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="home-wifi-good-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="good-wifi-client-satisfaction"} > (3 * 0.05)) without (sloth_window) ) or ( @@ -356,6 +363,13 @@ spec: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"}[30d]) labels: + cluster: valhalla + cmd: examplesgen.sh + component: ubiquiti + context: home + sloth_id: home-wifi-risk-wifi-client-satisfaction + sloth_service: home-wifi + sloth_slo: risk-wifi-client-satisfaction sloth_window: 30d record: slo:sli_error:ratio_rate30d - name: sloth-slo-meta-recordings-home-wifi-risk-wifi-client-satisfaction @@ -453,7 +467,7 @@ spec: ( max(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (14.4 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (14.4 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (14.4 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -474,7 +488,7 @@ spec: ( max(slo:sli_error:ratio_rate2h{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (3 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (3 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="home-wifi-risk-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="risk-wifi-client-satisfaction"} > (3 * 0.0009999999999999432)) without (sloth_window) ) or ( diff --git a/examples/_gen/k8s-multifile.yml b/examples/_gen/k8s-multifile.yml index 9334edd1..11890be2 100644 --- a/examples/_gen/k8s-multifile.yml +++ b/examples/_gen/k8s-multifile.yml @@ -119,7 +119,14 @@ spec: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"}[30d]) labels: + cmd: examplesgen.sh + owner: myteam + repo: myorg/myservice + sloth_id: myservice-requests-availability + sloth_service: myservice + sloth_slo: requests-availability sloth_window: 30d + tier: "2" record: slo:sli_error:ratio_rate30d - name: sloth-slo-meta-recordings-myservice-requests-availability rules: @@ -215,7 +222,7 @@ spec: ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -237,7 +244,7 @@ spec: ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -371,7 +378,14 @@ spec: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"}[30d]) labels: + cmd: examplesgen.sh + owner: myteam2 + repo: myorg/myservice2 + sloth_id: myservice2-requests-availability + sloth_service: myservice2 + sloth_slo: requests-availability sloth_window: 30d + tier: "1" record: slo:sli_error:ratio_rate30d - name: sloth-slo-meta-recordings-myservice2-requests-availability rules: @@ -467,7 +481,7 @@ spec: ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (14.4 * 0.00010000000000005117)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (14.4 * 0.00010000000000005117))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (14.4 * 0.00010000000000005117)) without (sloth_window) ) or ( @@ -489,7 +503,7 @@ spec: ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (3 * 0.00010000000000005117)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (3 * 0.00010000000000005117))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (3 * 0.00010000000000005117)) without (sloth_window) ) or ( diff --git a/examples/_gen/kubernetes-apiserver.yml b/examples/_gen/kubernetes-apiserver.yml index a0bde786..4c30405e 100644 --- a/examples/_gen/kubernetes-apiserver.yml +++ b/examples/_gen/kubernetes-apiserver.yml @@ -110,6 +110,13 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="k8s-apiserver-requests-availability", sloth_service="k8s-apiserver", sloth_slo="requests-availability"}[30d]) labels: + category: availability + cluster: valhalla + cmd: examplesgen.sh + component: kubernetes + sloth_id: k8s-apiserver-requests-availability + sloth_service: k8s-apiserver + sloth_slo: requests-availability sloth_window: 30d - name: sloth-slo-meta-recordings-k8s-apiserver-requests-availability rules: @@ -201,7 +208,7 @@ groups: ( max(slo:sli_error:ratio_rate5m{sloth_id="k8s-apiserver-requests-availability", sloth_service="k8s-apiserver", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="k8s-apiserver-requests-availability", sloth_service="k8s-apiserver", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="k8s-apiserver-requests-availability", sloth_service="k8s-apiserver", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -224,7 +231,7 @@ groups: ( max(slo:sli_error:ratio_rate2h{sloth_id="k8s-apiserver-requests-availability", sloth_service="k8s-apiserver", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="k8s-apiserver-requests-availability", sloth_service="k8s-apiserver", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="k8s-apiserver-requests-availability", sloth_service="k8s-apiserver", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -383,6 +390,13 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="k8s-apiserver-requests-latency", sloth_service="k8s-apiserver", sloth_slo="requests-latency"}[30d]) labels: + category: latency + cluster: valhalla + cmd: examplesgen.sh + component: kubernetes + sloth_id: k8s-apiserver-requests-latency + sloth_service: k8s-apiserver + sloth_slo: requests-latency sloth_window: 30d - name: sloth-slo-meta-recordings-k8s-apiserver-requests-latency rules: @@ -474,7 +488,7 @@ groups: ( max(slo:sli_error:ratio_rate5m{sloth_id="k8s-apiserver-requests-latency", sloth_service="k8s-apiserver", sloth_slo="requests-latency"} > (14.4 * 0.01)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="k8s-apiserver-requests-latency", sloth_service="k8s-apiserver", sloth_slo="requests-latency"} > (14.4 * 0.01))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="k8s-apiserver-requests-latency", sloth_service="k8s-apiserver", sloth_slo="requests-latency"} > (14.4 * 0.01)) without (sloth_window) ) or ( @@ -497,7 +511,7 @@ groups: ( max(slo:sli_error:ratio_rate2h{sloth_id="k8s-apiserver-requests-latency", sloth_service="k8s-apiserver", sloth_slo="requests-latency"} > (3 * 0.01)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="k8s-apiserver-requests-latency", sloth_service="k8s-apiserver", sloth_slo="requests-latency"} > (3 * 0.01))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="k8s-apiserver-requests-latency", sloth_service="k8s-apiserver", sloth_slo="requests-latency"} > (3 * 0.01)) without (sloth_window) ) or ( diff --git a/examples/_gen/multifile.yml b/examples/_gen/multifile.yml index f6633008..6e14e02e 100644 --- a/examples/_gen/multifile.yml +++ b/examples/_gen/multifile.yml @@ -110,7 +110,14 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"}[30d]) labels: + cmd: examplesgen.sh + owner: myteam + repo: myorg/myservice + sloth_id: myservice-requests-availability + sloth_service: myservice + sloth_slo: requests-availability sloth_window: 30d + tier: "2" - name: sloth-slo-meta-recordings-myservice-requests-availability rules: - record: slo:objective:ratio @@ -201,7 +208,7 @@ groups: ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -223,7 +230,7 @@ groups: ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -352,7 +359,14 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"}[30d]) labels: + cmd: examplesgen.sh + owner: myteam2 + repo: myorg/myservice2 + sloth_id: myservice2-requests-availability + sloth_service: myservice2 + sloth_slo: requests-availability sloth_window: 30d + tier: "1" - name: sloth-slo-meta-recordings-myservice2-requests-availability rules: - record: slo:objective:ratio @@ -443,7 +457,7 @@ groups: ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (14.4 * 0.00010000000000005117)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (14.4 * 0.00010000000000005117))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (14.4 * 0.00010000000000005117)) without (sloth_window) ) or ( @@ -465,7 +479,7 @@ groups: ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (3 * 0.00010000000000005117)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (3 * 0.00010000000000005117))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="myservice2-requests-availability", sloth_service="myservice2", sloth_slo="requests-availability"} > (3 * 0.00010000000000005117)) without (sloth_window) ) or ( diff --git a/examples/_gen/no-alerts.yml b/examples/_gen/no-alerts.yml index dfe0059c..b0209acb 100644 --- a/examples/_gen/no-alerts.yml +++ b/examples/_gen/no-alerts.yml @@ -138,6 +138,11 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myapp-http-availability", sloth_service="myapp", sloth_slo="http-availability"}[30d]) labels: + cmd: examplesgen.sh + owner: myteam + sloth_id: myapp-http-availability + sloth_service: myapp + sloth_slo: http-availability sloth_window: 30d - name: sloth-slo-meta-recordings-myapp-http-availability rules: diff --git a/examples/_gen/openslo-getting-started.yml b/examples/_gen/openslo-getting-started.yml index deb16eeb..472ab14f 100644 --- a/examples/_gen/openslo-getting-started.yml +++ b/examples/_gen/openslo-getting-started.yml @@ -145,6 +145,10 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="my-service-sloth-slo-my-service-0", sloth_service="my-service", sloth_slo="sloth-slo-my-service-0"}[30d]) labels: + cmd: examplesgen.sh + sloth_id: my-service-sloth-slo-my-service-0 + sloth_service: my-service + sloth_slo: sloth-slo-my-service-0 sloth_window: 30d - name: sloth-slo-meta-recordings-my-service-sloth-slo-my-service-0 rules: diff --git a/examples/_gen/openslo-kubernetes-apiserver.yml b/examples/_gen/openslo-kubernetes-apiserver.yml index 7bb8ddc4..41a6f8cc 100644 --- a/examples/_gen/openslo-kubernetes-apiserver.yml +++ b/examples/_gen/openslo-kubernetes-apiserver.yml @@ -145,6 +145,10 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="k8s-apiserver-requests-availability-openslo-0", sloth_service="k8s-apiserver", sloth_slo="requests-availability-openslo-0"}[30d]) labels: + cmd: examplesgen.sh + sloth_id: k8s-apiserver-requests-availability-openslo-0 + sloth_service: k8s-apiserver + sloth_slo: requests-availability-openslo-0 sloth_window: 30d - name: sloth-slo-meta-recordings-k8s-apiserver-requests-availability-openslo-0 rules: @@ -355,6 +359,10 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="k8s-apiserver-requests-latency-openslo-0", sloth_service="k8s-apiserver", sloth_slo="requests-latency-openslo-0"}[30d]) labels: + cmd: examplesgen.sh + sloth_id: k8s-apiserver-requests-latency-openslo-0 + sloth_service: k8s-apiserver + sloth_slo: requests-latency-openslo-0 sloth_window: 30d - name: sloth-slo-meta-recordings-k8s-apiserver-requests-latency-openslo-0 rules: @@ -559,6 +567,10 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="k8s-apiserver-requests-latency-openslo-1", sloth_service="k8s-apiserver", sloth_slo="requests-latency-openslo-1"}[30d]) labels: + cmd: examplesgen.sh + sloth_id: k8s-apiserver-requests-latency-openslo-1 + sloth_service: k8s-apiserver + sloth_slo: requests-latency-openslo-1 sloth_window: 30d - name: sloth-slo-meta-recordings-k8s-apiserver-requests-latency-openslo-1 rules: diff --git a/examples/_gen/plugin-getting-started.yml b/examples/_gen/plugin-getting-started.yml index 8da4e6bd..631df5ea 100644 --- a/examples/_gen/plugin-getting-started.yml +++ b/examples/_gen/plugin-getting-started.yml @@ -117,7 +117,14 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"}[30d]) labels: + cmd: examplesgen.sh + owner: myteam + repo: myorg/myservice + sloth_id: myservice-requests-availability + sloth_service: myservice + sloth_slo: requests-availability sloth_window: 30d + tier: "2" - name: sloth-slo-meta-recordings-myservice-requests-availability rules: - record: slo:objective:ratio @@ -208,7 +215,7 @@ groups: ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -230,7 +237,7 @@ groups: ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) ) or ( diff --git a/examples/_gen/plugin-k8s-getting-started.yml b/examples/_gen/plugin-k8s-getting-started.yml index 53a3be66..c50c0737 100644 --- a/examples/_gen/plugin-k8s-getting-started.yml +++ b/examples/_gen/plugin-k8s-getting-started.yml @@ -129,7 +129,14 @@ spec: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"}[30d]) labels: + cmd: examplesgen.sh + owner: myteam + repo: myorg/myservice + sloth_id: myservice-requests-availability + sloth_service: myservice + sloth_slo: requests-availability sloth_window: 30d + tier: "2" record: slo:sli_error:ratio_rate30d - name: sloth-slo-meta-recordings-myservice-requests-availability rules: @@ -225,7 +232,7 @@ spec: ( max(slo:sli_error:ratio_rate5m{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (14.4 * 0.0009999999999999432)) without (sloth_window) ) or ( @@ -245,7 +252,7 @@ spec: ( max(slo:sli_error:ratio_rate2h{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="myservice-requests-availability", sloth_service="myservice", sloth_slo="requests-availability"} > (3 * 0.0009999999999999432)) without (sloth_window) ) or ( diff --git a/examples/_gen/raw-home-wifi.yml b/examples/_gen/raw-home-wifi.yml index 66164627..54b8d7da 100644 --- a/examples/_gen/raw-home-wifi.yml +++ b/examples/_gen/raw-home-wifi.yml @@ -131,6 +131,13 @@ groups: / ignoring (sloth_window) count_over_time(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="wifi-client-satisfaction"}[30d]) labels: + cluster: valhalla + cmd: examplesgen.sh + component: ubiquiti + context: home + sloth_id: home-wifi-wifi-client-satisfaction + sloth_service: home-wifi + sloth_slo: wifi-client-satisfaction sloth_window: 30d - name: sloth-slo-meta-recordings-home-wifi-wifi-client-satisfaction rules: @@ -222,7 +229,7 @@ groups: ( max(slo:sli_error:ratio_rate5m{sloth_id="home-wifi-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="wifi-client-satisfaction"} > (14.4 * 0.05)) without (sloth_window) and - max((slo:sli_error:ratio_rate1h{sloth_id="home-wifi-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="wifi-client-satisfaction"} > (14.4 * 0.05))) without (sloth_window) + max(slo:sli_error:ratio_rate1h{sloth_id="home-wifi-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="wifi-client-satisfaction"} > (14.4 * 0.05)) without (sloth_window) ) or ( @@ -243,7 +250,7 @@ groups: ( max(slo:sli_error:ratio_rate2h{sloth_id="home-wifi-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="wifi-client-satisfaction"} > (3 * 0.05)) without (sloth_window) and - max((slo:sli_error:ratio_rate1d{sloth_id="home-wifi-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="wifi-client-satisfaction"} > (3 * 0.05))) without (sloth_window) + max(slo:sli_error:ratio_rate1d{sloth_id="home-wifi-wifi-client-satisfaction", sloth_service="home-wifi", sloth_slo="wifi-client-satisfaction"} > (3 * 0.05)) without (sloth_window) ) or ( diff --git a/internal/k8sprometheus/k8sprometheusmock/prometheus_rules_ensurer.go b/internal/k8sprometheus/k8sprometheusmock/prometheus_rules_ensurer.go index 0949077a..f8995be0 100644 --- a/internal/k8sprometheus/k8sprometheusmock/prometheus_rules_ensurer.go +++ b/internal/k8sprometheus/k8sprometheusmock/prometheus_rules_ensurer.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.5.1. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package k8sprometheusmock @@ -28,3 +28,18 @@ func (_m *PrometheusRulesEnsurer) EnsurePrometheusRule(ctx context.Context, pr * return r0 } + +type mockConstructorTestingTNewPrometheusRulesEnsurer interface { + mock.TestingT + Cleanup(func()) +} + +// NewPrometheusRulesEnsurer creates a new instance of PrometheusRulesEnsurer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewPrometheusRulesEnsurer(t mockConstructorTestingTNewPrometheusRulesEnsurer) *PrometheusRulesEnsurer { + mock := &PrometheusRulesEnsurer{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/internal/prometheus/prometheusmock/file_manager.go b/internal/prometheus/prometheusmock/file_manager.go index 1618f41a..703008ed 100644 --- a/internal/prometheus/prometheusmock/file_manager.go +++ b/internal/prometheus/prometheusmock/file_manager.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.5.1. DO NOT EDIT. +// Code generated by mockery v2.14.0. DO NOT EDIT. package prometheusmock @@ -60,3 +60,18 @@ func (_m *FileManager) ReadFile(ctx context.Context, path string) ([]byte, error return r0, r1 } + +type mockConstructorTestingTNewFileManager interface { + mock.TestingT + Cleanup(func()) +} + +// NewFileManager creates a new instance of FileManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewFileManager(t mockConstructorTestingTNewFileManager) *FileManager { + mock := &FileManager{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/pkg/kubernetes/api/sloth/v1/README.md b/pkg/kubernetes/api/sloth/v1/README.md index 42151954..46ef875c 100755 --- a/pkg/kubernetes/api/sloth/v1/README.md +++ b/pkg/kubernetes/api/sloth/v1/README.md @@ -60,7 +60,7 @@ var ( ) ``` -SchemeGroupVersion is group version used to register these objects\. +SchemeGroupVersion is group version used to register these objects. ```go var SchemeGroupVersion = schema.GroupVersion{Group: sloth.GroupName, Version: version} @@ -72,7 +72,7 @@ var SchemeGroupVersion = schema.GroupVersion{Group: sloth.GroupName, Version: ve func Kind(kind string) schema.GroupKind ``` -Kind takes an unqualified kind and returns back a Group qualified GroupKind\. +Kind takes an unqualified kind and returns back a Group qualified GroupKind. ## func Resource @@ -80,7 +80,7 @@ Kind takes an unqualified kind and returns back a Group qualified GroupKind\. func Resource(resource string) schema.GroupResource ``` -Resource takes an unqualified resource and returns a Group qualified GroupResource\. +Resource takes an unqualified resource and returns a Group qualified GroupResource. ## func VersionKind @@ -88,11 +88,11 @@ Resource takes an unqualified resource and returns a Group qualified GroupResour func VersionKind(kind string) schema.GroupVersionKind ``` -VersionKind takes an unqualified kind and returns back a Group qualified GroupVersionKind\. +VersionKind takes an unqualified kind and returns back a Group qualified GroupVersionKind. ## type Alert -Alert configures specific SLO alert\. +Alert configures specific SLO alert. ```go type Alert struct { @@ -117,7 +117,7 @@ type Alert struct { func (in *Alert) DeepCopy() *Alert ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new Alert\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alert. ### func \(\*Alert\) DeepCopyInto @@ -125,11 +125,11 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *Alert) DeepCopyInto(out *Alert) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ## type Alerting -Alerting wraps all the configuration required by the SLO alerts\. +Alerting wraps all the configuration required by the SLO alerts. ```go type Alerting struct { @@ -160,7 +160,7 @@ type Alerting struct { func (in *Alerting) DeepCopy() *Alerting ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new Alerting\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alerting. ### func \(\*Alerting\) DeepCopyInto @@ -168,13 +168,13 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *Alerting) DeepCopyInto(out *Alerting) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ## type PrometheusServiceLevel -\+genclient \+k8s:deepcopy\-gen:interfaces=k8s\.io/apimachinery/pkg/runtime\.Object \+kubebuilder:subresource:status \+kubebuilder:printcolumn:name="SERVICE"\,type="string"\,JSONPath="\.spec\.service" \+kubebuilder:printcolumn:name="DESIRED SLOs"\,type="integer"\,JSONPath="\.status\.processedSLOs" \+kubebuilder:printcolumn:name="READY SLOs"\,type="integer"\,JSONPath="\.status\.promOpRulesGeneratedSLOs" \+kubebuilder:printcolumn:name="GEN OK"\,type="boolean"\,JSONPath="\.status\.promOpRulesGenerated" \+kubebuilder:printcolumn:name="GEN AGE"\,type="date"\,JSONPath="\.status\.lastPromOpRulesSuccessfulGenerated" \+kubebuilder:printcolumn:name="AGE"\,type="date"\,JSONPath="\.metadata\.creationTimestamp" \+kubebuilder:resource:singular=prometheusservicelevel\,path=prometheusservicelevels\,shortName=psl;pslo\,scope=Namespaced\,categories=slo;slos;sli;slis +\+genclient \+k8s:deepcopy\-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object \+kubebuilder:subresource:status \+kubebuilder:printcolumn:name="SERVICE",type="string",JSONPath=".spec.service" \+kubebuilder:printcolumn:name="DESIRED SLOs",type="integer",JSONPath=".status.processedSLOs" \+kubebuilder:printcolumn:name="READY SLOs",type="integer",JSONPath=".status.promOpRulesGeneratedSLOs" \+kubebuilder:printcolumn:name="GEN OK",type="boolean",JSONPath=".status.promOpRulesGenerated" \+kubebuilder:printcolumn:name="GEN AGE",type="date",JSONPath=".status.lastPromOpRulesSuccessfulGenerated" \+kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" \+kubebuilder:resource:singular=prometheusservicelevel,path=prometheusservicelevels,shortName=psl;pslo,scope=Namespaced,categories=slo;slos;sli;slis -PrometheusServiceLevel is the expected service quality level using Prometheus as the backend used by Sloth\. +PrometheusServiceLevel is the expected service quality level using Prometheus as the backend used by Sloth. ```go type PrometheusServiceLevel struct { @@ -192,7 +192,7 @@ type PrometheusServiceLevel struct { func (in *PrometheusServiceLevel) DeepCopy() *PrometheusServiceLevel ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new PrometheusServiceLevel\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusServiceLevel. ### func \(\*PrometheusServiceLevel\) DeepCopyInto @@ -200,7 +200,7 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *PrometheusServiceLevel) DeepCopyInto(out *PrometheusServiceLevel) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ### func \(\*PrometheusServiceLevel\) DeepCopyObject @@ -208,13 +208,13 @@ DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writ func (in *PrometheusServiceLevel) DeepCopyObject() runtime.Object ``` -DeepCopyObject is an autogenerated deepcopy function\, copying the receiver\, creating a new runtime\.Object\. +DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. ## type PrometheusServiceLevelList -\+k8s:deepcopy\-gen:interfaces=k8s\.io/apimachinery/pkg/runtime\.Object +\+k8s:deepcopy\-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -PrometheusServiceLevelList is a list of PrometheusServiceLevel resources\. +PrometheusServiceLevelList is a list of PrometheusServiceLevel resources. ```go type PrometheusServiceLevelList struct { @@ -231,7 +231,7 @@ type PrometheusServiceLevelList struct { func (in *PrometheusServiceLevelList) DeepCopy() *PrometheusServiceLevelList ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new PrometheusServiceLevelList\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusServiceLevelList. ### func \(\*PrometheusServiceLevelList\) DeepCopyInto @@ -239,7 +239,7 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *PrometheusServiceLevelList) DeepCopyInto(out *PrometheusServiceLevelList) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ### func \(\*PrometheusServiceLevelList\) DeepCopyObject @@ -247,11 +247,11 @@ DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writ func (in *PrometheusServiceLevelList) DeepCopyObject() runtime.Object ``` -DeepCopyObject is an autogenerated deepcopy function\, copying the receiver\, creating a new runtime\.Object\. +DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. ## type PrometheusServiceLevelSpec -ServiceLevelSpec is the spec for a PrometheusServiceLevel\. +ServiceLevelSpec is the spec for a PrometheusServiceLevel. ```go type PrometheusServiceLevelSpec struct { @@ -277,7 +277,7 @@ type PrometheusServiceLevelSpec struct { func (in *PrometheusServiceLevelSpec) DeepCopy() *PrometheusServiceLevelSpec ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new PrometheusServiceLevelSpec\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusServiceLevelSpec. ### func \(\*PrometheusServiceLevelSpec\) DeepCopyInto @@ -285,7 +285,7 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *PrometheusServiceLevelSpec) DeepCopyInto(out *PrometheusServiceLevelSpec) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ## type PrometheusServiceLevelStatus @@ -313,7 +313,7 @@ type PrometheusServiceLevelStatus struct { func (in *PrometheusServiceLevelStatus) DeepCopy() *PrometheusServiceLevelStatus ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new PrometheusServiceLevelStatus\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusServiceLevelStatus. ### func \(\*PrometheusServiceLevelStatus\) DeepCopyInto @@ -321,13 +321,13 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *PrometheusServiceLevelStatus) DeepCopyInto(out *PrometheusServiceLevelStatus) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ## type SLI -SLI will tell what is good or bad for the SLO\. All SLIs will be get based on time windows\, that's why Sloth needs the queries to use \`\{\{\.window\}\}\` template variable\. +SLI will tell what is good or bad for the SLO. All SLIs will be get based on time windows, that's why Sloth needs the queries to use \`\{\{.window\}\}\` template variable. -Only one of the SLI types can be used\. +Only one of the SLI types can be used. ```go type SLI struct { @@ -351,7 +351,7 @@ type SLI struct { func (in *SLI) DeepCopy() *SLI ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new SLI\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SLI. ### func \(\*SLI\) DeepCopyInto @@ -359,11 +359,11 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *SLI) DeepCopyInto(out *SLI) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ## type SLIEvents -SLIEvents is an SLI that is calculated as the division of bad events and total events\, giving a ratio SLI\. Normally this is the most common ratio type\. +SLIEvents is an SLI that is calculated as the division of bad events and total events, giving a ratio SLI. Normally this is the most common ratio type. ```go type SLIEvents struct { @@ -385,7 +385,7 @@ type SLIEvents struct { func (in *SLIEvents) DeepCopy() *SLIEvents ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new SLIEvents\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SLIEvents. ### func \(\*SLIEvents\) DeepCopyInto @@ -393,11 +393,11 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *SLIEvents) DeepCopyInto(out *SLIEvents) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ## type SLIPlugin -SLIPlugin will use the SLI returned by the SLI plugin selected along with the options\. +SLIPlugin will use the SLI returned by the SLI plugin selected along with the options. ```go type SLIPlugin struct { @@ -416,7 +416,7 @@ type SLIPlugin struct { func (in *SLIPlugin) DeepCopy() *SLIPlugin ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new SLIPlugin\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SLIPlugin. ### func \(\*SLIPlugin\) DeepCopyInto @@ -424,11 +424,11 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *SLIPlugin) DeepCopyInto(out *SLIPlugin) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ## type SLIRaw -SLIRaw is a error ratio SLI already calculated\. Normally this will be used when the SLI is already calculated by other recording rule\, system\.\.\. +SLIRaw is a error ratio SLI already calculated. Normally this will be used when the SLI is already calculated by other recording rule, system... ```go type SLIRaw struct { @@ -443,7 +443,7 @@ type SLIRaw struct { func (in *SLIRaw) DeepCopy() *SLIRaw ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new SLIRaw\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SLIRaw. ### func \(\*SLIRaw\) DeepCopyInto @@ -451,11 +451,11 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *SLIRaw) DeepCopyInto(out *SLIRaw) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. ## type SLO -SLO is the configuration/declaration of the service level objective of a service\. +SLO is the configuration/declaration of the service level objective of a service. ```go type SLO struct { @@ -499,7 +499,7 @@ type SLO struct { func (in *SLO) DeepCopy() *SLO ``` -DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating a new SLO\. +DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SLO. ### func \(\*SLO\) DeepCopyInto @@ -507,7 +507,7 @@ DeepCopy is an autogenerated deepcopy function\, copying the receiver\, creating func (in *SLO) DeepCopyInto(out *SLO) ``` -DeepCopyInto is an autogenerated deepcopy function\, copying the receiver\, writing into out\. in must be non\-nil\. +DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non\-nil. diff --git a/pkg/kubernetes/gen/clientset/versioned/clientset.go b/pkg/kubernetes/gen/clientset/versioned/clientset.go index 895abab4..e70b7571 100644 --- a/pkg/kubernetes/gen/clientset/versioned/clientset.go +++ b/pkg/kubernetes/gen/clientset/versioned/clientset.go @@ -45,6 +45,10 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface { func NewForConfig(c *rest.Config) (*Clientset, error) { configShallowCopy := *c + if configShallowCopy.UserAgent == "" { + configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() + } + // share the transport between all clients httpClient, err := rest.HTTPClientFor(&configShallowCopy) if err != nil { diff --git a/pkg/kubernetes/gen/clientset/versioned/fake/register.go b/pkg/kubernetes/gen/clientset/versioned/fake/register.go index c8d8e92d..6248599c 100644 --- a/pkg/kubernetes/gen/clientset/versioned/fake/register.go +++ b/pkg/kubernetes/gen/clientset/versioned/fake/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/kubernetes/gen/clientset/versioned/scheme/register.go b/pkg/kubernetes/gen/clientset/versioned/scheme/register.go index 21b1f41a..c4f6bb53 100644 --- a/pkg/kubernetes/gen/clientset/versioned/scheme/register.go +++ b/pkg/kubernetes/gen/clientset/versioned/scheme/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/pkg/kubernetes/gen/crd/sloth.slok.dev_prometheusservicelevels.yaml b/pkg/kubernetes/gen/crd/sloth.slok.dev_prometheusservicelevels.yaml index 2bc1a778..7283e667 100644 --- a/pkg/kubernetes/gen/crd/sloth.slok.dev_prometheusservicelevels.yaml +++ b/pkg/kubernetes/gen/crd/sloth.slok.dev_prometheusservicelevels.yaml @@ -1,4 +1,3 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -261,9 +260,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/pkg/prometheus/alertwindows/v1/README.md b/pkg/prometheus/alertwindows/v1/README.md index 1a135005..09544ab2 100755 --- a/pkg/prometheus/alertwindows/v1/README.md +++ b/pkg/prometheus/alertwindows/v1/README.md @@ -39,7 +39,7 @@ type AlertWindows struct { ## type PageWindow -PageWindow represents the configuration for page alerting\. +PageWindow represents the configuration for page alerting. ```go type PageWindow struct { @@ -60,7 +60,7 @@ type QuickSlowWindow struct { ## type Spec -Spec represents the root type of the Alerting window\. +Spec represents the root type of the Alerting window. ```go type Spec struct { @@ -75,7 +75,7 @@ type Spec struct { ## type TicketWindow -PageWindow represents the configuration for ticket alerting\. +PageWindow represents the configuration for ticket alerting. ```go type TicketWindow struct { diff --git a/pkg/prometheus/api/v1/README.md b/pkg/prometheus/api/v1/README.md index 2a1a6187..ab419d3d 100755 --- a/pkg/prometheus/api/v1/README.md +++ b/pkg/prometheus/api/v1/README.md @@ -84,7 +84,7 @@ const Version = "prometheus/v1" ## type Alert -Alert configures specific SLO alert\. +Alert configures specific SLO alert. ```go type Alert struct { @@ -101,7 +101,7 @@ type Alert struct { ## type Alerting -Alerting wraps all the configuration required by the SLO alerts\. +Alerting wraps all the configuration required by the SLO alerts. ```go type Alerting struct { @@ -121,9 +121,9 @@ type Alerting struct { ## type SLI -SLI will tell what is good or bad for the SLO\. All SLIs will be get based on time windows\, that's why Sloth needs the queries to use \`\{\{\.window\}\}\` template variable\. +SLI will tell what is good or bad for the SLO. All SLIs will be get based on time windows, that's why Sloth needs the queries to use \`\{\{.window\}\}\` template variable. -Only one of the SLI types can be used\. +Only one of the SLI types can be used. ```go type SLI struct { @@ -138,7 +138,7 @@ type SLI struct { ## type SLIEvents -SLIEvents is an SLI that is calculated as the division of bad events and total events\, giving a ratio SLI\. Normally this is the most common ratio type\. +SLIEvents is an SLI that is calculated as the division of bad events and total events, giving a ratio SLI. Normally this is the most common ratio type. ```go type SLIEvents struct { @@ -155,7 +155,7 @@ type SLIEvents struct { ## type SLIPlugin -SLIPlugin will use the SLI returned by the SLI plugin selected along with the options\. +SLIPlugin will use the SLI returned by the SLI plugin selected along with the options. ```go type SLIPlugin struct { @@ -168,7 +168,7 @@ type SLIPlugin struct { ## type SLIRaw -SLIRaw is a error ratio SLI already calculated\. Normally this will be used when the SLI is already calculated by other recording rule\, system\.\.\. +SLIRaw is a error ratio SLI already calculated. Normally this will be used when the SLI is already calculated by other recording rule, system... ```go type SLIRaw struct { @@ -179,7 +179,7 @@ type SLIRaw struct { ## type SLO -SLO is the configuration/declaration of the service level objective of a service\. +SLO is the configuration/declaration of the service level objective of a service. ```go type SLO struct { @@ -203,7 +203,7 @@ type SLO struct { ## type Spec -Spec represents the root type of the SLOs declaration specification\. +Spec represents the root type of the SLOs declaration specification. ```go type Spec struct { diff --git a/scripts/kubegen.sh b/scripts/kubegen.sh index 89ba7e37..fb1cd0b2 100755 --- a/scripts/kubegen.sh +++ b/scripts/kubegen.sh @@ -3,8 +3,8 @@ set -o errexit set -o nounset -IMAGE_CLI_GEN=quay.io/slok/kube-code-generator:v1.23.0 -IMAGE_CRD_GEN=quay.io/slok/kube-code-generator:v1.23.0 +IMAGE_CLI_GEN=quay.io/slok/kube-code-generator:v1.25.0 +IMAGE_CRD_GEN=quay.io/slok/kube-code-generator:v1.25.0 ROOT_DIRECTORY=$(dirname "$(readlink -f "$0")")/../ PROJECT_PACKAGE="github.com/slok/sloth" GEN_DIRECTORY="pkg/kubernetes/gen"