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

allow extending flux runtime ui beyond flux to create gitops runtime #4162

Merged
merged 43 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c130c5c
added gitopsruntime test for extending runtime ui ...
enekofb Dec 8, 2023
1a4d7bf
added feature flag for runtime ui
enekofb Dec 15, 2023
426dae1
adding unit flux runtime
enekofb Dec 15, 2023
3b9896f
can set configuration via feature flag
enekofb Dec 15, 2023
2943b3f
refactor file names
enekofb Dec 15, 2023
5e8f106
added integration for flux runtime api
enekofb Dec 15, 2023
7f5e979
added to listcrds
enekofb Dec 15, 2023
0dcceb4
not required
enekofb Dec 15, 2023
cefdf0b
refactored label value
enekofb Dec 15, 2023
a2ad0ea
not required
enekofb Dec 15, 2023
0234159
linted
enekofb Dec 15, 2023
e520131
gitops runtime visible in the ui and flux version only renders flux
enekofb Dec 15, 2023
25fd565
renamed flux runtime to runtime to be able to accomodate both flux an…
enekofb Dec 15, 2023
2e9707f
linted
enekofb Dec 15, 2023
9763344
extending api with listruntime* operations
enekofb Dec 18, 2023
d62e8fc
implemented runtime api endpoint
enekofb Dec 18, 2023
45a2582
restore flux runtime endpoint
enekofb Dec 18, 2023
62ced64
implemented runtime crds api handler
enekofb Dec 18, 2023
35239ac
added ui support to runtime
enekofb Dec 18, 2023
2115b9a
review pr
enekofb Dec 18, 2023
38cbb0e
fix style
enekofb Dec 18, 2023
0f1b6ec
prettified
enekofb Dec 18, 2023
29222f7
ran proto
enekofb Dec 18, 2023
e90c342
Smth. like that should work.
opudrovs Dec 19, 2023
5a74e47
just my grain of salt of the pr
enekofb Dec 19, 2023
2412c37
review PR
enekofb Dec 19, 2023
9d4d0e7
review PR
enekofb Dec 19, 2023
0f4a057
added documentation
enekofb Dec 20, 2023
c041d69
review pr
enekofb Dec 20, 2023
431c614
review pr
enekofb Dec 20, 2023
0d07ba2
added documentation on how to decorate manifests
enekofb Dec 22, 2023
2b87e0e
some more docs refactoring
enekofb Dec 22, 2023
05f8a4b
pr review
enekofb Dec 22, 2023
276f873
removed as not expected refactoring but replacement
enekofb Dec 22, 2023
2168725
removed multiple flux detection and test version logic for consistenc…
enekofb Dec 22, 2023
49f0d58
Apply suggestions from code review
enekofb Dec 22, 2023
306f513
Update website/docs/open-source/getting-started/install-OSS.mdx
enekofb Dec 22, 2023
93d08fe
exporting runtime components
enekofb Dec 22, 2023
62161d2
Update website/docs/open-source/getting-started/ui-OSS.mdx
enekofb Dec 22, 2023
314a13d
Update website/docs/open-source/getting-started/ui-OSS.mdx
enekofb Dec 22, 2023
fa4a07b
pr review comments
enekofb Dec 22, 2023
302b9f3
Update website/docs/open-source/getting-started/ui-OSS.mdx
enekofb Dec 22, 2023
e1f470a
better wording
enekofb Dec 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions api/core/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,30 @@ service Core {
};
}

/*
* ListRuntimeObjects lists Weave GitOps runtime components.
* Weave GitOps runtime is composed of Flux runtime but also other components
* in the ecosystem like TF-controller or Policy Agent.
*/
rpc ListRuntimeObjects(ListRuntimeObjectsRequest)
returns (ListRuntimeObjectsResponse) {
option (google.api.http) = {
get: "/v1/runtime_objects"
};
}

/*
* ListRuntimeCrds lists Weave GitOps runtime components CRDs.
* Weave GitOps runtime is composed of Flux runtime but also other components
* in the ecosystem like TF-controller or Policy Agent.
*/
rpc ListRuntimeCrds(ListRuntimeCrdsRequest)
returns (ListRuntimeCrdsResponse) {
option (google.api.http) = {
get: "/v1/runtime_crds"
};
}

/*
* GetReconciledObjects returns a list of objects that were created
* as a result of reconciling a Flux automation.
Expand Down Expand Up @@ -318,6 +342,16 @@ message ListFluxRuntimeObjectsResponse {
repeated ListError errors = 2;
}

message ListRuntimeObjectsRequest {
string namespace = 1;
string clusterName = 2;
}

message ListRuntimeObjectsResponse {
repeated Deployment deployments = 1;
repeated ListError errors = 2;
}

message ListFluxCrdsRequest {
string clusterName = 1;
}
Expand All @@ -327,6 +361,15 @@ message ListFluxCrdsResponse {
repeated ListError errors = 2;
}

message ListRuntimeCrdsRequest {
string clusterName = 1;
}

message ListRuntimeCrdsResponse {
repeated Crd crds = 1;
repeated ListError errors = 2;
}

message GetObjectRequest {
string name = 1;
string namespace = 2;
Expand Down
102 changes: 102 additions & 0 deletions api/core/core.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,74 @@
]
}
},
"/v1/runtime_crds": {
"get": {
"summary": "ListRuntimeCrds lists Weave GitOps runtime components CRDs.\nWeave GitOps runtime is composed of Flux runtime but also other components\nin the ecosystem like TF-controller or Policy Agent.",
"operationId": "Core_ListRuntimeCrds",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ListRuntimeCrdsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "clusterName",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Core"
]
}
},
"/v1/runtime_objects": {
"get": {
"summary": "ListRuntimeObjects lists Weave GitOps runtime components.\nWeave GitOps runtime is composed of Flux runtime but also other components\nin the ecosystem like TF-controller or Policy Agent.",
"operationId": "Core_ListRuntimeObjects",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1ListRuntimeObjectsResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "clusterName",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"Core"
]
}
},
"/v1/session_logs": {
"post": {
"summary": "GetSessionLogs returns the logs for a given session",
Expand Down Expand Up @@ -1319,6 +1387,40 @@
}
}
},
"v1ListRuntimeCrdsResponse": {
"type": "object",
"properties": {
"crds": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Crd"
}
},
"errors": {
"type": "array",
"items": {
"$ref": "#/definitions/v1ListError"
}
}
}
},
"v1ListRuntimeObjectsResponse": {
"type": "object",
"properties": {
"deployments": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Deployment"
}
},
"errors": {
"type": "array",
"items": {
"$ref": "#/definitions/v1ListError"
}
}
}
},
"v1LogEntry": {
"type": "object",
"properties": {
Expand Down
5 changes: 5 additions & 0 deletions charts/gitops-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ envVars:
value: "true"
- name: WEAVE_GITOPS_FEATURE_CLUSTER
value: "false"
# -- Enable this feature flag if you want to expand Flux Runtime UI with other Weave GitOps components like Policy Agent or TF-Controller.
# Ensure that Weave GitOps Deployment and CRDs are labelled with Label 'app.kubernetes.io/part-of=weave-gitops'. See https://docs.gitops.weave.works/docs/open-source/getting-started/install-OSS for more info.
- name: WEAVE_GITOPS_FEATURE_GITOPS_RUNTIME
value: "false"

# -- Annotations to add to the deployment
annotations: {}
# Should the 'oidc-auth' secret be created. For a detailed
Expand Down
Loading
Loading