Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
Signed-off-by: Ram Cohen <[email protected]>
  • Loading branch information
RamCohen committed Mar 1, 2022
1 parent 6492336 commit d4516bd
Show file tree
Hide file tree
Showing 64 changed files with 516 additions and 519 deletions.
110 changes: 0 additions & 110 deletions .github/assets/test-upgrade-manifest.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
container: ghcr.io/kedacore/build-tools:main
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: "^1.17"
- run: go version
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,26 @@ jobs:

- name: Run end to end tests
env:
AZURE_APP_INSIGHTS_APP_ID: ${{ secrets.AZURE_APP_INSIGHTS_APP_ID }}
AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY: ${{ secrets.AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY }}
AZURE_DATA_EXPLORER_DB: ${{ secrets.AZURE_DATA_EXPLORER_DB }}
AZURE_DATA_EXPLORER_ENDPOINT: ${{ secrets.AZURE_DATA_EXPLORER_ENDPOINT }}
AZURE_DEVOPS_BUILD_DEFINITON_ID: ${{ secrets.AZURE_DEVOPS_BUILD_DEFINITON_ID }}
AZURE_DEVOPS_ORGANIZATION_URL: ${{ secrets.AZURE_DEVOPS_ORGANIZATION_URL }}
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}
AZURE_DEVOPS_POOL_NAME: ${{ secrets.AZURE_DEVOPS_POOL_NAME }}
AZURE_DEVOPS_PROJECT: ${{ secrets.AZURE_DEVOPS_PROJECT }}
AZURE_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.AZURE_LOG_ANALYTICS_WORKSPACE_ID }}
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }}
AZURE_SP_ID: ${{ secrets.AZURE_SP_ID }}
AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }}
AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }}
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
AZURE_SUBSCRIPTION: ${{ secrets.AZURE_SUBSCRIPTION }}
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY}}
DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY}}
DATADOG_SITE: ${{ secrets.DATADOG_SITE}}
GCP_SP_KEY: ${{ secrets.GCP_SP_KEY }}
NEWRELIC_ACCOUNT_ID: ${{ secrets.NEWRELIC_ACCOUNT_ID}}
NEWRELIC_API_KEY: ${{ secrets.NEWRELIC_API_KEY}}
NEWRELIC_LICENSE: ${{ secrets.NEWRELIC_LICENSE}}
Expand All @@ -95,8 +100,8 @@ jobs:
OPENSTACK_PROJECT_ID: ${{ secrets.OPENSTACK_PROJECT_ID }}
OPENSTACK_USER_ID: ${{ secrets.OPENSTACK_USER_ID }}
PREDICTKUBE_API_KEY: ${{ secrets.PREDICTKUBE_API_KEY }}
TEST_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.TEST_LOG_ANALYTICS_WORKSPACE_ID }}
TEST_STORAGE_CONNECTION_STRING: ${{ secrets.TEST_STORAGE_CONNECTION_STRING }}
TEST_APP_INSIGHTS_APP_ID: ${{ secrets.TEST_APP_INSIGHTS_APP_ID }}
TEST_APP_INSIGHTS_INSTRUMENTATION_KEY: ${{ secrets.TEST_APP_INSIGHTS_INSTRUMENTATION_KEY }}
run: make e2e-test

- name: Delete all e2e related namespaces
if: ${{ always() }}
run: make e2e-test-clean
13 changes: 9 additions & 4 deletions .github/workflows/nightly-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,26 @@ jobs:

