From 0f22d2b0e41874eeef1ecc6f1c1116d245f0ff4d Mon Sep 17 00:00:00 2001
From: Pete Birley <pete@port.direct>
Date: Mon, 28 Aug 2017 10:35:53 -0500
Subject: [PATCH] Magnum: Fix chart decomposition statements

There were some errors inthe magnum chart decomposition values
and conditionals. This PS resolves them.

Change-Id: Ie3617c7431cf2a3379b5ede8af0838f833d0554c
---
 magnum/templates/deployment-api.yaml        | 2 +-
 magnum/templates/ingress-api.yaml           | 2 +-
 magnum/templates/job-bootstrap.yaml         | 2 +-
 magnum/templates/job-db-init.yaml           | 2 +-
 magnum/templates/job-db-sync.yaml           | 2 +-
 magnum/templates/job-ks-endpoints.yaml      | 2 +-
 magnum/templates/job-ks-service.yaml        | 2 +-
 magnum/templates/job-ks-user.yaml           | 2 +-
 magnum/templates/pdb-api.yaml               | 2 +-
 magnum/templates/secret-db.yaml             | 2 +-
 magnum/templates/secret-keystone.yaml       | 2 +-
 magnum/templates/service-api.yaml           | 2 +-
 magnum/templates/service-ingress-api.yaml   | 2 +-
 magnum/templates/statefulset-conductor.yaml | 2 +-
 magnum/values.yaml                          | 1 -
 15 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/magnum/templates/deployment-api.yaml b/magnum/templates/deployment-api.yaml
index dce937f1f2..54fbe53630 100644
--- a/magnum/templates/deployment-api.yaml
+++ b/magnum/templates/deployment-api.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.deployment_api }}
 {{- $envAll := . }}
 {{- $dependencies := .Values.dependencies.api }}
 {{- $mounts_magnum_api := .Values.pod.mounts.magnum_api.magnum_api }}
diff --git a/magnum/templates/ingress-api.yaml b/magnum/templates/ingress-api.yaml
index 1dee12dcf2..0cf1394044 100644
--- a/magnum/templates/ingress-api.yaml
+++ b/magnum/templates/ingress-api.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.ingress_api }}
 {{- $envAll := . }}
 {{- if .Values.network.api.ingress.public }}
 ---
diff --git a/magnum/templates/job-bootstrap.yaml b/magnum/templates/job-bootstrap.yaml
index 1dc3d04ad9..841f3c67d2 100644
--- a/magnum/templates/job-bootstrap.yaml
+++ b/magnum/templates/job-bootstrap.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.job_bootstrap }}
 {{- $envAll := . }}
 {{- if .Values.bootstrap.enabled }}
 {{- $dependencies := .Values.dependencies.bootstrap }}
diff --git a/magnum/templates/job-db-init.yaml b/magnum/templates/job-db-init.yaml
index 6f1cf0d345..9db9b92f94 100644
--- a/magnum/templates/job-db-init.yaml
+++ b/magnum/templates/job-db-init.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.job_db_init }}
 {{- $envAll := . }}
 {{- $dependencies := .Values.dependencies.db_init }}
 ---
diff --git a/magnum/templates/job-db-sync.yaml b/magnum/templates/job-db-sync.yaml
index aa27bf2f9e..5fc2753a7f 100644
--- a/magnum/templates/job-db-sync.yaml
+++ b/magnum/templates/job-db-sync.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.job_db_sync }}
 {{- $envAll := . }}
 {{- $dependencies := .Values.dependencies.db_sync }}
 ---
diff --git a/magnum/templates/job-ks-endpoints.yaml b/magnum/templates/job-ks-endpoints.yaml
index 35e5631946..a1bfd27ac1 100644
--- a/magnum/templates/job-ks-endpoints.yaml
+++ b/magnum/templates/job-ks-endpoints.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.job_ks_endpoints }}
 {{- $envAll := . }}
 {{- $dependencies := .Values.dependencies.ks_endpoints }}
 ---
