From f020ef6607f4fb999109fe4e8299258db5c111af Mon Sep 17 00:00:00 2001 From: Renis Makadia Date: Wed, 22 Mar 2017 21:15:40 -0700 Subject: [PATCH] =?UTF-8?q?Fixed=20issue=20#207=20by=20Updated=20Nova?= =?UTF-8?q?=E2=80=99s=20Label=20(key/value=20pair)=20and=20Replicas=20for?= =?UTF-8?q?=20consistency=20in=20values.yaml.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nova/templates/daemonset-compute.yaml | 2 +- nova/templates/daemonset-libvirt.yaml | 2 +- nova/templates/deployment-api-metadata.yaml | 4 +-- nova/templates/deployment-api-osapi.yaml | 4 +-- nova/templates/deployment-conductor.yaml | 4 +-- nova/templates/deployment-consoleauth.yaml | 4 +-- nova/templates/deployment-scheduler.yaml | 4 +-- nova/templates/job-db-init.yaml | 2 +- nova/templates/job-db-sync.yaml | 2 +- nova/templates/job-ks-endpoints.yaml | 2 +- nova/templates/job-ks-service.yaml | 2 +- nova/templates/job-ks-user.yaml | 2 +- nova/values.yaml | 39 +++++++++++++++++---- 13 files changed, 49 insertions(+), 24 deletions(-) diff --git a/nova/templates/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml index 9c282873a9..fa0938c835 100644 --- a/nova/templates/daemonset-compute.yaml +++ b/nova/templates/daemonset-compute.yaml @@ -31,7 +31,7 @@ spec: ]' spec: nodeSelector: - {{ .Values.labels.compute_node_selector_key }}: {{ .Values.labels.compute_node_selector_value }} + {{ .Values.labels.agent.compute.node_selector_key }}: {{ .Values.labels.agent.compute.node_selector_value }} securityContext: runAsUser: 0 hostNetwork: true diff --git a/nova/templates/daemonset-libvirt.yaml b/nova/templates/daemonset-libvirt.yaml index c013c4df58..f66f64d5c9 100644 --- a/nova/templates/daemonset-libvirt.yaml +++ b/nova/templates/daemonset-libvirt.yaml @@ -31,7 +31,7 @@ spec: ]' spec: nodeSelector: - {{ .Values.labels.compute_node_selector_key }}: {{ .Values.labels.compute_node_selector_value }} + {{ .Values.labels.agent.libvirt.node_selector_key }}: {{ .Values.labels.agent.libvirt.node_selector_value }} securityContext: runAsUser: 0 hostNetwork: true diff --git a/nova/templates/deployment-api-metadata.yaml b/nova/templates/deployment-api-metadata.yaml index 4f0454bfc7..0aeac13202 100644 --- a/nova/templates/deployment-api-metadata.yaml +++ b/nova/templates/deployment-api-metadata.yaml @@ -19,7 +19,7 @@ kind: Deployment metadata: name: nova-api-metadata spec: - replicas: {{ .Values.control_replicas }} + replicas: {{ .Values.replicas.api_metadata }} revisionHistoryLimit: {{ .Values.upgrades.revision_history }} strategy: type: {{ .Values.upgrades.pod_replacement_strategy }} @@ -40,7 +40,7 @@ spec: ]' spec: nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.api_metadata.node_selector_key }}: {{ .Values.labels.api_metadata.node_selector_value }} containers: - name: nova-api image: {{ .Values.images.api }} diff --git a/nova/templates/deployment-api-osapi.yaml b/nova/templates/deployment-api-osapi.yaml index b025f7e69d..bbf548ada9 100644 --- a/nova/templates/deployment-api-osapi.yaml +++ b/nova/templates/deployment-api-osapi.yaml @@ -19,7 +19,7 @@ kind: Deployment metadata: name: nova-api-osapi spec: - replicas: {{ .Values.control_replicas }} + replicas: {{ .Values.replicas.osapi }} revisionHistoryLimit: {{ .Values.upgrades.revision_history }} strategy: type: {{ .Values.upgrades.pod_replacement_strategy }} @@ -40,7 +40,7 @@ spec: ]' spec: nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.osapi.node_selector_key }}: {{ .Values.labels.osapi.node_selector_value }} containers: - name: nova-osapi image: {{ .Values.images.api }} diff --git a/nova/templates/deployment-conductor.yaml b/nova/templates/deployment-conductor.yaml index 446cc47ad6..e957155242 100644 --- a/nova/templates/deployment-conductor.yaml +++ b/nova/templates/deployment-conductor.yaml @@ -19,7 +19,7 @@ kind: Deployment metadata: name: nova-conductor spec: - replicas: {{ .Values.control_replicas }} + replicas: {{ .Values.replicas.conductor }} revisionHistoryLimit: {{ .Values.upgrades.revision_history }} strategy: type: {{ .Values.upgrades.pod_replacement_strategy }} @@ -40,7 +40,7 @@ spec: ]' spec: nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.conductor.node_selector_key }}: {{ .Values.labels.conductor.node_selector_value }} containers: - name: nova-conductor image: {{ .Values.images.conductor }} diff --git a/nova/templates/deployment-consoleauth.yaml b/nova/templates/deployment-consoleauth.yaml index 92d872f63c..986e211472 100644 --- a/nova/templates/deployment-consoleauth.yaml +++ b/nova/templates/deployment-consoleauth.yaml @@ -19,7 +19,7 @@ kind: Deployment metadata: name: nova-consoleauth spec: - replicas: {{ .Values.control_replicas }} + replicas: {{ .Values.replicas.consoleauth }} revisionHistoryLimit: {{ .Values.upgrades.revision_history }} strategy: type: {{ .Values.upgrades.pod_replacement_strategy }} @@ -40,7 +40,7 @@ spec: ]' spec: nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.consoleauth.node_selector_key }}: {{ .Values.labels.consoleauth.node_selector_value }} containers: - name: nova-consoleauth image: {{ .Values.images.consoleauth }} diff --git a/nova/templates/deployment-scheduler.yaml b/nova/templates/deployment-scheduler.yaml index d69f0344bc..97993174e0 100644 --- a/nova/templates/deployment-scheduler.yaml +++ b/nova/templates/deployment-scheduler.yaml @@ -19,7 +19,7 @@ kind: Deployment metadata: name: nova-scheduler spec: - replicas: {{ .Values.control_replicas }} + replicas: {{ .Values.replicas.scheduler }} revisionHistoryLimit: {{ .Values.upgrades.revision_history }} strategy: type: {{ .Values.upgrades.pod_replacement_strategy }} @@ -40,7 +40,7 @@ spec: ]' spec: nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.scheduler.node_selector_key }}: {{ .Values.labels.scheduler.node_selector_value }} containers: - name: nova-scheduler image: {{ .Values.images.scheduler }} diff --git a/nova/templates/job-db-init.yaml b/nova/templates/job-db-init.yaml index 7107b97566..ee36c41d41 100644 --- a/nova/templates/job-db-init.yaml +++ b/nova/templates/job-db-init.yaml @@ -28,7 +28,7 @@ spec: spec: restartPolicy: OnFailure nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} containers: - name: nova-db-init image: {{ .Values.images.db_init }} diff --git a/nova/templates/job-db-sync.yaml b/nova/templates/job-db-sync.yaml index aa2fc94880..cdabcff96a 100644 --- a/nova/templates/job-db-sync.yaml +++ b/nova/templates/job-db-sync.yaml @@ -28,7 +28,7 @@ spec: spec: restartPolicy: OnFailure nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} containers: - name: nova-db-sync image: {{ .Values.images.db_sync }} diff --git a/nova/templates/job-ks-endpoints.yaml b/nova/templates/job-ks-endpoints.yaml index 3852a0e9c5..70874bab02 100644 --- a/nova/templates/job-ks-endpoints.yaml +++ b/nova/templates/job-ks-endpoints.yaml @@ -29,7 +29,7 @@ spec: spec: restartPolicy: OnFailure nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} containers: {{- range $key1, $osServiceType := tuple "compute" }} {{- range $key2, $osServiceEndPoint := tuple "admin" "internal" "public" }} diff --git a/nova/templates/job-ks-service.yaml b/nova/templates/job-ks-service.yaml index a30cdc162c..0f6d70d4a4 100644 --- a/nova/templates/job-ks-service.yaml +++ b/nova/templates/job-ks-service.yaml @@ -29,7 +29,7 @@ spec: spec: restartPolicy: OnFailure nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} containers: {{- range $key1, $osServiceType := tuple "compute" }} - name: {{ $osServiceType }}-ks-service-registration diff --git a/nova/templates/job-ks-user.yaml b/nova/templates/job-ks-user.yaml index 43c62851d4..64344f264a 100644 --- a/nova/templates/job-ks-user.yaml +++ b/nova/templates/job-ks-user.yaml @@ -30,7 +30,7 @@ spec: spec: restartPolicy: OnFailure nodeSelector: - {{ .Values.labels.control_node_selector_key }}: {{ .Values.labels.control_node_selector_value }} + {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} containers: - name: nova-ks-user image: {{ .Values.images.ks_user }} diff --git a/nova/values.yaml b/nova/values.yaml index 808ef434cb..9a9c7996b6 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -18,13 +18,38 @@ # name: value labels: - control_node_selector_key: openstack-control-plane - control_node_selector_value: enabled - compute_node_selector_key: openstack-compute-node - compute_node_selector_value: enabled - -control_replicas: 1 -compute_replicas: 1 + agent: + compute: + node_selector_key: openstack-compute-node + node_selector_value: enabled + libvirt: + node_selector_key: openstack-compute-node + node_selector_value: enabled + conductor: + node_selector_key: openstack-control-plane + node_selector_value: enabled + consoleauth: + node_selector_key: openstack-control-plane + node_selector_value: enabled + scheduler: + node_selector_key: openstack-control-plane + node_selector_value: enabled + osapi: + node_selector_key: openstack-control-plane + node_selector_value: enabled + api_metadata: + node_selector_key: openstack-control-plane + node_selector_value: enabled + job: + node_selector_key: openstack-control-plane + node_selector_value: enabled + +replicas: + api_metadata: 1 + osapi: 1 + conductor: 1 + consoleauth: 1 + scheduler: 1 images: db_init: quay.io/stackanetes/stackanetes-kolla-toolbox:newton