- name: Run end to end test
env:
AZURE_APP_INSIGHTS_APP_ID: ${{ secrets.AZURE_APP_INSIGHTS_APP_ID }}
AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY: ${{ secrets.AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY }}
AZURE_DATA_EXPLORER_DB: ${{ secrets.AZURE_DATA_EXPLORER_DB }}
AZURE_DATA_EXPLORER_ENDPOINT: ${{ secrets.AZURE_DATA_EXPLORER_ENDPOINT }}
AZURE_DEVOPS_BUILD_DEFINITON_ID: ${{ secrets.AZURE_DEVOPS_BUILD_DEFINITON_ID }}
AZURE_DEVOPS_ORGANIZATION_URL: ${{ secrets.AZURE_DEVOPS_ORGANIZATION_URL }}
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}
AZURE_DEVOPS_POOL_NAME: ${{ secrets.AZURE_DEVOPS_POOL_NAME }}
AZURE_DEVOPS_PROJECT: ${{ secrets.AZURE_DEVOPS_PROJECT }}
AZURE_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.AZURE_LOG_ANALYTICS_WORKSPACE_ID }}
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }}
AZURE_SP_ID: ${{ secrets.AZURE_SP_ID }}
AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }}
AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }}
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
AZURE_SUBSCRIPTION: ${{ secrets.AZURE_SUBSCRIPTION }}
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY}}
DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY}}
DATADOG_SITE: ${{ secrets.DATADOG_SITE}}
GCP_SP_KEY: ${{ secrets.GCP_SP_KEY }}
NEWRELIC_ACCOUNT_ID: ${{ secrets.NEWRELIC_ACCOUNT_ID}}
NEWRELIC_API_KEY: ${{ secrets.NEWRELIC_API_KEY}}
NEWRELIC_LICENSE: ${{ secrets.NEWRELIC_LICENSE}}
Expand All @@ -40,8 +45,8 @@ jobs:
OPENSTACK_PROJECT_ID: ${{ secrets.OPENSTACK_PROJECT_ID }}
OPENSTACK_USER_ID: ${{ secrets.OPENSTACK_USER_ID }}
PREDICTKUBE_API_KEY: ${{ secrets.PREDICTKUBE_API_KEY }}
TEST_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.TEST_LOG_ANALYTICS_WORKSPACE_ID }}
TEST_STORAGE_CONNECTION_STRING: ${{ secrets.TEST_STORAGE_CONNECTION_STRING }}
TEST_APP_INSIGHTS_APP_ID: ${{ secrets.TEST_APP_INSIGHTS_APP_ID }}
TEST_APP_INSIGHTS_INSTRUMENTATION_KEY: ${{ secrets.TEST_APP_INSIGHTS_INSTRUMENTATION_KEY }}
run: make e2e-test

- name: Delete all e2e related namespaces
if: ${{ always() }}
run: make e2e-test-clean
30 changes: 18 additions & 12 deletions .github/workflows/pr-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update comment with the execution url
if: ${{ startsWith(github.event.comment.body,'/run-e2e') && steps.check-permission.outputs.has-permission }}
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.comment.id }}
body: |
**Update:** You can check the progres [here](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
reactions: rocket

run-test:
needs: check
runs-on: ubuntu-latest
Expand All @@ -28,14 +37,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Update comment with the execution url
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.comment.id }}
body: |
**Update:** You can check the progres [here](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
reactions: rocket

- name: Checkout Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -66,22 +67,27 @@ jobs:
continue-on-error: true
id: test
env:
AZURE_APP_INSIGHTS_APP_ID: ${{ secrets.AZURE_APP_INSIGHTS_APP_ID }}
AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY: ${{ secrets.AZURE_APP_INSIGHTS_INSTRUMENTATION_KEY }}
AZURE_DATA_EXPLORER_DB: ${{ secrets.AZURE_DATA_EXPLORER_DB }}
AZURE_DATA_EXPLORER_ENDPOINT: ${{ secrets.AZURE_DATA_EXPLORER_ENDPOINT }}
AZURE_DEVOPS_BUILD_DEFINITON_ID: ${{ secrets.AZURE_DEVOPS_BUILD_DEFINITON_ID }}
AZURE_DEVOPS_ORGANIZATION_URL: ${{ secrets.AZURE_DEVOPS_ORGANIZATION_URL }}
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}
AZURE_DEVOPS_POOL_NAME: ${{ secrets.AZURE_DEVOPS_POOL_NAME }}
AZURE_DEVOPS_PROJECT: ${{ secrets.AZURE_DEVOPS_PROJECT }}
AZURE_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.AZURE_LOG_ANALYTICS_WORKSPACE_ID }}
AZURE_RESOURCE_GROUP: ${{ secrets.AZURE_RESOURCE_GROUP }}
AZURE_SP_ID: ${{ secrets.AZURE_SP_ID }}
AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }}
AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }}
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
AZURE_SUBSCRIPTION: ${{ secrets.AZURE_SUBSCRIPTION }}
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY}}
DATADOG_APP_KEY: ${{ secrets.DATADOG_APP_KEY}}
DATADOG_SITE: ${{ secrets.DATADOG_SITE}}
E2E_IMAGE_TAG: "pr-${{ steps.checkout.outputs.pr_num }}"
GCP_SP_KEY: ${{ secrets.GCP_SP_KEY }}
NEWRELIC_ACCOUNT_ID: ${{ secrets.NEWRELIC_ACCOUNT_ID}}
NEWRELIC_API_KEY: ${{ secrets.NEWRELIC_API_KEY}}
NEWRELIC_LICENSE: ${{ secrets.NEWRELIC_LICENSE}}
Expand All @@ -91,10 +97,6 @@ jobs:
OPENSTACK_USER_ID: ${{ secrets.OPENSTACK_USER_ID }}
PREDICTKUBE_API_KEY: ${{ secrets.PREDICTKUBE_API_KEY }}
TEST_CLUSTER_NAME: keda-pr-run
TEST_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.TEST_LOG_ANALYTICS_WORKSPACE_ID }}
TEST_STORAGE_CONNECTION_STRING: ${{ secrets.TEST_STORAGE_CONNECTION_STRING }}
TEST_APP_INSIGHTS_APP_ID: ${{ secrets.TEST_APP_INSIGHTS_APP_ID }}
TEST_APP_INSIGHTS_INSTRUMENTATION_KEY: ${{ secrets.TEST_APP_INSIGHTS_INSTRUMENTATION_KEY }}
run: |
MESSAGE="${{ github.event.comment.body }}"
REGEX='/run-e2e (.+)'
Expand All @@ -105,6 +107,10 @@ jobs:
echo "${{ steps.checkout.outputs.pr_num }}"
make e2e-test
- name: Delete all e2e related namespaces
if: ${{ always() }}
run: make e2e-test-clean

