VMware vSphere with Tanzu: >= v80u3
TKG Service: v3.0.0 and v3.1.0
As part of moving to TKG as a Supervisor Service, the default TKGServiceconfiguration was bundled within a Carvel package.
Since it's an object managed by Kapp, any edits will be overridden during the next package/app reconciliation, unless there are rebase rules.
The recommended fix is to update to TKG Service 3.2 version that contains the fix.
Please the below steps to workaround the issue without an upgrade by adding rebase rules.
Step 1: Create a secret in the TKG Service namespace
This secret is used to update the tkg-service-configuration-kapp-config ConfigMap
containing rebase rules for TkgServiceConfiguration
kind objects.
The object exists in the TKG Service's Namespace.
# Create file from yaml above
$
vi
tkgserviceconfiguration-rebase-rule-fix.yaml
# Get TKG SVS namespace
$ TKG_NS=$(kubectl get ns |
grep
svc-tkg |
gawk
'{print $1}'
)
# Confirm this is the namespace with the configmap we want to overlay
$ kubectl get -n ${TKG_NS} configmap tkg-service-configuration-kapp-config
# Create the secret in the TKG service namespace
$ kubectl apply -f tkgserviceconfiguration-rebase-rule-fix.yaml -n ${TKG_NS}
Step 2: Create a secret in vmware-system-supervisor-services namespace
This secret is used to update the packageInstall
for tkgs-config
to add a new ytt secret path.
# Create file from yaml above
$
vi
tkgs-config-overlay-fix.yaml
# Create the secret in the vmware-system-supervisor-services namespace
$ kubectl apply -f tkgs-config-overlay-fix.yaml
Step 3: Annotate the svc-tkg PackageInstall with the ytt secret
This step annotates the outer TKG Service package.
tkg-service-configuration-kapp-config
ConfigMap is updatedVerify the rules get applied
Verify workaround
To verify the workaround make edits to TkgServiceConfiguration and confirm they are retained for longer than 10 minutes.
Manually removing workaround
The workaround should be removed after moving to a version that fixes this issue (v3.2.0).
As part of Service upgrades, app platform only patches the spec
of TKG Service's PackageInstall
and this workaround will be carried forward until manually removed.