-
Notifications
You must be signed in to change notification settings - Fork 18
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
Issue #6 : Add Namespace and Probes Configuration to Kubernetes Manifests #7
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks @RohanRusta21! Could you also add a description to the newly added fields
} | ||
} | ||
}, | ||
"readiness": { |
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.
Can you add order
: ["path", "initialDelaySeconds"...]
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.
Hey @petar-cvit , Yup its done now. Please Review it :)
- name: {{ $key }} | ||
value: {{ $value | quote }} | ||
{{- if .Values.general.environment }} | ||
{{- toYaml .Values.general.environment | indent 12 }} |
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.
} | ||
}, | ||
"order": [ | ||
"enabled", |
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.
can we add enabled
to each probe separately? Also can you make it disabled by default in values.yaml
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.
Hi @petar-cvit , actually initially I tried to have separate toggle for each probe. But it was not working fine. Maybe will try it again.
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.
Please do. You can paste the error here if you want and we can try to figure it out
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.
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.
We refactored manifest rendering so you can try out the template again with the updated version.
labels: | ||
app: {{ .Values.name }} | ||
spec: | ||
replicas: {{ (.Values.scaling).replicas | default 1 }} |
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.
Can we leave this default?
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.
yes we can
@@ -17,12 +18,14 @@ spec: | |||
containers: | |||
- name: {{ .Values.name }} | |||
image: "{{ .Values.general.image }}:{{ .Values.general.version }}" | |||
{{- if ((.Values.networking).expose) }} | |||
|
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.
Could you remove all empty lines?
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.
yeah sure
ports: | ||
- name: http | ||
containerPort: {{ .Values.networking.port | default 80 }} | ||
containerPort: {{ .Values.networking.port }} |
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.
What happens if port is not set? We cant enforce it since exposing is optional
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.
Yeah but this template is meant to expose the port specified by the user.
resources: | ||
{{- if ((.Values.scaling).resources).memory }} |
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.
Can you rever the resources object since its not format properly and it can cause a null pointer because of deleted brackets
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.
ok
{{- end }} | ||
|
||
{{- if .Values.probes.enabled }} |
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.
Can you add brackets the same way it was done in the resources object to avoid null objects
} | ||
}, | ||
"order": [ | ||
"enabled", |
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.
We refactored manifest rendering so you can try out the template again with the updated version.
@RohanRusta21, you also have some conflicts that need to be resolved. We renamed the chart since this PR was opened |
Hi @petar-cvit @KaradzaJuraj ,
This pull request focuses on the addition of new fields within various files, namely "deployment.yaml", "services.yaml", "values.schema.json", and "values.yaml". Here's a summary of the changes made:
In "demo-extended/templates/deployment.yaml", I have introduced YAML code for Namespace and Probes (specifically, readinessProbe, livenessProbe, and startupProbe). The default values for these fields are retrieved from "values.yaml".
Within "demo-extended/templates/services.yaml", I have incorporated YAML code for Namespace. Similar to the deployment template, the default values for these fields are sourced from "values.yaml".
In "demo-extended/values.schema.json", I have extended the JSON schema to include the Namespace field below Name, which falls under the metadata of deployment.yml. Additionally, I have structured a separate, expandable section for Probes, allowing users to conveniently review and customize each probe as needed.
Within "demo-extended/values.yaml", default values have been provided for the newly added fields in the branch, along with resources (CPU and memory), which were previously declared but lacked default values.
Please Review the PR and feel free to contact me if any improvement required from my end 👍 ,
Thanks & Regards,
Rohan Rustagi