From 64190dfc73e35fb9b6e3acb4e5cbe67c4be413bd Mon Sep 17 00:00:00 2001
From: keyboardfann <keyboardfann@gmail.com>
Date: Mon, 16 Mar 2020 18:32:36 +0800
Subject: [PATCH] Fix deploy heketi show selector missing error. (#5738)

---
 .../roles/provision/templates/glusterfs-daemonset.json.j2    | 5 +++++
 .../roles/provision/templates/heketi-bootstrap.json.j2       | 5 +++++
 .../roles/provision/templates/heketi-deployment.json.j2      | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/contrib/network-storage/heketi/roles/provision/templates/glusterfs-daemonset.json.j2 b/contrib/network-storage/heketi/roles/provision/templates/glusterfs-daemonset.json.j2
index 15efb3d6a..8934fa926 100644
--- a/contrib/network-storage/heketi/roles/provision/templates/glusterfs-daemonset.json.j2
+++ b/contrib/network-storage/heketi/roles/provision/templates/glusterfs-daemonset.json.j2
@@ -12,6 +12,11 @@
         }
     },
     "spec": {
+        "selector": {
+            "matchLabels": {
+                "glusterfs-node": "daemonset"
+            }
+        },
         "template": {
             "metadata": {
                 "name": "glusterfs",
diff --git a/contrib/network-storage/heketi/roles/provision/templates/heketi-bootstrap.json.j2 b/contrib/network-storage/heketi/roles/provision/templates/heketi-bootstrap.json.j2
index 6f82bb409..7a932d049 100644
--- a/contrib/network-storage/heketi/roles/provision/templates/heketi-bootstrap.json.j2
+++ b/contrib/network-storage/heketi/roles/provision/templates/heketi-bootstrap.json.j2
@@ -42,6 +42,11 @@
         }
       },
       "spec": {
+        "selector": {
+          "matchLabels": {
+            "name": "deploy-heketi"
+          }
+        },
         "replicas": 1,
         "template": {
           "metadata": {
diff --git a/contrib/network-storage/heketi/roles/provision/templates/heketi-deployment.json.j2 b/contrib/network-storage/heketi/roles/provision/templates/heketi-deployment.json.j2
index 0cd24e167..8e09ce855 100644
--- a/contrib/network-storage/heketi/roles/provision/templates/heketi-deployment.json.j2
+++ b/contrib/network-storage/heketi/roles/provision/templates/heketi-deployment.json.j2
@@ -55,6 +55,11 @@
         }
       },
       "spec": {
+        "selector": {
+          "matchLabels": {
+            "name": "heketi"
+          }
+        },
         "replicas": 1,
         "template": {
           "metadata": {
-- 
GitLab