Coder Social home page Coder Social logo

Comments (4)

aeneasr avatar aeneasr commented on May 22, 2024 1

Oh ok, I see - the current way this is generated is simply from helm create . so there's definitely room for improvement!

from k8s.

aeneasr avatar aeneasr commented on May 22, 2024

What exactly is the issue here? You can check out the release pipeline here: https://github.com/ory/k8s/blob/master/.circleci/config.yml#L14

from k8s.

ermik avatar ermik commented on May 22, 2024

This doesn't refer to build artifacts, rather it is one of best practices to include labels (annotations) to the generated manifests explicitly, rather than relying on other tools in the deployment pipeline (Tiller, kubelet) to write them when manifests are applied in the cluster.

This issue can be closed by adding a .tpl partial with something like the following:

{{- define "labels.app"}}
app: {{ .Chart.Name | quote }}
{{- end }}
{{- define "labels.version" }}{{- $serviceVersion := printf "v%s" .Chart.Version }}
version: {{ $serviceVersion | quote }}
{{- end }}
{{- define "labels.helm" }}
chart: {{ printf "%s-%s" .Chart.Name (.Chart.Version | replace "+" "_") | quote }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
{{- end }}

and using this partial in the following way:

  name: {{ .Values.somename | quote }}
  labels:
    {{- include "labels.app" . | indent 4 }}
    {{- include "labels.version" . | indent 4 }}
    {{- include "labels.helm" . | indent 4 }}

in each of the templated objects.

There are more annotations that are suggested in best practices, but helm.sh and app/version are ones I (personally) think are important.

from k8s.

ermik avatar ermik commented on May 22, 2024

I took another look and I see that I missed some of the work that has already been done. Additionally, the example above shows classic labels — I linked to current best practices to avoid confusion. I've reformatted this issue to make sure it's clearer and published the PR implementing the changes.

from k8s.

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.