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 1 commit
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
6 changes: 5 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 @@ -153,6 +153,8 @@ helm uninstall [RELEASE_NAME]
| commonNodeSelector | object | `{}` | |
| commonTolerations | list | `[]` | |
| cosign.cosignPub | string | `""` | |
| cosign.timeoutSeconds.mutating | int | `10` | |
| cosign.timeoutSeconds.validating | int | `10` | |
| cosign.webhookName | string | `"policy.sigstore.dev"` | |
| imagePullSecrets | list | `[]` | |
| installCRDs | bool | `true` | |
Expand Down Expand Up @@ -200,3 +202,5 @@ 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.defaulting | int | `10` | |
| webhook.webhookTimeoutSeconds.validating | int | `10` | |
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ webhooks:
matchPolicy: Equivalent
name: {{ required "A valid webhook.webhookNames.defaulting is required" .Values.webhook.webhookNames.defaulting }}
sideEffects: None
timeoutSeconds: {{ .Values.webhook.webhookTimeoutSeconds.defaulting }}
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand All @@ -44,3 +45,4 @@ webhooks:
matchPolicy: Equivalent
name: {{ required "A valid webhook.webhookNames.validating is required" .Values.webhook.webhookNames.validating }}
sideEffects: None
timeoutSeconds: {{ .Values.webhook.webhookTimeoutSeconds.validating }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ webhooks:
failurePolicy: {{ .Values.webhook.failurePolicy }}
sideEffects: None
reinvocationPolicy: IfNeeded
timeoutSeconds: {{ .Values.cosign.timeoutSeconds.mutating }}
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ webhooks:
namespace: {{ .Release.Namespace }}
failurePolicy: {{ .Values.webhook.failurePolicy }}
sideEffects: None
timeoutSeconds: {{ .Values.cosign.timeoutSeconds.validating }}
56 changes: 52 additions & 4 deletions charts/policy-controller/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,29 @@
"title": "cosignPub",
"type": "string"
},
"timeoutSeconds": {
"additionalProperties": false,
"properties": {
"mutating": {
"default": 10,
"required": [],
"title": "mutating",
"type": "integer"
},
"validating": {
"default": 10,
"required": [],
"title": "validating",
"type": "integer"
}
},
"required": [
"mutating",
"validating"
],
"title": "timeoutSeconds",
"type": "object"
},
"webhookName": {
"default": "policy.sigstore.dev",
"required": [],
Expand All @@ -44,7 +67,8 @@
},
"required": [
"cosignPub",
"webhookName"
"webhookName",
"timeoutSeconds"
],
"title": "cosign",
"type": "object"
Expand Down Expand Up @@ -188,8 +212,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 +571,29 @@
],
"title": "webhookNames",
"type": "object"
},
"webhookTimeoutSeconds": {
"additionalProperties": false,
"properties": {
"defaulting": {
"default": 10,
"required": [],
"title": "defaulting",
"type": "integer"
},
"validating": {
"default": 10,
"required": [],
"title": "validating",
"type": "integer"
}
},
"required": [
"defaulting",
"validating"
],
"title": "webhookTimeoutSeconds",
"type": "object"
}
},
"required": [
Expand All @@ -570,7 +617,8 @@
"volumes",
"namespaceSelector",
"registryCaBundle",
"webhookNames"
"webhookNames",
"webhookTimeoutSeconds"
falcorocks marked this conversation as resolved.
Show resolved Hide resolved
],
"title": "webhook",
"type": "object"
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"
timeoutSeconds:
falcorocks marked this conversation as resolved.
Show resolved Hide resolved
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