Skip to content
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

Change default pepr dev host to host.k3d.internal #72

Merged
merged 1 commit into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pepr init
npm run k3d-setup

# Start playing with Pepr now
# If using another local K8s distro instead of k3d, run `pepr dev --host host.docker.internal`
pepr dev
kubectl apply -f capabilities/hello-pepr.samples.yaml

Expand Down
8 changes: 6 additions & 2 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Initialize a new Pepr Module.
- `--skip-post-init` - Skip npm install, git init and VSCode launch

---

## `pepr update`

Update the current Pepr Module to the latest SDK version and update the global Pepr CLI to the same version.
Expand All @@ -23,12 +24,15 @@ Update the current Pepr Module to the latest SDK version and update the global P

## `pepr dev`

Connect a local cluster to a local version of the Pepr Controller to do real-time debugging of your module.
Connect a local cluster to a local version of the Pepr Controller to do real-time debugging of your module. Note
the `pepr dev` assumes a K3d cluster is running by default. If you are working with Kind or another docker-based
K8s distro, you will need to pass the `--host host.docker.internal` option to `pepr dev`. If working with a remote
cluster you will have to give Pepr a host path to your machine that is reachable from the K8s cluster.

**Options:**

- `-l, --log-level [level]` - Log level: debug, info, warn, error (default: "info")
- `-h, --host [host]` - Host to listen on (default: "host.docker.internal")
- `-h, --host [host]` - Host to listen on (default: "host.k3d.internal")
- `--confirm` - Skip confirmation prompt

---
Expand Down
1 change: 1 addition & 0 deletions docs/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Each Pepr Module is it's own Typescript project, produced by [`pepr init`](./cli
npm run k3d-setup

# Launch pepr dev mode (npm start or pepr dev)
# If using another local K8s distro instead of k3d, use `pepr dev --host host.docker.internal`
pepr dev

# From another terminal, apply the sample yaml
Expand Down
2 changes: 1 addition & 1 deletion src/cli/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function (program: RootCmd) {
program
.command("dev")
.description("Setup a local webhook development environment")
.option("-h, --host [host]", "Host to listen on", "host.docker.internal")
.option("-h, --host [host]", "Host to listen on", "host.k3d.internal")
.option("--confirm", "Skip confirmation prompt")
.action(async opts => {
// Prompt the user to confirm if they didn't pass the --confirm flag
Expand Down