Skip to content

Commit

Permalink
Merge pull request #8 from dysnix/fix-pr-comments
Browse files Browse the repository at this point in the history
Fix PR comments
  • Loading branch information
daniel-yavorovich authored Jan 25, 2022
2 parents 4e0bb8d + 5c3c539 commit ab64321
Show file tree
Hide file tree
Showing 16 changed files with 460 additions and 72 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ jobs:
validate:
name: Validate
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**

# build-tools is built from ../../tools/build-tools.Dockerfile
container: ghcr.io/kedacore/build-tools:main
steps:
Expand Down Expand Up @@ -58,6 +63,19 @@ jobs:
- name: Publish on GitHub Container Registry
run: make publish

# https://github.com/sigstore/cosign-installer
- name: Install Cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.4.1'
- name: Check Cosign install!
run: cosign version

- name: Sign KEDA images published on GitHub Container Registry
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: make sign-images

- name: Publish on Docker Hub
run: make publish-dockerhub

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ jobs:
build:
name: Push Release
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
deployments: write
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**

# build-tools is built from ../../tools/build-tools.Dockerfile
container: ghcr.io/kedacore/build-tools:main
steps:
Expand Down Expand Up @@ -65,6 +71,21 @@ jobs:
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}

# https://github.com/sigstore/cosign-installer
- name: Install Cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: 'v1.4.1'
- name: Check Cosign install!
run: cosign version

- name: Sign KEDA images published on GitHub Container Registry
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: make sign-images
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}

