truecharts / public

Community Helm Chart Repository
https://truecharts.org
GNU Affero General Public License v3.0
1.14k stars 617 forks source link

k3s, csi-smb: Ports and Values #21155

Closed IngwiePhoenix closed 5 months ago

IngwiePhoenix commented 5 months ago

Is your feature request related to a problem?

Hello there!

First off; I have spent a while learning Kubernetes now and this is my first cluster (yay!) and previously I used Docker Compose with bind-mounts - which is what brings me here, basically. After reading through the chart templates and the sheer catalogue of charts, I am well impressed. This is amazing! A true goldmine. :)

I use k3s as my distribution, because we use it at work too and it probably helps if I drive a system against the wall at home that I am ment to utilize at work. So, here I am, with my first k3s cluster.

While attempting to install the csi-smb driver (csi-nfs' controller was giving me problems to no end, so I hoped that SMB might help here), I first encountered errors during the helm install that I needed to specify ports. However, the default Values.yaml didn't specify one either, and after going through the templates, I am non the wiser still. So I disabled the service, for now.

But this next issue... I have no idea how to work around.

Error: INSTALLATION FAILED: 1 error occurred:
        * Deployment.apps "csi-smb-csi-driver-smb" is invalid: [spec.template.spec.containers[0].livenessProbe.httpGet.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].readinessProbe.httpGet.port: Invalid value: 0: must be between 1 and 65535, inclusive, spec.template.spec.containers[0].startupProbe.httpGet.port: Invalid value: 0: must be between 1 and 65535, inclusive]

Describe the solution you'd like

So, this is what I currently have:

apiVersion: v1
kind: Namespace
metadata:
  name: csi-smb
---
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
  name: csi-smb
  namespace: kube-system
spec:
  repo: https://charts.truecharts.org
  chart: csi-driver-smb
  targetNamespace: csi-smb
  valuesContent: |-
    TZ: Europe/Berlin
    global:
      namespace: csi-smb
      metallb:
        addServiceAnnotations: false
    manifestManager:
      enabled: false
    operator:
      register: true
    portal:
      open:
        enabled: false
    service:
      main:
        enabled: false
        ports:
          main:
            enabled: true
    workload:
      main:
        enabled: true

The plan is to deploy the csi-smb driver so I can create PVCs that live on my NAS as one of the storage tiers (2x 10TB HGST HDDs - slow, but vast).

Describe alternatives you've considered

A pointer to where I should/could go would do. Although I am still new to the templating language used in charts, I have done my fair share of PHP and EJS back in the day; I can read them just fine. I grepped around for potential defaults but found none. So, a pointer would do. ^^

Additional context

k3s uses Traefik already, and it is configured to use both it's own IngressRoute as well as the "standard" Ingress from networking.k8s.io. Helm charts are applied as seen in the format above; stored on disk and then just kubectl apply -f csi-smb.yaml By default it has the local-path-provisioner onboard for local storage. It's LoadBalancer is Klipper; think shrunken metallb, really.

That's all I can really think of.

Thanks and kind regards, Ingwie

I've read and agree with the following

PrivatePuffin commented 5 months ago

How about getting rid of 90% of that values.yaml file? Half of it is either wrong or not needed.

Things like this are advanced, completely unneeded, and not well tested at all:

    global:
      namespace: csi-smb
PrivatePuffin commented 5 months ago

This is either not a thing anymore or the settings are wrong:

    manifestManager:
      enabled: false
    operator:
      register: true
PrivatePuffin commented 5 months ago
    service:
      main:
        enabled: false
        ports:
          main:
            enabled: true
    workload:

This makes no sense.

PrivatePuffin commented 5 months ago

TLDR:

Stop altering value that don't need to be altered. ONLY modify if something explicitly needs modifications for your setup.

I'm closing this, as this issue is so full of usererror that we cannot spend devtime on this. Please be aware that github issues are only for bugs, support is given through our dedicated support staff on Discord through out ticketing system

IngwiePhoenix commented 5 months ago

I took the base for the values from here: https://github.com/truecharts/charts/blob/master/charts/system/csi-driver-smb/values.yaml

And the documentation for the common and global values while attempting to look up what exactly most of these do. There was, unfortunately, no hint or alike that some of them were straight up unused, deprecated or the like o.o Good to know!

Thanks for the infos though, much appreciated.

PrivatePuffin commented 5 months ago

Some more notes:

PrivatePuffin commented 5 months ago

I took the base for the values from here: https://github.com/truecharts/charts/blob/master/charts/system/csi-driver-smb/values.yaml

And the documentation for the common and global values while attempting to look up what exactly most of these do. There was, unfortunately, no hint or alike that some of them were straight up unused, deprecated or the like o.o Good to know!

Lets be more clear about that: You should only modify something if it needs modifications for your setup.

What you've done is copy the complete values.yaml, which is not how you use helm charts. Your personal value file should only contain your personal overrides

PrivatePuffin commented 5 months ago

Another interesting note: helm.cattle.io/v1

Is also not a supported deployment method by us. Only normal helm is, we don't know how this works if it has bugs etc.

PrivatePuffin commented 5 months ago

I will show you what a correct values.yaml looks like:

    TZ: Europe/Berlin

Thats it.


The common docs aren't a "lets go over them all and see if I need it" kind of docs. first need to determine what you want the chart to do, then find settings that you need changed to get it to function how you want it.


Another important note: So I disabled the service, for now.

You cannot "just" disable random features and expect things to work. If things don't work as expected out of the box, you find out how to fix it or file a support ticket.

Things are interconnected, you cannot just say "nah nuke that one component" and then be surprised other components start crashing


With all that being said, I op you now understand better why this is user error needing support tickets and not bug-report material.