Commit Graph

555 Commits

Author SHA1 Message Date
Maartje Eyskens
f671c811cf Improve logic
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-15 17:02:13 +01:00
Maartje Eyskens
bedb95a0a4 Add revocation checks
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-15 17:02:13 +01:00
Maartje Eyskens
654f16ec14 WIP add inspect secret
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-15 17:02:12 +01:00
jetstack-bot
cdc53b65cb
Merge pull request #3500 from meyskens/update-copy
Update copyright to cert-manager project
2020-12-15 10:12:31 +00:00
Maartje Eyskens
ab0cd57dc5 Use The cert-manager Authors.
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-11 19:04:13 +01:00
jetstack-bot
2c521609de
Merge pull request #3477 from tharun208/feat/profiling
Added profiling for controller
2020-12-11 14:11:10 +00:00
Maartje Eyskens
1788a9d758 Update copyright to cert-manager project
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-08 19:04:49 +01:00
Tharun
b67da63a4e Added profiling for controller
Signed-off-by: Tharun <rajendrantharun@live.com>
2020-11-22 12:15:52 +05:30
Richard Wall
a33abd2060 Plumb through the flag provided defaultRenewBeforeExpiryDuration
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-11-19 12:44:18 +00:00
Richard Wall
cc1412b252 Deprecate the --renew-before-expiry-duration flag
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-11-19 12:44:18 +00:00
Maartje Eyskens
7d1cd33081 Make resyncPeriod constant
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-22 10:25:10 +02:00
Maartje Eyskens
00d2b3b79e Set the resync period to 10 hours
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-21 15:19:22 +02:00
Maartje Eyskens
560eac4b06
Update cmd/controller/app/options/options.go
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>

