Skip to content

Commit

Permalink
api changes for psp runasgroup policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayank Kumar committed Oct 10, 2018
1 parent 4033862 commit bc3e3af
Show file tree
Hide file tree
Showing 34 changed files with 1,576 additions and 379 deletions.
46 changes: 46 additions & 0 deletions api/openapi-spec/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions api/swagger-spec/extensions_v1beta1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions api/swagger-spec/policy_v1beta1.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions docs/api-reference/extensions/v1beta1/definitions.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions docs/api-reference/policy/v1beta1/definitions.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/api/podsecuritypolicy/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ func DropDisabledAlphaFields(pspSpec *policy.PodSecurityPolicySpec) {
if !utilfeature.DefaultFeatureGate.Enabled(features.ProcMountType) {
pspSpec.AllowedProcMountTypes = nil
}
if !utilfeature.DefaultFeatureGate.Enabled(features.RunAsGroup) {
pspSpec.RunAsGroup = nil
}
}
34 changes: 34 additions & 0 deletions pkg/apis/extensions/v1beta1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions pkg/apis/policy/fuzzer/fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ var Funcs = func(codecs runtimeserializer.CodecFactory) []interface{} {
}
psp.RunAsUser.Rule = runAsUserRules[c.Rand.Intn(len(runAsUserRules))]

runAsGroupRules := []policy.RunAsGroupStrategy{
policy.RunAsGroupStrategyMustRunAs,
policy.RunAsGroupStrategyRunAsAny,
policy.RunAsGroupStrategyMayRunAs,
}
psp.RunAsGroup = &policy.RunAsGroupStrategyOptions{}
psp.RunAsGroup.Rule = runAsGroupRules[c.Rand.Intn(len(runAsGroupRules))]
seLinuxRules := []policy.SELinuxStrategy{
policy.SELinuxStrategyMustRunAs,
policy.SELinuxStrategyRunAsAny,
Expand Down
Loading

0 comments on commit bc3e3af

Please sign in to comment.