-
Notifications
You must be signed in to change notification settings - Fork 33
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
Solution:1.0 #2
base: main
Are you sure you want to change the base?
Solution:1.0 #2
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.
In general good job, bold and deep parametrization on first review iteration.
Still needs polishing and fixing some minor issues described via comments.
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. |
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.
Remove generated comments, they make configs look messy.
averageUtilization: 70 | ||
|
||
secret: | ||
SECRET_KEY: QGUyKHl4KXYmdGdoM19zPTB5amEtaSFkcGVieHN6XmRnNDd4KS1rJmtxXzN6Zio5ZSoK(@e2(yx)v&tgh3_s=0yja-i!dpebxsz^dg47x)-k&kq_3zf*9e*) |
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.
Do not store secret value as a plain text in values.yml
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 a question to this part.
In video "Creating Helm Chart - Working with values files" (27 sec), mentor implemented it in exect way.
Could you say how it must be implemented? I need to use values in b64?
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.
Or create a 3rd file with secretKeyRef on secret.yml. and that values copy to values.yaml, after paste to deployment.yml?
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.
@cth-usq good question. I will repeat this question to course creators.
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.
@YuriiSmolii here is example of second variant (https://ververica.zendesk.com/hc/en-us/articles/360015021359-How-to-secure-passwords-secrets-in-values-yaml-with-Kubernetes-secrets)
DB_USER: "app_user" | ||
DB_PASSWORD: "1234" |
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.
Do not store secret value as a plain text in values.yml
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.
Secrets wrongly configured and no configs for ServiceAccount
@@ -0,0 +1,51 @@ | |||
common: | |||
namespace: todoapp |
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.
Namespace is not common for subchart
MYSQL_ROOT_PASSWORD: 1234 | ||
MYSQL_USER: app_user | ||
MYSQL_PASSWORD: 1234 |
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.
Same with secrets here.
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. |
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.
Remove generated text here as well.
# pod-name.service-name.namespace.svc.cluster.local | ||
# pod-name.service-name | ||
# mysql-0.mysql.mysql.svc.cluster.local |
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.
Remove commented code.
requests: | ||
cpu: {{ .Values.mysql.statefulSet.resources.requests.cpu }} | ||
memory: {{ .Values.mysql.statefulSet.resources.requests.memory }} | ||
livenessProbe: |
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.
You could import the whole block from values. And same for other below
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.
Minor changes requested.
Щодо secrets, на цьому етапі зараховуємо завдання з секретами у values.yml, як це. було показано на відео.
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Chart.Name }} |
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.
Use chart name as prefix, not a full name:
{{ .Chart.Name }}-configmap
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Chart.Name }} |
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.
name: {{ .Chart.Name }} | |
name: {{ .Chart.Name }}-clusterip |
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ .Chart.Name }} |
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.
name: {{ .Chart.Name }} | |
name: {{ .Chart.Name }}-statefulset |
requests: | ||
{{ .Values.mysql.statefulSet.resources.requests }} | ||
livenessProbe: | ||
{{ .Values.mysql.statefulSet.livenessProbe }} | ||
readinessProbe: | ||
{{ .Values.mysql.statefulSet.readinessProbe }} |
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.
This is not changed.
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.
Actually, resources, livenessProbe and readinesS on the same level in code line maybe will be better to keep them as 3 lines
resources: | ||
requests: | ||
memory: {{ .Values.todoapp.resources.requests.memory | quote }} | ||
cpu: {{ .Values.todoapp.resources.requests.cpu | quote }} | ||
limits: | ||
memory: {{ .Values.todoapp.resources.limits.memory | quote }} | ||
cpu: {{ .Values.todoapp.resources.limits.cpu | quote }} |
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 be imported whole block.
bootstrap.sh
Outdated
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.
Delete commented lines.
@YuriiSmolii Тобто так як я зробив відразу? |
Так |
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.
Minor change requested.
limits: | ||
memory: {{ .Values.todoapp.resources.limits.memory | quote }} | ||
cpu: {{ .Values.todoapp.resources.limits.cpu | quote }} | ||
{{ .Values.todoapp.resources.requests.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.
Тут неправильно імпортований блок, потрібно не лише memory, а весь блок resource конфігурацій.
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.
Приклад:
spec:
containers:
- name: my-container
image: my-image:latest
resources:
{{ toYaml .Values.resources | nindent 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.
@YuriiSmolii my inattention
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.
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.
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.
Good job!
No description provided.