mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-11-27 20:36:44 -08:00
marker: fix err messages
This commit is contained in:
2 files changed
+5
-6
No files matched your search
@@ -24,22 +24,22 @@ func GenerateConfigMap(client kubernetes.Interface, labels map[string]string, na
|
||||
Namespace: namespace,
|
||||
Labels: labels,
|
||||
}
|
||||
// Fetch the existing secret or initialize an empty one
|
||||
// Fetch the existing configmap or initialize an empty one
|
||||
existingConfigMap, err := configMapsClient.Get(ctx, name, metav1.GetOptions{})
|
||||
if err != nil {
|
||||
existingConfigMap, err = configMapsClient.Create(ctx, &corev1.ConfigMap{
|
||||
ObjectMeta: configMapMeta, Data: nil}, metav1.CreateOptions{},
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to initialize secret: %w", err)
|
||||
return fmt.Errorf("failed to initialize configmap: %w", err)
|
||||
}
|
||||
} else {
|
||||
if managedBy, ok := existingConfigMap.Labels["app.kubernetes.io/managed-by"]; ok {
|
||||
if managedBy != "matrix-tools-deployment-markers" {
|
||||
return fmt.Errorf("secret %s/%s is not managed by this matrix-tools-deployment-markers", namespace, name)
|
||||
return fmt.Errorf("configmap %s/%s is not managed by this matrix-tools-deployment-markers", namespace, name)
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("secret %s/%s is not managed by this matrix-tools-deployment-markers", namespace, name)
|
||||
return fmt.Errorf("configmap %s/%s is not managed by this matrix-tools-deployment-markers", namespace, name)
|
||||
}
|
||||
// Make sure the labels are set correctly
|
||||
existingConfigMap.Labels = labels
|
||||
@@ -69,7 +69,7 @@ func GenerateConfigMap(client kubernetes.Interface, labels map[string]string, na
|
||||
}
|
||||
}
|
||||
case "post":
|
||||
// During post-install, we update the secret with the new value as the upgrade succeeded
|
||||
// During post-install, we update the configmap with the new value as the upgrade succeeded
|
||||
existingConfigMap.Data[key] = newValue
|
||||
default:
|
||||
return fmt.Errorf("unknown step: %s", step)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import hashlib
|
||||
from base64 import b64decode
|
||||
from pathlib import Path
|
||||
|
||||
import pyhelm3
|
||||
|
||||
Reference in new issue
Block a user