Commit Graph

266 Commits

Author SHA1 Message Date
James Munnelly
1adfe16690 Bulk fix of non-test staticcheck failures
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-06-26 12:25:08 +01:00
jetstack-bot
83f391c177
Merge pull request #3018 from hzhou97/fix-convert-cmd
Fix ctl convert cmd
2020-06-23 18:14:12 +01:00
jetstack-bot
2f4c57e178
Merge pull request #2957 from hzhou97/create_cr_cmd
Add Create CertificateRequest ctl command
2020-06-23 17:21:12 +01:00
Haoxiang Zhou
24404aa1eb Added new scheme to use for ctl commands
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-23 17:18:56 +01:00
Haoxiang Zhou
7e4fa1ab13 Removed unnecessary variables and 'AddToScheme's; Builder doesn't continue on error
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-19 10:29:42 +01:00
Haoxiang Zhou
a98240c6f9 Changed directory set-up for tests, review changes
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-18 16:47:10 +01:00
Haoxiang Zhou
12ef535648 Use webhook's scheme to read in objects in internal api version
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-18 10:22:25 +01:00
Haoxiang Zhou
a628f62f2c Changed flag to from-certificate-file
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-16 12:30:28 +01:00
Haoxiang Zhou
3b7284973c Wrtie key to file before creating CR and changed key file permission
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-16 12:24:18 +01:00
Haoxiang Zhou
1a01120fbd Make name of CR a required argument, changed tests accordingly
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-16 12:19:46 +01:00
Haoxiang Zhou
de787796b7 Review changes
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-15 14:22:55 +01:00
Haoxiang Zhou
5a5c3ce053 Change to only have -f flag
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-11 17:30:59 +01:00
Haoxiang Zhou
023177108c Moved subcommand certificaterequest to its own package
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-11 14:00:29 +01:00
Haoxiang Zhou
60ea8ff78f Review changes, update description and function name
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-11 13:32:46 +01:00
Haoxiang Zhou
4b135540d4 Store private key in file, added flag to specify file name.
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-05 10:26:37 +01:00
Haoxiang Zhou
378521300a Add argument check, example uses; cleanup
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-04 10:12:17 +01:00
Haoxiang Zhou
19e489c59a Move use of factory out of Run func
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-04 09:14:40 +01:00
Haoxiang Zhou
0e3a355873 Use first arg as name of CR if supplied.
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-04 09:14:40 +01:00
Haoxiang Zhou
d14c316f3d Clean-up and comments
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-04 09:14:12 +01:00
James Munnelly
395445e460 Handle multiple versions when decoding objects from file
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-05-29 15:17:07 +01:00
Haoxiang Zhou
655ca97d71 Create CR from Certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-29 13:32:50 +01:00
Haoxiang Zhou
5996cdc650 Read in manifest for Certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-29 09:51:05 +01:00
Haoxiang Zhou
990cb6ab15 Added options and scaffold Run function.
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-28 15:27:17 +01:00
Haoxiang Zhou
19ad36a819 Add boilerplate and fix style issue
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-28 13:02:14 +01:00
Haoxiang Zhou
61c45c73fe Updated bazel dependencies
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-28 12:16:25 +01:00
Haoxiang Zhou
ac89f21cac Add new ctl sub command certificaterequest for create
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-28 11:24:46 +01:00
Haoxiang Zhou
70aaeee2b6 Add new ctl command create
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-05-28 11:23:32 +01:00
JoshVanL
e465329b80
Revert vault free port and expose listener port from metrics server
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-26 23:01:55 +01:00
JoshVanL
5539bf3495
Moves metrics controller into sub-package of ./controller/certificates
and fix metrics listen address flag description

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-21 10:47:52 +01:00
JoshVanL
db24ca052b
Remove the Factory interface from ACME accounts, in favour of using
package level funcs. This exposes BuildHTTPClient that instruments
metrics, which is passed to NewClient. ACME issuer has reference to
plumbed in metrics

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-21 10:44:37 +01:00
JoshVanL
3e7f7eb87e
Expose Prometheus listen address as a controller command line flag
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-18 18:21:03 +01:00
JoshVanL
8214cb4b70
Initialise new metrics implementation and pass through new instrumented
ACME client Factory

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-18 17:44:36 +01:00
James Munnelly
b126a0c0e5 Use acme AccountRegistry throughout and tidy up ACME setup code
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-05-13 13:14:46 +01:00
James Munnelly
927a16fe03 Update references to ctl binary name
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-05-05 16:44:27 +01:00
jetstack-bot
a04d2f0935
Merge pull request #2871 from meyskens/tar-everything
Release a tar.gz for the CLI tool
2020-05-01 18:22:55 +01:00
jetstack-bot
304f241c8d
Merge pull request #2872 from meyskens/kubectl-cert-manager
Rename the CLI to kubectl cert-manager
2020-05-01 17:42:54 +01:00
Maartje Eyskens
f868b48a70 fix cobra failure
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-05-01 17:13:29 +02:00
Maartje Eyskens
68fc95189f Use doesn't allow a space
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-05-01 17:04:59 +02:00
Maartje Eyskens
fa3e838f2f Fix the convert example
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-05-01 17:00:34 +02:00
Maartje Eyskens
d6ff9aa2f2 Rename the CLI to kubectl cert-manager
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-05-01 16:35:29 +02:00
Maartje Eyskens
801c24b485 Release a tar.gz for the CLI tool
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-05-01 14:47:04 +02:00
James Munnelly
f7c5f1c7fe Ensure version x_defs are set on built ctl binary
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-30 16:53:25 +01:00
JoshVanL
25ab073fbd
Updates renew command test so that it adds kubeconfig flags which it no
longer inherits

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 13:08:28 +01:00
JoshVanL
5af4fa8e87
Moves ctl kubeconfig flags to top level
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:58:36 +01:00
JoshVanL
28f7e7bc78
Cleans up renew kube flags and adds --namespace validation
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:57:42 +01:00
JoshVanL
9056534024
Removes --wait from ctl renew command
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:55:44 +01:00
JoshVanL
3d8a1110d8
Adds ctl renew validation unit tests
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:55:38 +01:00
JoshVanL
1d238e5cc0
Removes ability to use password auth
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:55:36 +01:00
JoshVanL
27d5ecd8a9
Updates help, better validation and pipes through context
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:55:34 +01:00
JoshVanL
57bde90d8d
Adds all kubectl client auth methods
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:55:32 +01:00