[FEATURE_REQUEST] Ignore Violations For Specific Resources Using YAML Config File

オープン
#487 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go, helm, kubernetes
領域
devops, tooling

調査の方向性

The request asks for a YAML-based alternative to the existing annotation method for ignoring a check on a specific resource, but the payload does not name the files involved. Start by finding where the annotation-based ignore is applied and whether a kube-linter.yaml config is already loaded. The design, including the config format, is still open, so agree on it in the thread first. Done means a named check is skipped for a named resource when the YAML entry is present, with the reason recorded.

索引モデルが issue の本文から書いたものです。

説明

Description of the problem/feature request
Currently the only way to ignore a violation for a specific check and a specific resource is via the annotation method. The problem is we pull through the public Helm Charts and deem them immutable to facilitate easier upgrades further down the line and in some cases the maintainers have not made annotations a configurable field from the values.yaml file.

An example would be a test Pod resource that does not contain a readinessProbe directive. We don't want to exclude this check completely as its important for the actual component, but would want to ignore for this specific Pod resource.

An option (might be others as well) could be to configure this in the YAML file, kube-linter.yaml, that is an add-on to the folder structure.

For example:

# Pattern
ignoreChecks:
  <check-name>:
    resources:
      - name: <resource-name>
        reason: <explanation>

# Example
ignoreChecks:
  no-readiness-probe:
    resources:
      - name: component-A-service-test
        reason: "Test pod does not require readiness probe"

The above is not absolute, its just a point of reference using the information one would supply via the annotation in a easy reusable way.

Description of the existing behavior vs. expected behavior
Existing behavior is this is not possible without altering the YAML resource file directly. Expected behavior is for a lint check to pass if able to ignore violations via the YAML configuration file.

Additional context
N/A

主要言語
Go
スター
3.5k
フォーク
277
平均マージ
1日 22分
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stackrox/kube-linter のほかの issue

stackrox/kube-linter の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。