-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tiller proxy basic functionality (#357)
* Vendor update * Docs, make tasks and dockerfiles * Copy chart logic from helm-crd * Proxy logic to communicate with tiller * Proxy HTTP wrapper * Main function * Minor review * CMD update * Add auth functionality * Chart utils update * Update proxy pkg * Review * Fix typo
- Loading branch information
1 parent
fa5ad1f
commit 2c70d7f
Showing
421 changed files
with
67,197 additions
and
22,178 deletions.
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.