The name is defined in the following code and it came from the spec. (CR)
{code:java} ObjectMeta: metav1.ObjectMeta{ Name: getConfigMapName(m), Namespace: m.Namespace, Labels: getAppLabels(m.Name), }, {code}
The problem can be in Also, I note that the fetch that should be using the same helper func to get the name and it is not .
{code:java} //fetchAppConfigMap returns the config map resource created for this instance func (r *ReconcileMobileSecurityService) fetchAppConfigMap(reqLogger logr.Logger, instance *mobilesecurityservicev1alpha1.MobileSecurityService) (*corev1.ConfigMap, error) { reqLogger.Info("Checking if the ConfigMap already exists") configMap := &corev1.ConfigMap{} err := r.client.Get(context.TODO(), types.NamespacedName{Name: instance.Spec.ConfigMapName, Namespace: instance.Namespace}, configMap) return configMap, err }
{code} |
|