Skip to content

Commit 5090ff9

Browse files
authored
Merge pull request #890 from falcorocks/feat-timeout-values
feat: add webhook timeout values
2 parents 93cecb3 + acaf7df commit 5090ff9

7 files changed

+75
-9
lines changed

charts/policy-controller/Chart.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ sources:
88
type: application
99

1010
name: policy-controller
11-
version: 0.8.1
12-
appVersion: 0.11.0
11+
version: 0.9.0
12+
appVersion: 0.12.0
1313

1414
maintainers:
1515
- name: dlorenc
@@ -19,4 +19,4 @@ annotations:
1919
artifacthub.io/license: Apache-2.0
2020
artifacthub.io/images: |
2121
- name: policy-controller
22-
image: ghcr.io/sigstore/policy-controller/policy-controller:v0.11.0@sha256:f3b57d4c906fcbd7229c3069c055ce2b2862e01106c2b85df1322f1e3a232829
22+
image: ghcr.io/sigstore/policy-controller/policy-controller:v0.12.0@sha256:6b51f336dec9e9adff29606855dbd2c7910c5eb80d6579795a29cb3844428efc

charts/policy-controller/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<!-- This README.md is generated. Please edit README.md.gotmpl -->
44

5-
![Version: 0.8.1](https://img.shields.io/badge/Version-0.8.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.11.0](https://img.shields.io/badge/AppVersion-0.11.0-informational?style=flat-square)
5+
![Version: 0.9.0](https://img.shields.io/badge/Version-0.9.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.12.0](https://img.shields.io/badge/AppVersion-0.12.0-informational?style=flat-square)
66

77
The Helm chart for Policy Controller
88

@@ -154,6 +154,7 @@ helm uninstall [RELEASE_NAME]
154154
| commonTolerations | list | `[]` | |
155155
| cosign.cosignPub | string | `""` | |
156156
| cosign.webhookName | string | `"policy.sigstore.dev"` | |
157+
| cosign.webhookTimeoutSeconds | object | `{}` | |
157158
| imagePullSecrets | list | `[]` | |
158159
| installCRDs | bool | `true` | |
159160
| leasescleanup.image.pullPolicy | string | `"IfNotPresent"` | |
@@ -169,7 +170,7 @@ helm uninstall [RELEASE_NAME]
169170
| webhook.failurePolicy | string | `"Fail"` | |
170171
| webhook.image.pullPolicy | string | `"IfNotPresent"` | |
171172
| webhook.image.repository | string | `"ghcr.io/sigstore/policy-controller/policy-controller"` | |
172-
| webhook.image.version | string | `"sha256:f3b57d4c906fcbd7229c3069c055ce2b2862e01106c2b85df1322f1e3a232829"` | |
173+
| webhook.image.version | string | `"sha256:6b51f336dec9e9adff29606855dbd2c7910c5eb80d6579795a29cb3844428efc"` | |
173174
| webhook.name | string | `"webhook"` | |
174175
| webhook.namespaceSelector.matchExpressions[0].key | string | `"policy.sigstore.dev/include"` | |
175176
| webhook.namespaceSelector.matchExpressions[0].operator | string | `"In"` | |
@@ -200,3 +201,4 @@ helm uninstall [RELEASE_NAME]
200201
| webhook.volumes | list | `[]` | |
201202
| webhook.webhookNames.defaulting | string | `"defaulting.clusterimagepolicy.sigstore.dev"` | |
202203
| webhook.webhookNames.validating | string | `"validating.clusterimagepolicy.sigstore.dev"` | |
204+
| webhook.webhookTimeoutSeconds | object | `{}` | |

charts/policy-controller/templates/webhook/policy_webhook_configurations.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ webhooks:
2828
matchPolicy: Equivalent
2929
name: {{ required "A valid webhook.webhookNames.defaulting is required" .Values.webhook.webhookNames.defaulting }}
3030
sideEffects: None
31+
{{- if .Values.webhook.webhookTimeoutSeconds }}
32+
{{- if .Values.webhook.webhookTimeoutSeconds.defaulting }}
33+
timeoutSeconds: {{ .Values.webhook.webhookTimeoutSeconds.defaulting }}
34+
{{- end }}
35+
{{- end }}
3136
---
3237
apiVersion: admissionregistration.k8s.io/v1
3338
kind: ValidatingWebhookConfiguration
@@ -44,3 +49,8 @@ webhooks:
4449
matchPolicy: Equivalent
4550
name: {{ required "A valid webhook.webhookNames.validating is required" .Values.webhook.webhookNames.validating }}
4651
sideEffects: None
52+
{{- if .Values.webhook.webhookTimeoutSeconds }}
53+
{{- if .Values.webhook.webhookTimeoutSeconds.validating }}
54+
timeoutSeconds: {{ .Values.webhook.webhookTimeoutSeconds.validating }}
55+
{{- end }}
56+
{{- end }}

charts/policy-controller/templates/webhook/webhook_mutating.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ webhooks:
1414
failurePolicy: {{ .Values.webhook.failurePolicy }}
1515
sideEffects: None
1616
reinvocationPolicy: IfNeeded
17+
{{- if .Values.cosign.webhookTimeoutSeconds }}
18+
{{- if .Values.cosign.webhookTimeoutSeconds.mutating }}
19+
timeoutSeconds: {{ .Values.cosign.webhookTimeoutSeconds.mutating }}
20+
{{- end }}
21+
{{- end }}

charts/policy-controller/templates/webhook/webhook_validating.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ webhooks:
1313
namespace: {{ .Release.Namespace }}
1414
failurePolicy: {{ .Values.webhook.failurePolicy }}
1515
sideEffects: None
16+
{{- if .Values.cosign.webhookTimeoutSeconds }}
17+
{{- if .Values.cosign.webhookTimeoutSeconds.validating }}
18+
timeoutSeconds: {{ .Values.cosign.webhookTimeoutSeconds.validating }}
19+
{{- end }}
20+
{{- end}}

charts/policy-controller/values.schema.json

+40-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@
4040
"required": [],
4141
"title": "webhookName",
4242
"type": "string"
43+
},
44+
"webhookTimeoutSeconds": {
45+
"additionalProperties": false,
46+
"properties": {
47+
"mutating": {
48+
"required": [],
49+
"title": "mutating",
50+
"type": "integer"
51+
},
52+
"validating": {
53+
"required": [],
54+
"title": "validating",
55+
"type": "integer"
56+
}
57+
},
58+
"required": [],
59+
"title": "webhookTimeoutSeconds",
60+
"type": "object"
4361
}
4462
},
4563
"required": [
@@ -188,8 +206,8 @@
188206
"type": "string"
189207
},
190208
"version": {
191-
"default": "sha256:f291fce5b9c1a69ba54990eda7e0fe4114043b1afefb0f4ee3e6f84ec9ef1605",
192-
"description": "crane digest ghcr.io/sigstore/policy-controller/policy-controller:v0.8.2",
209+
"default": "sha256:6b51f336dec9e9adff29606855dbd2c7910c5eb80d6579795a29cb3844428efc",
210+
"description": "crane digest ghcr.io/sigstore/policy-controller/policy-controller:v0.12.0",
193211
"required": [],
194212
"title": "version",
195213
"type": "string"
@@ -547,6 +565,26 @@
547565
],
548566
"title": "webhookNames",
549567
"type": "object"
568+
},
569+
"webhookTimeoutSeconds": {
570+
"additionalProperties": false,
571+
"properties": {
572+
"defaulting": {
573+
"default": 10,
574+
"required": [],
575+
"title": "defaulting",
576+
"type": "integer"
577+
},
578+
"validating": {
579+
"default": 10,
580+
"required": [],
581+
"title": "validating",
582+
"type": "integer"
583+
}
584+
},
585+
"required": [],
586+
"title": "webhookTimeoutSeconds",
587+
"type": "object"
550588
}
551589
},
552590
"required": [

charts/policy-controller/values.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ cosign:
22
# add the values in base64 encoded
33
cosignPub: ""
44
webhookName: "policy.sigstore.dev"
5+
webhookTimeoutSeconds: {}
6+
# mutating: 10
7+
# validating: 10
58

69
installCRDs: true
710

@@ -16,8 +19,8 @@ webhook:
1619
name: webhook
1720
image:
1821
repository: ghcr.io/sigstore/policy-controller/policy-controller
19-
# crane digest ghcr.io/sigstore/policy-controller/policy-controller:v0.11.0
20-
version: sha256:f3b57d4c906fcbd7229c3069c055ce2b2862e01106c2b85df1322f1e3a232829
22+
# crane digest ghcr.io/sigstore/policy-controller/policy-controller:v0.12.0
23+
version: sha256:6b51f336dec9e9adff29606855dbd2c7910c5eb80d6579795a29cb3844428efc
2124
pullPolicy: IfNotPresent
2225
env: {}
2326
extraArgs: {}
@@ -70,6 +73,9 @@ webhook:
7073
webhookNames:
7174
defaulting: "defaulting.clusterimagepolicy.sigstore.dev"
7275
validating: "validating.clusterimagepolicy.sigstore.dev"
76+
webhookTimeoutSeconds: {}
77+
# defaulting: 10
78+
# validating: 10
7379

7480
leasescleanup:
7581
image:

0 commit comments

Comments
 (0)