.helmignore ファイル

.helmignore ファイルは、Helmチャートに含めたくないファイルを指定するために使用されます。

このファイルが存在する場合、helm package コマンドは、アプリケーションをパッケージ化する際に、.helmignore ファイルで指定されたパターンに一致するすべてのファイルを無視します。

これにより、不要なファイルや機密性の高いファイルまたはディレクトリがHelmチャートに追加されるのを防ぐのに役立ちます。

.helmignore ファイルは、Unixシェルのグロブマッチング、相対パスマッチング、および否定(!プレフィックス付き)をサポートしています。1行あたり1つのパターンのみが考慮されます。

.helmignore ファイルの例を次に示します。

# comment

# Match any file or path named .helmignore
.helmignore

# Match any file or path named .git
.git

# Match any text file
*.txt

# Match only directories named mydir
mydir/

# Match only text files in the top-level directory
/*.txt

# Match only the file foo.txt in the top-level directory
/foo.txt

# Match any file named ab.txt, ac.txt, or ad.txt
a[b-d].txt

# Match any file under subdir matching temp*
*/temp*

*/*/temp*
temp?

.gitignore とのいくつかの注目すべき違い

  • '**'構文はサポートされていません。
  • グロブライブラリは、fnmatch(3)ではなく、Goの'filepath.Match'です。
  • 末尾のスペースは常に無視されます(サポートされているエスケープシーケンスはありません)。
  • 特別な先頭シーケンスとしての'!'のサポートはありません。
  • デフォルトでは自身を除外しないため、.helmignore の明示的なエントリを追加する必要があります。

このドキュメントの改善にご協力ください。 情報の追加、修正、削除を行うには、issueを提出するか、プルリクエストを送信してください。