Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit bc4d7c2

Browse files
authored
add sales department as available option of departments (#7)
* add sales department as available option of departments * bump version to 2.1.1
1 parent e590728 commit bc4d7c2

File tree

16 files changed

+58
-16
lines changed

16 files changed

+58
-16
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
resource "aws_s3_bucket" "b" {
2+
bucket = "my-tf-test-bucket"
3+
tags = {
4+
mycompany.com.department = "sales"
5+
}
6+
}
7+
8+
resource "aws_ami" "example" {
9+
name = "terraform-example"
10+
virtualization_type = "hvm"
11+
root_device_name = "/dev/xvda"
12+
tags = {
13+
mycompany.com.department = "sales"
14+
}
15+
ebs_block_device {
16+
device_name = "/dev/xvda"
17+
snapshot_id = "snap-xxxxxxxx"
18+
volume_size = 8
19+
}
20+
}

infra/checkov/require-known-department-label/policy.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@ definition:
2525
resource_types: "all"
2626
attribute: 'tags.mycompany.com.department'
2727
operator: "equals"
28-
value: servicedesk
28+
value: servicedesk
29+
- cond_type: "attribute"
30+
resource_types: "all"
31+
attribute: 'tags.mycompany.com.department'
32+
operator: "equals"
33+
value: sales

kubernetes/kyverno/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33

4-
nameSuffix: "-2.1.0"
4+
nameSuffix: "-2.1.1"
55

66
commonLabels:
7-
mycompany.com/policy-version: "2.1.0"
7+
mycompany.com/policy-version: "2.1.1"
88

99
resources:
1010
- require-department-label/policy.yaml

kubernetes/kyverno/require-department-label/fail0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Pod
33
metadata:
44
name: require-department-label-fail0
55
labels:
6-
mycompany.com/policy-version: "2.1.0"
6+
mycompany.com/policy-version: "2.1.1"
77
spec:
88
containers:
99
- name: nginx

kubernetes/kyverno/require-department-label/pass0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: require-department-label-pass0
55
labels:
66
mycompany.com/department: finance
7-
mycompany.com/policy-version: "2.1.0"
7+
mycompany.com/policy-version: "2.1.1"
88
spec:
99
containers:
1010
- name: nginx

kubernetes/kyverno/require-department-label/policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
- "*"
4040
selector:
4141
matchLabels:
42-
mycompany.com/policy-version: "2.1.0"
42+
mycompany.com/policy-version: "2.1.1"
4343
validate:
4444
message: "The label `mycompany.com/department` is required."
4545
pattern:

kubernetes/kyverno/require-department-label/skip0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: require-department-label-skip0
55
labels:
66
mycompany.com/require-department-label: exempt
7-
mycompany.com/policy-version: "2.1.0"
7+
mycompany.com/policy-version: "2.1.1"
88
spec:
99
containers:
1010
- name: nginx

kubernetes/kyverno/require-department-label/skip1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: require-department-label-skip1
55
namespace: kube-system
66
labels:
7-
mycompany.com/policy-version: "2.1.0"
7+
mycompany.com/policy-version: "2.1.1"
88
spec:
99
containers:
1010
- name: nginx

kubernetes/kyverno/require-known-department-label/fail0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: require-known-department-label-fail0
55
labels:
66
mycompany.com/department: nothr
7-
mycompany.com/policy-version: "2.1.0"
7+
mycompany.com/policy-version: "2.1.1"
88
spec:
99
containers:
1010
- name: nginx

kubernetes/kyverno/require-known-department-label/pass0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: require-known-department-label-pass0
55
labels:
66
mycompany.com/department: hr
7-
mycompany.com/policy-version: "2.1.0"
7+
mycompany.com/policy-version: "2.1.1"
88
spec:
99
containers:
1010
- name: nginx

0 commit comments

Comments
 (0)