Skip to content
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

Clean up API #4005

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open

Clean up API #4005

wants to merge 54 commits into from

Conversation

sarataha
Copy link
Contributor

@sarataha sarataha commented Sep 12, 2023

Part of: weaveworks/weave-gitops-enterprise#3220

What changed?
Protobuf changes

  • Refactored APIs to meet the styling guide.
  • Ref: https://protobuf.dev/programming-guides/style/
  • Routes should contain dashes rather than underscores
  • Some routes removed as they were not implemented:
    • /v1/namespace/flux
    • /v1/namespaces
  • Some routes hidden from docs as INTERNAL
    • /v1/crds/{name}/is-available -- not really designed to be used by users
    • /v1/reconciled_objects -- unused, remove in a follow up PR
    • /v1/child_objects -- unused, remove in a follow up PR
    • /v1/session-logs -- discussions to remove

User-guide changes

@sarataha sarataha force-pushed the api-cleanup branch 3 times, most recently from db9882e to 3801850 Compare September 14, 2023 14:12
@sarataha sarataha marked this pull request as ready for review September 19, 2023 00:01
sarataha and others added 20 commits October 17, 2023 10:01
* Change field names to use snake-case
- They need to be treated as a single value
- add all docs
- Adds intro and reference
- Make sure they each have a single title line
- Followed by description
- Remove unimplemented methods
- buf lint fixes around camelCasing
- Updated swagger files from EE
- Featureflags must be declared as a public route
- Adds objects tag to group all "objects" routes together
- For listing events and things
- Remove unused endpoints GetReconciledObjects and GetChildObjects
- Mark some soon to be removed endpoints as internal
@foot foot requested a review from bigkevmcd October 18, 2023 08:29
@bigkevmcd
Copy link
Contributor

Weave GitOps Core API

What version should we declare? Maybe the same as the Weave GitOps version? Can we automate updating this?

GET /v1/flux/deployments

Determine which controllers are installed, their image versions, status, etc.

Maybe mention “Flux controllers” ?

GET /v1/namespaces/{namespace}/objects/{kind}/{name}

What happens if you don’t provide a cluster?

GET /v1/namespaces/{namespace}/objects/{kind}/{name}/events

What happens if you don’t provide a cluster?

GET /v1/namespaces/{namespace}/objects/{kind}/{name}/inventory

Replace kubernetes with Kubernetes

Weird linespacing here?

image

What happens if you don’t provide a clusterName?

GET /v1/objects/{kind}

It says “List objects of kind across all clusters” but there’s a clusterName parameter?

Does it only list across all clusters if you don't provide a clusterName?

Can we add an example of a labelSelector?

What happens if you don’t provide a namespace?

PATCH /v1/suspend

Doesn’t say what it does? Maybe something like “This will set the .spec.suspend field on the provided resources which will suspend reconciliation of that resource.”.

PATCH /v1/sync

Doesn’t say what it does? Maybe something like “This will trigger a reconciliation of the referenced objects.”?

GET /v1/policy-validations

Doesn’t say what it does? And I don’t quite get what it does, it looks like it’s querying for events based on involvedObject ?

What happens if you don’t provide clusterName?

GET /v1/policy-validations/{validationId}

What happens if you don’t provide clusterName?

Can we include an example validationId?

What are valid validationTypes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants