From 1c9f7348b8d481ae044f2ec58627cba1ce859b8c Mon Sep 17 00:00:00 2001 From: Jorge Turrado Ferrero Date: Thu, 2 May 2024 08:15:24 +0200 Subject: [PATCH] Prepare v0.8.0 (#1010) * Prepare v0.8.0 Signed-off-by: Jorge Turrado * rebase main branch Signed-off-by: Jorge Turrado * move add-in installation to the end of setup to remove noise on logs Signed-off-by: Jorge Turrado * Apply suggestions from code review Co-authored-by: Tom Kerkhove Signed-off-by: Jorge Turrado Ferrero --------- Signed-off-by: Jorge Turrado Signed-off-by: Jorge Turrado Signed-off-by: Jorge Turrado Ferrero Co-authored-by: Tom Kerkhove --- .github/ISSUE_TEMPLATE/2_bug_report.yml | 1 + CHANGELOG.md | 30 ++++++++++++---- Makefile | 20 +++-------- .../e2e-test/{ => otel}/deployment.yaml | 0 .../e2e-test/{ => otel}/kustomization.yaml | 0 .../e2e-test/{ => otel}/scaledobject.yaml | 0 .../{ => e2e-test}/tls/deployment.yaml | 0 .../{ => e2e-test}/tls/kustomization.yaml | 0 .../{ => e2e-test}/tls/proxy.service.yaml | 0 config/interceptor/otel/deployment.yaml | 23 ------------ config/interceptor/otel/kustomization.yaml | 5 --- config/interceptor/otel/scaledobject.yaml | 6 ---- .../e2e-test/{ => otel}/deployment.yaml | 0 .../e2e-test/{ => otel}/kustomization.yaml | 0 tests/utils/setup_test.go | 36 +++++++++---------- 15 files changed, 48 insertions(+), 73 deletions(-) rename config/interceptor/e2e-test/{ => otel}/deployment.yaml (100%) rename config/interceptor/e2e-test/{ => otel}/kustomization.yaml (100%) rename config/interceptor/e2e-test/{ => otel}/scaledobject.yaml (100%) rename config/interceptor/{ => e2e-test}/tls/deployment.yaml (100%) rename config/interceptor/{ => e2e-test}/tls/kustomization.yaml (100%) rename config/interceptor/{ => e2e-test}/tls/proxy.service.yaml (100%) delete mode 100644 config/interceptor/otel/deployment.yaml delete mode 100644 config/interceptor/otel/kustomization.yaml delete mode 100644 config/interceptor/otel/scaledobject.yaml rename config/scaler/e2e-test/{ => otel}/deployment.yaml (100%) rename config/scaler/e2e-test/{ => otel}/kustomization.yaml (100%) diff --git a/.github/ISSUE_TEMPLATE/2_bug_report.yml b/.github/ISSUE_TEMPLATE/2_bug_report.yml index 8c684db1..a0a95b72 100644 --- a/.github/ISSUE_TEMPLATE/2_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/2_bug_report.yml @@ -52,6 +52,7 @@ body: label: "HTTP Add-on Version" description: "What version of the KEDA HTTP Add-on are you running?" options: + - "0.8.0" - "0.7.0" - "0.6.0" - "0.5.0" diff --git a/CHANGELOG.md b/CHANGELOG.md index a6ed0ce8..16297bc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ This changelog keeps track of work items that have been completed and are ready ## History - [Unreleased](#unreleased) +- [v0.8.0](#v080) - [v0.7.0](#v070) - [v0.6.0](#v060) - [v0.5.0](#v050) @@ -22,14 +23,33 @@ This changelog keeps track of work items that have been completed and are ready ### New -- **General**: Add support to collect metrics using either a prometheus compatible endpoint or by sending metrics to an OTEL http endpoint ([#910](https://github.com/kedacore/http-add-on/issues/910)) -- **General**: Propagate HTTPScaledObject labels and annotations to ScaledObject ([#840](https://github.com/kedacore/http-add-on/issues/840)) -- **General**: Provide support to allow HTTP scaler to work alongside other core KEDA scalers ([#489](https://github.com/kedacore/http-add-on/issues/489)) -- **General**: Support aggregation windows ([#882](https://github.com/kedacore/http-add-on/issues/882)) +- **General**: TODO ([#TODO](https://github.com/kedacore/http-add-on/issues/TODO)) ### Improvements +- **General**: TODO ([#TODO](https://github.com/kedacore/http-add-on/issues/TODO)) + +### Fixes + +- **General**: TODO ([#TODO](https://github.com/kedacore/http-add-on/issues/TODO)) + +### Deprecations + +- **General**: TODO ([#TODO](https://github.com/kedacore/http-add-on/issues/TODO)) + +### Other + +- **General**: TODO ([#TODO](https://github.com/kedacore/http-add-on/issues/TODO)) + +## v0.8.0 + +### New + - **General**: Add configurable TLS on the wire support to the interceptor proxy ([#907](https://github.com/kedacore/http-add-on/issues/907)) +- **General**: Add support for collecting metrics using a Prometheus compatible endpoint or by sending metrics to an OpenTelemetry's HTTP endpoint ([#910](https://github.com/kedacore/http-add-on/issues/910)) +- **General**: Propagate HTTPScaledObject labels and annotations to ScaledObject ([#840](https://github.com/kedacore/http-add-on/issues/840)) +- **General**: Provide support for allowing HTTP scaler to work alongside other core KEDA scalers ([#489](https://github.com/kedacore/http-add-on/issues/489)) +- **General**: Support aggregation windows ([#882](https://github.com/kedacore/http-add-on/issues/882)) ### Fixes @@ -39,8 +59,6 @@ This changelog keeps track of work items that have been completed and are ready You can find all deprecations in [this overview](https://github.com/kedacore/http-add-on/labels/breaking-change) and [join the discussion here](https://github.com/kedacore/http-add-on/discussions/categories/deprecations). -- **General**: Deprecated `.spec.scaleTargetRef.deployment` ([#960](https://github.com/kedacore/http-add-on/discussions/960)) -- **General**: Deprecated `KEDA_HTTP_DEPLOYMENT_CACHE_POLLING_INTERVAL_MS` in favor of `KEDA_HTTP_ENDPOINTS_CACHE_POLLING_INTERVAL_MS` ([#438](https://github.com/kedacore/http-add-on/issues/438)) - **General**: Deprecated `targetPendingRequests` in favor of `spec.scalingMetric.*.targetValue` ([#959](https://github.com/kedacore/http-add-on/discussions/959)) ### Other diff --git a/Makefile b/Makefile index 1bb081b1..d8a2671a 100644 --- a/Makefile +++ b/Makefile @@ -176,22 +176,22 @@ deploy: manifests kustomize ## Deploy to the K8s cluster specified in ~/.kube/co $(KUSTOMIZE) edit set image ghcr.io/kedacore/http-add-on-interceptor=${IMAGE_INTERCEPTOR_VERSIONED_TAG} cd config/interceptor && \ - $(KUSTOMIZE) edit add patch --path e2e-test/deployment.yaml --group apps --kind Deployment --name interceptor --version v1 + $(KUSTOMIZE) edit add patch --path e2e-test/otel/deployment.yaml --group apps --kind Deployment --name interceptor --version v1 cd config/interceptor && \ - $(KUSTOMIZE) edit add patch --path e2e-test/scaledobject.yaml --group keda.sh --kind ScaledObject --name interceptor --version v1alpha1 + $(KUSTOMIZE) edit add patch --path e2e-test/otel/scaledobject.yaml --group keda.sh --kind ScaledObject --name interceptor --version v1alpha1 cd config/interceptor && \ - $(KUSTOMIZE) edit add patch --path tls/deployment.yaml --group apps --kind Deployment --name interceptor --version v1 + $(KUSTOMIZE) edit add patch --path e2e-test/tls/deployment.yaml --group apps --kind Deployment --name interceptor --version v1 cd config/interceptor && \ - $(KUSTOMIZE) edit add patch --path tls/proxy.service.yaml --kind Service --name interceptor-proxy --version v1 + $(KUSTOMIZE) edit add patch --path e2e-test/tls/proxy.service.yaml --kind Service --name interceptor-proxy --version v1 cd config/scaler && \ $(KUSTOMIZE) edit set image ghcr.io/kedacore/http-add-on-scaler=${IMAGE_SCALER_VERSIONED_TAG} cd config/scaler && \ - $(KUSTOMIZE) edit add patch --path e2e-test/deployment.yaml --group apps --kind Deployment --name scaler --version v1 + $(KUSTOMIZE) edit add patch --path e2e-test/otel/deployment.yaml --group apps --kind Deployment --name scaler --version v1 cd config/operator && \ $(KUSTOMIZE) edit set image ghcr.io/kedacore/http-add-on-operator=${IMAGE_OPERATOR_VERSIONED_TAG} @@ -200,13 +200,3 @@ deploy: manifests kustomize ## Deploy to the K8s cluster specified in ~/.kube/co undeploy: $(KUSTOMIZE) build config/default | kubectl delete -f - - -kind-load: - kind load docker-image ghcr.io/kedacore/http-add-on-operator:${VERSION} - kind load docker-image ghcr.io/kedacore/http-add-on-interceptor:${VERSION} - kind load docker-image ghcr.io/kedacore/http-add-on-scaler:${VERSION} - -k3d-import: - k3d image import ghcr.io/kedacore/http-add-on-operator:main - k3d image import ghcr.io/kedacore/http-add-on-interceptor:main - k3d image import ghcr.io/kedacore/http-add-on-scaler:main diff --git a/config/interceptor/e2e-test/deployment.yaml b/config/interceptor/e2e-test/otel/deployment.yaml similarity index 100% rename from config/interceptor/e2e-test/deployment.yaml rename to config/interceptor/e2e-test/otel/deployment.yaml diff --git a/config/interceptor/e2e-test/kustomization.yaml b/config/interceptor/e2e-test/otel/kustomization.yaml similarity index 100% rename from config/interceptor/e2e-test/kustomization.yaml rename to config/interceptor/e2e-test/otel/kustomization.yaml diff --git a/config/interceptor/e2e-test/scaledobject.yaml b/config/interceptor/e2e-test/otel/scaledobject.yaml similarity index 100% rename from config/interceptor/e2e-test/scaledobject.yaml rename to config/interceptor/e2e-test/otel/scaledobject.yaml diff --git a/config/interceptor/tls/deployment.yaml b/config/interceptor/e2e-test/tls/deployment.yaml similarity index 100% rename from config/interceptor/tls/deployment.yaml rename to config/interceptor/e2e-test/tls/deployment.yaml diff --git a/config/interceptor/tls/kustomization.yaml b/config/interceptor/e2e-test/tls/kustomization.yaml similarity index 100% rename from config/interceptor/tls/kustomization.yaml rename to config/interceptor/e2e-test/tls/kustomization.yaml diff --git a/config/interceptor/tls/proxy.service.yaml b/config/interceptor/e2e-test/tls/proxy.service.yaml similarity index 100% rename from config/interceptor/tls/proxy.service.yaml rename to config/interceptor/e2e-test/tls/proxy.service.yaml diff --git a/config/interceptor/otel/deployment.yaml b/config/interceptor/otel/deployment.yaml deleted file mode 100644 index 0f6b3ec8..00000000 --- a/config/interceptor/otel/deployment.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: interceptor -spec: - replicas: 1 - template: - spec: - containers: - - name: interceptor - env: - - name: KEDA_HTTP_OTEL_PROM_EXPORTER_ENABLED - value: "true" - - name: KEDA_HTTP_OTEL_PROM_EXPORTER_PORT - value: "2223" - - name: KEDA_HTTP_OTEL_HTTP_EXPORTER_ENABLED - value: "true" - - name: KEDA_HTTP_OTEL_HTTP_COLLECTOR_ENDPOINT - value: "opentelemetry-collector.open-telemetry-system:4318" - - name: KEDA_HTTP_OTEL_HTTP_COLLECTOR_INSECURE - value: "true" - - name: KEDA_HTTP_OTEL_METRIC_EXPORT_INTERVAL - value: "1" diff --git a/config/interceptor/otel/kustomization.yaml b/config/interceptor/otel/kustomization.yaml deleted file mode 100644 index 74055b35..00000000 --- a/config/interceptor/otel/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -resources: -- deployment.yaml -- scaledobject.yaml diff --git a/config/interceptor/otel/scaledobject.yaml b/config/interceptor/otel/scaledobject.yaml deleted file mode 100644 index c3c0e462..00000000 --- a/config/interceptor/otel/scaledobject.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: keda.sh/v1alpha1 -kind: ScaledObject -metadata: - name: interceptor -spec: - minReplicaCount: 1 diff --git a/config/scaler/e2e-test/deployment.yaml b/config/scaler/e2e-test/otel/deployment.yaml similarity index 100% rename from config/scaler/e2e-test/deployment.yaml rename to config/scaler/e2e-test/otel/deployment.yaml diff --git a/config/scaler/e2e-test/kustomization.yaml b/config/scaler/e2e-test/otel/kustomization.yaml similarity index 100% rename from config/scaler/e2e-test/kustomization.yaml rename to config/scaler/e2e-test/otel/kustomization.yaml diff --git a/tests/utils/setup_test.go b/tests/utils/setup_test.go index 0c28df6d..f7f24fca 100644 --- a/tests/utils/setup_test.go +++ b/tests/utils/setup_test.go @@ -172,24 +172,6 @@ func TestSetupKEDA(t *testing.T) { "replica count should be 1 after 3 minutes") } -func TestSetupTLSConfiguration(t *testing.T) { - out, err := ExecuteCommandWithDir("make test-certs", "../..") - require.NoErrorf(t, err, "error generating test certs - %s", err) - t.Log(string(out)) - t.Log("test certificates successfully generated") - - _, err = ExecuteCommand("kubectl -n keda create secret tls keda-tls --cert ../../certs/tls.crt --key ../../certs/tls.key") - require.NoErrorf(t, err, "could not create tls cert secret in keda namespace - %s", err) -} - -func TestDeployKEDAHttpAddOn(t *testing.T) { - out, err := ExecuteCommandWithDir("make deploy", "../..") - require.NoErrorf(t, err, "error deploying KEDA Http Add-on - %s", err) - - t.Log(string(out)) - t.Log("KEDA Http Add-on deployed successfully using 'make deploy' command") -} - func TestSetupOpentelemetryComponents(t *testing.T) { OpentelemetryNamespace := "open-telemetry-system" otlpTempFileName := "otlp.yml" @@ -220,3 +202,21 @@ func TestSetupOpentelemetryComponents(t *testing.T) { _, err = ExecuteCommand(fmt.Sprintf("kubectl apply -f %s -n %s", otlpServiceTempFileName, OpentelemetryNamespace)) require.NoErrorf(t, err, "cannot update opentelemetry ports - %s", err) } + +func TestSetupTLSConfiguration(t *testing.T) { + out, err := ExecuteCommandWithDir("make test-certs", "../..") + require.NoErrorf(t, err, "error generating test certs - %s", err) + t.Log(string(out)) + t.Log("test certificates successfully generated") + + _, err = ExecuteCommand("kubectl -n keda create secret tls keda-tls --cert ../../certs/tls.crt --key ../../certs/tls.key") + require.NoErrorf(t, err, "could not create tls cert secret in keda namespace - %s", err) +} + +func TestDeployKEDAHttpAddOn(t *testing.T) { + out, err := ExecuteCommandWithDir("make deploy", "../..") + require.NoErrorf(t, err, "error deploying KEDA Http Add-on - %s", err) + + t.Log(string(out)) + t.Log("KEDA Http Add-on deployed successfully using 'make deploy' command") +}