/api/application/appcatalog/helm: PATCH
Patches a helm chart to scale the deployment.
The following table shows which roles can access this REST API endpoint:
Data admin | CollectionAdmin | Data user | Admin | Service user |
---|---|---|---|---|
✓ | X | X | Χ | Χ |
Synopsis of the request URL
curl -k -H “Authorization: Bearer <token>” -H "Content-Type: application/json"
https://<spectrum_discover_host>/api/application/appcatalog/helm
Supported request types and response formats
Supported request types:
- PATCH
- JSON
Examples
The following example shows how to patch a helm chart. In this example:
- replicas
- The number of replicas to scale the deployment to.
For the contents of replicas.json file, enter this information:
[moadmin@spectrum-discover ~]$ cat replicas.json
{
"replicas": 5
}
Note: The
"exif-header-extractor-application-0-0-2"
is
the <deployment_name>
from the helm POST response.Request:
curl -X PATCH -k -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" https://<spectrum_discover_host>/api/application/appcatalog/helm/exif-header-extractor-application-0-0-2 -d@replicas.json | jq
Response:
{
"success": "true",
"message": "Successfully patched deployment.",
"output": {
"apiVersion": "ibm.spectrum.discover/v1alpha1",
"kind": "SpectrumDiscoverApplication",
"metadata": {
"creationTimestamp": "2020-09-25T16:32:28Z",
"generation": 2,
"name": "exif-header-extractor-application-0-0-2",
"namespace": "spectrum-discover",
"resourceVersion": "3985433",
"selfLink": "/apis/ibm.spectrum.discover/v1alpha1/namespaces/spectrum-discover/spectrumdiscoverapplications/exif-header-extractor-application-0-0-2",
"uid": "92986ff7-7b37-4fb5-a9c7-e08bfc5f448f"
},
"spec": {
"application_name": "exif-header-extractor-application-0-0-2",
"description": "This extracts exif header information for jpg/jpeg or tiff files.",
"env": {
"test1": "test2",
"test3": "test4"
},
"log_level": "INFO",
"replicas": 10,
"repo_name": "ibmcom/spectrum-discover-exif-header-extractor",
"tag": "latest",
"version": "0.0.2"
},
"status": {
"conditions": [
{
"ansibleResult": {
"changed": 0,
"completion": "2020-09-25T16:32:48.519165",
"failures": 0,
"ok": 3,
"skipped": 0
},
"lastTransitionTime": "2020-09-25T16:32:28Z",
"message": "Awaiting next reconciliation",
"reason": "Successful",
"status": "True",
"type": "Running"
}
]
}
}
}