Skip to content

add horizontal pod auto scale at 80% cpu usage#28

Open
ScottBishop wants to merge 2 commits into
masterfrom
AddHorizontalPodScaling
Open

add horizontal pod auto scale at 80% cpu usage#28
ScottBishop wants to merge 2 commits into
masterfrom
AddHorizontalPodScaling

Conversation

@ScottBishop

Copy link
Copy Markdown
Contributor

No description provided.

@ScottBishop ScottBishop added the Needs Review Request a code review label Dec 12, 2018

@kennyko kennyko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally the service should be able to safely scale up and down before introducing an autoscaler. Make sure the application can handle terminations without causing errors. (like if the pod is killed while processing an image, it won't be killed until its done) https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods

@@ -0,0 +1,17 @@
apiVersion: autoscaling/v1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not everyone may want to use an HPA, so wrap all of this in an if?

Comment thread vizzy/templates/scaling.yaml Outdated
apiVersion: apps/v1
kind: Deployment
name: {{ .Chart.Name }}
targetCPUUtilizationPercentage: 80 No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make configurable

maxReplicas: {{ .Values.maxReplica }}
minReplicas: {{ .Values.replicaCount }}
scaleTargetRef:
apiVersion: apps/v1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the apiVersion in deployment.yaml

@ScottBishop ScottBishop added Ready To Merge Stamp of approval and removed Needs Review Request a code review labels Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready To Merge Stamp of approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants