Skip to content

Commit acad129

Browse files
authored
chore: Fix BuildContextCompressionLevel description, output the level (#9688)
* chore: Fix BuildContextCompressionLevel description, output the level Signed-off-by: Suleiman Dibirov <[email protected]> * fixes Signed-off-by: Suleiman Dibirov <[email protected]> --------- Signed-off-by: Suleiman Dibirov <[email protected]>
1 parent 25bb601 commit acad129

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

docs-v2/content/en/schemas/v4beta12.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2672,8 +2672,8 @@
26722672
},
26732673
"buildContextCompressionLevel": {
26742674
"type": "integer",
2675-
"description": "gzip compression level for the build context.",
2676-
"x-intellij-html-description": "gzip compression level for the build context.",
2675+
"description": "gzip compression level(0-9) for the build context. 0: NoCompression. 1: BestSpeed. 9: BestCompression. -1: DefaultCompression. -2: HuffmanOnly.",
2676+
"x-intellij-html-description": "gzip compression level(0-9) for the build context. 0: NoCompression. 1: BestSpeed. 9: BestCompression. -1: DefaultCompression. -2: HuffmanOnly.",
26772677
"default": "1"
26782678
},
26792679
"cache": {

pkg/skaffold/build/cluster/kaniko.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ func (b *Builder) copyKanikoBuildContext(ctx context.Context, out io.Writer, wor
139139
errs := make(chan error, 1)
140140
buildCtxReader, buildCtxWriter := io.Pipe()
141141
gzipWriter, err := gzip.NewWriterLevel(buildCtxWriter, *artifact.BuildContextCompressionLevel)
142+
log.Entry(ctx).Infof("Using gzip compression level %d", *artifact.BuildContextCompressionLevel)
142143

143144
if err != nil {
144145
return fmt.Errorf("creating gzip writer: %w", err)

pkg/skaffold/schema/latest/config.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,13 +1555,13 @@ type KanikoArtifact struct {
15551555
// Defaults to 5 minutes (`5m`).
15561556
CopyTimeout string `yaml:"copyTimeout,omitempty"`
15571557

1558-
// BuildContextCompressionLevel is the gzip compression level for the build context.
1558+
// BuildContextCompressionLevel is the gzip compression level(0-9) for the build context.
1559+
// 0: NoCompression.
1560+
// 1: BestSpeed.
1561+
// 9: BestCompression.
1562+
// -1: DefaultCompression.
1563+
// -2: HuffmanOnly.
15591564
// Defaults to `1`.
1560-
// 0: NoCompression
1561-
// 1: BestSpeed
1562-
// 9: BestCompression
1563-
// -1: DefaultCompression
1564-
// -2: HuffmanOnly
15651565
BuildContextCompressionLevel *int `yaml:"buildContextCompressionLevel,omitempty"`
15661566
}
15671567

0 commit comments

Comments
 (0)