- name: React to comment with success
uses: dkershner6/reaction-action@v1
if: steps.test.outcome == 'success'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
container: ubuntu:focal
steps:
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17

Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
ARCH: arm64
steps:
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17

Expand Down Expand Up @@ -105,8 +105,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2.3.2
- uses: actions/setup-go@v2
- uses: actions/setup-python@v3.0.0
- uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Get golangci
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/v1-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ jobs:
AZURE_SP_ID: ${{ secrets.AZURE_SP_ID }}
AZURE_SP_KEY: ${{ secrets.AZURE_SP_KEY }}
AZURE_SP_TENANT: ${{ secrets.AZURE_SP_TENANT }}
TEST_STORAGE_CONNECTION_STRING: ${{ secrets.TEST_STORAGE_CONNECTION_STRING }}
TEST_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.TEST_LOG_ANALYTICS_WORKSPACE_ID }}
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
AZURE_LOG_ANALYTICS_WORKSPACE_ID: ${{ secrets.AZURE_LOG_ANALYTICS_WORKSPACE_ID }}
run: make e2e-test
10 changes: 0 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ issues:
- path: triggerauthentication_controller.go
linters:
- dupl
# Got "sigs.k8s.io/controller-runtime/pkg/client/fake is deprecated: please use pkg/envtest for testing"
# This might not be ideal, see: https://github.com/kubernetes-sigs/controller-runtime/issues/768
- path: scale_resolvers_test.go
linters:
- staticcheck
# Got "sigs.k8s.io/controller-runtime/pkg/client/fake is deprecated: please use pkg/envtest for testing"
# This might not be ideal, see: https://github.com/kubernetes-sigs/controller-runtime/issues/768
- path: kubernetes_workload_scaler_test.go
linters:
- staticcheck
# https://github.com/go-critic/go-critic/issues/926
- linters:
- gocritic
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
### Improvements

