Commit Graph

250 Commits

Author SHA1 Message Date
Tim Ramlot
b999749854
improve gen.CSR and use it everywhere
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2022-11-10 09:21:31 +01:00
Danny Kulchinsky
81c85ee15c add issuer_{group|name|kind} labels to prom metrics
Signed-off-by: Danny Kulchinsky <dkulchinsky@fastly.com>
2022-09-28 10:21:36 -04:00
James Munnelly
ddc19a1c57 Fix comment
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-08-05 15:52:52 +01:00
James Munnelly
2de5135e18 Fix test flake
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-08-04 14:15:49 +01:00
James Munnelly
e62bfaf367 Add test to check InvalidRequest handling for certificates
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-08-04 12:21:41 +01:00
James Munnelly
51014e5752 Add integration test for regenerating private key for each CR upon failure
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-08-04 12:21:41 +01:00
James Munnelly
099a52ffe3 integration framework: add StartInformersAndControllers
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-08-04 12:21:41 +01:00
Ashley Davis
fb231ab641
Remove bazel 🎉
This removes all .bazel and .bzl files, and a bunch of scripts relating
to bazel, now that it's been entirely replaced.

There are still a few places where traces could be removed, but this
removes the brunt of the bazel stuff that remains.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-07-26 11:38:50 +01:00
joshvanl
328ea2b632 Change all scripts #!/bin/bash -> #!/usr/bin/env bash. Also changes same
for Makefile SHELL

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-07-04 14:49:34 +01:00
Irbe Krumina
1d917ef311 Revert "Use Apply instead of Update to modify resources in tests"
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-05-03 11:31:47 +01:00
irbekrm
58b633aa04 Code review feedback
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-29 12:42:41 +01:00
irbekrm
030ee91f5e Integration tests use SSA instead of Update to update test resources
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-04-28 14:51:19 +01:00
joshvanl
8ebedac654 Fix challenge serialization, and add integration tests for apply helpers
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-04-01 11:53:44 +01:00
joshvanl
fa411f187d Fix golang linting
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-03-29 13:59:10 +01:00
joshvanl
c54451092e Adds integration tests for owner reference post issuance checks
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-03-29 13:54:27 +01:00
jetstack-bot
e116d416f3
Merge pull request #4799 from JoshVanL/controllers-server-side-apply-orders
Server Side Apply: Adds support for Order controllers to use SSA with Feature Gate
2022-03-28 13:11:31 +01:00
irbekrm
dbad3d98f3 Rename issuanceAttempts -> failedIssuanceAttempts
In an attempt to convey the meaning of the field better

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00:00
irbekrm
4c901aefab Code review comments
Adds test conditions to certs via patch API call instead of update to avoid conflicts

Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00:00
irbekrm
8e81e01932 Adds an integration test for exponential backoff
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00:00
Joakim Ahrlin
ead4ab54ea add regression tests for certificate validation
Signed-off-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
2022-03-10 15:41:42 +01:00
jetstack-bot
d998e37a44
Merge pull request #4873 from SgtCoDFish/importsfixes
Fix imports in a few files
2022-02-21 11:41:48 +00:00
Ashley Davis
6420aa4bfa
fix imports in a few files
this is according to our policy on organizing imports, see:
https://cert-manager.io/docs/contributing/coding-conventions/#organizing-imports

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-18 17:42:45 +00:00
Ashley Davis
9cf53f7e8e
accept files starting with ./ in versionchecker
also small no-op refactors

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-17 14:48:56 +00:00
Ashley Davis
eb6c29756d
Refactor CRD provisioning for integration tests
Falls back to looking in bin/crds if nothing has been provisioned in
bazel.

