Skip to content

Commit aac4c7c

Browse files
feat: add limits and requests to PolicyServer (#417)
Signed-off-by: Fabrizio Sestito <[email protected]>
1 parent 3d8f2ed commit aac4c7c

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

charts/kubewarden-crds/templates/policyservers.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,16 @@ spec:
11421142
items:
11431143
type: string
11441144
type: array
1145+
limits:
1146+
additionalProperties:
1147+
anyOf:
1148+
- type: integer
1149+
- type: string
1150+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1151+
x-kubernetes-int-or-string: true
1152+
description: Limits describes the maximum amount of compute resources
1153+
allowed.
1154+
type: object
11451155
maxUnavailable:
11461156
anyOf:
11471157
- type: integer
@@ -1160,6 +1170,18 @@ spec:
11601170
description: Replicas is the number of desired replicas.
11611171
format: int32
11621172
type: integer
1173+
requests:
1174+
additionalProperties:
1175+
anyOf:
1176+
- type: integer
1177+
- type: string
1178+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
1179+
x-kubernetes-int-or-string: true
1180+
description: Requests describes the minimum amount of compute resources
1181+
required. If Request is omitted for, it defaults to Limits if that
1182+
is explicitly specified, otherwise to an implementation-defined
1183+
value
1184+
type: object
11631185
securityContexts:
11641186
description: Security configuration to be used in the Policy Server
11651187
workload. The field allows different configurations for the pod

charts/kubewarden-defaults/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ policyServer:
115115
sourceAuthorities: {}
116116
# affinity for pods of the default PolicyServer
117117
affinity: {}
118+
# limits and requests, see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
119+
limits: {}
120+
requests: {}
118121
crdVersion: "policies.kubewarden.io/v1"
119122
recommendedPolicies:
120123
enabled: False

0 commit comments

Comments
 (0)