7
7
8
8
// +genclient=true
9
9
10
- // PodSecurityPolicySubjectReview checks whether a particular user/SA tuple can create the PodSpec .
10
+ // PodSecurityPolicySubjectReview checks whether a particular user/SA tuple can create the PodTemplateSpec .
11
11
type PodSecurityPolicySubjectReview struct {
12
12
unversioned.TypeMeta
13
13
@@ -20,13 +20,13 @@ type PodSecurityPolicySubjectReview struct {
20
20
21
21
// PodSecurityPolicySubjectReviewSpec defines specification for PodSecurityPolicySubjectReview
22
22
type PodSecurityPolicySubjectReviewSpec struct {
23
- // PodSpec is the PodSpec to check. If PodSpec .ServiceAccountName is empty it will not be defaulted.
23
+ // Template is the PodTemplateSpec to check. If PodTemplateSpec.Spec .ServiceAccountName is empty it will not be defaulted.
24
24
// If its non-empty, it will be checked.
25
- PodSpec kapi.PodSpec
25
+ Template kapi.PodTemplateSpec
26
26
27
27
// User is the user you're testing for.
28
28
// If you specify "User" but not "Group", then is it interpreted as "What if User were not a member of any groups.
29
- // If User and Groups are empty, then the check is performed using *only* the ServiceAccountName in the PodSpec .
29
+ // If User and Groups are empty, then the check is performed using *only* the ServiceAccountName in the PodTemplateSpec .
30
30
User string
31
31
32
32
// Groups is the groups you're testing for.
@@ -35,7 +35,7 @@ type PodSecurityPolicySubjectReviewSpec struct {
35
35
36
36
// PodSecurityPolicySubjectReviewStatus contains information/status for PodSecurityPolicySubjectReview.
37
37
type PodSecurityPolicySubjectReviewStatus struct {
38
- // AllowedBy is a reference to the rule that allows the PodSpec .
38
+ // AllowedBy is a reference to the rule that allows the PodTemplateSpec .
39
39
// A rule can be a SecurityContextConstraint or a PodSecurityPolicy
40
40
// A `nil`, indicates that it was denied.
41
41
AllowedBy * kapi.ObjectReference
@@ -45,11 +45,11 @@ type PodSecurityPolicySubjectReviewStatus struct {
45
45
// is no information available.
46
46
Reason string
47
47
48
- // PodSpec is the PodSpec after the defaulting is applied.
49
- PodSpec kapi.PodSpec
48
+ // Template is the PodTemplateSpec after the defaulting is applied.
49
+ Template kapi.PodTemplateSpec
50
50
}
51
51
52
- // PodSecurityPolicySelfSubjectReview checks whether this user/SA tuple can create the PodSpec .
52
+ // PodSecurityPolicySelfSubjectReview checks whether this user/SA tuple can create the PodTemplateSpec .
53
53
type PodSecurityPolicySelfSubjectReview struct {
54
54
unversioned.TypeMeta
55
55
@@ -62,11 +62,11 @@ type PodSecurityPolicySelfSubjectReview struct {
62
62
63
63
// PodSecurityPolicySelfSubjectReviewSpec contains specification for PodSecurityPolicySelfSubjectReview.
64
64
type PodSecurityPolicySelfSubjectReviewSpec struct {
65
- // PodSpec is the PodSpec to check.
66
- PodSpec kapi.PodSpec
65
+ // Template is the PodTemplateSpec to check.
66
+ Template kapi.PodTemplateSpec
67
67
}
68
68
69
- // PodSecurityPolicyReview checks which service accounts (not users, since that would be cluster-wide) can create the `PodSpec ` in question.
69
+ // PodSecurityPolicyReview checks which service accounts (not users, since that would be cluster-wide) can create the `PodTemplateSpec ` in question.
70
70
type PodSecurityPolicyReview struct {
71
71
unversioned.TypeMeta
72
72
@@ -79,22 +79,22 @@ type PodSecurityPolicyReview struct {
79
79
80
80
// PodSecurityPolicyReviewSpec defines specification for PodSecurityPolicyReview
81
81
type PodSecurityPolicyReviewSpec struct {
82
- // PodSpec is the PodSpec to check. The PodSpec .ServiceAccountName field is used
83
- // if ServiceAccountNames is empty, unless the PodSpec .ServiceAccountName is empty,
82
+ // Template is the PodTemplateSpec to check. The PodTemplateSpec.Spec .ServiceAccountName field is used
83
+ // if ServiceAccountNames is empty, unless the PodTemplateSpec.Spec .ServiceAccountName is empty,
84
84
// in which case "default" is used.
85
- // If ServiceAccountNames is specified, PodSpec .ServiceAccountName is ignored.
86
- PodSpec kapi.PodSpec
85
+ // If ServiceAccountNames is specified, PodTemplateSpec.Spec .ServiceAccountName is ignored.
86
+ Template kapi.PodTemplateSpec
87
87
88
88
// ServiceAccountNames is an optional set of ServiceAccounts to run the check with.
89
- // If ServiceAccountNames is empty, the PodSpec ServiceAccountName is used,
89
+ // If ServiceAccountNames is empty, the PodTemplateSpec.Spec. ServiceAccountName is used,
90
90
// unless it's empty, in which case "default" is used instead.
91
- // If ServiceAccountNames is specified, PodSpec ServiceAccountName is ignored.
91
+ // If ServiceAccountNames is specified, PodTemplateSpec.Spec. ServiceAccountName is ignored.
92
92
ServiceAccountNames []string // TODO: find a way to express 'all service accounts'
93
93
}
94
94
95
95
// PodSecurityPolicyReviewStatus represents the status of PodSecurityPolicyReview.
96
96
type PodSecurityPolicyReviewStatus struct {
97
- // AllowedServiceAccounts returns the list of service accounts in *this* namespace that have the power to create the PodSpec .
97
+ // AllowedServiceAccounts returns the list of service accounts in *this* namespace that have the power to create the PodTemplateSpec .
98
98
AllowedServiceAccounts []ServiceAccountPodSecurityPolicyReviewStatus
99
99
}
100
100
0 commit comments