Commit Graph

1551 Commits

Author SHA1 Message Date
jetstack-bot
9a64cfa027
Merge pull request #1008 from munnerz/ref-docs-cleanup
Move reference-docs generation tools into docs/ subdir
2018-11-15 11:35:00 +00:00
Max Ehrlich
bbd9249198 Configurable issuer duration and renewBefore Take 2 (#893)
* Configurable issuer duration and renewBefore [1/3]

This is part one of (probably) three parts manually moving the changes from commit 723015174a167d746323f506ab3575cfb243d8bd to the new master. This commit moves the basic functionality of configurable duration while skipping e2e tests and docs. It does not include new work.

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Configurable issuer duration and renewBefore [2/3]

This commit moves over most of the e2e testing updates, some things are intentionally left out as they may be obsolete

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Configurable issuer duration and renewBefore [3/3]

This commit moves the documentation changes, completely the migration of the original code to the latest master

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerunning all hack scripts with since the massive bazel update

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add missing boilerplate headers

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerun codegen hack

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerunning update-docs hack

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix failing unit tests

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix build errors in e2e tests

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerun update-deps

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Don't recreate the CA issuer, it already exists

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Need to create new issuers for the duration and renew time tests because those fields are set in the issuer, so make sure they are named uniquely

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add duration e2e tests for self-signed issuer

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add duration e2e tests for vault w/ custom mount path

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add validation to disallow acme certificates with duration and renewBefore set and update unit tests to verify

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update docs to mention duration/renew for self-signed issuer and fix potential parsing errors with rst formatting

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Self-signed issuer was missing duration validation

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix a bug causing certificates with a short enough renew-before w.r.t their duration to be renewed instantly and forever

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Print the exact time until renewal

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Move duration and renwal validation to the issuer validation

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update e2e tests to work with new validation

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add e2e test for the self-signed issuer

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Redo cert duration and renew before to appear as part of the CSR and not the issuer

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Updating tests to match new duration/renewbefore format

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update e2e tests to match new format

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update docs to reflect changing the field from issuers to certificates

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove event firing and replace with a TODO as of discussion on PR

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Run hack scripts

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove the sync unit test since without events there is no way to catch the warnings that it was testing

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Use IssuerOptions RenewBeforeExpiryDuration if certificates dont set a renewBefore value for immediate renewal checks

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Delete check on certificate data length in e2e test for certificate duration as there is no reason it should be there

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update e2e tests since certificate creation will never generate an event

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerunning hack scripts after big rebase

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix a few problems that slipped through during the rebase

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix an e2e error that resulted from the rebase

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add unit test for the calculateTimeBeforeExpiry function

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Adding back in a bunch of missing error checks

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove unused function

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add missing boilerplate

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove unused constant

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Move log constants to function body

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerun hack scripts

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove mistakenly commited file

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove double-import of util package

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix bad function call in e2e vault issuer

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Change duration and renewBefore to be pointer fields as they are optional

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove wrong vault issuer test that got passed the rebase somehow

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Change e2e to use pointer format

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Move e2e cert tests out of issuer test file

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Move e2e self-signed issuer test to new location

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Make sure to check for nil in GenerateTemplate

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add more empty checks to be safe

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerunning hacks after rebase

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix bad function call in new e2e test

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Try not setting duration and renewbefore on acme e2e tests

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Zero checks should really just be replaced by nil tests, zero should be caught as any other too-small value

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fixed a missing nil check that got away

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Change e2e duration test format to use pointer times to better simulate API calls

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix sync unit test to match e2e test format

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix vault e2e test

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Revert changes to Certificate sync function

Signed-off-by: James Munnelly <james@munnelly.eu>

* Remove selfsigned e2e issuer.go

Signed-off-by: James Munnelly <james@munnelly.eu>

* Don't use ACME issuer in duration example and tidy up line endings

Signed-off-by: James Munnelly <james@munnelly.eu>

* Allow renewBefore to be set on ACME certificates

Signed-off-by: James Munnelly <james@munnelly.eu>

* Update renewBefore ACME docs. Remove unused fields.

Signed-off-by: James Munnelly <james@munnelly.eu>

* Rename calculateTimeBeforeExpiry to calculateDurationUntilRenew

Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-14 22:30:00 +00:00
James Munnelly
b50603a576 Remove extra buildozer modifications
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-14 11:39:22 +00:00
James Munnelly
b71944b5a4 Move reference-docs generation tools into docs/ subdir
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-14 00:48:06 +00:00
jetstack-bot
c3b4bc88ee
Merge pull request #1071 from munnerz/acmeorders-clock
acmeorders: instantiate real clock
2018-11-13 20:08:00 +00:00
jetstack-bot
4426604f7f
Merge pull request #1063 from munnerz/bump-kind
Bump kind to latest HEAD
2018-11-13 19:51:02 +00:00
James Munnelly
93e886dfaa Fix v1alpha3 kind config
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-13 19:32:02 +00:00
James Munnelly
ed5ff98c9e Use appropriate kubeadm config version for kubernetes version
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-13 17:37:50 +00:00
jetstack-bot
77eea12d32
Merge pull request #1073 from munnerz/acme-skip-recheck-acc
Mark issuer as invalid when parsing URLs fails
2018-11-13 16:41:00 +00:00
James Munnelly
6006ad6f50 Mark issuer as invalid when parsing URLs fails
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-13 16:14:13 +00:00
jetstack-bot
d9eda64085
Merge pull request #1032 from munnerz/acme-skip-recheck-acc
Skip re-checking ACME account status if Issuer is ready and URL hosts match
2018-11-13 16:08:00 +00:00
James Munnelly
b9947e3247 Skip re-checking ACME account status if Issuer is ready and URL hosts match
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-13 15:52:15 +00:00
James Munnelly
3eb8c486ce acmeorders: instantiate real clock
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-13 15:22:44 +00:00
jetstack-bot
3ce276d5e8
Merge pull request #1066 from heckj/files-for-quickstart
adding files for quickstart
2018-11-13 11:21:59 +00:00
jetstack-bot
1a4e51f753
Merge pull request #1065 from heckj/docs-cleanup
Docs cleanup
2018-11-13 11:17:00 +00:00
Joe Heck
c18449afb4 adding files for quickstart
- I'm going to reference them, but the testing for this repo does
  link validation up front, so the files need to exist in their final
  locations before the other PR can pass it's testing/validation.

Signed-off-by: Joe Heck <heckj@mac.com>
2018-11-10 12:58:50 -08:00
Joe Heck
7e3ee68879 minor grammar improvement
Signed-off-by: Joe Heck <heckj@mac.com>
2018-11-10 09:48:54 -08:00
Joe Heck
facf1e9fb4 clean up sphinx warnings
- fixed missing blank line in ref docs code block
- updated references to sphinx docs
- included documentation notes into the docs index

Signed-off-by: Joe Heck <heckj@mac.com>
2018-11-10 09:48:54 -08:00
James Munnelly
78f1718b86 Bump config template and kind image
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-09 11:47:34 +00:00
James Munnelly
eab17704a8 Bump kind to latest HEAD
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-09 11:24:32 +00:00
jetstack-bot
eca128747a
Merge pull request #1059 from munnerz/acme-ctrl-events
Fire Events when challenges succeed or fail
2018-11-08 16:03:20 +00:00
jetstack-bot
e8ea986c51
Merge pull request #1058 from munnerz/gitlab-push
Fix GitLab build use of APP_VERSION
2018-11-07 21:14:46 +00:00
James Munnelly
71dd4f6996 Fix GitLab build use of APP_VERSION
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 20:56:48 +00:00
James Munnelly
5cc3240145 Fire Events when challenges succeed or fail
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 20:38:22 +00:00
jetstack-bot
c3b4f2b84e
Merge pull request #1057 from munnerz/chart-canary
Bump Helm chart version to canary on master
2018-11-07 19:38:46 +00:00
James Munnelly
95e685e4fc Bump Helm chart version to canary on master
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 19:09:23 +00:00
jetstack-bot
25c1c126c8
Merge pull request #1052 from munnerz/webhook-panic
Re-enable webhook during e2e tests and fix panic on start
2018-11-07 17:11:46 +00:00
jetstack-bot
814a1d7d8e
Merge pull request #1012 from munnerz/e2e-crt-algo
Add e2e test verifying we can obtain ECDSA keys from RSA CA issuers
2018-11-07 16:47:45 +00:00
jetstack-bot
c1247b9df3
Merge pull request #1053 from munnerz/gitlab-bazelbuild-vers
Bump CI image used on GitLab
2018-11-07 16:36:46 +00:00
James Munnelly
f22c3de2ea Bump CI image used on GitLab
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 16:26:03 +00:00
James Munnelly
17c5a2e21c Update BUILD.bazel
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 16:22:25 +00:00
jetstack-bot
1af712ee36
Merge pull request #1050 from munnerz/go-111
Bump project to use Go 1.11.2
2018-11-07 16:20:45 +00:00
James Munnelly
51d950692c Update pod started checker to tolerate PodCompleted
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 16:14:57 +00:00
James Munnelly
719dd915d1 Re-enable webhook during e2e tests and fix panic on start
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 16:06:49 +00:00
James Munnelly
2858f261f8 Run //hack:update-codegen
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 15:56:58 +00:00
James Munnelly
aac88430f2 Disable gazelle proto generation
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 15:48:47 +00:00
James Munnelly
544507f442 Update gofmt
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 12:39:36 +00:00
James Munnelly
d6679f39f2 Update Bazel files
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 11:33:30 +00:00
James Munnelly
a8bb45598d Bump gazelle to 0.15.0
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 11:29:18 +00:00
James Munnelly
8843c30e4c Bump rules_go version
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 11:25:12 +00:00
James Munnelly
7c212e5fa4 Bump Golang to 1.11.2
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 11:17:58 +00:00
James Munnelly
cf402848b9 Add RSA/ECDSA unit tests for CA issuer
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 11:14:54 +00:00
James Munnelly
fdfc7f2f77 Don't explicitly set SignatureAlgorithm on signed Certificate
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 11:14:54 +00:00
James Munnelly
e7fd05ddea Add e2e test verifying we can obtain ECDSA keys from RSA CA issuers
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 11:14:54 +00:00
jetstack-bot
96dc275df9
Merge pull request #1049 from munnerz/gen-types
Add Certificate and Issuer unit gen functions
2018-11-07 11:06:45 +00:00
jetstack-bot
319d6086ca
Merge pull request #1048 from munnerz/fix-grab-secret-name
Fix invalid secret name used in certificates controller
2018-11-07 10:47:45 +00:00
James Munnelly
17563ee1a1 Add Certificate and Issuer unit gen functions
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 09:56:09 +00:00
jetstack-bot
ac80ed82f1
Merge pull request #1046 from munnerz/logs-pkg
Revert "Remove pkg/logs package"
2018-11-07 09:48:55 +00:00
jetstack-bot
a2f77b6e61
Merge pull request #1040 from munnerz/gofmt
Use go_sdk gofmt instead of goimports
2018-11-07 09:48:45 +00:00
jetstack-bot
04ac65caee
Merge pull request #1047 from munnerz/stamped-images
Stamp docker images with current timestamp using Bazel
2018-11-07 09:28:45 +00:00