@@ -111,9 +111,28 @@ func (o *OrchestratorProfile) Validate(isUpdate bool) error {
111
111
}
112
112
}
113
113
}
114
- if helpers .IsTrueBoolPointer (o .KubernetesConfig .EnablePodSecurityPolicy ) &&
115
- ! helpers .IsTrueBoolPointer (o .KubernetesConfig .EnableRbac ) {
116
- return fmt .Errorf ("enablePodSecurityPolicy requires the enableRbac feature as a prerequisite" )
114
+ if helpers .IsTrueBoolPointer (o .KubernetesConfig .EnablePodSecurityPolicy ) {
115
+ if ! helpers .IsTrueBoolPointer (o .KubernetesConfig .EnableRbac ) {
116
+ return fmt .Errorf ("enablePodSecurityPolicy requires the enableRbac feature as a prerequisite" )
117
+ }
118
+ if o .OrchestratorVersion == common .KubernetesVersion1Dot5Dot7 ||
119
+ o .OrchestratorVersion == common .KubernetesVersion1Dot5Dot8 ||
120
+ o .OrchestratorVersion == common .KubernetesVersion1Dot6Dot6 ||
121
+ o .OrchestratorVersion == common .KubernetesVersion1Dot6Dot9 ||
122
+ o .OrchestratorVersion == common .KubernetesVersion1Dot6Dot11 ||
123
+ o .OrchestratorVersion == common .KubernetesVersion1Dot7Dot0 ||
124
+ o .OrchestratorVersion == common .KubernetesVersion1Dot7Dot1 ||
125
+ o .OrchestratorVersion == common .KubernetesVersion1Dot7Dot2 ||
126
+ o .OrchestratorVersion == common .KubernetesVersion1Dot7Dot4 ||
127
+ o .OrchestratorVersion == common .KubernetesVersion1Dot7Dot5 ||
128
+ o .OrchestratorVersion == common .KubernetesVersion1Dot7Dot7 ||
129
+ o .OrchestratorVersion == common .KubernetesVersion1Dot7Dot9 ||
130
+ o .OrchestratorVersion == common .KubernetesVersion1Dot7Dot10 ||
131
+ o .OrchestratorVersion == common .KubernetesVersion1Dot7Dot12 {
132
+ return fmt .Errorf ("enablePodSecurityPolicy is only supported in acs-engine for Kubernetes version %s or greater; unable to validate for Kubernetes version %s" ,
133
+ "1.8.0" , o .OrchestratorVersion )
134
+ }
135
+
117
136
}
118
137
}
119
138
0 commit comments