Skip to content

Commit

Permalink
Fix/#1855 (#1884)
Browse files Browse the repository at this point in the history
* fix: add aipVersion and kind to create service binding

* docs: add telepresence alternative method

Co-authored-by: Ralph Smith <ralph.smith@bottomline.com>
  • Loading branch information
ralphsmith80 and Ralph Smith committed Jul 22, 2020
1 parent 10bdb7d commit 66ce3c8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,6 @@
"last 1 firefox version",
"last 1 safari version"
]
}
},
"proxy": "http://127.0.0.1:8080"
}
2 changes: 2 additions & 0 deletions dashboard/src/shared/ServiceBinding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ export class ServiceBinding {
) {
const u = ServiceBinding.getLink(namespace);
const { data } = await axiosWithAuth.post<IServiceBinding>(u, {
apiVersion: "servicecatalog.k8s.io/v1beta1",
kind: "ServiceBinding",
metadata: {
name: bindingName,
},
Expand Down
16 changes: 15 additions & 1 deletion docs/developer/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Next, create a `telepresence` shell to swap the `kubeapps-internal-dashboard` de
telepresence --namespace kubeapps --method inject-tcp --swap-deployment kubeapps-internal-dashboard --expose 3000:8080 --run-shell
```

> **NOTE**: If you encounter issues getting this setup working correctly, please try switching the telepresence proxying method in the above command to `vpn-tcp`. Refer to [the telepresence docs](https://www.telepresence.io/reference/methods) to learn more about the available proxying methods and their limitations.
> **NOTE**: If you encounter issues getting this setup working correctly, please try switching the telepresence proxying method in the above command to `vpn-tcp`. Refer to [the telepresence docs](https://www.telepresence.io/reference/methods) to learn more about the available proxying methods and their limitations. If this doesn't work you can use the [Telepresence alternative](#telepresence-alternative).
Finally, launch the dashboard within the telepresence shell:

Expand All @@ -64,6 +64,20 @@ yarn run start

> **NOTE**: The commands above assume you install Kubeapps in the `kubeapps` namespace. Please update the environment variable `TELEPRESENCE_CONTAINER_NAMESPACE` if you are using a different namespace.
#### Telepresence alternative

As an alternative to using [Telepresence](https://www.telepresence.io/) you can use the default [Create React App API proxy](https://create-react-app.dev/docs/proxying-api-requests-in-development/) functionality.

To use this a run Kubeapps per the [getting-started documentation](../../docs/user/getting-started.md#step-3-start-the-kubeapps-dashboard). This will start Kubeapps running on port `8080`.

Next you can launch the dashboard.

```bash
yarn run start
```

> **NOTE**: The [proxy](../../dashboard/package.json#L176) `key:value` has already added to the `package.json` for convenience but you can change the `host:port` values to meet your needs.
You can now access the local development server simply by accessing the dashboard as you usually would (e.g. doing a port-forward or accesing the Ingress URL).

#### Troubleshooting
Expand Down

0 comments on commit 66ce3c8

Please sign in to comment.