- name: Publish KEDA images on Docker Hub
run: make publish-dockerhub
env:
Expand Down
12 changes: 12 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"scanSettings": {
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

- **General:** `keda-operator` Cluster Role: add `list` and `watch` access to service accounts ([#2406](https://github.com/kedacore/keda/pull/2406))|([#2410](https://github.com/kedacore/keda/pull/2410))
- **General:** Delete the cache entry when a ScaledObject is deleted ([#2408](https://github.com/kedacore/keda/pull/2408))
- **General:** Sign KEDA images published on GitHub Container Registry ([#2501](https://github.com/kedacore/keda/pull/2501))|([#2502](https://github.com/kedacore/keda/pull/2502))|([#2504](https://github.com/kedacore/keda/pull/2504))
- **Azure Pipelines Scaler:** support `poolName` or `poolID` validation ([#2370](https://github.com/kedacore/keda/pull/2370))
- **Graphite Scaler:** use the latest datapoint returned, not the earliest ([#2365](https://github.com/kedacore/keda/pull/2365))
- **Kubernetes Workload Scaler:** ignore terminated pods ([#2384](https://github.com/kedacore/keda/pull/2384))
Expand All @@ -40,7 +41,9 @@
- **Kafka Scaler:** concurrently query brokers for consumer and producer offsets ([#2405](https://github.com/kedacore/keda/pull/2405))
- **External Scaler:** fix wrong calculation of retry backoff duration ([#2416](https://github.com/kedacore/keda/pull/2416))
- **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))
- **General:** fail fast on `buildScalers` when not able to resolve a secret that a deployment is relying on ([#2394](https://github.com/kedacore/keda/pull/2394))
- **CPU Scaler:** Adding e2e test for the cpu scaler ([#2441](https://github.com/kedacore/keda/pull/2441))
- **AWS SQS Scaler**: allow using simple queue name instead of URL ([#2457](https://github.com/kedacore/keda/pull/2457))

### Breaking Changes

Expand Down
14 changes: 13 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ endif
GO_BUILD_VARS= GO111MODULE=on CGO_ENABLED=$(CGO) GOOS=$(TARGET_OS) GOARCH=$(ARCH)
GO_LDFLAGS="-X=github.com/kedacore/keda/v2/version.GitCommit=$(GIT_COMMIT) -X=github.com/kedacore/keda/v2/version.Version=$(VERSION)"

COSIGN_FLAGS ?= -a GIT_HASH=${GIT_COMMIT} -a GIT_VERSION=${VERSION} -a BUILD_DATE=${DATE}

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.22

Expand Down Expand Up @@ -91,14 +93,20 @@ e2e-test-local: ## Run e2e tests against Kubernetes cluster configured in ~/.kub

##@ Development

install-go-enum:
$(GOROOT)/bin/go get github.com/searKing/golang/tools/cmd/go-enum

enums-gen: install-go-enum
$(GOROOT)/bin/go generate ./...

manifests: controller-gen ## Generate ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) crd:crdVersions=v1 rbac:roleName=keda-operator paths="./..." output:crd:artifacts:config=config/crd/bases
# withTriggers is only used for duck typing so we only need the deepcopy methods
# However operator-sdk generate doesn't appear to have an option for that
# until this issue is fixed: https://github.com/kubernetes-sigs/controller-tools/issues/398
rm config/crd/bases/keda.sh_withtriggers.yaml

generate: controller-gen mockgen-gen ## Generate code containing DeepCopy, DeepCopyInto, DeepCopyObject method implementations (API) and mocks.
generate: controller-gen mockgen-gen enums-gen ## Generate code containing DeepCopy, DeepCopyInto, DeepCopyObject method implementations (API) and mocks.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."

adapter/generated/openapi/zz_generated.openapi.go: go.mod go.sum ## Generate OpenAPI for KEDA Metrics Adapter.
Expand Down Expand Up @@ -191,6 +199,10 @@ release: manifests kustomize set-version ## Produce new KEDA release in keda-$(V
rm -rf config/default/kustomize-config/metadataLabelTransformer.yaml.out
$(KUSTOMIZE) build config/default > keda-$(VERSION).yaml

sign-images: ## Sign KEDA images published on GitHub Container Registry
COSIGN_EXPERIMENTAL=1 cosign sign ${COSIGN_FLAGS} $(IMAGE_CONTROLLER)
COSIGN_EXPERIMENTAL=1 cosign sign ${COSIGN_FLAGS} $(IMAGE_ADAPTER)

.PHONY: set-version
set-version:
@sed -i".out" -e 's@Version[ ]*=.*@Version = "$(VERSION)"@g' ./version/version.go;
Expand Down
7 changes: 0 additions & 7 deletions RELEASE-PROCESS.MD
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,6 @@ Before we can release our new Helm chart version, we need to prepare it:

Guidance on how to release it can be found in our [contribution guide](https://github.com/kedacore/charts/blob/master/CONTRIBUTING.md#shipping-a-new-version).

### Deploy KEDA through Azure Functions Core Tools (optional)

Update the following files with the release artifact (YAML):

- https://github.com/Azure/azure-functions-core-tools/blob/v3.x/src/Azure.Functions.Cli/StaticResources/keda-v2.yaml
- https://github.com/Azure/azure-functions-core-tools/blob/v4.x/src/Azure.Functions.Cli/StaticResources/keda-v2.yaml

## 8. Prepare next release

Prepare next release by creating a [new GitHub milestone](https://github.com/kedacore/keda/milestones/new) called `v{upcoming-semver-version}` with a target date in 3 months as per our [release governance](https://github.com/kedacore/governance/blob/main/RELEASES.md).
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd
github.com/Azure/go-autorest/autorest v0.11.22
github.com/Azure/go-autorest/autorest/azure/auth v0.5.9
github.com/DataDog/datadog-api-client-go v1.6.0 // indirect
github.com/DataDog/datadog-api-client-go v1.8.0
github.com/Huawei/gophercloud v1.0.21
github.com/Shopify/sarama v1.30.0
github.com/aws/aws-sdk-go v1.42.16
Expand Down Expand Up @@ -111,7 +111,7 @@ require (
github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/fatih/color v1.9.0 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
Expand Down Expand Up @@ -174,7 +174,7 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.0 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
Expand All @@ -189,6 +189,8 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/searKing/golang v1.0.145 // indirect
github.com/searKing/golang/tools/cmd/go-enum v0.0.0-20210618061541-6f9001ab7f06 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cobra v1.1.3 // indirect
Expand Down
Loading

0 comments on commit ab64321

Please sign in to comment.