Skip to content

Commit

Permalink
set new values for the system resources
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Fernandez <[email protected]>
  • Loading branch information
hectorj2f committed Apr 18, 2023
1 parent 87b2138 commit 80eb843
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/kind-e2e-trustroot-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
# Wait for the webhook to come up and become Ready
kubectl rollout status --timeout 5m --namespace cosign-system deployments/webhook
kubectl wait deployment -n cosign-system --for condition=Available=True --timeout=90s --all
- name: Run TrustRoot CRD e2e tests
Expand Down
6 changes: 4 additions & 2 deletions cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ var types = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{

batchv1.SchemeGroupVersion.WithKind("CronJob"): &crdNoStatusUpdatesOrDeletes{GenericCRD: &duckv1.CronJob{}},
batchv1beta1.SchemeGroupVersion.WithKind("CronJob"): &crdNoStatusUpdatesOrDeletes{GenericCRD: &duckv1.CronJob{}},
}

var typesCIP = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{
// v1alpha1
v1alpha1.SchemeGroupVersion.WithKind("ClusterImagePolicy"): &v1alpha1.ClusterImagePolicy{},
v1alpha1.SchemeGroupVersion.WithKind("TrustRoot"): &v1alpha1.TrustRoot{},
Expand Down Expand Up @@ -295,7 +297,7 @@ func NewPolicyValidatingAdmissionController(ctx context.Context, cmw configmap.W
ctx,
*validatingCIPWebhookName,
"/validating",
types,
typesCIP,
func(ctx context.Context) context.Context {
ctx = policyControllerConfigStore.ToContext(ctx)
return ctx
Expand All @@ -309,7 +311,7 @@ func NewPolicyMutatingAdmissionController(ctx context.Context, cmw configmap.Wat
ctx,
*mutatingCIPWebhookName,
"/defaulting",
types,
typesCIP,
func(ctx context.Context) context.Context {
return ctx
},
Expand Down
3 changes: 2 additions & 1 deletion config/501-policy-webhook-configurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ webhooks:
matchPolicy: Equivalent
name: defaulting.clusterimagepolicy.sigstore.dev
sideEffects: None
timeoutSeconds: 25
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand All @@ -42,5 +43,5 @@ webhooks:
matchPolicy: Equivalent
name: validating.clusterimagepolicy.sigstore.dev
sideEffects: None

timeoutSeconds: 25
---
8 changes: 4 additions & 4 deletions config/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ spec:
]
resources:
requests:
cpu: 20m
memory: 20Mi
cpu: 40m
memory: 40Mi
limits:
cpu: 200m
memory: 200Mi
cpu: 400m
memory: 400Mi
env:
- name: SYSTEM_NAMESPACE
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ patches:
target:
kind: Deployment
name: policy-webhook
name: webhook

0 comments on commit 80eb843

Please sign in to comment.