-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue-590, ingestNodes for OpenSearch in API v2 #610
Conversation
5f4281f
to
1f52059
Compare
@@ -55,7 +55,8 @@ type OpenSearchSpec struct { | |||
BundledUseOnly bool `json:"bundledUseOnly,omitempty"` | |||
UserRefs []*UserReference `json:"userRefs,omitempty"` | |||
//+kubuilder:validation:MaxItems:=1 | |||
ResizeSettings []*ResizeSettings `json:"resizeSettings,omitempty"` | |||
ResizeSettings []*ResizeSettings `json:"resizeSettings,omitempty"` | |||
OpenSearchIngestNode []*OpenSearchIngestNode `json:"ingestNodes,omitempty"` |
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.
OpenSearchIngestNode -> OpenSearchIngestNodes
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.
fixed
1f52059
to
c41c745
Compare
c41c745
to
29ccb49
Compare
@@ -56,6 +56,8 @@ type OpenSearchSpec struct { | |||
UserRefs []*UserReference `json:"userRefs,omitempty"` | |||
//+kubuilder:validation:MaxItems:=1 | |||
ResizeSettings []*ResizeSettings `json:"resizeSettings,omitempty"` | |||
//+kubuilder:validation:MaxItems:=1 | |||
OpenSearchIngestNodes []*OpenSearchIngestNodes `json:"ingestNodes,omitempty"` |
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.
[]*OpenSearchIngestNodes -> []*OpenSearchIngestNode
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.
It has multiple nodes, so I use plural form
l.Info("The node has been successfully reloaded", | ||
"Node ID", nrs.Status.NodeInProgress.ID, | ||
"Node ID", nodeReloadStatus.NodeID, | ||
) | ||
r.EventRecorder.Eventf(nrs, models.Normal, models.UpdatedEvent, | ||
"Node %s has been successfully reloaded", nrs.Status.NodeInProgress.ID, | ||
"Node %s has been successfully reloaded", nodeReloadStatus.NodeID, |
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.
Revert these changes please
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.
replaced with "nrs.Status"
@@ -211,6 +219,17 @@ func (oss *OpenSearchSpec) dataNodesToInstAPI() (iDataNodes []*models.OpenSearch | |||
return | |||
} | |||
|
|||
func (oss *OpenSearchSpec) ingestNodesToInstAPI() (iIngestNodes []*models.OpenSearchIngestNodes) { | |||
for _, ingestNodes := range oss.OpenSearchIngestNodes { |
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.
ingestNodes -> ingestNode
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.
Fixed
@@ -56,6 +56,8 @@ type OpenSearchSpec struct { | |||
UserRefs []*UserReference `json:"userRefs,omitempty"` | |||
//+kubuilder:validation:MaxItems:=1 | |||
ResizeSettings []*ResizeSettings `json:"resizeSettings,omitempty"` | |||
//+kubuilder:validation:MaxItems:=1 | |||
OpenSearchIngestNodes []*OpenSearchIngestNodes `json:"ingestNodes,omitempty"` |
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.
OpenSearch- prefix in field name is unnecessary.
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.
Fixed
pkg/models/opensearch_apiv2.go
Outdated
AlertingPlugin bool `json:"alertingPlugin"` | ||
ResizeSettings []*ResizeSettings `json:"resizeSettings,omitempty"` | ||
Description string `json:"description,omitempty"` | ||
OpenSearchIngestNodes []*OpenSearchIngestNodes `json:"ingestNodes,omitempty"` |
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.
OpenSearch
prefix is not necessary because it's obvious that they are nodes of OpenSearch cluster
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.
Fixed
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
29ccb49
to
3bcec33
Compare
No description provided.