Co-authored-by: Richard Wall <wallrj@users.noreply.github.com>
2020-10-16 16:43:13 +02:00
Maartje Eyskens
232f21db26 Validate API values not being 0 + following k8s naming + defaults
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-16 13:08:26 +02:00
Maartje Eyskens
7c87e93950 update burst description
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-14 17:49:19 +02:00
Maartje Eyskens
ebadd4cd28 Fix defaults, description and add validation
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-14 17:46:09 +02:00
Maartje Eyskens
5dfb4d409b Make Kubernetes API QPS throtteling configurable
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-10-14 17:16:44 +02:00
Matthias Frey
2f2253afaf make propagation check period configurable
Signed-off-by: Matthias Frey <freym@users.noreply.github.com>
2020-09-24 11:28:49 +02:00
jetstack-bot
a4394510e2
Merge pull request #3275 from wallrj/3251-cainjector-3
Load cainjector controllers independently
2020-09-18 17:14:06 +01:00
Richard Wall
c3e79865ca Exit(1) and explain what causes the context to be cancelled
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-09-18 10:24:10 +01:00
Richard Wall
392ed06cfc Explain why we start the two controllers in separate goroutines
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-09-18 10:21:21 +01:00
Richard Wall
4fd5cd6b3c Avoid launching controller goroutines during shutdown of unelected
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-09-18 10:15:14 +01:00
Richard Wall
e2765f720a Remove debug log
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-09-18 10:04:28 +01:00
Richard Wall
b772f3295b Use cancellable contexts and errgroups
...to control the starting and stopping of controllers and caches

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-09-17 09:37:05 +01:00
Richard Wall
81874895b0 Use NewUnmanaged and separate caches for each controller
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-09-11 10:09:27 +01:00
Richard Wall
bcff4edb0f Run both controllers in a single goroutine with a single manager
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-09-10 13:54:50 +01:00
Josh Soref
efd26e6b4f
Add missing quote to help
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2020-09-09 15:32:59 -04:00
Richard Wall
ba02ea4120 Revert "Refactor the cainjector to only have 1 leader election"
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-09-04 16:54:16 +01:00
jetstack-bot
57034dc1e4
Merge pull request #3213 from hzhou97/add_more_events_output
Ctl command status certificate: Add Events of Issuer and Secret to output
2020-08-27 16:04:36 +01:00
JoshVanL
c83ef5ee77 Fixes client-go logs to use infof
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-08-27 11:04:09 +02:00
Haoxiang Zhou
4ccf8ebdb7 Return error thrown when looking for events
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-26 16:29:33 +02:00
Haoxiang Zhou
5f423a442e Create Events for integration and unit tests
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-26 16:28:28 +02:00
Haoxiang Zhou
a1ce1cefb5 Add Events of Issuer and Secret to output
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-26 15:31:53 +02:00
jetstack-bot
85a9044c0c
Merge pull request #3205 from JoshVanL/ctl-convert-list
Add support for ctl convert over a list
2020-08-21 12:21:43 +01:00
JoshVanL
3ed1dfdc31
Updates deps
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-08-21 11:05:23 +01:00
JoshVanL
d3e27905eb
Remove bad error text output
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-08-21 10:48:21 +01:00
JoshVanL
1c9e955407
Add support for ctl covert with List
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-08-21 10:40:57 +01:00
Richard Wall
1254179f3a Use V1 API resources in ctl create certificaterequest tests
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 17:12:15 +01:00
Richard Wall
bd94bf92a5 cmapiv1 > cmapi
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:06 +01:00
Richard Wall
b638954b03 Fix ./cmd/ctl and tests
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:06 +01:00
Richard Wall
81eb53f597 ./hack/update-all.sh
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:06 +01:00
Richard Wall
a70298180a Run a script to update v1alpha2 usage to v1
Script is available at https://github.com/jetstack/cert-manager/pull/3201

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:26:51 +01:00
Richard Wall
0388599674 Rename import to make way for corev1 and v1 api imports later
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-19 15:04:54 +01:00
jetstack-bot
fff2778ae2
Merge pull request #3187 from meyskens/cainject-le
Refactor the cainjector to only have 1 leader election
2020-08-18 10:49:43 +01:00
Haoxiang Zhou
6c26e0d821 Add Challenge output and update tests
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-17 16:15:28 +02:00
Haoxiang Zhou
a77f4be62b Use assert.Equals instead of reflect.DeepEquals to compare status structs
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-17 12:19:39 +02:00
Maartje Eyskens
8b7552cec1 Refactor the cainjector to only have 1 leader election
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-17 11:16:48 +02:00
Haoxiang Zhou
62700fceef Add unit tests testing building CertificateStatus struct from gathered Data
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-14 09:35:09 +02:00
Haoxiang Zhou
5a8f3371fa Refactor Run() into multiple functions for better testing
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-14 09:35:09 +02:00
Haoxiang Zhou
894745be7a Refactor out unnecessary helper functions for IssuerStatus
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-14 09:35:09 +02:00
Haoxiang Zhou
9a1da3ed71 Not creating OrderStatus at all if not ACME Issuer
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-14 09:35:09 +02:00
Haoxiang Zhou
d4877695da Use GenericIssuer to clean up Run function
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-14 09:35:09 +02:00
jetstack-bot
e1791b0b0e
Merge pull request #3154 from hzhou97/add_order_output
Ctl command `status certificate`: Add order output
2020-08-12 14:13:59 +01:00
Maartje Eyskens
3259fdfe9b Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:42 +02:00
Maartje Eyskens
827ce9c5ad Revert log levels on errors
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:42 +02:00
Maartje Eyskens
bdc8b346c6 Log NS as info
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:42 +02:00
Maartje Eyskens
5d4869b20e Fix formatted logs
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:41 +02:00
Maartje Eyskens
86dee5ed41 Set error log levels
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:41 +02:00
Maartje Eyskens
fecd0b3518 Set all log levels for info
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:41 +02:00
Maartje Eyskens
9dd00905e9 Update klog
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>

