Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement application health check and hpa #209

Merged
merged 15 commits into from
Jul 9, 2024
Merged

Conversation

ashwani-opstree
Copy link
Contributor

  • Health Probes (Readiness and Liveness)
  • Horizontal Pod Autoscaling (Memory and CPU)

@ashwani-opstree ashwani-opstree requested a review from rishops July 5, 2024 04:53
# -- global variables
global:
replicaCount: 1
fullnameOverride: "nginx"
Copy link
Contributor

@sandy724 sandy724 Jul 5, 2024

Choose a reason for hiding this comment

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

nginx can't be a default option
Yes i changed it.

# -- Override default container image format
image:
# -- Image repository
repository: "nginx"
Copy link
Contributor

@sandy724 sandy724 Jul 5, 2024

Choose a reason for hiding this comment

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

repository -> name
Yes i changed it.

# -- Image tag
tag: "latest"
# -- Variable used to control when the image should be fetched
pullPolicy: always
Copy link
Contributor

@sandy724 sandy724 Jul 5, 2024

Choose a reason for hiding this comment

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

should be PullIfNotPresent
Yes i changed it.

# -- Variable used to control when the image should be fetched
pullPolicy: always
# -- Definition of the liveness probe
livenessProbe:
Copy link
Contributor

@sandy724 sandy724 Jul 5, 2024

Choose a reason for hiding this comment

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

Should be optional
Can we have a warning mentioning this should have been present
Yes i changed it.

@@ -0,0 +1,27 @@
{{- if .Values.hpa }}
apiVersion: autoscaling/v2beta1
Copy link
Contributor

@sandy724 sandy724 Jul 5, 2024

Choose a reason for hiding this comment

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

Support for multiple k8s versions
Yes i changed it.

- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ default 50 .Values.hpa.targetAverageCPUUtilization }}
Copy link
Contributor

@sandy724 sandy724 Jul 5, 2024

Choose a reason for hiding this comment

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

remove hard coding
Yes i changed it.

imagePullPolicy: {{ .Values.image.pullPolicy }}
- name: {{ include "microservice.fullname" . }}
image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag }}"
imagePullPolicy: {{ .Values.deployment.image.pullPolicy | default "IfNotPresent" }}
Copy link
Contributor

@sandy724 sandy724 Jul 5, 2024

Choose a reason for hiding this comment

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

Should have been solved by default value
Yes i changed it.

ports:
- name: http
containerPort: 80
protocol: TCP
{{- if .Values.deployment.livenessProbe }}
Copy link
Contributor

@sandy724 sandy724 Jul 5, 2024

Choose a reason for hiding this comment

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

Move probes to separate sections
Yes i changed it.

@ashwani-opstree ashwani-opstree force-pushed the ms-health-check branch 2 times, most recently from de39c68 to 41973a4 Compare July 9, 2024 04:54
ashwani-opstree and others added 14 commits July 9, 2024 12:42
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
Signed-off-by: Ashwani Singh <[email protected]>
@ashwani-opstree ashwani-opstree merged commit 555b0ee into main Jul 9, 2024
4 of 5 checks passed
@ashwani-opstree ashwani-opstree deleted the ms-health-check branch July 29, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants