-
Notifications
You must be signed in to change notification settings - Fork 26
Add cluster settings api #546
Add cluster settings api #546
Conversation
282a626
to
d766028
Compare
d766028
to
5b50b6b
Compare
af936e5
to
89684f8
Compare
de55e1b
to
f85baf4
Compare
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.
I have some hard feelings about did.
We already did a huge effort creating the "/checks/:id/settings"
group of endpoint for this exact purpose.
This PR in my opinion totally overlaps this.
Did we consider simply adding the connection data information to the currently existing endpoints?
In essence, the information used in the runner, and shown in the frontend is exactly the same
@@ -186,6 +186,7 @@ func NewAppWithDeps(config *Config, deps Dependencies) (*App, error) { | |||
apiGroup.POST("/clusters/:id/tags", ApiClusterCreateTagHandler(deps.clustersService, deps.tagsService)) | |||
apiGroup.DELETE("/clusters/:id/tags/:tag", ApiClusterDeleteTagHandler(deps.clustersService, deps.tagsService)) | |||
apiGroup.GET("/clusters/:cluster_id/results", ApiClusterCheckResultsHandler(deps.consul, deps.checksService)) | |||
apiGroup.GET("/clusters/settings", ApiGetClustersSettingsHandler(deps.clustersService)) |
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.
I'm super confused with this.
We already have the "/checks/:id/settings"
end point for this. Where the id
is the ansible group id (as we need to group the ansible checks by group0.
This was named on purpose this way, as we were already seeing high changes to have other checks groups (like SAP system wide checks, or SAP landscapes wide checks)
cf2e948
to
116abd0
Compare
116abd0
to
bb6caa2
Compare
bb6caa2
to
24bb748
Compare
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.
Mega-LGTM
All the changes have been addressed already and there's team consensous on those
This PR exposes an api at
GET /api/clusters/settings
to retrieve the clusters settings for the runner to provide to Ansible.Involved settings are:
address
anduser
to enable ansible connectionExample API response.
This allows the runner to only call one API and provided useful information to Ansible and remove consul dependency from the runner itself (next PR).