Skip to content

Commit

Permalink
Fix exception if no data in certs config map (#18519)
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
  • Loading branch information
mmorhun authored Dec 3, 2020
1 parent 3231363 commit 2864592
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ public void provision(KubernetesEnvironment k8sEnv, RuntimeIdentity runtimeID)

KubernetesNamespace namespace = namespaceFactory.getOrCreate(runtimeID);
Optional<ConfigMap> existing = namespace.configMaps().get(configMapName);
if (existing.isEmpty() || !existing.get().getData().equals(allCaCertsConfigMap.getData())) {
if (existing.isEmpty()
|| !(existing.get().getData() == allCaCertsConfigMap.getData()
|| existing.get().getData().equals(allCaCertsConfigMap.getData()))) {
// create or renew map
k8sEnv
.getConfigMaps()
Expand Down

0 comments on commit 2864592

Please sign in to comment.