Skip to content

Commit 177fcec

Browse files
author
Achille Roussel
committed
update docs and copyright notice
1 parent 0d9c125 commit 177fcec

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Segment
3+
Copyright 2021 Twilio Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ Kubectl plugin to run curl commands against kubernetes pods
44

55
## Motivation
66

7-
Sending http requests to kubernetes pods is unnecessarily complicated, this plugin makes it easy.
7+
Sending http requests to kubernetes pods is unnecessarily complicated, this
8+
plugin makes it easy.
9+
10+
The plugin creates a port forwarding from the local network to the kubernetes
11+
pod that was selected to receive the request, then instantiate a curl command
12+
by rewriting the URL to connect to the forwarded local port, and passing all
13+
curl options that were given on the command line.
814

915
## Installation
1016

@@ -29,7 +35,8 @@ kubectl curl [options] URL [container]
2935

3036
* In the URL, the host part must be the name of the pod to send the request to.
3137
* If no port number is specified, the request will be sent to a `http` port.
32-
* If there are multiple containers with a `http` port, the name of the container to send to the request to must be specified after the URL.
38+
* If there are multiple containers with a `http` port, the name of the container
39+
to send to the request to must be specified after the URL.
3340

3441
## Examples
3542

curl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func init() {
4747
log.SetPrefix("* ")
4848

4949
flags = pflag.NewFlagSet("kubectl curl", pflag.ExitOnError)
50-
flags.BoolVarP(&help, "help", "h", false, "Prints the kubectl pprof help.")
50+
flags.BoolVarP(&help, "help", "h", false, "Prints the kubectl plugin help.")
5151
flags.BoolVarP(&debug, "debug", "", false, "Enable debug mode to print more details about the kubectl command execution.")
5252

5353
for _, opt := range curlOptions {
@@ -81,7 +81,7 @@ func main() {
8181
defer stop()
8282

8383
if err := run(ctx); err != nil {
84-
fmt.Fprintf(os.Stderr, "* ERROR: %s", err)
84+
fmt.Fprintf(os.Stderr, "* ERROR: %s\n", err)
8585
os.Exit(1)
8686
}
8787
}

0 commit comments

Comments
 (0)