Problem
We have identified an issue with Kommander where disabling enterprise apps such as Kubecost did not persist after a license update. This bug is caused by the license controller which redeploys apps after some time or whenever the license is updated. This unexpected behavior can lead to conflicts and resource consumption issues, mainly if these enterprise apps are intentionally disabled.
Affected DKP Versions
It is unclear which versions are affected, but according to the abovementioned bug, the problem should be fixed in DKP v2.4.1 and DKP v2.6.0.
Solution 1 (preferable)
Upgrade to the version that has a fix (see above).
Solution 2
NOTE: The below changes will be undone during the DKP upgrade process, and the problem will reappear.
1. Clone the Flux git repository:
kubectl port-forward svc/gitea-http -n kommander 8080:443
git clone -c http.sslVerify=false https://$(kubectl -n kommander-flux get secret kommander-git-credentials -o go-template='{{.data.username|base64decode}}'):$(kubectl -n kommander-flux get secret kommander-git-credentials -o go-template='{{.data.password|base64decode}}')@localhost:8080/kommander/kommander.git
2. Open the services/kommander/0.2.3/defaults/cm.yaml
file in the repository and remove all the Kubecost-related apps in the following YAML path: data.values.yaml: |.kommander-licensing:.defaultEnterpriseApps
3. Commit the change:
git commit -am "Remove kubecost from kommander defaults"
4. Push the change:
git push
5. Wait for the following interval till the changes propagate:
kubectl get gitrepository -n kommander-flux -o yaml | grep interval
6. Remove the Kubecost-related app deployments:
kubectl delete appdeployment centralized-kubecost kubecost kubecost-thanos-traefik -n kommander
kubectl delete appdeployment kubecost kubecost-thanos-traefik -n kommander-default-workspace