Skip to content

[API] Clean up the cluster-service API #3220

Open
@foot

Description

@foot

Motivation: customers want to use our APIs! Lets tidy them up before giving users access

  • Make sure all methods have docstrings
  • Make sure all ambiguous param names have examples
  • Tags are a mix of TitleCase and lowercase
  • For most resources we want to have
    • "single pane of glass" endpoint, e.g. GET /api/v1/helm-releases, that returns all helm-releases on all cluster on all namespace that the user can see.
    • Then for accessing a specific resource you have to use the very long path: /v1/namespaces/{clusterNamespace}/clusters/{clusternname}/namespace/{resNamespace}/helm-releases/{resName}
  • Some endpoints have legacy naming:
    • POST /api/clusters to create a PR from a template, this should be POST /v1/templates/pull-request
  • Make sure all message fields are snake_case (@simon double check this std. w/ google etc.)
  • Check docstrings all make sense, and omit the name of message (function) in the proto file.
  • kebab-case the resource names in the api endpoints, e.g. /helm-releases/ not /helm_releases/ (this is an OSS resource)

Tasks here:

  • review *.proto files in OSS
  • review *.proto files in EE
  • Update, re-gen

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions