-
Notifications
You must be signed in to change notification settings - Fork 84
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
pod Affinity #224
Closed
Closed
pod Affinity #224
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
08ec13c
pod Affinity
khushimalhoz 49f1a39
Update Chart.yaml
khushimalhoz d77014d
Update Chart.yaml
khushimalhoz 0c7a154
Update deployment.yaml
khushimalhoz aadab3e
Create affinity.yaml
khushimalhoz 6a5be98
Update deploy-nginx.yaml
khushimalhoz 920b62f
Update deploy-nginx.yaml
khushimalhoz 6f7e680
Update Chart.yaml
khushimalhoz 8b03544
Update deploy-nginx.yaml
khushimalhoz 031ca13
Merge branch 'main' into khushi/microservice
ashwani-opstree 3df39a7
Update deployment.yaml
khushimalhoz 61a0e3c
Update values.yaml
khushimalhoz 19f93c6
Update affinity.yaml
khushimalhoz ac1e1e0
Update affinity.yaml
khushimalhoz 0d99723
Update values.yaml
khushimalhoz 2deb7fb
Update Chart.yaml
khushimalhoz 59ca5de
Update deployment.yaml
khushimalhoz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,6 @@ appVersion: "0.1.2" | |
maintainers: | ||
- name: ashwani-opstree | ||
- name: tripathishikha1 | ||
- name: khushimalhoz | ||
|
||
|
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,38 @@ | ||
global: | ||
namespace: "default" | ||
# replicacount: 5 | ||
fullnameOverride: "webapp" | ||
|
||
deployment: | ||
image: | ||
name: nginx | ||
tag: latest | ||
pullPolicy: IfNotPresent | ||
livenessProbe: | ||
httpGet: | ||
path: "/" | ||
port: http | ||
readinessProbe: | ||
httpGet: | ||
path: "/" | ||
port: http | ||
resources: | ||
requests: | ||
memory: 100Mi | ||
cpu: 100m | ||
limits: | ||
memory: 500Mi | ||
cpu: 500m | ||
affinity: | ||
enabled: false # Set to false to disable podAntiAffinity | ||
topologySpreadConstraints: | ||
enabled: false # Set to false to disable topologySpreadConstraints | ||
volumes: | ||
enabled: true | ||
configMaps: | ||
- name: index | ||
mountPath: /usr/share/nginx/html | ||
data: | ||
index.html: | | ||
Hello! Opstree | ||
|
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 |
---|---|---|
|
@@ -30,4 +30,3 @@ deployment: | |
data: | ||
index.html: | | ||
Hello! Opstree | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this setting as default in the deployment helm template. If someone wants to override the default setting, he can use these parameters to override.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done the changes
To make the affinity and tolerations
in deployment.yaml
affinity:
{{- toYaml (merge .Values.deployment.affinity (default dict .Values.deployment.affinity)) | nindent 8 }}
tolerations:
{{- toYaml (merge .Values.deployment.tolerations (default dict .Values.deployment.tolerations)) | nindent 8 }}
affinity and tolerations settings have default values defined in values.yaml, and these settings can be overridden by user-specified values. The merge function combines the defaults with the user-provided values, ensuring that the user can override the default settings if needed.