PageSourceSearch

https://helm.sh/assets/js/6e8aa265.bf009aa9.js

js helm.sh collected 2026-09-24 07:26:48 UTC 5,203 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhelm_www=self.webpackChunkhelm_www||[]).push([["2748"],{47531(e,s,t){t.r(s),t.d(s,{metadata:()=>n,default:()=>h,frontMatter:()=>o,contentTitle:()=>a,toc:()=>d,assets:()=>c});var n=JSON.parse('{"id":"chart_best_practices/requirements","title":"Requirements Files","description":"This section of the guide covers best practices for requirements.yaml files.","source":"@site/versioned_docs/version-2/chart_best_practices/requirements.md","sourceDirName":"chart_best_practices","slug":"/chart_best_practices/requirements","permalink":"/docs/v2/chart_best_practices/requirements","draft":false,"unlisted":false,"editUrl":"https://github.com/helm/helm-www/blob/main/versioned_docs/version-2/chart_best_practices/requirements.md","tags":[],"version":"2","sidebarPosition":4,"frontMatter":{"sidebar_position":4,"sidebar_label":"Requirements"},"sidebar":"tutorialSidebar","previous":{"title":"Templates","permalink":"/docs/v2/chart_best_practices/templates"},"next":{"title":"Labels & Annotations","permalink":"/docs/v2/chart_best_practices/labels"}}'),r=t(74848),i=t(28453);let o={sidebar_position:4,sidebar_label:"Requirements"},a="Requirements Files",c={},d=[{value:"Versions",id:"versions",level:2},{value:"Repository URLs",id:"repository-urls",level:3},{value:"Conditions and Tags",id:"conditions-and-tags",level:2}];function l(e){let s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"requirements-files",children:"Requirements Files"})}),"\n",(0,r.jsxs)(s.p,{children:["This section of the guide covers best practices for ",(0,r.jsx)(s.code,{children:"requirements.yaml"})," files."]}),"\n",(0,r.jsx)(s.h2,{id:"versions",children:"Versions"}),"\n",(0,r.jsx)(s.p,{children:"Where possible, use version ranges instead of pinning to an exact version. The suggested default is to use a patch-level version match:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-yaml",children:"version: ~1.2.3\n"})}),"\n",(0,r.jsxs)(s.p,{children:["This will match version ",(0,r.jsx)(s.code,{children:"1.2.3"})," and any patches to that release.  In other words, ",(0,r.jsx)(s.code,{children:"~1.2.3"})," is equivalent to ",(0,r.jsx)(s.code,{children:">= 1.2.3, < 1.3.0"})]}),"\n",(0,r.jsxs)(s.p,{children:["For the complete version matching syntax, please see the ",(0,r.jsx)(s.a,{href:"https://github.com/Masterminds/semver#checking-version-constraints",children:"semver documentation"})]}),"\n",(0,r.jsx)(s.h3,{id:"repository-urls",children:"Repository URLs"}),"\n",(0,r.jsxs)(s.p,{children:["Where possible, use ",(0,r.jsx)(s.code,{children:"https://"})," repository URLs, followed by ",(0,r.jsx)(s.code,{children:"http://"})," URLs."]}),"\n",(0,r.jsxs)(s.p,{children:["If the repository has been added to the repository index file, the repository name can be used as an alias of URL. Use ",(0,r.jsx)(s.code,{children:"alias:"})," or ",(0,r.jsx)(s.code,{children:"@"})," followed by repository names."]}),"\n",(0,r.jsxs)(s.p,{children:["File URLs (",(0,r.jsx)(s.code,{children:"file://..."}),') are considered a "special case" for charts that are assembled by a fixed deployment pipeline. Charts that use ',(0,r.jsx)(s.code,{children:"file://"})," in a ",(0,r.jsx)(s.code,{children:"requirements.yaml"})," file are not allowed in the official Helm repository."]}),"\n",(0,r.jsx)(s.h2,{id:"conditions-and-tags",children:"Conditions and Tags"}),"\n",(0,r.jsxs)(s.p,{children:["Conditions or tags should be added to any dependencies that ",(0,r.jsx)(s.em,{children:"are optional"}),"."]}),"\n",(0,r.jsx)(s.p,{children:"The preferred form of a condition is:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-yaml",children:"condition: somechart.enabled\n"})}),"\n",(0,r.jsxs)(s.p,{children:["Where ",(0,r.jsx)(s.code,{children:"somechart"})," is the chart name of the dependency."]}),"\n",(0,r.jsx)(s.p,{children:"When multiple subcharts (dependencies) together provide an optional or swappable feature, those charts should share the same tags."}),"\n",(0,r.jsxs)(s.p,{children:["For example, if both ",(0,r.jsx)(s.code,{children:"nginx"})," and ",(0,r.jsx)(s.code,{children:"memcached"})," together provided performance optimizations for the main app in the chart, and were required to both be present when that feature is enabled, then they might both have a\ntags section like this:"]}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{children:"tags:\n  - webaccelerator\n"})}),"\n",(0,r.jsx)(s.p,{children:"This allows a user to turn that feature on and off with one tag."})]})}function h(e={}){let{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453(e,s,t){t.d(s,{R:()=>o,x:()=>a});var n=t(96540);let r={},i=n.createContext(r);function o(e){let s=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.