-
Notifications
You must be signed in to change notification settings - Fork 705
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
Tiller proxy basic functionality #357
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7c493ca
Vendor update
b225b5f
Docs, make tasks and dockerfiles
3f0d6e7
Copy chart logic from helm-crd
22d2777
Proxy logic to communicate with tiller
e0bfeac
Proxy HTTP wrapper
cbeb53c
Main function
4e02db6
Minor review
0be05b7
CMD update
aba1f3b
Chart utils update
3a970de
Update proxy pkg
6d2dc61
Add auth functionality
f0584d7
Merge master
4c08eb9
Review
ff9fe2a
Fix typo
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
proxy-static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM quay.io/deis/go-dev:v1.8.2 as builder | ||
COPY . /go/src/github.com/kubeapps/kubeapps | ||
WORKDIR /go/src/github.com/kubeapps/kubeapps | ||
RUN CGO_ENABLED=0 go build -a -installsuffix cgo ./cmd/tiller-proxy | ||
|
||
FROM scratch | ||
COPY --from=builder /go/src/github.com/kubeapps/kubeapps/tiller-proxy /proxy | ||
EXPOSE 8080 | ||
CMD ["/proxy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM alpine:3.6 | ||
RUN apk --no-cache add ca-certificates | ||
COPY ./proxy-static /proxy | ||
CMD ["/proxy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Tiller Proxy | ||
|
||
This proxy is a service for Kubeapps that connects the Dashboard with Tiller. The goal of this Proxy is to provide a secure proxy for authenticated users to deploy, upgrade and delete charts in different namespaces. | ||
|
||
Part of the logic of this tool has been extracted from [helm-CRD](https://github.com/bitnami-labs/helm-crd). That tool has been deprecated in Kubeapps to avoid having to synchronize the state of a release in two different places (Tiller and the CRD object). | ||
|
||
The client should provide the header `Authorization: Bearer TOKEN` being TOKEN the Kubernetes API Token in order to perform any action. | ||
|
||
# Configuration | ||
|
||
It is possible to configure this proxy with the following flags: | ||
|
||
``` | ||
--debug enable verbose output | ||
--home string location of your Helm config. Overrides $HELM_HOME (default "/Users/andresmartinez/.helm") | ||
--host string address of Tiller. Overrides $HELM_HOST | ||
--kube-context string name of the kubeconfig context to use | ||
--tiller-connection-timeout int the duration (in seconds) Helm will wait to establish a connection to tiller (default 300) | ||
--tiller-namespace string namespace of Tiller (default "kube-system") | ||
``` | ||
|
||
# Routes | ||
|
||
This proxy provides 6 different routes: | ||
|
||
- `GET` `/v1/releases`: List all the releases of the Tiller | ||
- `GET` `/namespaces/{namespace}/releases`: List all the releases within a namespace | ||
- `POST` `/namespaces/{namespace}/releases`: Create a new release | ||
- `GET` `/namespaces/{namespace}/releases/{release}`: Get release info | ||
- `PUT` `/namespaces/{namespace}/releases/{release}`: Update release info | ||
- `DELETE` `/namespaces/{namespace}/releases/{release}`: Delete a release | ||
|
||
# Enabling authorization | ||
|
||
By default, authorization for any request is enabled (it can be disabled using the flag --disable-auth). If enabled, the client should have permissions to: | ||
|
||
- "Read" access to all the release resources in a release when doing a HTTP GET over a specific release. | ||
- "Create" access to all the release resources in a release when doing a when doing an HTTP POST. | ||
- "Create", "Update" and "Delete" permissions to all the release resources when doing an HTTP PUT to upgrade a release. | ||
- "Delete" permissions to all the release resources when doing an HTTP PUT. | ||
|
||
Note that the user only needs a valid token in order to list releases. | ||
|
||
Right now, the only supported method for authentication is using a bearer token. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we not run the binary directly, or with telepresence?
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.
true, I'm just not that used to telepresence :)