SCC: mark AllowedFlexVolumes as optional field.
@@ -58,7 +58,8 @@ type SecurityContextConstraints struct {
// AllowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all
// Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes
// is allowed in the "Volumes" field.
- AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes" protobuf:"bytes,21,rep,name=allowedFlexVolumes"`
+ // +optional
+ AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" protobuf:"bytes,21,rep,name=allowedFlexVolumes"`
// AllowHostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
AllowHostNetwork bool `json:"allowHostNetwork" protobuf:"varint,9,opt,name=allowHostNetwork"`
// AllowHostPorts determines if the policy allows host ports in the containers.
@@ -135,7 +136,7 @@ var (
// AllowedFlexVolume represents a single Flexvolume that is allowed to be used.
type AllowedFlexVolume struct {
// Driver is the name of the Flexvolume driver.
- Driver string `json:"driver,omitempty" protobuf:"bytes,1,opt,name=driver"`
+ Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"`
}
// SELinuxContextStrategyOptions defines the strategy type and any options used to create the strategy.
