Tanzu Mission Control "contour" package showing unmanaged
search cancel

Tanzu Mission Control "contour" package showing unmanaged

book

Article ID: 372388

calendar_today

Updated On:

Products

VMware Tanzu Mission Control

Issue/Introduction

You will not be able to edit the contour package eventhough it is deployed through TMC.
Package will show "Managed" as "No". 

Cause

Below could have happened to the cluster where some of the packages show unmanaged

1. The cluster was attached
2. Some packages were installed (in this case let's consider contour) - the package installs were managed package installs at this point
3. The cluster was detached
4. The same cluster was attached again
5. The previously installed managed package installs now got discovered as unmanaged package installs by TMC and probably this state was overlooked at that time.

If we verify the state in the db for the package install, the cluster UID of the cluster is different from the cluster UID in the annotation of package install. This means cluster was initially registered with certain UID and the package contour was installed and later it was detached and attached again where the cluster UID was changed.

The same can be verified by running below command 

kubectl get pkgi contour -n tanzu-system-ingress -oyaml | grep "tmc.cloud.vmware.com/managed-tanzu-package-install"

The above output should have the old cluster UID

Resolution

Since the packages are not managed, it can not be edited through TMC. Here are the steps you can try as a workaround.

1. Get the inline values secret name(this secret holds the package install's configuration)

kubectl get pkgi contour -n tanzu-system-ingress -oyaml | yq '.spec.values[0].secretRef.name' 

2. Convert the new configuration to base64 encoded json. Here config.yaml is the new configuration you want to apply to the package install(given in the overlay section of TMC UI) this should be in yaml format.
We convert this yaml to json using yq and jq and base64 encode the content.

yq eval config.yaml -o=json | jq -c | tr -d '\n' | base64 

3. Patch the inline values secret. 

kubectl patch secret <secret-name-from-command-1> -n tanzu-system-ingress --type='json' -p='[{"op": "replace", "path": "/data/inline-values", "value": "<output-from-command-2>"}]' 

Additional Information

This issue will be resolved soon which makes TMC installed packages as managed.