Skip to content

Commit 258b57b

Browse files
revert back --skip-tls flag changes with deprecation notice (#5633)
* revert back --skip-tls with deprecation notice Signed-off-by: laxmikantbpandhare <[email protected]> * added changelog Signed-off-by: laxmikantbpandhare <[email protected]> * modified according to test sanity changes Signed-off-by: laxmikantbpandhare <[email protected]> * modified according to suggestion Signed-off-by: laxmikantbpandhare <[email protected]> * removed use-http flag Signed-off-by: laxmikantbpandhare <[email protected]> * modified tag to use http Signed-off-by: laxmikantbpandhare <[email protected]> * added typos Signed-off-by: laxmikantbpandhare <[email protected]> * removed comment Signed-off-by: laxmikantbpandhare <[email protected]> * removed field as it is not used in registry pod Signed-off-by: laxmikantbpandhare <[email protected]>
1 parent 9bb14cc commit 258b57b

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
entries:
2+
- description: >
3+
Reverted removal of `--skip-tls` flag and mark the flag as deprecated.
4+
kind: addition
5+
breaking: false

internal/olm/operator/bundle/install.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ func (i *Install) setup(ctx context.Context) error {
7171
}
7272
}
7373

74+
//if user sets --skip-tls then set --use-http to true as --skip-tls is deprecated
75+
if i.SkipTLS {
76+
i.UseHTTP = true
77+
}
78+
7479
// Load bundle labels and set label-dependent values.
7580
labels, bundle, err := operator.LoadBundle(ctx, i.BundleImage, i.SkipTLSVerify, i.UseHTTP)
7681
if err != nil {

internal/olm/operator/registry/index_image.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ type IndexImageCatalogCreator struct {
6262
PackageName string
6363
IndexImage string
6464
BundleImage string
65+
SkipTLS bool
6566
SkipTLSVerify bool
6667
UseHTTP bool
6768
BundleAddMode index.BundleAddMode
@@ -89,6 +90,11 @@ func (c *IndexImageCatalogCreator) BindFlags(fs *pflag.FlagSet) {
8990
"Name of a generic secret containing a PEM root certificate file required to pull bundle images. "+
9091
"This secret *must* be in the namespace that this command is configured to run in, "+
9192
"and the file *must* be encoded under the key \"cert.pem\"")
93+
94+
_ = fs.MarkDeprecated("skip-tls", "use --skip-tls-verify or --use-http instead")
95+
fs.BoolVar(&c.SkipTLS, "skip-tls", false, "skip authentication of image registry TLS "+
96+
"certificate when pulling a bundle image in-cluster")
97+
9298
fs.BoolVar(&c.SkipTLSVerify, "skip-tls-verify", false, "skip TLS certificate verification for container image registries "+
9399
"while pulling bundles")
94100
fs.BoolVar(&c.UseHTTP, "use-http", false, "use plain HTTP for container image registries "+

website/content/en/docs/cli/operator-sdk_run_bundle-upgrade.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ operator-sdk run bundle-upgrade <bundle-image> [flags]
2323
-n, --namespace string If present, namespace scope for this CLI request
2424
--pull-secret-name string Name of image pull secret ("type: kubernetes.io/dockerconfigjson") required to pull bundle images. This secret *must* be both in the namespace and an imagePullSecret of the service account that this command is configured to run in
2525
--service-account string Service account name to bind registry objects to. If unset, the default service account is used. This value does not override the operator's service account
26+
--skip-tls skip authentication of image registry TLS certificate when pulling a bundle image in-cluster
2627
--skip-tls-verify skip TLS certificate verification for container image registries while pulling bundles
2728
--timeout duration Duration to wait for the command to complete before failing (default 2m0s)
2829
--use-http use plain HTTP for container image registries while pulling bundles

website/content/en/docs/cli/operator-sdk_run_bundle.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ operator-sdk run bundle <bundle-image> [flags]
2525
-n, --namespace string If present, namespace scope for this CLI request
2626
--pull-secret-name string Name of image pull secret ("type: kubernetes.io/dockerconfigjson") required to pull bundle images. This secret *must* be both in the namespace and an imagePullSecret of the service account that this command is configured to run in
2727
--service-account string Service account name to bind registry objects to. If unset, the default service account is used. This value does not override the operator's service account
28+
--skip-tls skip authentication of image registry TLS certificate when pulling a bundle image in-cluster
2829
--skip-tls-verify skip TLS certificate verification for container image registries while pulling bundles
2930
--timeout duration Duration to wait for the command to complete before failing (default 2m0s)
3031
--use-http use plain HTTP for container image registries while pulling bundles

0 commit comments

Comments
 (0)