Commit Graph

66 Commits

Author SHA1 Message Date
James Munnelly
ff0a2c00a1 Don't manually init issuer helper
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 15:24:41 +01:00
James Munnelly
57315074f7 acmeorders: remove util_test.go and refactor to use builder directly
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 12:30:23 +01:00
James Munnelly
99bbc31386 Promote 'Clock' to be a field on controller context
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-26 12:30:23 +01:00
jetstack-bot
0b5f963bf9
Merge pull request #1884 from munnerz/order-csr-pem
Encode CSR on Order into PEM format and properly handle decoding
2019-07-12 17:00:38 +01:00
James Munnelly
c6ceea4e81 Encode CSR on Order into PEM format and properly handle decoding
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-12 14:00:46 +01:00
Michael Tsang
b717292090 Rewrite if/else for nil selector
Signed-off-by: Michael Tsang <michael.tsang@jetstack.io>
2019-07-10 17:09:26 +01:00
Michael Tsang
adfb8703c8 Fix bug where solver with no selector causes nil pointer
Signed-off-by: Michael Tsang <michael.tsang@jetstack.io>
2019-07-10 15:34:24 +01:00
James Munnelly
ed3efdebe0 orders: fire an Event when no acme solver matches an identifier being validated
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-07-04 22:14:35 +01:00
James Munnelly
c9bcfc2b62 Refactor label selector checker
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-25 16:52:15 +02:00
James Munnelly
cf8c12c5ea Add unit tests for dnsZone selectors
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-25 15:18:30 +02:00
James Munnelly
e8c64e46cc Add support for dnsZones in solver selector
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-25 15:18:30 +02:00
James Munnelly
77d9891650 Rewrite challengeSpecForAuthorization function
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-25 15:18:30 +02:00
James Munnelly
fc24b9afc9 Add unit tests for challengeSpecForAuthorization function
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-25 15:17:17 +02:00
James Munnelly
20b1343c88 Remove use of klog from more places
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-25 14:30:41 +02:00
James Munnelly
f8a798bd2b update bazel files
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-19 15:33:57 +01:00
James Munnelly
442789113a Refactor controllers to not reference BaseController
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-19 15:11:06 +01:00
jetstack-bot
48cd58b23f
Merge pull request #1722 from cheukwing/issue-1003
Add BaseController as a refactoring of common controller code
2019-06-17 19:27:57 +01:00
jetstack-bot
4c199c90ca
Merge pull request #1717 from dobesv/patch-2
Fix solver selection logic to return the selected solver rather than always returning the last one
2019-06-06 13:29:03 +01:00
jetstack-bot
edd2225002
Merge pull request #1692 from cheukwing/issue-1001
Add metric to count number of sync calls
2019-06-05 11:20:39 +01:00
Dobes Vandermeer
bd8cd5441a Fix address to reference array element
The address of a for loop created variable does not change between loops - the variable is over-written with each new variable.  This fixes the code so that `d` references the array element instead of the local variable, which means that when `d` is assigned to `matchAll` or `specificMatch` it will work as intended.

Signed-off-by: Dobes Vandermeer <dobesv@gmail.com>
2019-05-28 09:00:04 +01:00
Dobes Vandermeer
6d28bee388 Update matchAllDomainsNumLabels and numLabelsSpecificMatch
These variables seem like they should be updated when updating the thing they are supposed to be derived from.

