Skip to content

Commit 14c5dbb

Browse files
committed
chore: delete unused helm fields and methods from v1 -> v2 migration
1 parent adf51dd commit 14c5dbb

File tree

3 files changed

+0
-144
lines changed

3 files changed

+0
-144
lines changed

pkg/skaffold/deploy/helm/helm_test.go

-71
Original file line numberDiff line numberDiff line change
@@ -1148,77 +1148,6 @@ func TestHelmDependencies(t *testing.T) {
11481148
}
11491149
}
11501150

1151-
func TestImageSetFromConfig(t *testing.T) {
1152-
tests := []struct {
1153-
description string
1154-
valueName string
1155-
tag string
1156-
expected string
1157-
strategy *latest.HelmConventionConfig
1158-
shouldErr bool
1159-
}{
1160-
{
1161-
description: "Helm set values with no convention config",
1162-
valueName: "image",
1163-
tag: "skaffold-helm:1.0.0",
1164-
expected: "image=skaffold-helm:1.0.0",
1165-
strategy: nil,
1166-
shouldErr: false,
1167-
},
1168-
{
1169-
description: "Helm set values with helm conventions",
1170-
valueName: "image",
1171-
tag: "skaffold-helm:1.0.0",
1172-
expected: "image.repository=skaffold-helm,image.tag=1.0.0",
1173-
strategy: &latest.HelmConventionConfig{},
1174-
shouldErr: false,
1175-
},
1176-
{
1177-
description: "Helm set values with helm conventions and explicit registry value",
1178-
valueName: "image",
1179-
tag: "docker.io/skaffold-helm:1.0.0",
1180-
expected: "image.registry=docker.io,image.repository=skaffold-helm,image.tag=1.0.0",
1181-
strategy: &latest.HelmConventionConfig{
1182-
ExplicitRegistry: true,
1183-
},
1184-
shouldErr: false,
1185-
},
1186-
{
1187-
description: "Invalid tag with helm conventions",
1188-
valueName: "image",
1189-
tag: "skaffold-helm:1.0.0,0",
1190-
expected: "",
1191-
strategy: &latest.HelmConventionConfig{},
1192-
shouldErr: true,
1193-
},
1194-
{
1195-
description: "Helm set values with helm conventions and explicit registry value, but missing in tag",
1196-
valueName: "image",
1197-
tag: "skaffold-helm:1.0.0",
1198-
expected: "",
1199-
strategy: &latest.HelmConventionConfig{
1200-
ExplicitRegistry: true,
1201-
},
1202-
shouldErr: true,
1203-
},
1204-
{
1205-
description: "Helm set values using digest",
1206-
valueName: "image",
1207-
tag: "skaffold-helm:stable@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2",
1208-
expected: "image.repository=skaffold-helm,image.tag=stable@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2",
1209-
strategy: &latest.HelmConventionConfig{},
1210-
shouldErr: false,
1211-
},
1212-
}
1213-
for _, test := range tests {
1214-
testutil.Run(t, test.description, func(t *testutil.T) {
1215-
values, err := imageSetFromConfig(test.strategy, test.valueName, test.tag)
1216-
t.CheckError(test.shouldErr, err)
1217-
t.CheckDeepEqual(test.expected, values)
1218-
})
1219-
}
1220-
}
1221-
12221151
func TestHelmRender(t *testing.T) {
12231152
tests := []struct {
12241153
description string

pkg/skaffold/deploy/helm/util.go

-52
This file was deleted.

pkg/skaffold/schema/latest/config.go

-21
Original file line numberDiff line numberDiff line change
@@ -912,27 +912,6 @@ type HelmPackaged struct {
912912
AppVersion string `yaml:"appVersion,omitempty"`
913913
}
914914

915-
// HelmImageConfig describes an image configuration.
916-
type HelmImageConfig struct {
917-
// HelmFQNConfig is the image configuration uses the syntax `IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG`.
918-
HelmFQNConfig *HelmFQNConfig `yaml:"fqn,omitempty" yamltags:"oneOf=helmImageStrategy"`
919-
920-
// HelmConventionConfig is the image configuration uses the syntax `IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG`.
921-
HelmConventionConfig *HelmConventionConfig `yaml:"helm,omitempty" yamltags:"oneOf=helmImageStrategy"`
922-
}
923-
924-
// HelmFQNConfig is the image config to use the FullyQualifiedImageName as param to set.
925-
type HelmFQNConfig struct {
926-
// Property defines the image config.
927-
Property string `yaml:"property,omitempty"`
928-
}
929-
930-
// HelmConventionConfig is the image config in the syntax of image.repository and image.tag.
931-
type HelmConventionConfig struct {
932-
// ExplicitRegistry separates `image.registry` to the image config syntax. Useful for some charts e.g. `postgresql`.
933-
ExplicitRegistry bool `yaml:"explicitRegistry,omitempty"`
934-
}
935-
936915
// LogsConfig configures how container logs are printed as a result of a deployment.
937916
type LogsConfig struct {
938917
// Prefix defines the prefix shown on each log line. Valid values are

0 commit comments

Comments
 (0)