Skip to content

Commit 63740fc

Browse files
authored
Fix certificate revisionHistoryLimit schema (external-secrets#4534)
* fix invalid quote Signed-off-by: Aran Shavit <[email protected]> * fix schema Signed-off-by: Aran Shavit <[email protected]> * change implementation so that default value will work Signed-off-by: Aran Shavit <[email protected]> * ran make test.crds.update Signed-off-by: Aran Shavit <[email protected]> --------- Signed-off-by: Aran Shavit <[email protected]>
1 parent 621f1f0 commit 63740fc

File tree

8 files changed

+12
-10
lines changed

8 files changed

+12
-10
lines changed

deploy/charts/external-secrets/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ The command removes all the Kubernetes components associated with the chart and
174174
| webhook.certManager.cert.duration | string | `"8760h"` | Set the requested duration (i.e. lifetime) of the Certificate. See https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec One year by default. |
175175
| webhook.certManager.cert.issuerRef | object | `{"group":"cert-manager.io","kind":"Issuer","name":"my-issuer"}` | For the Certificate created by this chart, setup the issuer. See https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.IssuerSpec |
176176
| webhook.certManager.cert.renewBefore | string | `""` | How long before the currently issued certificate’s expiry cert-manager should renew the certificate. See https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec Note that renewBefore should be greater than .webhook.lookaheadInterval since the webhook will check this far in advance that the certificate is valid. |
177-
| webhook.certManager.cert.revisionHistoryLimit | string | `""` | Set the revisionHistoryLimit on the Certificate. See https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec Defaults to nil. |
177+
| webhook.certManager.cert.revisionHistoryLimit | int | `0` | Set the revisionHistoryLimit on the Certificate. See https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec Defaults to 0 (ignored). |
178178
| webhook.certManager.enabled | bool | `false` | Enabling cert-manager support will disable the built in secret and switch to using cert-manager (installed separately) to automatically issue and renew the webhook certificate. This chart does not install cert-manager for you, See https://cert-manager.io/docs/ |
179179
| webhook.create | bool | `true` | Specifies whether a webhook deployment be created. |
180180
| webhook.deploymentAnnotations | object | `{}` | Annotations to add to Deployment |

deploy/charts/external-secrets/templates/webhook-certificate.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ spec:
2626
{{- with .Values.webhook.certManager.cert.renewBefore }}
2727
renewBefore: {{ . | quote }}
2828
{{- end }}
29-
{{- with .Values.webhook.certManager.cert.revisionHistoryLimit }}
30-
revisionHistoryLimit: {{ . }}
29+
{{- if gt (.Values.webhook.certManager.cert.revisionHistoryLimit | int) 0 }}
30+
revisionHistoryLimit: {{ .Values.webhook.certManager.cert.revisionHistoryLimit }}
3131
{{- end }}
3232
secretName: {{ include "external-secrets.fullname" . }}-webhook
3333
{{- end }}

deploy/charts/external-secrets/values.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@
661661
"type": "string"
662662
},
663663
"revisionHistoryLimit": {
664-
"type": "string"
664+
"type": "integer"
665665
}
666666
},
667667
"type": "object"

deploy/charts/external-secrets/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ webhook:
317317
duration: "8760h"
318318
# -- Set the revisionHistoryLimit on the Certificate. See
319319
# https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec
320-
# Defaults to nil.
321-
revisionHistoryLimit: ""
320+
# Defaults to 0 (ignored).
321+
revisionHistoryLimit: 0
322322
# -- How long before the currently issued certificate’s expiry
323323
# cert-manager should renew the certificate. See
324324
# https://cert-manager.io/docs/reference/api-docs/#cert-manager.io/v1.CertificateSpec

tests/__snapshot__/clustergenerator-v1alpha1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ spec:
221221
name: string
222222
namespace: string
223223
userPass:
224-
path: "user"
224+
path: "userpass"
225225
secretRef:
226226
key: string
227227
name: string

tests/__snapshot__/clustersecretstore-v1beta1.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ spec:
336336
hostAPI: "https://app.infisical.com/api"
337337
secretsScope:
338338
environmentSlug: string
339+
expandSecretReferences: true
339340
projectSlug: string
340341
recursive: false
341342
secretsPath: "/"
@@ -585,7 +586,7 @@ spec:
585586
name: string
586587
namespace: string
587588
userPass:
588-
path: "user"
589+
path: "userpass"
589590
secretRef:
590591
key: string
591592
name: string

tests/__snapshot__/secretstore-v1beta1.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ spec:
336336
hostAPI: "https://app.infisical.com/api"
337337
secretsScope:
338338
environmentSlug: string
339+
expandSecretReferences: true
339340
projectSlug: string
340341
recursive: false
341342
secretsPath: "/"
@@ -585,7 +586,7 @@ spec:
585586
name: string
586587
namespace: string
587588
userPass:
588-
path: "user"
589+
path: "userpass"
589590
secretRef:
590591
key: string
591592
name: string

tests/__snapshot__/vaultdynamicsecret-v1alpha1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ spec:
9292
name: string
9393
namespace: string
9494
userPass:
95-
path: "user"
95+
path: "userpass"
9696
secretRef:
9797
key: string
9898
name: string

0 commit comments

Comments
 (0)