Removes "bazel.go" and consolidates in "paths.go", since the bazel name
will become obsolete and the functionality has changed

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-17 14:48:56 +00:00
jetstack-bot
10c5d72279
Merge pull request #4792 from JoshVanL/controllers-server-side-apply-certificaterequests
Server Side Apply: Adds support for CertificateRequests controller to use SSA with Feature Gate
2022-02-16 10:57:37 +00:00
joshvanl
0802489f4e Updates Order controller to support apply call when feature gate it
enabled

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-16 10:33:48 +00:00
jetstack-bot
12a2148df3
Merge pull request #4794 from JoshVanL/controllers-server-side-apply-issuers
Server Side Apply: Adds support for [Cluster]Issuer controller to use SSA with Feature Gate
2022-02-11 19:37:01 +00:00
joshvanl
f73d6584fb Fix copyright year. Remove carrot from OWNERS string match
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:26:56 +00:00
joshvanl
d1ffb0ad0d Adds roundtrip tests for issuer and cluster issuer serialize
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:26:56 +00:00
joshvanl
5f1249efe9 Adds issuer and cluster issuer integration tests to ensure mapped
conditions

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:26:56 +00:00
joshvanl
8f43629e5f Remove carrot from OWNERS string match
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:23:23 +00:00
joshvanl
c2c2cb52ec Use more appropriate names in apply integration tests
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:22:33 +00:00
joshvanl
da67eb2b65 Adds explicit field manager to requestsmanager controller Create call
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:22:33 +00:00
joshvanl
2f922cf37d Adds integration test for CertificateRequest apply helper
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:22:33 +00:00
joshvanl
7b943d65cc Change import paths jetstack/cert-manager ->
`cert-manager/cert-manager`

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:22:33 +00:00
joshvanl
a4588c3401 Adds condition_list_type_test integration test for CertificateRequest object
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:22:33 +00:00
joshvanl
9a04b3cb08 Return CR object from apply helper
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:22:03 +00:00
joshvanl
d6ea92afd8 Adds apply helper function for CertificateRequests. Integration for
condition map

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:21:19 +00:00
joshvanl
9946c84760 Fix NewController signature in certificates integration test
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:17:47 +00:00
joshvanl
4dc6c957d4 Adds review comments
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:15:57 +00:00
joshvanl
6b3cde9327 Fix apply[_test].go package names
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:15:57 +00:00
joshvanl
067863f83a Revert issuing integration test to again check for Issuing condition
being removed

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:15:57 +00:00
joshvanl
a8909f9b91 Update integration tests for passing field manager. Add integration
tests for certificate condition field open api tags

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:15:56 +00:00
Ashley Davis
fc4f130755
Change handling of time in ctl integration tests
Two main changes:

1. Timezones

Because the tests were run in bazel or in CI environments, they always
ran in UTC, but the behaviour of ctl is based on local time, not UTC. We
show "not after" in the local timezone.

Now, we parse the "not after" time from the output so that its timezone
is respected and should pass on any developer laptop even outside of
bazel.

2. Created At

There was previously a pretty big regex for checking that "Created at"
was a valid timestamp. Now, we simply parse the timestamp using the Go
standard library to confirm that it's a valid RFC3339 timestamp.

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-10 15:29:51 +00:00
joshvanl
ab45d640ea Adds integration tests for additional output formats
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-07 14:42:04 +00:00
Ashley Davis
3a055cc2f5
rename all uses of github.com/jetstack/cert-manager
This was done by running the following command twice:

 ```bash
 grep -Ri "github.com/jetstack/cert-manager" . | \
 cut -d":" -f1 | \
 sort | \
 uniq | \
 xargs sed -i
 "s/github.com\/jetstack\/cert-manager/github.com\/cert-manager\/cert-manager/"
 ```

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-02 09:08:31 +00:00
joshvanl
fb6e0b9f00 Pass FieldManager down to issuing controller->secrets manager
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-01-27 13:56:29 +00:00
jetstack-bot
b12d78d364
Merge pull request #4746 from JoshVanL/controller-readiness-certificates-spec-match
Certificates controller policies refactor
2022-01-27 12:45:40 +00:00
James Munnelly
d03d98967d Fix webhook kubernetes config in integration tests
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-20 10:56:50 +00:00
James Munnelly
708de3c580 webhook: use new admission-plugin backed validation and mutation handlers
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-20 10:56:46 +00:00