Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add webhook timeout values #890

Merged
merged 5 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/policy-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sources:
type: application

name: policy-controller
version: 0.8.1
version: 0.9.0
appVersion: 0.11.0

maintainers:
Expand Down
4 changes: 3 additions & 1 deletion charts/policy-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

![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)
![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.11.0](https://img.shields.io/badge/AppVersion-0.11.0-informational?style=flat-square)
falcorocks marked this conversation as resolved.
Show resolved Hide resolved

The Helm chart for Policy Controller

Expand Down Expand Up @@ -154,6 +154,7 @@ helm uninstall [RELEASE_NAME]
| commonTolerations | list | `[]` | |
| cosign.cosignPub | string | `""` | |
| cosign.webhookName | string | `"policy.sigstore.dev"` | |
| cosign.webhookTimeoutSeconds | object | `{}` | |
| imagePullSecrets | list | `[]` | |
| installCRDs | bool | `true` | |
| leasescleanup.image.pullPolicy | string | `"IfNotPresent"` | |
Expand Down Expand Up @@ -200,3 +201,4 @@ helm uninstall [RELEASE_NAME]
| webhook.volumes | list | `[]` | |
| webhook.webhookNames.defaulting | string | `"defaulting.clusterimagepolicy.sigstore.dev"` | |
| webhook.webhookNames.validating | string | `"validating.clusterimagepolicy.sigstore.dev"` | |
| webhook.webhookTimeoutSeconds | object | `{}` | |
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ webhooks:
matchPolicy: Equivalent
name: {{ required "A valid webhook.webhookNames.defaulting is required" .Values.webhook.webhookNames.defaulting }}
sideEffects: None
{{- if .Values.webhook.webhookTimeoutSeconds }}
{{- if .Values.webhook.webhookTimeoutSeconds.defaulting }}
timeoutSeconds: {{ .Values.webhook.webhookTimeoutSeconds.defaulting }}
{{- end }}
{{- end }}
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand All @@ -44,3 +49,8 @@ webhooks:
matchPolicy: Equivalent
name: {{ required "A valid webhook.webhookNames.validating is required" .Values.webhook.webhookNames.validating }}
sideEffects: None
{{- if .Values.webhook.webhookTimeoutSeconds }}
{{- if .Values.webhook.webhookTimeoutSeconds.validating }}
timeoutSeconds: {{ .Values.webhook.webhookTimeoutSeconds.validating }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ webhooks:
failurePolicy: {{ .Values.webhook.failurePolicy }}
sideEffects: None
reinvocationPolicy: IfNeeded
{{- if .Values.cosign.webhookTimeoutSeconds }}
{{- if .Values.cosign.webhookTimeoutSeconds.mutating }}
timeoutSeconds: {{ .Values.cosign.webhookTimeoutSeconds.mutating }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ webhooks:
namespace: {{ .Release.Namespace }}
failurePolicy: {{ .Values.webhook.failurePolicy }}
sideEffects: None
{{- if .Values.cosign.webhookTimeoutSeconds }}
{{- if .Values.cosign.webhookTimeoutSeconds.validating }}
timeoutSeconds: {{ .Values.cosign.webhookTimeoutSeconds.validating }}
{{- end }}
{{- end}}
40 changes: 38 additions & 2 deletions charts/policy-controller/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,24 @@
"title": "cosignPub",
"type": "string"
},
"webhookTimeoutSeconds": {
"additionalProperties": false,
"properties": {
"mutating": {
"required": [],
"title": "mutating",
"type": "integer"
},
"validating": {
"required": [],
"title": "validating",
"type": "integer"
}
},
"required": [],
"title": "webhookTimeoutSeconds",
"type": "object"
},
"webhookName": {
"default": "policy.sigstore.dev",
"required": [],
Expand Down Expand Up @@ -188,8 +206,8 @@
"type": "string"
},
"version": {
"default": "sha256:f291fce5b9c1a69ba54990eda7e0fe4114043b1afefb0f4ee3e6f84ec9ef1605",
"description": "crane digest ghcr.io/sigstore/policy-controller/policy-controller:v0.8.2",
"default": "sha256:f3b57d4c906fcbd7229c3069c055ce2b2862e01106c2b85df1322f1e3a232829",
falcorocks marked this conversation as resolved.
Show resolved Hide resolved
"description": "crane digest ghcr.io/sigstore/policy-controller/policy-controller:v0.11.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "crane digest ghcr.io/sigstore/policy-controller/policy-controller:v0.11.0",
"description": "crane digest ghcr.io/sigstore/policy-controller/policy-controller:v0.12.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"required": [],
"title": "version",
"type": "string"
Expand Down Expand Up @@ -547,6 +565,24 @@
],
"title": "webhookNames",
"type": "object"
},
"webhookTimeoutSeconds": {
"additionalProperties": false,
"properties": {
"defaulting": {
"required": [],
"title": "defaulting",
"type": "integer"
},
"validating": {
"required": [],
"title": "validating",
"type": "integer"
}
},
"required": [],
"title": "webhookTimeoutSeconds",
"type": "object"
}
},
"required": [
Expand Down
6 changes: 6 additions & 0 deletions charts/policy-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ cosign:
# add the values in base64 encoded
cosignPub: ""
webhookName: "policy.sigstore.dev"
webhookTimeoutSeconds: {}
# mutating: 10
# validating: 10

installCRDs: true

Expand Down Expand Up @@ -70,6 +73,9 @@ webhook:
webhookNames:
defaulting: "defaulting.clusterimagepolicy.sigstore.dev"
validating: "validating.clusterimagepolicy.sigstore.dev"
webhookTimeoutSeconds: {}
# defaulting: 10
# validating: 10

leasescleanup:
image:
Expand Down
Loading