-
Notifications
You must be signed in to change notification settings - Fork 667
Added helm endpoint to get infos about the given release #4059
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
Added helm endpoint to get infos about the given release #4059
Conversation
|
/test analyze |
|
/hold |
|
Not sure if we really need the additional endpoint, because recently merged [
{
"name": "foo3",
"info": {
"first_deployed": "2020-01-22T13:59:18.293548246+01:00",
"last_deployed": "2020-01-22T13:59:18.293548246+01:00",
"deleted": "",
"description": "Install complete",
"status": "deployed",
"notes": "1. Get the application URL by running these commands:\n export POD_NAME=$(kubectl get pods --namespace foo -l \"app=foo3-mink\" -o jsonpath=\"{.items[0].metadata.name}\")\n echo \"Visit http://127.0.0.1:8080 to use your application\"\n kubectl port-forward $POD_NAME 8080:80\n"
},
"chart": {
"metadata": {
"name": "mink",
"version": "0.1.0",
"description": "A Helm chart for Kubernetes",
"apiVersion": "v1"
},
"lock": null,
"templates": [
{
"name": "templates/NOTES.txt",
"data": "MS4gR2V0IHRoZSBhcHBsaWNhdGlvbiBVUkwgYnkgcnVubmluZyB0aGVzZSBjb21tYW5kczoKe3stIGlmIGNvbnRhaW5zICJOb2RlUG9ydCIgLlZhbHVlcy5zZXJ2aWNlLnR5cGUgfX0KICBleHBvcnQgTk9ERV9QT1JUPSQoa3ViZWN0bCBnZXQgLS1uYW1lc3BhY2Uge3sgLlJlbGVhc2UuTmFtZXNwYWNlIH19IC1vIGpzb25wYXRoPSJ7LnNwZWMucG9ydHNbMF0ubm9kZVBvcnR9IiBzZXJ2aWNlcyB7eyB0ZW1wbGF0ZSAiZnVsbG5hbWUiIC4gfX0pCiAgZXhwb3J0IE5PREVfSVA9JChrdWJlY3RsIGdldCBub2RlcyAtLW5hbWVzcGFjZSB7eyAuUmVsZWFzZS5OYW1lc3BhY2UgfX0gLW8ganNvbnBhdGg9InsuaXRlbXNbMF0uc3RhdHVzL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291bnQgfX0KICB0ZW1wbGF0ZToKICAgIG1ldGFkYXRhOgogICAgICBsYWJlbHM6CiAgICAgICAgYXBwOiB7eyB0ZW1wbGF0ZSAiZnVsbG5hbWUiIC4gfX0KICAgIHNwZWM6CiAgICAgIGNvbnRhaW5lcnM6CiAgICAgIC0gbmFtZToge3sgLkNoYXJ0Lk5hbWUgfX0KICAgICAgICBpbWFnZTogInt7IC5WYWx1ZXMuaW1hZ2UucmVwb3NpdG9yeSB9fTp7eyAuVmFsdWVzLmltYWdlLnRhZyB9fSIKICAgICAgICBpbWFnZVB1bGxQb2xpY3k6IHt7IC5WYWx1ZXMuaW1hZ2UucHVsbFBvbGljeSB9fQogICAgICAgIHBvcnRzOgogICAgICAgIC0gY29udGFpbmVyUG9ydDoge3sgLlZhbHVlcy5zZXJ2aWNlLmludGVybmFsUG9ydCB9fQogICAgICAgIGxpdmVuZXNzUHJvYmU6CiAgICAgICAgICBodHRwR2V0OgogICAgICAgICAgICBwYXRoOiAvCiAgICAgICAgICAgIHBvcnQ6IHt7IC5WYWx1ZXMuc2VydmljZS5pbnRlcm5hbFBvcnQgfX0KICAgICAgICByZWFkaW5lc3NQcm9iZToKICAgICAgICAgIGh0dHBHZXQ6CiAgICAgICAgICAgIHBhdGg6IC8KICAgICAgICAgICAgcG9ydDoge3sgLlZhbHVlcy5zZXJ2aWNlLmludGVybmFsUG9ydCB9fQogICAgICAgIHJlc291cmNlczoKe3sgdG9ZYW1sIC5WYWx1ZXMucmVzb3VyY2VzIHwgaW5kZW50IDEyIH19Cg=="
},
{
"name": "templates/service.yaml",
"data": "YXBpVmVyc2lvbjogdjEKa2luZDogU2VydmljZQptZXRhZGF0YToKICBuYW1lOiB7eyB0ZW1wbGF0ZSAiZnVsbG5hbWUiIC4gfX0KICBsYWJlbHM6CiAgICBjaGFydDogInt7IC5DaGFydC5OYW1lIH19LXt7IC5DaGFydC5WZXJzaW9uIH19IgpzcGVjOgogIHR5cGU6IHt7IC5WYWx1ZXMuc2VydmljZS50eXBlIH19CiAgcG9ydHM6CiAgLSBwb3J0OiB7eyAuVmFsdWVzLnNlcnZpY2UuZXh0ZXJuYWxQb3J0IH19CiAgICB0YXJnZXRQb3J0OiB7eyAuVmFsdWVzLnNlcnZpY2UuaW50ZXJuYWxQb3J0IH19CiAgICBwcm90b2NvbDogVENQCiAgICBuYW1lOiB7eyAuVmFsdWVzLnNlcnZpY2UubmFtZSB9fQogIHNlbGVjdG9yOgogICAgYXBwOiB7eyB0ZW1wbGF0ZSAiZnVsbG5hbWUiIC4gfX0K"
}
],
"values": {
"image": {
"pullPolicy": "IfNotPresent",
"repository": "nginx",
"tag": "stable"
},
"replicaCount": 1,
"resources": {
"limits": {
"cpu": "100m",
"memory": "128Mi"
},
"requests": {
"cpu": "100m",
"memory": "128Mi"
}
},
"service": {
"externalPort": 80,
"internalPort": 80,
"name": "nginx",
"type": "ClusterIP"
}
},
"schema": null,
"files": [
{
"name": ".helmignore",
"data": "IyBQYXR0ZXJucyB0byBpZ25vcmUgd2hlbiBidWlsZGluZyBwYWNrYWdlcy4KIyBUaGlzIHN1cHBvcnRzIHNoZWxsIGdsb2IgbWF0Y2hpbmcsIHJlbGF0aXZlIHBhdGggbWF0Y2hpbmcsIGFuZAojIG5lZ2F0aW9uIChwcmVmaXhlZCB3aXRoICEpLiBPbmx5IG9uZSBwYXR0ZXJuIHBlciBsaW5lLgouRFNfU3RvcmUKIyBDb21tb24gVkNTIGRpcnMKLmdpdC8KLmdpdGlnbm9yZQouYnpyLwouYnpyaWdub3JlCi5oZy8KLmhnaWdub3JlCi5zdm4vCiMgQ29tbW9uIGJhY2t1cCBmaWxlcwoqLnN3cAoqLmJhawoqLnRtcAoqfgojIFZhcmlvdXMgSURFcwoucHJvamVjdAouaWRlYS8KKi50bXByb2oK"
}
]
},
"manifest": "---\n# Source: mink/templates/service.yaml\napiVersion: v1\nkind: Service\nmetadata:\n name: foo3-mink\n labels:\n chart: \"mink-0.1.0\"\nspec:\n type: ClusterIP\n ports:\n - port: 80\n targetPort: 80\n protocol: TCP\n name: nginx\n selector:\n app: foo3-mink\n---\n# Source: mink/templates/deployment.yaml\napiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n name: foo3-mink\n labels:\n chart: \"mink-0.1.0\"\nspec:\n replicas: 1\n template:\n metadata:\n labels:\n app: foo3-mink\n spec:\n containers:\n - name: mink\n image: \"nginx:stable\"\n imagePullPolicy: IfNotPresent\n ports:\n - containerPort: 80\n livenessProbe:\n httpGet:\n path: /\n port: 80\n readinessProbe:\n httpGet:\n path: /\n port: 80\n resources:\n limits:\n cpu: 100m\n memory: 128Mi\n requests:\n cpu: 100m\n memory: 128Mi\n",
"version": 1,
"namespace": "foo"
}
]If we really want an additional endpoint, then adding |
|
Closing this since the way Pregrag suggested is adequate. |
|
Sure, before providing the API, I wanted to ensure we really want it. |
|
/retest |
|
/hold cancel |
d6a1800 to
9d6e0e8
Compare
|
/test e2e-gcp-console |
|
/test backend |
pedjak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, I would make GetRelease function private.
|
/retitle Added helm endpoint to get infos about the given release |
|
@sbose78 no bugzilla needed right now to get into master / 4.5 This needs approval from someone else though @spadgett @benjaminapetersen @rhamilto |
|
@akashshinde you're going to want to squash your commits appropriately |
docs/helm/README.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
403 is "Forbidden", 400 is "Bad Request". But it looks like we're actually returning "Bad Gateway"?
pkg/helm/handlers/handlers.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check for errors?
pkg/server/server.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be 405, Method Not Allowed, with an Allow response header
5bda741 to
04fb0ba
Compare
|
@christianvogt squeshed |
|
/test e2e-gcp-console |
1 similar comment
|
/test e2e-gcp-console |
|
/assign spadgett |
|
@benjaminapetersen needs approval for backend change fyi @rohitkrai03 |
04fb0ba to
e468c5f
Compare
|
/test backend |
e468c5f to
2b14058
Compare
|
/retest |
|
/test e2e-gcp-console |
1 similar comment
|
/test e2e-gcp-console |
spadgett
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: akashshinde, pedjak, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR adds following helm service routes CC: @sbose78 @pedjak
To Test
curl /api/helm/releases?ns=namespace&release_name=release-nameResponse should return yaml array of all installed kube resources by respective release.