- **Azure Queue:** Don't call Azure queue GetProperties API unnecessarily ([#2613](https://github.com/kedacore/keda/pull/2613))
- **Kafka Scaler** Make "disable" a valid value for tls auth parameter ([#2608](https://github.com/kedacore/keda/issues/2608))
- **Datadog Scaler:** Validate query to contain `{` to prevent panic on invalid query ([#2625](https://github.com/kedacore/keda/issues/2625))
- **Kafka Scaler** Make "disable" a valid value for tls auth parameter ([#2608](https://github.com/kedacore/keda/issues/2608))

### Breaking Changes

Expand All @@ -45,6 +45,9 @@
### Other

- **General:** Improve e2e tests reliability ([#2580](https://github.com/kedacore/keda/issues/2580))
- **General:** Syncronize HPA annotations from ScaledObject ([#2659](https://github.com/kedacore/keda/pull/2659))
- **General:** Improve e2e tests to always cleanup resources in cluster ([#2584](https://github.com/kedacore/keda/issues/2584))
- **Memory Scaler** Adding e2e test for the memory scaler ([#2220](https://github.com/kedacore/keda/issues/2220))

## v.2.6.1

Expand Down Expand Up @@ -77,7 +80,7 @@
- **AWS SQS Scaler:** Allow using simple queue name instead of URL ([#2457](https://github.com/kedacore/keda/pull/2457))
- **Azure EventHub Scaler:** Don't expose connection string in metricName ([#2404](https://github.com/kedacore/keda/pull/2404))
- **Azure Pipelines Scaler:** Support `poolName` or `poolID` validation ([#2370](https://github.com/kedacore/keda/pull/2370))
- **CPU Scaler:** AAding e2e test for the cpu scaler ([#2441](https://github.com/kedacore/keda/pull/2441))
- **CPU Scaler:** Adding e2e test for the cpu scaler ([#2441](https://github.com/kedacore/keda/pull/2441))
- **External Scaler:** Fix wrong calculation of retry backoff duration ([#2416](https://github.com/kedacore/keda/pull/2416))
- **Graphite Scaler:** Use the latest datapoint returned, not the earliest ([#2365](https://github.com/kedacore/keda/pull/2365))
- **Kafka Scaler:** Allow flag `topic` to be optional, where lag of all topics within the consumer group will be used for scaling ([#2409](https://github.com/kedacore/keda/pull/2409))
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ e2e-test-local: ## Run e2e tests against Kubernetes cluster configured in ~/.kub
npm install --prefix tests
./tests/run-all.sh

.PHONY: e2e-test-clean
e2e-test-clean: ## Delete all namespaces labeled with type=e2e
kubectl delete ns -l type=e2e

##################################################
# Development #
##################################################
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<a href="https://github.com/kedacore/keda/actions?query=workflow%3Amain-build"><img src="https://github.com/kedacore/keda/workflows/main-build/badge.svg" alt="main build"></a>
<a href="https://github.com/kedacore/keda/actions?query=workflow%3Anightly-e2e-test"><img src="https://github.com/kedacore/keda/workflows/nightly-e2e-test/badge.svg" alt="nightly e2e"></a>
<a href="https://bestpractices.coreinfrastructure.org/projects/3791"><img src="https://bestpractices.coreinfrastructure.org/projects/3791/badge"></a>
<a href="https://artifacthub.io/packages/helm/kedacore/keda"><img src="https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kedacore"></a>
<a href="https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.jparrowsec.cn%2Fkedacore%2Fkeda?ref=badge_shield"><img src="https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.jparrowsec.cn%2Fkedacore%2Fkeda.svg?type=shield"></a>
<a href="https://twitter.com/kedaorg"><img src="https://img.shields.io/twitter/follow/kedaorg?style=social" alt="Twitter"></a></p>

KEDA allows for fine-grained autoscaling (including to/from zero) for event driven Kubernetes workloads. KEDA serves
Expand Down
7 changes: 4 additions & 3 deletions controllers/keda/hpa.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,10 @@ func (r *ScaledObjectReconciler) newHPAForScaledObject(ctx context.Context, logg
APIVersion: gvkr.GroupVersion().String(),
}},
ObjectMeta: metav1.ObjectMeta{
Name: getHPAName(scaledObject),
Namespace: scaledObject.Namespace,
Labels: labels,
Name: getHPAName(scaledObject),
Namespace: scaledObject.Namespace,
Labels: labels,
Annotations: scaledObject.Annotations,
},
TypeMeta: metav1.TypeMeta{
APIVersion: "v2beta2",
Expand Down
Loading

0 comments on commit d4516bd

Please sign in to comment.