GoogleContainerTools/skaffold

Refactor code and remove duplication

オープン

#7,318 opened on 2022/04/15

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Go (1,416 件のフォーク)batch import
help wantedkind/starter-projectkind/todopriority/p3

Repository metrics

Stars
 (12,822 個のスター)
PR merge metrics
 (平均マージ 3d 6h) (30d で 16 merged PRs)

説明

This task is about remove code duplication.

The skaffold filter command was added to apply debug transformations to configure container images for debugging. See here -> https://skaffold.dev/docs/workflows/debug/#configuring-container-images-for-debugging

When skaffold filter command was added it did not need any information from the run context.

However, after @aaron-prindle added the Resource Selector config where users can configure which resource types to transform. These list now needs to be passed to Filter command. In #7317, @tejal29 duplicated the functionality in getTransformList

The right way to do this is, Add Filter() method to the SkaffoldRunner which has access to the runner.RunContext.TransformAllowList and runCtx.runner.RunContext.TransformDenyList

The new Filter method will additionally execute the runFilter in here

コントリビューターガイド