From 199d5189e78f6cc955b1fe8750543dd7893ec6f8 Mon Sep 17 00:00:00 2001 From: haasad Date: Fri, 9 Aug 2024 15:14:27 +0200 Subject: [PATCH] Add option to fully disable the storage canary. --- class/defaults.yml | 4 +++- component/main.jsonnet | 2 +- docs/modules/ROOT/pages/references/parameters.adoc | 13 +++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/class/defaults.yml b/class/defaults.yml index dc969e3..b1b08d6 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -164,6 +164,9 @@ parameters: tcp: preferred_ip_protocol: ip4 + storage_canary: + enabled: ${openshift4_slos:slos:storage:canary:enabled} + network_canary: enabled: ${openshift4_slos:slos:network:canary:enabled} namespace: appuio-network-canary @@ -184,7 +187,6 @@ parameters: key: 'storagenode' operator: 'Exists' - canary_scheduler_controller: enabled: true manifests_version: ${openshift4_slos:images:canary_scheduler_controller:tag} diff --git a/component/main.jsonnet b/component/main.jsonnet index ac6c502..faadd69 100644 --- a/component/main.jsonnet +++ b/component/main.jsonnet @@ -199,7 +199,7 @@ local storageCanaries = std.flattenArrays(std.filterMap( '10_secrets': com.generateResources(params.secrets, function(name) com.namespaced(params.namespace, kube.Secret(name))), [if params.canary_scheduler_controller.enabled then '30_canaryImageStream']: canaryImageStream, [if params.canary_scheduler_controller.enabled then '30_canary']: canary, - [if params.canary_scheduler_controller.enabled then '32_storageCanary']: storageCanaries, + [if params.canary_scheduler_controller.enabled && params.storage_canary.enabled then '32_storageCanary']: storageCanaries, } + blackbox.deployment + blackbox.probes diff --git a/docs/modules/ROOT/pages/references/parameters.adoc b/docs/modules/ROOT/pages/references/parameters.adoc index 479eb58..d00b671 100644 --- a/docs/modules/ROOT/pages/references/parameters.adoc +++ b/docs/modules/ROOT/pages/references/parameters.adoc @@ -596,6 +596,19 @@ kustomize_input: The input passed to the Kustomize renderer. See https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/[The Kustomization File] for all available options. +== `storage_canary` +[horizontal] +type:: dictionary + +`storage_canary` allows configuring the storage canary used for periodically performing storage operations for the storage SLO. + +=== `storage_canary.enabled`: +[horizontal] +type:: boolean +default:: `${openshift4_slos:slos:storage:canary:enabled}` + +Whether the canary should be deployed. +By default the component will deploy the canary if the storage canary SLO is enabled. == `network_canary` [horizontal]