-
Notifications
You must be signed in to change notification settings - Fork 41
Issue #207 Stnd control plane node issue #302
Issue #207 Stnd control plane node issue #302
Conversation
@renmak Thanks for taking this on. I looked through the comments on PR #285, and this gets us closer. However, I think it doesn't quite get us to where @alanmeadows suggested for the labels for nova. Instead of having a blanket approach to labels under a |
@wilkers-steve @v1k0d3n @alanmeadows consoleauth: openstack-compute-node We will refer to above key value as Is this what you guys have in mind? Thanks |
This looks good, except I agree with steve, lets just break it out, and simultaneously, achieve parity with neutron and its agent approach:
also, even though its outside this pull request, can we fix
|
@alanmeadows @wilkers-steve @v1k0d3n @intlabs Thanks Alan for feedback. So based on your feedback, this is what i came up with. Please correct me if this is incorrect. So based on openstack-helm/nova/templates/ each, daemonset and deployment have been addressed below.
|
Libvirt isn't really an agent, but this could work for now
Note the All the other definitions are fine, but what is |
k that's my misunderstanding. But that brings up a question. We have total 5 jobs. db-init, db-sync, ks-endpoints, ks-service and ks-user. Each of these jobs refers to openstack-control-plane. Which label do we use for these jobs? |
I would just add the below and have them refer to this. I do not think we have standardized this approach (allowing jobs (as a holistic category) to target their label), but a separate pull request could introduce this pattern everywhere:
Defining a label for each job may be overkill. |
Thanks for clarification Alan. As per your suggestions on Replicas, here is what i was planning.
I will make needed code changes and update this PR. |
All sounds fine except I would ensure metadata has its own replica declaration, much like api-metadata does. This gives you parity with labels. Also, if we're calling it "osapi" consistently, lets use that for replicas as well. The goal is consistent naming between the names within the deployment manifests themselves, the replica fields, and the label fields so that all three match as closely as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@renmak This is looking good. A few things to address then this looks close to good for me
@@ -31,7 +31,7 @@ spec: | |||
]' | |||
spec: | |||
nodeSelector: | |||
{{ .Values.labels.compute_node_selector_key }}: {{ .Values.labels.compute_node_selector_value }} | |||
{{ .Values.labels.agent.libvert.node_selector_key }}: {{ .Values.labels.agent.libvert.node_selector_value }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/libvert/libvirt
nova/values.yaml
Outdated
compute: | ||
node_selector_key: openstack-compute-plane | ||
node_selector_value: enabled | ||
libvert: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/libvert/libvirt
nova/values.yaml
Outdated
compute_replicas: 1 | ||
agent: | ||
compute: | ||
node_selector_key: openstack-compute-plane |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be openstack-compute-node
instead of openstack-compute-plane
nova/values.yaml
Outdated
node_selector_key: openstack-compute-plane | ||
node_selector_value: enabled | ||
libvert: | ||
node_selector_key: openstack-compute-plane |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also openstack-compute-node
, not openstack-compute-plane
I will squash all these commits into one final commit |
329d281
to
fd953d8
Compare
@@ -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 }} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @wilkers-steve or other cores, i think we can merge this in when you're ready.
@@ -19,7 +19,7 @@ kind: Deployment | |||
metadata: | |||
name: nova-api-metadata | |||
spec: | |||
replicas: {{ .Values.control_replicas }} | |||
replicas: {{ .Values.replicas.api-metadata }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helm won't be able to package up the chart with .Values.replicas.api-metadata
. You can only use alphanumeric and underscores in YAML keys. Something like .Values.replicas.api_metadata
will build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @larryrensing
@@ -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 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
nova/values.yaml
Outdated
node_selector_value: enabled | ||
|
||
replicas: | ||
api-metadata: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
nova/values.yaml
Outdated
osapi: | ||
node_selector_key: openstack-control-plane | ||
node_selector_value: enabled | ||
api-metadata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
nova/values.yaml
Outdated
@@ -16,15 +16,39 @@ | |||
# This is a YAML-formatted file. | |||
# Declare name/value pairs to be passed into your templates. | |||
# name: value | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep this space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@renmak, @larryrensing pointed out the remaining issues that should be addressed before we merge this in. Once those are complete, I think this should be good.
Thanks for review and catching bug. I will work on this today and get code changes in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work @renmak, and good catch @larryrensing. LGTM.
…nd Replicas for consistency in values.yaml.
5f90fd1
to
f020ef6
Compare
K so update one final commit with all changes. Thanks @v1k0d3n @wilkers-steve @larryrensing |
@renmak This looks good. Thanks for fixing this. Pulled it down locally and everything runs fine. I'll go ahead and merge this in once @larryrensing signs off on the changes being satisfactory |
LGTM :) I'd merge @wilkers-steve |
What is the purpose of this pull request?: Updating Nova label name and value to align with how labels are used in Neutron
What issue does this pull request address?: Fixes issue #207. Also this new PR replaces previous PR #285
Notes for reviewers to consider: Please look at comment from Allan in PR #285. My new changes in this PR are based on his comment.
Specific reviewers for pull request: @alanmeadows @v1k0d3n