Signed-off-by: Dobes Vandermeer <dobesv@gmail.com>
2019-05-24 09:57:53 +01:00
Michael Tsang
0add074b7f Add basecontroller to other controllers
Signed-off-by: Michael Tsang <michael.tsang@jetstack.io>
2019-05-23 17:32:33 +01:00
Michael Tsang
7d67ae466e Remove metrics field from controllers
Signed-off-by: Michael Tsang <michael.tsang@jetstack.io>
2019-05-20 11:06:11 +01:00
Michael Tsang
455f6ebab4 Use ControllerName as label value
Signed-off-by: Michael Tsang <michael.tsang@jetstack.io>
2019-05-17 16:49:39 +01:00
Michael Tsang
f2e57a1c95 Add ControllerSyncCallCount metric
Signed-off-by: Michael Tsang <michael.tsang@jetstack.io>
2019-05-17 14:22:16 +01:00
James Munnelly
7945a6b6a8 Remove anonymous function
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-05-01 17:14:34 +01:00
James Munnelly
220d39c17d Update acmeorders controller to support both formats
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-05-01 14:24:00 +01:00
James Munnelly
871ed4283b Allow controller constructors to return errors
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-04-18 14:22:04 +01:00
James Munnelly
708313ac4b Update acmeorders controller
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-03-12 14:24:50 +00:00
James Munnelly
2f30258f0e Switch to klog
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-02-22 12:34:02 +00:00
James Munnelly
0bde3dacba Create pkg/api/util and re-arrange controller instantiation code
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-02-19 11:25:54 +00:00
James Munnelly
d055d370bb Plumb testing.T through to test Builder
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-31 20:20:20 +00:00
James Munnelly
948a2cf77c Add more OWNERS files with auto-labels
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-24 19:38:31 +00:00
James Munnelly
c91833f43a Update order status if state changes will retrieving an existing certificate
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-17 18:29:55 +00:00
James Munnelly
e88e4f4406 If an Order is already valid, attempt to retrieve existing certificate
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-17 13:19:04 +00:00
jetstack-bot
2fc68d9b33
Merge pull request #1197 from munnerz/acme-retain-challenges
Retain Challenge resources for debugging if an Order enters an invalid state
2019-01-11 17:22:11 +00:00
jetstack-bot
c512319bfb
Merge pull request #1188 from kragniz/controller-namespace
Add --namespace flag
2019-01-11 15:14:11 +00:00
James Munnelly
b1df71dd66 Retain Challenge resources for debugging if an Order enters an invalid state
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-11 14:04:23 +00:00
James Munnelly
21c7b2e13f Increase ACME control loop max back-off. Increase create order back-off to 1h. Fire Event when Order fails.
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-10 22:07:48 +00:00
Daniel Morsing
cc946c0b45 Populate reason field regardless
If we have an error, then tell people about it.

Signed-off-by: Daniel Morsing <dmo@jetstack.io>
2019-01-10 14:54:43 +00:00
Daniel Morsing
1b921b1583 remove more strict validation
Turns out the ACME server can respond with different codes than the ones listed

Signed-off-by: Daniel Morsing <dmo@jetstack.io>
2019-01-10 14:35:30 +00:00
Daniel Morsing
ba240bbe4e Add reason when an order/challenge gets marked invalid
When an ACME server tells us that a challenge or an order is invalid, it's helpful to get some information on why that's the case. Populate the reason field with the error information so that these issues can be more easily debugged.

Signed-off-by: Daniel Morsing <dmo@jetstack.io>
2019-01-10 14:05:15 +00:00
Louis Taylor
40b68a3e10 Fix more references to clusterIssuer
Signed-off-by: Louis Taylor <louis@kragniz.eu>
2019-01-10 13:52:52 +00:00
James Munnelly
0fcc0c666c Update copyright header year
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 15:07:55 +00:00
jetstack-bot
f4e5203f1c
Merge pull request #1116 from munnerz/cleanup-challenges
CleanUp ACME challenges after issuing and on delete using finalizer
2018-11-29 15:07:17 +00:00
jetstack-bot
28162cebff
Merge pull request #1119 from munnerz/remove-requeue
Remove requeue option and fix small race in controllers
2018-11-29 13:42:16 +00:00
James Munnelly
f8fe9ef21f Remove requeue option and fix small race in controllers
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-29 12:23:21 +00:00
James Munnelly
34c3590052 Store a copy of the signed certificate on the Order resource after Finalize
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-29 12:11:42 +00:00
jetstack-bot
8f37cf6c40
Merge pull request #1117 from munnerz/wildcard-challenge-check
Include wildcard field in comparison of challenge specs
2018-11-29 11:26:17 +00:00
James Munnelly
dd8f98768b CleanUp ACME challenges after issuing and on delete using finalizer
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-28 22:05:47 +00:00