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

Add GetInstalledPackageResourceRefs to packages API and implement in Helm. #3581

Merged
merged 7 commits into from
Nov 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
292 changes: 291 additions & 1 deletion cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,69 @@
]
}
},
"/core/packages/v1alpha1/installedpackages/plugin/{installedPackageRef.plugin.name}/{installedPackageRef.plugin.version}/c/{installedPackageRef.context.cluster}/ns/{installedPackageRef.context.namespace}/{installedPackageRef.identifier}/resourcerefs": {
"get": {
"operationId": "PackagesService_GetInstalledPackageResourceRefs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1alpha1GetInstalledPackageResourceRefsResponse"
}
},
"401": {
"description": "Returned when the user does not have permission to access the resource.",
"schema": {}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "installedPackageRef.plugin.name",
"description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.plugin.version",
"description": "Plugin version\n\nThe version of the plugin, such as v1alpha1",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.context.cluster",
"description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.context.namespace",
"description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.identifier",
"description": "The fully qualified identifier for the installed package\n(ie. a unique name for the context).",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"PackagesService"
]
}
},
"/core/plugins/v1alpha1/configured-plugins": {
"get": {
"summary": "GetConfiguredPlugins returns a map of short and longnames for the configured plugins.",
Expand Down Expand Up @@ -1109,6 +1172,70 @@
]
}
},
"/plugins/fluxv2/packages/v1alpha1/installedpackages/c/{installedPackageRef.context.cluster}/ns/{installedPackageRef.context.namespace}/{installedPackageRef.identifier}/resourcerefs": {
"get": {
"summary": "GetInstalledPackageResourceRefs returns the references for the Kubernetes\nresources created by an installed package.",
"operationId": "FluxV2PackagesService_GetInstalledPackageResourceRefs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1alpha1GetInstalledPackageResourceRefsResponse"
}
},
"401": {
"description": "Returned when the user does not have permission to access the resource.",
"schema": {}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "installedPackageRef.context.cluster",
"description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.context.namespace",
"description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.identifier",
"description": "The fully qualified identifier for the installed package\n(ie. a unique name for the context).",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.plugin.name",
"description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "installedPackageRef.plugin.version",
"description": "Plugin version. The version of the plugin, such as v1alpha1",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"FluxV2PackagesService"
]
}
},
"/plugins/fluxv2/packages/v1alpha1/packagerepositories": {
"get": {
"summary": "GetPackageRepositories returns the repositories managed by the 'fluxv2' plugin",
Expand Down Expand Up @@ -1670,6 +1797,70 @@
]
}
},
"/plugins/helm/packages/v1alpha1/installedpackages/c/{installedPackageRef.context.cluster}/ns/{installedPackageRef.context.namespace}/{installedPackageRef.identifier}/resourcerefs": {
"get": {
"summary": "GetInstalledPackageResourceRefs returns the references for the Kubernetes resources created by\nan installed package.",
"operationId": "HelmPackagesService_GetInstalledPackageResourceRefs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1alpha1GetInstalledPackageResourceRefsResponse"
}
},
"401": {
"description": "Returned when the user does not have permission to access the resource.",
"schema": {}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "installedPackageRef.context.cluster",
"description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.context.namespace",
"description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.identifier",
"description": "The fully qualified identifier for the installed package\n(ie. a unique name for the context).",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.plugin.name",
"description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "installedPackageRef.plugin.version",
"description": "Plugin version. The version of the plugin, such as v1alpha1",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"HelmPackagesService"
]
}
},
"/plugins/helm/packages/v1alpha1/installedpackages/c/{installedPackageRef.context.cluster}/ns/{installedPackageRef.context.namespace}/{installedPackageRef.identifier}/rollback": {
"put": {
"summary": "RollbackInstalledPackage updates an installed package based on the request.",
Expand Down Expand Up @@ -2246,6 +2437,70 @@
]
}
},
"/plugins/kapp_controller/packages/v1alpha1/installedpackages/c/{installedPackageRef.context.cluster}/ns/{installedPackageRef.context.namespace}/{installedPackageRef.identifier}/resourcerefs": {
"get": {
"summary": "GetInstalledPackageResourceRefs returns the references for the Kubernetes resources created by\nan installed package.",
"operationId": "KappControllerPackagesService_GetInstalledPackageResourceRefs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1alpha1GetInstalledPackageResourceRefsResponse"
}
},
"401": {
"description": "Returned when the user does not have permission to access the resource.",
"schema": {}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "installedPackageRef.context.cluster",
"description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.context.namespace",
"description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.identifier",
"description": "The fully qualified identifier for the installed package\n(ie. a unique name for the context).",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "installedPackageRef.plugin.name",
"description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "installedPackageRef.plugin.version",
"description": "Plugin version. The version of the plugin, such as v1alpha1",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"KappControllerPackagesService"
]
}
},
"/plugins/kapp_controller/packages/v1alpha1/packagerepositories": {
"get": {
"summary": "GetPackageRepositories returns the repositories managed by the 'kapp_controller' plugin",
Expand Down Expand Up @@ -2788,6 +3043,22 @@
"description": "Response for GetInstalledPackageDetail",
"title": "GetInstalledPackageDetailResponse"
},
"v1alpha1GetInstalledPackageResourceRefsResponse": {
"type": "object",
"properties": {
"context": {
"$ref": "#/definitions/v1alpha1Context"
},
"resourceRefs": {
"type": "array",
"items": {
"$ref": "#/definitions/v1alpha1ResourceRef"
}
}
},
"description": "Response for GetInstalledPackageResourceRefs",
"title": "GetInstalledPackageResourceRefsResponse"
},
"v1alpha1GetInstalledPackageSummariesResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -3058,7 +3329,7 @@
},
"suspend": {
"type": "boolean",
"description": "Whether reconciliation should be suspended until otherwise enabled.",
"description": "Whether reconciliation should be suspended until otherwise enabled.\nThis can be utilized to e.g. temporarily ignore chart changes, and\nprevent a Helm release from getting upgraded",
"title": "Suspend"
},
"serviceAccountName": {
Expand All @@ -3070,6 +3341,25 @@
"description": "ReconciliationOptions enable specifying standard fields for backends that continuously\nreconcile a package install as new matching versions are released. Most of the naming\nis from the flux HelmReleaseSpec though it maps directly to equivalent fields on Carvel's\nInstalledPackage.",
"title": "ReconciliationOptions"
},
"v1alpha1ResourceRef": {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"description": "The APIVersion directly from the resource has the group and version, eg. \"apps/v1\"\nor just the version for core resources."
},
"kind": {
"type": "string",
"description": "The Kind directly from the templated manifest. Together with the APIVersion this\nforms the GroupVersionKind."
},
"name": {
"type": "string",
"description": "The name of the specific resource in the context of the installed package."
}
},
"description": "A reference to a Kubernetes resource related to a specific installed package.\nThe context (cluster, namespace) for each resource is that of the related\ninstalled package.",
"title": "Resource reference"
},
"v1alpha1RollbackInstalledPackageRequest": {
"type": "object",
"properties": {
Expand Down
Loading