Giter Site home page Giter Site logo

Comments (4)

jeantil avatar jeantil commented on August 16, 2024

I started an attempt at implementing helm's 3 best practices regarding namespace management as laid out by one helm's core maintainer in this comment

However after trying to apply the namespace-less recommendation I encoutered at 2 issues which made me doubt that the official best practice was sound

I am considering using defaulting instead of fully removing the namespace mentions

{{ .Values.namespace | default .Release.Namespace }}

This would make the default behaviour align with the recommendations while allowing users to pin the namespace through value
I wonder if people in the team have an opinion ...

from pulsar-helm-chart.

imunhatep avatar imunhatep commented on August 16, 2024

This issue is not about usage of namespace refs in rbac manifests or other kinds.. This issue is about managing kind: namespace , i.e. create, update, delete e.t.c with HELM chart.

I reported same issue for other pulsar chart: streamnative/charts#140

from pulsar-helm-chart.

jeantil avatar jeantil commented on August 16, 2024

I am confused, in your initial issue you provided the following reproduction steps:

kubectl create ns pulsartest
helm upgrade --install pulsar -n pulsartest apache/pulsar
Error: namespaces "pulsar" not found

the chart does not try to create/update/delete the namespace and the chart will succeed if you configure it correclty (pass --set namespace=pulsartest) still without creating/updating/deleting a namespace.So you are forced to repeat the namespace information which is suboptimal.

The helm's best practice indicate that to avoid this repetition chart maintainers are not supposed to embbed namespace definitions in their templates.
The problem is that making the chart follow the official helm conventions ( which is easy) will fail in some common helm/k8s workflows because of the rbac/FQDN issues i mention in the referenced comment.

In the stream native chart they had already applied the other alternative I mentioned :

I am considering using defaulting instead of fully removing the namespace mentions
{{ .Values.namespace | default .Release.Namespace }}

They had left a default value in the values file which required you to pass --set namespace=null to get the desired behavior. The fix they applied to your issue was to remove the default value and align the documentation.

I'm hoping one of the maintainers for the apache chart will comment on what they would consider the correct option for their chart :D

from pulsar-helm-chart.

imunhatep avatar imunhatep commented on August 16, 2024

Hey, thank you for follow up.

Here I see chart is managing NS and in fact will try to create/delete it: https://github.com/apache/pulsar-helm-chart/blob/master/charts/pulsar/templates/namespace.yaml

While it seems convenient to be able to create namespace by configuring the chart, but the whole goal of mentioned helm issues, is to point out missing tooling in helm to properly manage NS.

At the end, it's up to maintainers to decide how to handle charts.. e.g. streamnative decided that updating docs is the way, well.. ok :)

from pulsar-helm-chart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.