Skip to content

Commit

Permalink
Merge pull request #183 from joelsmith/kedamain
Browse files Browse the repository at this point in the history
Prepare release 2.10.1
  • Loading branch information
joelsmith authored May 10, 2023
2 parents 09127f7 + 485471c commit bd27b93
Show file tree
Hide file tree
Showing 35 changed files with 16,648 additions and 720 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
packages: write
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**

container: ghcr.io/kedacore/build-tools:1.18.6
container: ghcr.io/kedacore/build-tools:1.19.7
steps:
- name: Check out code
uses: actions/checkout@v3
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Go modules cache
uses: actions/cache@v3
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Go modules cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-python@v4
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Get golangci
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.2
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
packages: write
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**

container: ghcr.io/kedacore/build-tools:1.18.6
container: ghcr.io/kedacore/build-tools:1.19.7
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/version-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
id: setup-id
run: |
cd keda/
DIRS=$(ls|tail -2)
DIRS=$(ls | sort --version-sort |tail -2)
dirs=($DIRS)
dir_old_list=$(find ${dirs[0]} -print)
dir_new_list=$(find ${dirs[1]} -print)
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.18.8 as builder
FROM ghcr.io/kedacore/build-tools:1.19.7 as builder

ARG BUILD_VERSION=main
ARG GIT_COMMIT=HEAD
Expand Down Expand Up @@ -32,6 +32,7 @@ RUN VERSION=${BUILD_VERSION} GIT_COMMIT=${GIT_COMMIT} GIT_VERSION=${GIT_VERSION}
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/resources/keda.yaml /workspace/resources/keda.yaml
COPY --from=builder /workspace/resources/keda-olm-operator.yaml /workspace/resources/keda-olm-operator.yaml
COPY --from=builder /workspace/bin/manager .
# 65532 is numeric for nonroot
USER 65532:65532
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.9.0)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.10.0)

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
Expand Down
87 changes: 87 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,93 @@ spec:
# cpu: 1000m
# memory: 1000Mi
## KEDA Admission Webhooks related config
admissionWebhooks:
## Logging level for KEDA Admission Webhooks
# allowed values: 'debug', 'info', 'error', or an integer value greater than 0, specified as string
# default value: info
logLevel: info
## Logging format for KEDA Admission Webhooks
# allowed values are json and console
# default value: console
logEncoder: console
## Logging time encoding for KEDA Admission Webhooks
# allowed values are `epoch`, `millis`, `nano`, `iso8601`, `rfc3339` or `rfc3339nano`
# default value: rfc3339
# logTimeEncoding: rfc3339
## Arbitrary arguments
# Define any argument with possibility to override already existing ones.
# Array of strings (format is either with prefix '--key=value' or just 'value')
# args: []
## Annotations to be added to the KEDA Admission Webhooks Deployment
# https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
# deploymentAnnotations:
# annotationKey: annotationValue
## Labels to be added to the KEDA Admission Webhooks Deployment
# https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
# deploymentLabels:
# labelKey: labelValue
## Annotations to be added to the KEDA Admission Webhooks Pod
# https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
# podAnnotations:
# annotationKey: annotationValue
## Labels to be added to the KEDA Admission Webhooks Pod
# https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
# podLabels:
# labelKey: labelValue
## Node selector for pod scheduling for KEDA Admission Webhooks
# https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
# nodeSelector:
# beta.kubernetes.io/os: linux
## Tolerations for pod scheduling for KEDA Admission Webhooks
# https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
# tolerations:
# - key: "key1"
# operator: "Equal"
# value: "value1"
# effect: "NoSchedule"
# - key: "key1"
# operator: "Equal"
# value: "value1"
# effect: "NoExecute"
## Affinity for pod scheduling for KEDA Admission Webhooks
# https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/
# affinity:
# podAntiAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# - labelSelector:
# matchExpressions:
# - key: app
# operator: In
# values:
# - keda-operator
# - keda-operator-metrics-apiserver
# topologyKey: "kubernetes.io/hostname"
## Pod priority for KEDA Admission Webhooks
# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
# priorityClassName: high-priority
## Manage resource requests & limits for KEDA Admission Webhooks
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
# resourcesKedaOperator:
# requests:
# cpu: 100m
# memory: 100Mi
# limits:
# cpu: 1000m
# memory: 1000Mi
## KEDA ServiceAccount related config
serviceAccount:
## Annotations to be added to the Service Account
Expand Down
9 changes: 8 additions & 1 deletion RELEASE-PROCESS.MD → RELEASE-PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ cp -r keda/2.8.0 keda/2.9.0
## 3. Update KEDA CRDs
Update all KEDA CRDs in the newly (eg. `2.9.0`) created directory, get the up-to-date version from the release file mentioned in [step 1](#1-keda-release-yaml-file).

To update the `keda.sh_kedacontrollers.yaml` CRD, perform the following steps:

```bash
make manifests
cp config/crd/bases/keda.sh_kedacontrollers.yaml keda/2.9.0/manifests/
```

## 4. Update CSV file
Update ClusterServiceVersion file in the newly (eg. `2.9.0`) created directory:
- rename the file to respect the version.
Expand Down Expand Up @@ -56,7 +63,7 @@ git push origin release290

## 8. Create KEDA release on GitHub

Creating a new release in the releases page (https://github.com/kedacore/keda/releases) will trigger a GitHub workflow which will create a new image with the latest code and tagged with the next version (in this example 2.9.0).
Creating a new release in the releases page (https://github.com/kedacore/keda-olm-operator/releases) will trigger a GitHub workflow which will create a new image with the latest code and tagged with the next version (in this example 2.9.0).

> Note: The Docker Hub repo with all the different images can be seen here: https://hub.docker.com/r/kedacore/keda-olm-operator/tags
Expand Down
32 changes: 32 additions & 0 deletions apis/keda/v1alpha1/kedacontroller_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ type KedaControllerSpec struct {
// +optional
MetricsServer KedaMetricsServerSpec `json:"metricsServer"`

// +optional
AdmissionWebhooks KedaAdmissionWebhooksSpec `json:"admissionWebhooks"`

// +optional
ServiceAccount KedaServiceAccountSpec `json:"serviceAccount"`

Expand Down Expand Up @@ -114,6 +117,35 @@ type KedaMetricsServerSpec struct {
Args []string `json:"args,omitempty"`
}

type KedaAdmissionWebhooksSpec struct {

// Logging level for Admission Webhooks
// allowed values: 'debug', 'info', 'error', or an integer value greater than 0, specified as string
// default value: info
// +optional
LogLevel string `json:"logLevel,omitempty"`

// Logging format for Admission Webhooks
// allowed values are 'json' and 'console'
// default value: console
// +optional
LogEncoder string `json:"logEncoder,omitempty"`

// Logging time encoding for Admission Webhooks
// allowed values are 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'
// default value: rfc3339
// +optional
LogTimeEncoding string `json:"logTimeEncoding,omitempty"`

GenericDeploymentSpec `json:",inline"`

// Any user-defined arguments with possibility to override any existing or
// previously defined arguments. Allowed formats are '--argument=value',
// 'argument=value' or just 'value'. Ex.: '--v=0' or 'ENV_ARGUMENT'
// +optional
Args []string `json:"args,omitempty"`
}

type GenericDeploymentSpec struct {

// Annotations applied to the Deployment
Expand Down
22 changes: 22 additions & 0 deletions apis/keda/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=keda
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.23.0
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0+git
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

Expand Down
Loading

0 comments on commit bd27b93

Please sign in to comment.