Skip to content

Commit

Permalink
Merge pull request #123 from practo/1.2.0
Browse files Browse the repository at this point in the history
Release 1.2.0
  • Loading branch information
alok87 authored Nov 22, 2020
2 parents 7972b8b + 7adcfc6 commit 029a435
Show file tree
Hide file tree
Showing 33 changed files with 48 additions and 1,079 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ define \n

endef

BUILD_IMAGE ?= golang:1.15.1-alpine
TEST_IMAGE ?= practodev/golang:1.15.1-alpine-test
BUILD_IMAGE ?= golang:1.15.3-alpine
TEST_IMAGE ?= practodev/golang:1.15.3-alpine-test

# If you want to build all binaries, see the 'all-build' rule.
# If you want to build all containers, see the 'all-container' rule.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ git pull origin master
- Build and push the image to `hub.docker.com/practodev`. Note: practodev push access is required.
```
git fetch --tags
git tag v1.1.0
git tag v1.2.0
make push
```
Note: For every tag major and major minor versions tags also available. For example: `v1` and `v1.1`
Note: For every tag major and major minor versions tags also available. For example: `v1` and `v1.2`
- Create a Release in Github. Refer [this](https://github.com/practo/k8s-worker-pod-autoscaler/releases/tag/v1.1.0) and create a release. Release should contain the Changelog information of all the issues and pull request after the last release.
- Create a Release in Github. Refer [this](https://github.com/practo/k8s-worker-pod-autoscaler/releases/tag/v1.2.0) and create a release. Release should contain the Changelog information of all the issues and pull request after the last release.
- Publish the release in Github 🎉
Expand Down
12 changes: 12 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Upgrade Worker Pod Autoscaler

## Upgrade from v1.1 to v1.2

### Breaking changes
`v1alpha1` was discontinued. Please move to `v1`.

### Recommended Actions
```
kubectl apply -f ./artifacts/crd.yaml
```
### Changes
- [v1.2.0](https://github.com/practo/k8s-worker-pod-autoscaler/releases/tag/v1.2.0)

## Upgrade from v1.0 to v1.1

### Breaking Changes
Expand Down
5 changes: 1 addition & 4 deletions artifacts/crd.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apiextensions.k8s.io/v1beta1
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: workerpodautoscalers.k8s.practo.dev
Expand Down Expand Up @@ -75,6 +75,3 @@ spec:
format: float
nullable: true
description: 'For fast running workers doing high RPM, the backlog is very close to zero. So for such workers scale up cannot happen based on the backlog, hence this is a really important specification to always keep the minimum number of workers running based on the queue RPM. (highly recommended, default=0.0 i.e. disabled).'
- name: v1alpha1
served: true
storage: false
3 changes: 0 additions & 3 deletions artifacts/golang/1.14.2-alpine-test/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions artifacts/golang/1.15.1-alpine-test/Dockerfile

This file was deleted.

3 changes: 3 additions & 0 deletions artifacts/golang/1.15.3-alpine-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM golang:1.15.3-alpine

RUN apk add beanstalkd
6 changes: 3 additions & 3 deletions artifacts/golang/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

Test image used for `make test`.

Current image being used: `practodev/golang:1.15.1-alpine-test`
Current image being used: `practodev/golang:1.15.3-alpine-test`

### Why?
It keeps all the test dependencies installed on top of golang package

### Built using
```
cd 1.15.1-alpine-test
docker build -t practodev/golang:1.15.1-alpine-test .
cd 1.15.3-alpine-test
docker build -t practodev/golang:1.15.3-alpine-test .
```
2 changes: 1 addition & 1 deletion cmd/workerpodautoscaler/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (v *runCmd) run(cmd *cobra.Command, args []string) {
kubeClient, customClient,
kubeInformerFactory.Apps().V1().Deployments(),
kubeInformerFactory.Apps().V1().ReplicaSets(),
customInformerFactory.K8s().V1alpha1().WorkerPodAutoScalers(),
customInformerFactory.K8s().V1().WorkerPodAutoScalers(),
wpaDefaultMaxDisruption,
queues,
)
Expand Down
2 changes: 1 addition & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-
bash "${CODEGEN_PKG}/generate-groups.sh" all \
github.com/practo/k8s-worker-pod-autoscaler/pkg/generated \
github.com/practo/k8s-worker-pod-autoscaler/pkg/apis \
workerpodautoscaler:v1alpha1 \
workerpodautoscaler:v1 \
--go-header-file "${SCRIPT_ROOT}/hack/boilerplate.go.txt"
5 changes: 0 additions & 5 deletions pkg/apis/workerpodautoscaler/v1alpha1/doc.go

This file was deleted.

8 changes: 0 additions & 8 deletions pkg/apis/workerpodautoscaler/v1alpha1/get_default.go

This file was deleted.

43 changes: 0 additions & 43 deletions pkg/apis/workerpodautoscaler/v1alpha1/register.go

This file was deleted.

47 changes: 0 additions & 47 deletions pkg/apis/workerpodautoscaler/v1alpha1/types.go

This file was deleted.

143 changes: 0 additions & 143 deletions pkg/apis/workerpodautoscaler/v1alpha1/zz_generated.deepcopy.go

This file was deleted.

10 changes: 5 additions & 5 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"k8s.io/client-go/util/retry"
"k8s.io/client-go/util/workqueue"

v1alpha1 "github.com/practo/k8s-worker-pod-autoscaler/pkg/apis/workerpodautoscaler/v1alpha1"
v1 "github.com/practo/k8s-worker-pod-autoscaler/pkg/apis/workerpodautoscaler/v1"
clientset "github.com/practo/k8s-worker-pod-autoscaler/pkg/generated/clientset/versioned"
samplescheme "github.com/practo/k8s-worker-pod-autoscaler/pkg/generated/clientset/versioned/scheme"
informers "github.com/practo/k8s-worker-pod-autoscaler/pkg/generated/informers/externalversions/workerpodautoscaler/v1alpha1"
listers "github.com/practo/k8s-worker-pod-autoscaler/pkg/generated/listers/workerpodautoscaler/v1alpha1"
informers "github.com/practo/k8s-worker-pod-autoscaler/pkg/generated/informers/externalversions/workerpodautoscaler/v1"
listers "github.com/practo/k8s-worker-pod-autoscaler/pkg/generated/listers/workerpodautoscaler/v1"
queue "github.com/practo/k8s-worker-pod-autoscaler/pkg/queue"
)

Expand Down Expand Up @@ -746,7 +746,7 @@ func updateWorkerPodAutoScalerStatus(
namespace string,
customclientset clientset.Interface,
desiredWorkers int32,
workerPodAutoScaler *v1alpha1.WorkerPodAutoScaler,
workerPodAutoScaler *v1.WorkerPodAutoScaler,
currentWorkers int32,
availableWorkers int32,
queueMessages int32) {
Expand All @@ -773,7 +773,7 @@ func updateWorkerPodAutoScalerStatus(
// we must use Update instead of UpdateStatus to update the Status block of the WorkerPodAutoScaler resource.
// UpdateStatus will not allow changes to the Spec of the resource,
// which is ideal for ensuring nothing other than resource status has been updated.
_, err := customclientset.K8sV1alpha1().WorkerPodAutoScalers(workerPodAutoScaler.Namespace).Update(workerPodAutoScalerCopy)
_, err := customclientset.K8sV1().WorkerPodAutoScalers(workerPodAutoScaler.Namespace).Update(workerPodAutoScalerCopy)
if err != nil {
klog.Errorf("Error updating wpa status, err: %v", err)
return
Expand Down
Loading

0 comments on commit 029a435

Please sign in to comment.