Disable a Custom Configuration of an Application for a Cluster

Enabled customizations are defined in a ConfigMap, which, in turn, is referenced in the spec.clusterConfigOverrides object of your AppDeployment.
Review your current configuration to establish what you want to remove:
BASHkubectl get appdeployment -n ${WORKSPACE_NAMESPACE} kube-prometheus-stack -o yamlThe output looks similar to this:
YAMLapiVersion: apps.kommander.d2iq.io/v1alpha3 kind: AppDeployment metadata: name: kube-prometheus-stack namespace: ${WORKSPACE_NAMESPACE} spec: appRef: name: kube-prometheus-stack-34.9.3 kind: ClusterApp configOverrides: name: kube-prometheus-stack-overrides-attached clusterSelector: matchExpressions: - key: kommander.d2iq.io/cluster-name operator: In values: - attached-cluster1 - attached-cluster2 clusterConfigOverrides: - configMapName: kps-cluster1-overrides clusterSelector: matchExpressions: - key: kommander.d2iq.io/cluster-name operator: In values: - attached-cluster1 - configMapName: kps-cluster2-overrides clusterSelector: matchExpressions: - key: kommander.d2iq.io/cluster-name operator: In values: - attached-cluster2Here you can see that
kube-prometheus-stackhas been enabled for theattached-cluster1andattached-cluster2. There is also a custom configuration for each of the clusters:kps-cluster1-overridesandkps-cluster2-overrides.Edit the file by deleting the
configMapNameentry of the cluster for which you would like to delete the customization. This is located under theclusterConfigOverrides:YAMLcat <<EOF | kubectl apply -f - apiVersion: apps.kommander.d2iq.io/v1alpha3 kind: AppDeployment metadata: name: kube-prometheus-stack namespace: ${WORKSPACE_NAMESPACE} spec: appRef: kind: ClusterApp name: kube-prometheus-stack-34.9.3 configOverrides: name: kube-prometheus-stack-ws-overrides clusterSelector: matchExpressions: - key: kommander.d2iq.io/cluster-name operator: In values: - attached-cluster1 clusterConfigOverrides: - configMapName: kps-cluster1-overrides clusterSelector: matchExpressions: - key: kommander.d2iq.io/cluster-name operator: In values: - attached-cluster1 EOFCompare steps one and two for a reference of how an entry should be deleted.
Before deleting a
ConfigMapthat contains your customization, ensure you will NOT require it at a later time. It is not possible to restore a deletedConfigMap.
If you choose to delete it, run:
kubectl delete configmap <name_configmap> -n ${WORKSPACE_NAMESPACE}
It is NOT possible to delete a ConfigMap that is being actively used and referenced in the configOverride of any AppDeployment.
Verify the Current Configuration of your Application
Refer to the Verify applications help to connect to the managed or attached cluster and check the status of the deployments.
If you want to know how the AppDeployment resource is currently configured, refer to the Print and review the state of your AppDeployment section.