-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from practo/v1
v1.0.0 Release: General Availability
- Loading branch information
Showing
27 changed files
with
1,191 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Upgrade Worker Pod Autoscaler | ||
|
||
## Upgrade from v0.2 to v1 | ||
|
||
### Breaking Changes | ||
There is no backward breaking change from `v0.2` to `v1`. | ||
|
||
### Recommended Actions | ||
Update the WorkerPodAutoScaler CRD from `v1alpha1` to `v1` using below: | ||
``` | ||
kubectl apply -f ./artifacts/crd.yaml | ||
``` | ||
|
||
Note: Support for `v1alpha1` CRD version is still there, but it would be discontinued in the future releases. | ||
|
||
### Changes | ||
- [v1.0.0](https://github.com/practo/k8s-worker-pod-autoscaler/releases/tag/v1.0.0) | ||
- [v1.0.0-beta](https://github.com/practo/k8s-worker-pod-autoscaler/releases/tag/v1.0.0-beta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: workerpodautoscalers.k8s.practo.dev | ||
spec: | ||
conversion: | ||
strategy: None | ||
group: k8s.practo.dev | ||
names: | ||
kind: WorkerPodAutoScaler | ||
listKind: WorkerPodAutoScalerList | ||
plural: workerpodautoscalers | ||
shortNames: | ||
- wpa | ||
- wpas | ||
singular: workerpodautoscaler | ||
preserveUnknownFields: true | ||
scope: Namespaced | ||
versions: v1 | ||
versions: | ||
- name: v1 | ||
served: true | ||
storage: true | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
required: | ||
- spec | ||
properties: | ||
apiVersion: | ||
type: string | ||
kind: | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
type: object | ||
required: | ||
- deploymentName | ||
- minReplicas | ||
- maxReplicas | ||
- queueURI | ||
- targetMessagesPerWorker | ||
properties: | ||
deploymentName: | ||
type: string | ||
description: 'Name of the kubernetes deployment in the same namespace as WPA object' | ||
maxDisruption: | ||
type: string | ||
nullable: true | ||
description: 'Amount of disruption that can be tolerated in a single scale down activity. Number of pods or percentage of pods that can scale down in a single down scale down activity' | ||
maxReplicas: | ||
type: integer | ||
format: int32 | ||
description: 'Maximum number of workers you want to run' | ||
minReplicas: | ||
type: integer | ||
format: int32 | ||
description: 'Minimum number of workers you want to run' | ||
queueURI: | ||
type: string | ||
description: 'Full URL of the queue' | ||
targetMessagesPerWorker: | ||
type: integer | ||
format: int32 | ||
description: 'Number of jobs in the queue which have not been picked up by the workers. This also used to calculate the desired number of workers' | ||
secondsToProcessOneJob: | ||
type: number | ||
format: float | ||
nullable: true | ||
description: 'This metric is useful to calculate the desired number of workers more accurately. It is particularly very useful for workers which have `targetMessagesPerWorker` as always zero. `secondsToProcessOneJob` in the combination with `messagesSentPerMinute`(queue RPM) helps in calculating the minimum workers that is expected to be running to handle `messagesSentPerMinute`(RPM) with every job being processed in `secondsToProcessOneJob` seconds' | ||
- name: v1alpha1 | ||
served: true | ||
storage: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// +k8s:deepcopy-gen=package | ||
// +groupName=k8s.practo.dev | ||
|
||
// Package v1 is the v1 version of the API. | ||
package v1 // import "github.com/practo/k8s-worker-pod-autoscalers/pkg/apis/workerpodautoscaler/v1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package v1 | ||
|
||
func (w *WorkerPodAutoScaler) GetMaxDisruption(defaultDisruption string) *string { | ||
if w.Spec.MaxDisruption == nil { | ||
return &defaultDisruption | ||
} | ||
return w.Spec.MaxDisruption | ||
} |
Oops, something went wrong.