Repository: vmware-tanzu/tanzu-framework (language: go)

Issue:
Add custom compatibility image path to isolated-cluster plugin
**Bug description**

@Vandy-P Please add why we require this change.

**Affected product area (please put an X in all that apply)**

- ( ) APIs
- ( ) Addons
- (x) CLI
- ( ) Docs
- ( ) IAM
- ( ) Installation
- ( ) Plugin
- ( ) Security
- ( ) Test and Release
- ( ) User Experience
- ( ) Developer Experience

**Expected behavior**

**Steps to reproduce the bug**

**Version** (include the SHA if the version is not obvious)

**Environment where the bug was observed (cloud, OS, etc)**

**Relevant Debug Output (Logs, manifests, etc)**



Discussion / hints:

Fix patch:
diff --git a/cmd/cli/plugin/isolated-cluster/imagepullop/publishimagestotar.go b/cmd/cli/plugin/isolated-cluster/imagepullop/publishimagestotar.go
index cb32ba7290..ada9063846 100644
--- a/cmd/cli/plugin/isolated-cluster/imagepullop/publishimagestotar.go
+++ b/cmd/cli/plugin/isolated-cluster/imagepullop/publishimagestotar.go
@@ -26,12 +26,13 @@ import (
 const outputDir = "tmp"
 
 type PublishImagesToTarOptions struct {
-	TkgImageRepo  string
-	TkgVersion    string
-	PkgClient     imgpkginterface.ImgpkgClient
-	ImageDetails  map[string]string
-	CaCertificate string
-	Insecure      bool
+	TkgImageRepo                string
+	TkgVersion                  string
+	PkgClient                   imgpkginterface.ImgpkgClient
+	ImageDetails                map[string]string
+	CaCertificate               string
+	Insecure                    bool
+	TkgCustomCompatibilityImage string
 }
 
 var pullImage = &PublishImagesToTarOptions{}
@@ -61,6 +62,7 @@ func init() {
 	PublishImagestotarCmd.Flags().BoolVarP(&pullImage.Insecure, "insecure", "", false, "Trusts the server certificate without validating it (optional)")
 	PublishImagestotarCmd.Flags().StringVarP(&pullImage.CaCertificate, "ca-certificate", "", "", "The private repository’s CA certificate  (optional)")
 	pullImage.ImageDetails = map[string]string{}
+	PublishImagestotarCmd.Flags().StringVarP(&pullImage.TkgCustomCompatibilityImage, "tkg-custom-compatibility-image-path", "", "", "TKG compatibility image path in special case(optional)")
 }
 
 func (p *PublishImagesToTarOptions) DownloadTkgCompatibilityImage() error {
@@ -70,7 +72,9 @@ func (p *PublishImagesToTarOptions) DownloadTkgCompatibilityImage() error {
 
 	tkgCompatibilityRelativeImagePath := "tkg-compatibility"
 
-	if !imgpkginterface.IsTKGRTMVersion(p.TkgVersion) {
+	if p.TkgCustomCompatibilityImage != "" {
+		tkgCompatibilityRelativeImagePath = p.TkgCustomCompatibilityImage
+	} else if !imgpkginterface.IsTKGRTMVersion(p.TkgVersion) {
 		tkgCompatibilityRelativeImagePath = path.Join(p.TkgVersion, tkgCompatibilityRelativeImagePath)
 	}
 	tkgCompatibilityImagePath := path.Join(p.TkgImageRepo, tkgCompatibilityRelativeImagePath)


Test patch: