Skip to content

Commit 5cc553c

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

File tree

4 files changed

+0
-199
lines changed

4 files changed

+0
-199
lines changed

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

-55
Original file line numberDiff line numberDiff line change
@@ -2063,23 +2063,6 @@
20632063
"description": "defines the manifests from helm releases.",
20642064
"x-intellij-html-description": "defines the manifests from helm releases."
20652065
},
2066-
"HelmConventionConfig": {
2067-
"properties": {
2068-
"explicitRegistry": {
2069-
"type": "boolean",
2070-
"description": "separates `image.registry` to the image config syntax. Useful for some charts e.g. `postgresql`.",
2071-
"x-intellij-html-description": "separates <code>image.registry</code> to the image config syntax. Useful for some charts e.g. <code>postgresql</code>.",
2072-
"default": "false"
2073-
}
2074-
},
2075-
"preferredOrder": [
2076-
"explicitRegistry"
2077-
],
2078-
"additionalProperties": false,
2079-
"type": "object",
2080-
"description": "image config in the syntax of image.repository and image.tag.",
2081-
"x-intellij-html-description": "image config in the syntax of image.repository and image.tag."
2082-
},
20832066
"HelmDeployFlags": {
20842067
"properties": {
20852068
"global": {
@@ -2120,44 +2103,6 @@
21202103
"description": "additional option flags that are passed on the command line to `helm`.",
21212104
"x-intellij-html-description": "additional option flags that are passed on the command line to <code>helm</code>."
21222105
},
2123-
"HelmFQNConfig": {
2124-
"properties": {
2125-
"property": {
2126-
"type": "string",
2127-
"description": "defines the image config.",
2128-
"x-intellij-html-description": "defines the image config."
2129-
}
2130-
},
2131-
"preferredOrder": [
2132-
"property"
2133-
],
2134-
"additionalProperties": false,
2135-
"type": "object",
2136-
"description": "image config to use the FullyQualifiedImageName as param to set.",
2137-
"x-intellij-html-description": "image config to use the FullyQualifiedImageName as param to set."
2138-
},
2139-
"HelmImageConfig": {
2140-
"properties": {
2141-
"fqn": {
2142-
"$ref": "#/definitions/HelmFQNConfig",
2143-
"description": "image configuration uses the syntax `IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG`.",
2144-
"x-intellij-html-description": "image configuration uses the syntax <code>IMAGE-NAME=IMAGE-REPOSITORY:IMAGE-TAG</code>."
2145-
},
2146-
"helm": {
2147-
"$ref": "#/definitions/HelmConventionConfig",
2148-
"description": "image configuration uses the syntax `IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG`.",
2149-
"x-intellij-html-description": "image configuration uses the syntax <code>IMAGE-NAME.repository=IMAGE-REPOSITORY, IMAGE-NAME.tag=IMAGE-TAG</code>."
2150-
}
2151-
},
2152-
"preferredOrder": [
2153-
"fqn",
2154-
"helm"
2155-
],
2156-
"additionalProperties": false,
2157-
"type": "object",
2158-
"description": "describes an image configuration.",
2159-
"x-intellij-html-description": "describes an image configuration."
2160-
},
21612106
"HelmPackaged": {
21622107
"properties": {
21632108
"appVersion": {

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)