Commit efd97f8
committed
fix: resolve jsonpath error when waiting for caBundle in webhook configurations
- Fixed error:
'deployment.apps/cert-manager-webhook condition met
deployment.apps/cert-manager-cainjector condition met
deployment.apps/cert-manager condition met
error: jsonpath wait format must be --for=jsonpath='{.status.readyReplicas}'=3'
- The error appears because 'kubectl wait' isn’t fully compatible with JSONPath on non-status fields, especially for resources like 'mutatingwebhookconfigurations' and 'validatingwebhookconfigurations'. 'kubectl wait' expects status fields related to replicas, which aren’t present in these configurations.
- Replaced 'kubectl wait' with the 'kubectl_wait_for_caBundle' function, which uses a loop with 'kubectl get' to repeatedly check the 'caBundle' field until it is populated. This bypasses the limitations of 'kubectl wait' and avoids replica-based conditions for webhook configurations.1 parent 6bda277 commit efd97f8
1 file changed
+25
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
44 | 67 | | |
45 | 68 | | |
46 | 69 | | |
47 | 70 | | |
48 | 71 | | |
49 | | - | |
50 | | - | |
| 72 | + | |
| 73 | + | |
51 | 74 | | |
52 | 75 | | |
53 | 76 | | |
| |||
0 commit comments