klog v2

Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-12 10:59:41 +02:00
Haoxiang Zhou
a1f7a1fcc3 Review implementation
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-06 18:21:48 +01:00
Haoxiang Zhou
8c9eb43102 Clean up
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-06 16:37:07 +01:00
Haoxiang Zhou
196959a05f No output about Orders if non-ACME Issuer
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-06 14:37:54 +01:00
Haoxiang Zhou
3913fa981f Add output about Order of Certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-06 12:02:26 +01:00
Haoxiang Zhou
8b6aad2c85 Populate CertificateStatus struct directly
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-04 12:55:33 +01:00
Haoxiang Zhou
f971e49400 Update unit test
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-03 12:07:14 +01:00
Haoxiang Zhou
6afc1d6cfa Change status cert to use structs
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-03 11:19:13 +01:00
Haoxiang Zhou
33bb65c9e1 Add NewTabWriter function
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-03 10:11:57 +01:00
Haoxiang Zhou
d490e52a5e Define builder and String functions for status struct
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-03 10:09:36 +01:00
Haoxiang Zhou
95a4f8f477 Define structs containing info for status command
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-31 12:17:29 +01:00
Haoxiang Zhou
25472462a3 Handle unknown values of Ext Key Usage if added in future
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-31 09:45:29 +01:00
Haoxiang Zhou
ef95d15642 Updated tests with output for secret
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-30 17:54:57 +01:00
Haoxiang Zhou
6ddcef818e Added unit test for key usage to string funtions
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-30 17:50:50 +01:00
Haoxiang Zhou
7bdc1eb237 Add output for secrets
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-29 12:24:04 +01:00
Haoxiang Zhou
f3bfc6d6ba Use Fprintf correctly
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-29 12:22:44 +01:00
jetstack-bot
ec6d2bb3e5
Merge pull request #3120 from hzhou97/add_issuer_output
Ctl status certificate command: Add issuer output and creation time
2020-07-29 12:13:20 +01:00
jetstack-bot
8434c6a941
Merge pull request #3094 from hzhou97/create_cr_new_test
Create cr command: change and add integration tests
2020-07-27 15:56:14 +01:00
Haoxiang Zhou
0c3eeaed96 Handle Issuers from non cert-manager groups
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-27 15:41:13 +01:00
Haoxiang Zhou
0d449ea76d Add tests for non-existing issuer; Review implementation
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-27 14:20:49 +01:00
Haoxiang Zhou
3b6b725c5d Added Certificate creation time to output
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-24 16:03:29 +01:00
Haoxiang Zhou
c4f7e27413 Add Issuer/ClusterIssuer output
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-24 15:32:34 +01:00
Haoxiang Zhou
cc40aad0ad Fix bug of using overwritten pointer when searching for CR
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-24 14:20:29 +01:00
Haoxiang Zhou
e9cdcbd3c4 Remove unnecessary PrefixWriter implementation
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-23 09:47:30 +01:00
Haoxiang Zhou
57ff60e35c Added more unit tests for Run function
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 17:29:47 +01:00
Haoxiang Zhou
d65e95eaeb Refactor TestCtlCreateCRBehaviourBeforeAnythingIsCreated to unit tests
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 16:51:48 +01:00
Haoxiang Zhou
8525a26bd2 Format the Events output with tabwriter
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 12:31:37 +01:00
Haoxiang Zhou
35e1d33ee4 Review implementations
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 09:45:17 +01:00
Haoxiang Zhou
f95251a5da Output Events of CR as well
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 09:45:17 +01:00
Haoxiang Zhou
a428472be7 Create implementation of PrefixWriter interface in describe package of kubectl
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 09:45:17 +01:00
Haoxiang Zhou
20c5e2696b Output the Events of Certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 09:45:17 +01:00
Haoxiang Zhou
f061f15e93 Review implementations
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-21 15:57:02 +01:00
Haoxiang Zhou
f5aeb56400 Validate errors if from-certificate-file flag is empty
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-17 17:48:02 +01:00
Haoxiang Zhou
28b9e4ba48 Added unit tests for Validate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-17 17:47:50 +01:00
Haoxiang Zhou
8b89873199 Smaller review implementations
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-17 13:53:39 +01:00
jetstack-bot
48eb68dd79
Merge pull request #3090 from hzhou97/add_cr_output
Ctl command status certificate: Add CR output
2020-07-16 10:31:48 +01:00
Haoxiang Zhou
7657b5e042 Add unit tests for string formatting functions
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-14 18:06:09 +01:00
Haoxiang Zhou
d808edaa08 Gather all CR info logic into function
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-14 17:43:06 +01:00
Haoxiang Zhou
69baa14a3e Add example use; cleanup and comments
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 15:49:32 +01:00
Haoxiang Zhou
cbf8da3197 Handle case where revision of cert not set yet
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:54:41 +01:00
Haoxiang Zhou
f5ebea1b27 Basic output for CR owned by Cert
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:54:41 +01:00
Haoxiang Zhou
864bb3ab59 Command output to stderr, check both ready condition and length of status.certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
a9e84ded4b Removed output in util function
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
e74d0fd954 Refactor Fetch function to have no API call
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
16a1d927e4 Fixed bug of assigning to new variable instead of correct one
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
2a2c637d3a Error when Ready condition is true but status.certificate is empty
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
76272f8acd Inline polling/waiting for CR to be ready
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
492fd623ec Changed flag to output-certificate-file
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
735be40fdc Improved help output
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
c2c62fe124 Added flag to specify timeout when waiting on certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
9583f7c0a3 Use %w to format errors, clean-up
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
6580010a14 Store certificate to file if flags are set
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
a421e5beb5 Added flags to wait for, fetch and store certificate from CR
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
55070d32ba Add util package
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
jetstack-bot
d4a7dfa730
Merge pull request #3026 from hzhou97/status_command
Basic `status certificate` ctl command
2020-07-10 11:07:08 +01:00
hzhou97
009b87431c Changed long description for command
Co-authored-by: James Westby <jw+debian@jameswestby.net>
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-09 15:47:06 +01:00
jetstack-bot
f80d79c268
Merge pull request #2909 from JoshVanL/2952-move-to-cobra
Move all commands into cobra
2020-07-07 12:30:04 +01:00
Haoxiang Zhou
e0b4cb176e Small review changes
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-06 11:17:31 +01:00
Haoxiang Zhou
58ec3c0bc7 Output NotBefore and RenewalTime
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 15:45:40 +01:00
Haoxiang Zhou
25a771f985 Clean-up from reviews
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 14:27:41 +01:00
Haoxiang Zhou
e43ec083c0 Output multiple lines for dns names and added example usage; clean-up
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 14:27:41 +01:00
Haoxiang Zhou
ff71b2976c Handle non-set NotAfter in output
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 14:27:41 +01:00
Haoxiang Zhou
2f7fa5e419 Changed output for conditions
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 14:27:41 +01:00
Haoxiang Zhou
3e9c78dfc6 Restructure to 'status certificate' instead of 'certificate status'
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 14:27:41 +01:00
Haoxiang Zhou
5d09aa814f Output incrementally instead of using one big format
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 14:27:41 +01:00
Haoxiang Zhou
8804fd9171 Handling basic outputs for multiple Status.Conditions
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 14:27:41 +01:00
Haoxiang Zhou
0369c745b1 Output for ready and up-to-date certificates
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 14:27:41 +01:00
Haoxiang Zhou
bc53b7b0aa Added scaffold for certificate status command
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-02 14:27:41 +01:00
James Munnelly
9e2d6a514b Move expcertificates into certificates package
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-07-01 12:16:25 +01:00
James Munnelly
2280480c02 Remove old certificates controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-07-01 11:46:13 +01:00
jetstack-bot
4018712a53
Merge pull request #3036 from hzhou97/create_cr_scheme
Use ctl.Scheme in create cr ctl command
2020-06-26 14:50:39 +01:00
JoshVanL
8f924151a3
Change acmesolver parameters and catch stopCh for server shutdown
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:47:37 +01:00
JoshVanL
d45847d302
Reverse webhook cmd run parameters
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:47:24 +01:00
JoshVanL
c3e2aae551
Fix binary names, printing errors, and help messages
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:47:11 +01:00
JoshVanL
7c831c537e
Add missing webhook flags and make options pointer
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:47:07 +01:00
JoshVanL
1107390b23
Fix webhook testing cmd
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:46:55 +01:00
JoshVanL
7c26448442
Fix controller bug for not exiting on option error
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:46:49 +01:00
JoshVanL
964a9b27dc
Move the webhook runtime into cobra
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:46:48 +01:00
JoshVanL
a6ae3418f6
Move the acmesolver runtime into cobra
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-06-26 13:46:45 +01:00
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
Haoxiang Zhou
8db33a0c43 Use ctl.Scheme instead of webhook.Scheme
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-06-26 12:02:49 +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
JoshVanL
4f0076615c
All ctl renew -A and -l options together
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:55:07 +01:00
JoshVanL
2a09b8ba55
Adds --wait, --all-namespaces, and --all to cert-manager-ctl renew
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:55:05 +01:00
James Munnelly
d3b6d70bc3
Fix-up renew subcommand
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-30 12:55:02 +01:00
JoshVanL
fa8c9753ac
Adds cert-manager-ctl renew sub-command
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:54:17 +01:00
JoshVanL
0657e34396
Moves cobra commands from cmd -> app
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:14:51 +01:00
JoshVanL
dcccdd39c5
Adds doc generation for cobra controlled ctl comands
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-30 12:14:48 +01:00
JoshVanL
2465bf8bd0
Uses own schema and fixes some text
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-28 10:23:53 +01:00
JoshVanL
23ce8fc0a8
Adds convert examples
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-28 09:28:18 +01:00
JoshVanL
4260eca10f
Expands some comments and adds some better error handling
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-28 09:28:16 +01:00
JoshVanL
2ec35382cd
Adds ctl covert command
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-04-28 09:28:14 +01:00
James Munnelly
67a93b4f22 Remove unused vars
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-21 17:58:18 +01:00