mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
* Object model with self-sufficient binary (#131) * Code cosmetics * Experimenting with object model and direct HELM usage * Experiment with object model * replacing the kubectl * Progressing * Save the progress * Able to start with migration in mind * Migrated two pieces * List releases via Helm * Forgotten field * Cristallized the problem of ctx switcher * Reworked to multi-context * Rollback is also new style * More migration * Refactoring * Describe via code * Bye-bye kubectl binary * Eliminate more old code * Refactor a bit * Merges * No binaries in dockerfile * Commit * Progress with getting the data * Learned the thing about get * One field less * Sstart with repos * Repo add * repo remove * Repos! Icons! * Simplified access to data * Ver listing works * Ver check works * Caching and values * fixup * Done with repos * Working on install * Install work-ish * Fix UI failing on install * Upgrade flow works * Fix image building * Remove outdated test file * Move files around * REfactorings * Cosmetics * Test for cache control (#151) * Files import formatted * Added go-test tools * Added test for no-cache header * added changes * test for cache behaviour of app * test for static route (#153) * Tests: route configuration & context setter (#154) * Test for route configuration * Test for context setter middleware * implemented changes * Restore coverage profile Fixes #156 * Cosmetics * Test for `NewRouter` function (#157) * Test for `configureScanners` (#158) * Test for `configureKubectls` (#163) * Test for repository loading (#169) - Created `repos_test.go` - Test: `Load()` of Repositories * Build all PRs * Fixes failing test (#171) * Fixes failing test - Fixes failing test of repo loading * handles error for * Did some changes * Test for listing of repos (#173) - and did some code formatting Signed-off-by: OmAxiani0 <aximaniom@gmail.com> Signed-off-by: OmAxiani0 <aximaniom@gmail.com> * Test for adding repo (#175) - Modified the `repositories.yml` file Signed-off-by: OmAxiani0 <aximaniom@gmail.com> Signed-off-by: OmAxiani0 <aximaniom@gmail.com> * Test for deleting the repository (#176) * Test for deleting the repository - Also added cleanup function for `TestAdd` * Fixes failing test * Add auto labeler for PR's (#174) * Add auto labeler for PR's * Add all file under .github/workflow to 'ci' label Co-authored-by: Harshit Mehta <harshitm@nvidia.com> * Test for getting repository (#177) * Add github workflow for auto PR labeling (#181) Co-authored-by: Harshit Mehta <harshitm@nvidia.com> * Stub compilation * Fixes around installing * More complex test * Using object model to execute helm test (#191) * Expand test * More test * Coverage * Add mutex for operations * Rectore cluster detection code * Change receiver to pointer * Support multiple namespaces * Cosmetics * Update repos periodically * fix tests * Fix error display * Allow reconfiguring chart without repo * mute linter * Cosmetics * Failing approach to parse manifests Relates to #30 * Report the error properly * ✅ Add test for dashboard/objects/data.go NewDataLayer (#199) * Fix problem of wrong namespace * Added unit tests for releases (#204) * Rework API routes (#197) * Bootstrap OpenAPI doc * Renaming some routes * Listing namespaces * k8s part of things * Repositories section * Document scanners API * One more API call * Progress * Reworked install flow * History endpoint * Textual info section * Resources endpoint * Rollback endpoint * Rollback endpoint * Unit tests * Cleanup * Forgotten tags * Fix tests * TODOs * Rework manifest scanning * add hasTests flag * Adding more information on UI for helm test API response (#195) * Hide test button when no tests Fixes #115 Improves #195 --------- Signed-off-by: OmAxiani0 <aximaniom@gmail.com> Co-authored-by: Om Aximani <75031769+OmAximani0@users.noreply.github.com> Co-authored-by: Harshit Mehta <hdm23061993@gmail.com> Co-authored-by: Harshit Mehta <harshitm@nvidia.com> Co-authored-by: Todd Turner <todd@toddtee.sh> Co-authored-by: arvindsundararajan98 <109727359+arvindsundararajan98@users.noreply.github.com>
749 lines
18 KiB
JSON
749 lines
18 KiB
JSON
{
|
|
"openapi": "3.0.3",
|
|
"info": {
|
|
"title": "Helm Dashboard API",
|
|
"version": ""
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "Releases"
|
|
},
|
|
{
|
|
"name": "Repositories"
|
|
},
|
|
{
|
|
"name": "K8s"
|
|
},
|
|
{
|
|
"name": "Scanners"
|
|
},
|
|
{
|
|
"name": "Miscellaneous"
|
|
}
|
|
],
|
|
"paths": {
|
|
"/api/helm/releases": {
|
|
"get": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "Get list of installed releases",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns list of installed releases"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/releases/{ns}": {
|
|
"parameters": [
|
|
{
|
|
"name": "ns",
|
|
"in": "path",
|
|
"description": "Name of kubernetes namespace, use '[emtpy]' if you want to use k8s context default"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "Install new release",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"chart": {
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
},
|
|
"values": {
|
|
"type": "string",
|
|
"description": "Text of values.yaml to use"
|
|
},
|
|
"preview": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "In case preview=true, the preview diff is generated",
|
|
"content": {
|
|
"text/plain": {}
|
|
}
|
|
},
|
|
"202": {
|
|
"description": "In case preview=false, the actial install is performed and resulting release object is returned",
|
|
"content": {
|
|
"application/json": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/releases/{ns}/{name}": {
|
|
"parameters": [
|
|
{
|
|
"name": "ns",
|
|
"in": "path",
|
|
"description": "Name of kubernetes namespace"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Name of Helm release"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "Upgrade/reconfigure existing release",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"chart": {
|
|
"type": "string",
|
|
"required": true
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
},
|
|
"values": {
|
|
"type": "string",
|
|
"description": "Text of values.yaml to use"
|
|
},
|
|
"preview": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "In case preview=true, the preview diff is generated",
|
|
"content": {
|
|
"text/plain": {}
|
|
}
|
|
},
|
|
"202": {
|
|
"description": "In case preview=false, the actial install is performed and resulting release object is returned",
|
|
"content": {
|
|
"application/json": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/releases/{ns}/{name}/history": {
|
|
"parameters": [
|
|
{
|
|
"name": "ns",
|
|
"in": "path",
|
|
"description": "Name of kubernetes namespace"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Name of Helm release"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "Get revision history for release",
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of release revisions"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/releases/{ns}/{name}/manifest": {
|
|
"parameters": [
|
|
{
|
|
"name": "ns",
|
|
"in": "path",
|
|
"description": "Name of kubernetes namespace"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Name of Helm release"
|
|
},
|
|
{
|
|
"name": "revision",
|
|
"in": "query",
|
|
"description": "Revision to get data from"
|
|
},
|
|
{
|
|
"name": "revisionDiff",
|
|
"in": "query",
|
|
"description": "Revision to diff against"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "Get manifest for release",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Manifest text, or diff if revisionDiff is specified"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/releases/{ns}/{name}/values": {
|
|
"parameters": [
|
|
{
|
|
"name": "ns",
|
|
"in": "path",
|
|
"description": "Name of kubernetes namespace"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Name of Helm release"
|
|
},
|
|
{
|
|
"name": "revision",
|
|
"in": "query",
|
|
"description": "Revision to get data from"
|
|
},
|
|
{
|
|
"name": "revisionDiff",
|
|
"in": "query",
|
|
"description": "Revision to diff against"
|
|
},
|
|
{
|
|
"name": "userDefined",
|
|
"in": "query",
|
|
"description": "If set, only user-defined values will be listed"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "Get values for release",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Values YAML text, or diff if revisionDiff is specified"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/releases/{ns}/{name}/notes": {
|
|
"parameters": [
|
|
{
|
|
"name": "ns",
|
|
"in": "path",
|
|
"description": "Name of kubernetes namespace"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Name of Helm release"
|
|
},
|
|
{
|
|
"name": "revision",
|
|
"in": "query",
|
|
"description": "Revision to get data from"
|
|
},
|
|
{
|
|
"name": "revisionDiff",
|
|
"in": "query",
|
|
"description": "Revision to diff against"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "Get textual notes for release",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Notes text, or diff if revisionDiff is specified"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/releases/{ns}/{name}/resources": {
|
|
"parameters": [
|
|
{
|
|
"name": "ns",
|
|
"in": "path",
|
|
"description": "Name of kubernetes namespace"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Name of Helm release"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "List of installed k8s resources for this release",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Structured list of resources",
|
|
"content": {
|
|
"application/json": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/releases/{ns}/{name}/rollback": {
|
|
"parameters": [
|
|
{
|
|
"name": "ns",
|
|
"in": "path",
|
|
"description": "Name of kubernetes namespace"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Name of Helm release"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "Rollback the release to a previous revision",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"revision": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"202": {
|
|
"description": "Rolled back successfully"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/releases/{ns}/{name}/test": {
|
|
"parameters": [
|
|
{
|
|
"name": "ns",
|
|
"in": "path",
|
|
"description": "Name of kubernetes namespace"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"description": "Name of Helm release"
|
|
}
|
|
],
|
|
"post": {
|
|
"tags": [
|
|
"Releases"
|
|
],
|
|
"description": "Run the tests on a release",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Logs of a test run"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/repositories": {
|
|
"get": {
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"description": "Get list of Helm repositories",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns list of Helm repositories"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"description": "Adds new repository",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"url"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"204": {
|
|
"description": "Empty response in case repository were added"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/repositories/{repo}": {
|
|
"parameters": [
|
|
{
|
|
"name": "repo",
|
|
"in": "path",
|
|
"description": "Name of Helm repository"
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"description": "Get list of charts in repository",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns list of charts"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"description": "Update repository from remote",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Empty response"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"description": "Remove repository",
|
|
"responses": {
|
|
"204": {
|
|
"description": "Empty response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/repositories/latestver": {
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "query",
|
|
"description": "Name of Helm chart to search for",
|
|
"required": true
|
|
}
|
|
],
|
|
"description": "Find the latest available version of specified chart through all the repositories",
|
|
"get": {
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The object with latest available version is returned"
|
|
},
|
|
"204": {
|
|
"description": "In case no matching repository found, the response is empty with status 204"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/repositories/versions": {
|
|
"parameters": [
|
|
{
|
|
"name": "name",
|
|
"in": "query",
|
|
"description": "Name of Helm chart to search for",
|
|
"required": true
|
|
}
|
|
],
|
|
"get": {
|
|
"description": "Get the list of versions for specified chart across the repositories",
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The list if chart versions is returned"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/helm/repositories/values": {
|
|
"parameters": [
|
|
{
|
|
"name": "chart",
|
|
"in": "query",
|
|
"description": "Name of Helm chart to search for, in format of <repository>/<chart-name>",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "version",
|
|
"in": "query",
|
|
"description": "Version of Helm chart to get values from",
|
|
"required": true
|
|
}
|
|
],
|
|
"get": {
|
|
"description": "Get the original values.yaml file for the chart",
|
|
"tags": [
|
|
"Repositories"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The content of values.yaml"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/k8s/contexts": {
|
|
"get": {
|
|
"tags": [
|
|
"K8s"
|
|
],
|
|
"description": "Get list of kubectl contexts configured locally",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns list of contexts"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/k8s/{kind}/get": {
|
|
"parameters": [
|
|
{
|
|
"name": "kind",
|
|
"in": "path",
|
|
"description": "Kind of kubernetes resource"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "query",
|
|
"description": "Name of kubernetes resource",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "namespace",
|
|
"in": "query",
|
|
"description": "Namespace of kubernetes resource",
|
|
"required": true
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"K8s"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns resources information"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/k8s/{kind}/list": {
|
|
"parameters": [
|
|
{
|
|
"name": "kind",
|
|
"in": "path",
|
|
"description": "Kind of kubernetes resource",
|
|
"schema": {
|
|
"enum": [
|
|
"namespaces"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"K8s"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns list of resources"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/k8s/{kind}/describe": {
|
|
"parameters": [
|
|
{
|
|
"name": "kind",
|
|
"in": "path",
|
|
"description": "Kind of kubernetes resource"
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "query",
|
|
"description": "Name of kubernetes resource",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "namespace",
|
|
"in": "query",
|
|
"description": "Namespace of kubernetes resource",
|
|
"required": true
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"K8s"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"text/plain": {}
|
|
},
|
|
"description": "Returns describe text"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/scanners": {
|
|
"get": {
|
|
"tags": [
|
|
"Scanners"
|
|
],
|
|
"description": "Get list of discovered scanners",
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of scanners"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/scanners/manifests": {
|
|
"post": {
|
|
"tags": [
|
|
"Scanners"
|
|
],
|
|
"description": "Scan manifests using all applicable scanners",
|
|
"requestBody": {
|
|
"content": {
|
|
"multipart/form-data": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"manifest": {
|
|
"type": "string",
|
|
"description": "Text of manifest to scan"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Map of scan results per scanner type"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/scanners/resource/{kind}": {
|
|
"parameters": [
|
|
{
|
|
"in": "path",
|
|
"name": "kind"
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "namespace",
|
|
"required": true
|
|
},
|
|
{
|
|
"in": "query",
|
|
"name": "name",
|
|
"required": true
|
|
}
|
|
],
|
|
"get": {
|
|
"tags": [
|
|
"Scanners"
|
|
],
|
|
"description": "Scan specified k8s resource in cluster",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Information with scan results per scanner type"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/": {
|
|
"delete": {
|
|
"tags": [
|
|
"Miscellaneous"
|
|
],
|
|
"description": "Shuts down the Helm Dashboard application",
|
|
"responses": {
|
|
"202": {
|
|
"description": "Shutdown command has been accepted"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/status": {
|
|
"get": {
|
|
"tags": [
|
|
"Miscellaneous"
|
|
],
|
|
"description": "Gets application status",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Returns JSON with some options",
|
|
"headers": {
|
|
"X-Application-Name": {
|
|
"description": "A string to self-identify the application"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |