Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Issue #207 Stnd control plane node issue #302

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nova/templates/daemonset-compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nova/templates/daemonset-libvirt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions nova/templates/deployment-api-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions nova/templates/deployment-api-osapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions nova/templates/deployment-conductor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions nova/templates/deployment-consoleauth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions nova/templates/deployment-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion nova/templates/job-db-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion nova/templates/job-db-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we going to assign jobs to different nodes than our deployments?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though unlikely there is a small possibility that some people may want to do this; as these pods will contain things like root db creds that the wider control-plane population will never see.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough. sounds good to me. :)

containers:
- name: nova-db-sync
image: {{ .Values.images.db_sync }}
Expand Down
2 changes: 1 addition & 1 deletion nova/templates/job-ks-endpoints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand Down
2 changes: 1 addition & 1 deletion nova/templates/job-ks-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion nova/templates/job-ks-user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
39 changes: 32 additions & 7 deletions nova/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down