diff --git a/magnum/templates/job-ks-service.yaml b/magnum/templates/job-ks-service.yaml
index facfc95287..fbce1fa7c7 100644
--- a/magnum/templates/job-ks-service.yaml
+++ b/magnum/templates/job-ks-service.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.job_ks_service }}
 {{- $envAll := . }}
 {{- $dependencies := .Values.dependencies.ks_service }}
 ---
diff --git a/magnum/templates/job-ks-user.yaml b/magnum/templates/job-ks-user.yaml
index 401dd158a1..89e5e87dba 100644
--- a/magnum/templates/job-ks-user.yaml
+++ b/magnum/templates/job-ks-user.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.job_ks_user }}
 {{- $envAll := . }}
 {{- $dependencies := .Values.dependencies.ks_user }}
 ---
diff --git a/magnum/templates/pdb-api.yaml b/magnum/templates/pdb-api.yaml
index f032dd0e8a..bf3711b0a0 100644
--- a/magnum/templates/pdb-api.yaml
+++ b/magnum/templates/pdb-api.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.pdb_api }}
 {{- $envAll := . }}
 ---
 apiVersion: policy/v1beta1
diff --git a/magnum/templates/secret-db.yaml b/magnum/templates/secret-db.yaml
index 79c2eac745..45d8802f13 100644
--- a/magnum/templates/secret-db.yaml
+++ b/magnum/templates/secret-db.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.secret_db }}
 {{- $envAll := . }}
 {{- range $key1, $userClass := tuple "admin" "user" }}
 {{- $secretName := index $envAll.Values.secrets.oslo_db $userClass }}
diff --git a/magnum/templates/secret-keystone.yaml b/magnum/templates/secret-keystone.yaml
index 8870cee498..2f159e2981 100644
--- a/magnum/templates/secret-keystone.yaml
+++ b/magnum/templates/secret-keystone.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.secret_keystone }}
 {{- $envAll := . }}
 {{- range $key1, $userClass := tuple "admin" "user" }}
 {{- $secretName := index $envAll.Values.secrets.identity $userClass }}
diff --git a/magnum/templates/service-api.yaml b/magnum/templates/service-api.yaml
index b236f877ca..5ac2409594 100644
--- a/magnum/templates/service-api.yaml
+++ b/magnum/templates/service-api.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.service_api }}
 {{- $envAll := . }}
 ---
 apiVersion: v1
diff --git a/magnum/templates/service-ingress-api.yaml b/magnum/templates/service-ingress-api.yaml
index b18358e0c4..79546a644e 100644
--- a/magnum/templates/service-ingress-api.yaml
+++ b/magnum/templates/service-ingress-api.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.service_ingress_api }}
 {{- $envAll := . }}
 {{- if .Values.network.api.ingress.public }}
 ---
diff --git a/magnum/templates/statefulset-conductor.yaml b/magnum/templates/statefulset-conductor.yaml
index 5944b39395..9127a8db28 100644
--- a/magnum/templates/statefulset-conductor.yaml
+++ b/magnum/templates/statefulset-conductor.yaml
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */}}
 
-{{- if .Values.manifests.configmap_etc }}
+{{- if .Values.manifests.statefulset_conductor }}
 {{- $envAll := . }}
 {{- $dependencies := .Values.dependencies.conductor }}
 {{- $mounts_magnum_conductor := .Values.pod.mounts.magnum_conductor.magnum_conductor }}
diff --git a/magnum/values.yaml b/magnum/values.yaml
index b57f5b28e0..5bc293957b 100644
--- a/magnum/values.yaml
+++ b/magnum/values.yaml
@@ -367,6 +367,5 @@ manifests:
   secret_db: true
   secret_keystone: true
   service_api: true
-  service_cfn: true
   service_ingress_api: true
   statefulset_conductor: true