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

Adding a helm chart #81

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Adding a helm chart #81

wants to merge 4 commits into from

Conversation

almahmoud
Copy link

Having a helm chart makes it easier to add the driver as a dependency to other charts in a k8s deployment stack.

I can also help add testing, auto-packaging, and auto-version bumping as github actions if you wish, as we have for our charts.

Other than codifying the helm chart, one noticeable change is also the customizability of the priority class (and optional creation) as opposed to hardcoding SystemCritical so that the chart can be used in a user namespace. This is needed for our project where we isolate users by nodepool and namespace.

Many customizations can still be added but I only added the minimum that we needed to start.

@maennchen
Copy link
Collaborator

@almahmoud That looks great :)

The priorityClass should be SystemCritical by default. (Allowing an override is fine)

The reason for that is how kubelet and the operating system treat pods with this priority class. If you for example run out of memory, you want to be certain that the csi pods are not terminated. This would lead to broken mounts in your application pods.

@almahmoud
Copy link
Author

Changed! Let me know if there's anything else!

# 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.
appVersion: "0.8.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are we starting with 0.8.0?

Copy link
Author

Choose a reason for hiding this comment

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

Tbh I wasn't sure how you're doing versioning, so happy to let you make the decision there!

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah wait, is this the helm chart version or the csi gcs version?

Copy link
Author

Choose a reason for hiding this comment

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

appVersion is the CSI GCS version, version is the chart version, which some people choose to version together, others choose to do separately, depending on how much out-of-band development there might be on the chart independent of features in the app I guess?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, I think versioning that together makes sense. @ofek We need to make sure to change this on releases.

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "csi-gcs.fullname" . }}
Copy link
Collaborator

@maennchen maennchen Nov 30, 2021

Choose a reason for hiding this comment

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

I think we should add the following labels (to most resources):

    app.kubernetes.io/name: {{ template "csi-gcs.name" $ }}
    app.kubernetes.io/managed-by: {{ $.Release.Service }}
    app.kubernetes.io/instance: {{ $.Release.Name }}
    app.kubernetes.io/version: {{ template "csi-gcs.version" $ }}
    helm.sh/chart: {{ template "csi-gcs.chart" $ }}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Yup!

Comment on lines +7 to +8
preemptionPolicy: Never
value: 1000000
Copy link
Collaborator

Choose a reason for hiding this comment

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

That should probably be configurable if the priority class is editable.

Copy link
Author

Choose a reason for hiding this comment

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

I can make these and a few more things that are usually configurable (like the image pull policies, extra labels/annotations, etc) later today

deploy/helm/csi-gcs/templates/rbac.yaml Show resolved Hide resolved
@rhummelmose
Copy link

Would very much like to see this merged :)

@ofek
Copy link
Owner

ofek commented Jan 12, 2022

Any update on this?

@huikaihoo
Copy link

Any reason why not merged yet?

@maennchen
Copy link
Collaborator

maennchen commented Nov 4, 2022

It is not merged yet because there’s outstanding tasks that have not been finished.

If anyone feels like finishing the PR, please consider opening your own PR which incorporates this one plus the content of the discussions.

@45413 45413 mentioned this pull request Feb 22, 2023
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.

5 participants