Commit Graph

368 Commits

Author SHA1 Message Date
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