Commit Graph

577 Commits

Author SHA1 Message Date
jetstack-bot
e2aede44c7
Merge pull request #4731 from DiptoChakrabarty/lint
add go linters fixes within codebase
2022-01-18 12:52:57 +00:00
jetstack-bot
5a0c4096cf
Merge pull request #4719 from munnerz/fixup-upgrade-migrate
Reword log messages in the 'cmctl upgrade migrate-api-version' command
2022-01-18 11:30:57 +00:00
DiptoChakrabarty
b0e2264b60 add go linters
Signed-off-by: DiptoChakrabarty <diptochuck123@gmail.com>
2022-01-13 00:12:15 +05:30
jetstack-bot
fa321b6a4b
Merge pull request #4287 from linka-cloud/acme-http-challenge-cutomer-dns
Acme http challenge custom dns
2022-01-11 11:24:03 +00:00
James Munnelly
efd1cad7f4 Reword log messages in the 'cmctl upgrade migrate-api-version' command
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-07 12:45:50 +00:00
James Munnelly
ea2d04e2c0 Add webhook-specific 'feature' package and wire it up through config
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-07 12:17:38 +00:00
James Munnelly
9c04a04c7c Move feature package into internal/controller
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-07 12:17:36 +00:00
Adphi
3375fa0609
http01: add custom nameservers support (#4286)
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
2022-01-06 21:02:46 +01:00
James Munnelly
c841d01d68 Allow specify --qps and --burst
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 16:47:43 +00:00
James Munnelly
b3f14ef51d Expand example usage text
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 16:42:39 +00:00
James Munnelly
4b257c1d72 Only mention upgrading to 1.0-1.6 once
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 16:39:07 +00:00
James Munnelly
35a96362a7 Rename command to 'migrate-api-version'
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 15:21:47 +00:00
James Munnelly
0f199173ba Add missing copyright headers
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 15:08:48 +00:00
James Munnelly
22b2b3687a Don't assume we are targetting 'v1'
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 15:07:27 +00:00
James Munnelly
c4d97e1f53 Indicate whether a migration was actually performed in Run
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 15:07:10 +00:00
James Munnelly
f6e3458837 Rename --force to --skip-stored-version-check
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 15:06:26 +00:00
James Munnelly
5b50412d1e Fix bug causing error to always be returned
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 14:07:58 +00:00
James Munnelly
8fa378fe01 Check to ensure the storage version or storedVersions have not unexpectedly changed before patching storedVersions
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 13:18:31 +00:00
James Munnelly
feca88bae5 Retry failed requests 3 times before giving up
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 13:18:31 +00:00
James Munnelly
438d74be15 Reorganise migrate command into a its own struct & add --force flag
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 13:18:31 +00:00
James Munnelly
0ca2db69a3 Print start time and how long it took to migrate resources
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 13:18:31 +00:00
James Munnelly
110604f1e5 Add 'cmctl upgrade migrate' tool to assist in v1.7 upgrade
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2022-01-06 13:18:31 +00:00
irbekrm
f4452f1cfa Fix some flag descriptions
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-12-31 09:15:32 +00:00
James Munnelly
81f22fd49c Upgrade k8s.io dependencies to v0.23.1
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-12-17 16:27:47 +00:00
Richard Wall
4eedf4fcfd Test conversion code using sample CRDs and remove conversion configuration from cert-manager CRDs
* Generate CRDs for the sample API types
* Allow alternative CRDs to be loaded into the envtest API server
* Override the conversion configuration of the CRDs
* Show webhook server logs in tests
* Simplify the loading of the test API CRDs
* Allow the ConversionHandler to be overridden in tests

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-12-14 17:33:22 +00:00
James Munnelly
1a96d9f32d config.cert-manager.io -> webhook.config.cert-manager.io
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-12-01 12:57:08 +00:00
James Munnelly
71a69cc488 Add unit tests for configfile loading
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-11-26 14:12:54 +00:00
James Munnelly
e21c6e6272 Add test for flag precedence
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-11-26 14:12:54 +00:00
James Munnelly
0e1d603c93 Add support for reading config from WebhookConfiguration object
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-11-26 14:12:54 +00:00
James Munnelly
2e3eb29327 Register logger flags
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-11-26 14:12:54 +00:00
James Munnelly
afa8e5a304 Refactoring webhook initialisation to support early config handling
Signed-off-by: James Munnelly <jmunnelly@apple.com>
2021-11-26 14:12:54 +00:00
Igor Zibarev
f9ceb8a73e Fix some lint issues regarding comments
References issue #4457

Signed-off-by: Igor Zibarev <zibarev.i@gmail.com>
2021-11-02 13:57:20 +03:00
Maël Valais
1a1ef80b1b cmctl status was fetching v1beta1 orders instead of v1
Signed-off-by: Maël Valais <mael@vls.dev>
2021-10-29 12:48:57 +02:00
jetstack-bot
5eabeb0020
Merge pull request #4520 from mcaci/lint
Remove t.Fatal from goroutine
2021-10-26 13:02:40 +01:00
jetstack-bot
f61d534975
Merge pull request #4550 from irbekrm/pprof
Pprof
2021-10-26 11:20:40 +01:00
irbekrm
c58b73edeb Pprof can be optionally run for cainjector
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-10-26 12:21:21 +03:00
irbekrm
7b6eeff457 Profiler address for controller can now be configured
Ensures that pprof is configured for controller in the same way as for cainjector

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-10-26 12:20:42 +03:00
irbekrm
73a696ddb3 Pprof addr for webhook defaults to localhost
Also whether it is enabled and the address can now be configured via commandline flags

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-10-26 12:18:32 +03:00
irbekrm
4d4a383cb7 Removes deprecated dns01-self-check-nameservers flag
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-10-25 08:43:08 +03:00
Michele Caci
ac4bf927c2 Remove t.Fatal from goroutine
Signed-off-by: Michele Caci <michele.caci@amadeus.com>
2021-10-19 12:53:46 +02:00
joshvanl
64feb85490 Adds bazel to build and release cmctl, along with kubectl-cert_manager
binary

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-10-14 15:49:46 +01:00
joshvanl
ce1424162e Updates all sub commands to discover the CLI name using the build
package name

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-10-14 14:45:01 +01:00
joshvanl
5f5217b412 Updates command registration to use new commands package. Name CLI
command by the build name.

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-10-14 14:44:19 +01:00
joshvanl
2f99b3130c Adds build/commands package to expose which commands should be
registered. Gates the completion command which is disabled by defualt.
Can be configured at build time.

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-10-14 14:43:05 +01:00
joshvanl
bbd39de0fc Adds build package to allow discovering the correct name of the CLI
command. Can be configured at build time.

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-10-14 14:42:10 +01:00
joshvanl
bae35d8adb Add ValidArgs functions to all commands to allow auto-completion of
runtime object names

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-10-14 13:20:31 +01:00
jetstack-bot
89bc977eb2
Merge pull request #4408 from JoshVanL/ctl-generate-completion
Adds generate completion scripts for bash, zsh, fish, and powershell
2021-10-11 16:02:14 +01:00
Richard Wall
e53c29f128 Call Options.Complete to set up the version checker command
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-10-09 10:14:01 +01:00
irbekrm
0679c33c3f Update kube libraries, regenerate go.mod/go.sum
Updates go.mod for Go 1.17

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-09-30 10:07:59 +01:00
jetstack-bot
898dc0e254
Merge pull request #4419 from artificial-aidan/master
Add Certificate RenewBefore prometheus metrics
2021-09-27 17:51:46 +01:00