Skip to content

Commit

Permalink
chore: fixing typo and adding hint in VAP section of ch8 (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrettgaither authored Oct 29, 2024
1 parent b54e49c commit faacb8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ ValidatingAdmissionPolicy CEL expressions have access to a number of different v

3) Create `validatenamespacequota.yaml` and create an admission policy that verifies deployments are not created or updated with a replica count that exceeds the `NamespaceQuota` `maxReplicas`. This policy needs to use the `NamespaceQuota` resource, do not hard code limits in your expressions.

?> Make sure that you are only using one admission policy and one admission policy binding to manage the deployments in both the development and production namespaces

4) From `examples/ch8/validatingadmissionpolicy` run `kubectl apply -f tests`. Only `valid-dev-deploy` and `valid-prod-deploy` should be created.

5) Your org is going to roll out a required label on all Deployments for `criticality` that should be one of `HIGH|MEDIUM|LOW`. Create a new ValidatingAdmissionPolicy that warns developers if their Deployment is missing this upcoming requirement with the following custom message "Deployments need a label of 'criticality' starting on 1/1/2027 with the values 'HIGH', 'MEDIUM', or 'LOW'""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: invalid-dev-deploy
name: invalid-prod-deploy
namespace: production
spec:
replicas: 20
Expand Down

0 comments on commit faacb8d

Please sign in to comment.