Commit f11a4ab9 authored by Paul Weil's avatar Paul Weil

generated code

parent 53b1a9da
...@@ -51,7 +51,7 @@ kube-apiserver ...@@ -51,7 +51,7 @@ kube-apiserver
### Options ### Options
``` ```
--admission-control="AlwaysAdmit": Ordered list of plug-ins to do admission control of resources into cluster. Comma-delimited list of: AlwaysAdmit, AlwaysDeny, AlwaysPullImages, DenyEscalatingExec, DenyExecOnPrivileged, InitialResources, LimitPodHardAntiAffinityTopology, LimitRanger, NamespaceAutoProvision, NamespaceExists, NamespaceLifecycle, PersistentVolumeLabel, ResourceQuota, SecurityContextDeny, ServiceAccount --admission-control="AlwaysAdmit": Ordered list of plug-ins to do admission control of resources into cluster. Comma-delimited list of: AlwaysAdmit, AlwaysDeny, AlwaysPullImages, DenyEscalatingExec, DenyExecOnPrivileged, InitialResources, LimitPodHardAntiAffinityTopology, LimitRanger, NamespaceAutoProvision, NamespaceExists, NamespaceLifecycle, PersistentVolumeLabel, PodSecurityPolicy, ResourceQuota, SecurityContextDeny, ServiceAccount
--admission-control-config-file="": File with admission control configuration. --admission-control-config-file="": File with admission control configuration.
--advertise-address=<nil>: The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used. --advertise-address=<nil>: The IP address on which to advertise the apiserver to members of the cluster. This address must be reachable by the rest of the cluster. If blank, the --bind-address will be used. If --bind-address is unspecified, the host's default interface will be used.
--allow-privileged[=false]: If true, allow privileged containers. --allow-privileged[=false]: If true, allow privileged containers.
...@@ -119,7 +119,7 @@ kube-apiserver ...@@ -119,7 +119,7 @@ kube-apiserver
--watch-cache-sizes=[]: List of watch cache sizes for every resource (pods, nodes, etc.), comma separated. The individual override format: resource#size, where size is a number. It takes effect when watch-cache is enabled. --watch-cache-sizes=[]: List of watch cache sizes for every resource (pods, nodes, etc.), comma separated. The individual override format: resource#size, where size is a number. It takes effect when watch-cache is enabled.
``` ```
###### Auto generated by spf13/cobra on 9-May-2016 ###### Auto generated by spf13/cobra on 10-May-2016
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
......
...@@ -45,6 +45,7 @@ func init() { ...@@ -45,6 +45,7 @@ func init() {
DeepCopy_extensions_DeploymentSpec, DeepCopy_extensions_DeploymentSpec,
DeepCopy_extensions_DeploymentStatus, DeepCopy_extensions_DeploymentStatus,
DeepCopy_extensions_DeploymentStrategy, DeepCopy_extensions_DeploymentStrategy,
DeepCopy_extensions_FSGroupStrategyOptions,
DeepCopy_extensions_HTTPIngressPath, DeepCopy_extensions_HTTPIngressPath,
DeepCopy_extensions_HTTPIngressRuleValue, DeepCopy_extensions_HTTPIngressRuleValue,
DeepCopy_extensions_HostPortRange, DeepCopy_extensions_HostPortRange,
...@@ -72,6 +73,7 @@ func init() { ...@@ -72,6 +73,7 @@ func init() {
DeepCopy_extensions_Scale, DeepCopy_extensions_Scale,
DeepCopy_extensions_ScaleSpec, DeepCopy_extensions_ScaleSpec,
DeepCopy_extensions_ScaleStatus, DeepCopy_extensions_ScaleStatus,
DeepCopy_extensions_SupplementalGroupsStrategyOptions,
DeepCopy_extensions_ThirdPartyResource, DeepCopy_extensions_ThirdPartyResource,
DeepCopy_extensions_ThirdPartyResourceData, DeepCopy_extensions_ThirdPartyResourceData,
DeepCopy_extensions_ThirdPartyResourceDataList, DeepCopy_extensions_ThirdPartyResourceDataList,
...@@ -311,6 +313,22 @@ func DeepCopy_extensions_DeploymentStrategy(in DeploymentStrategy, out *Deployme ...@@ -311,6 +313,22 @@ func DeepCopy_extensions_DeploymentStrategy(in DeploymentStrategy, out *Deployme
return nil return nil
} }
func DeepCopy_extensions_FSGroupStrategyOptions(in FSGroupStrategyOptions, out *FSGroupStrategyOptions, c *conversion.Cloner) error {
out.Rule = in.Rule
if in.Ranges != nil {
in, out := in.Ranges, &out.Ranges
*out = make([]IDRange, len(in))
for i := range in {
if err := DeepCopy_extensions_IDRange(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Ranges = nil
}
return nil
}
func DeepCopy_extensions_HTTPIngressPath(in HTTPIngressPath, out *HTTPIngressPath, c *conversion.Cloner) error { func DeepCopy_extensions_HTTPIngressPath(in HTTPIngressPath, out *HTTPIngressPath, c *conversion.Cloner) error {
out.Path = in.Path out.Path = in.Path
if err := DeepCopy_extensions_IngressBackend(in.Backend, &out.Backend, c); err != nil { if err := DeepCopy_extensions_IngressBackend(in.Backend, &out.Backend, c); err != nil {
...@@ -502,14 +520,32 @@ func DeepCopy_extensions_PodSecurityPolicyList(in PodSecurityPolicyList, out *Po ...@@ -502,14 +520,32 @@ func DeepCopy_extensions_PodSecurityPolicyList(in PodSecurityPolicyList, out *Po
func DeepCopy_extensions_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *PodSecurityPolicySpec, c *conversion.Cloner) error { func DeepCopy_extensions_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *PodSecurityPolicySpec, c *conversion.Cloner) error {
out.Privileged = in.Privileged out.Privileged = in.Privileged
if in.Capabilities != nil { if in.DefaultAddCapabilities != nil {
in, out := in.Capabilities, &out.Capabilities in, out := in.DefaultAddCapabilities, &out.DefaultAddCapabilities
*out = make([]api.Capability, len(in))
for i := range in {
(*out)[i] = in[i]
}
} else {
out.DefaultAddCapabilities = nil
}
if in.RequiredDropCapabilities != nil {
in, out := in.RequiredDropCapabilities, &out.RequiredDropCapabilities
*out = make([]api.Capability, len(in))
for i := range in {
(*out)[i] = in[i]
}
} else {
out.RequiredDropCapabilities = nil
}
if in.AllowedCapabilities != nil {
in, out := in.AllowedCapabilities, &out.AllowedCapabilities
*out = make([]api.Capability, len(in)) *out = make([]api.Capability, len(in))
for i := range in { for i := range in {
(*out)[i] = in[i] (*out)[i] = in[i]
} }
} else { } else {
out.Capabilities = nil out.AllowedCapabilities = nil
} }
if in.Volumes != nil { if in.Volumes != nil {
in, out := in.Volumes, &out.Volumes in, out := in.Volumes, &out.Volumes
...@@ -540,6 +576,13 @@ func DeepCopy_extensions_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *Po ...@@ -540,6 +576,13 @@ func DeepCopy_extensions_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *Po
if err := DeepCopy_extensions_RunAsUserStrategyOptions(in.RunAsUser, &out.RunAsUser, c); err != nil { if err := DeepCopy_extensions_RunAsUserStrategyOptions(in.RunAsUser, &out.RunAsUser, c); err != nil {
return err return err
} }
if err := DeepCopy_extensions_SupplementalGroupsStrategyOptions(in.SupplementalGroups, &out.SupplementalGroups, c); err != nil {
return err
}
if err := DeepCopy_extensions_FSGroupStrategyOptions(in.FSGroup, &out.FSGroup, c); err != nil {
return err
}
out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
return nil return nil
} }
...@@ -691,6 +734,22 @@ func DeepCopy_extensions_ScaleStatus(in ScaleStatus, out *ScaleStatus, c *conver ...@@ -691,6 +734,22 @@ func DeepCopy_extensions_ScaleStatus(in ScaleStatus, out *ScaleStatus, c *conver
return nil return nil
} }
func DeepCopy_extensions_SupplementalGroupsStrategyOptions(in SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, c *conversion.Cloner) error {
out.Rule = in.Rule
if in.Ranges != nil {
in, out := in.Ranges, &out.Ranges
*out = make([]IDRange, len(in))
for i := range in {
if err := DeepCopy_extensions_IDRange(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Ranges = nil
}
return nil
}
func DeepCopy_extensions_ThirdPartyResource(in ThirdPartyResource, out *ThirdPartyResource, c *conversion.Cloner) error { func DeepCopy_extensions_ThirdPartyResource(in ThirdPartyResource, out *ThirdPartyResource, c *conversion.Cloner) error {
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err return err
......
...@@ -62,6 +62,8 @@ func init() { ...@@ -62,6 +62,8 @@ func init() {
Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus, Convert_extensions_DeploymentStatus_To_v1beta1_DeploymentStatus,
Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy, Convert_v1beta1_DeploymentStrategy_To_extensions_DeploymentStrategy,
Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy, Convert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy,
Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions,
Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions,
Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath, Convert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath,
Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath, Convert_extensions_HTTPIngressPath_To_v1beta1_HTTPIngressPath,
Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue, Convert_v1beta1_HTTPIngressRuleValue_To_extensions_HTTPIngressRuleValue,
...@@ -138,6 +140,8 @@ func init() { ...@@ -138,6 +140,8 @@ func init() {
Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec, Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec,
Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus, Convert_v1beta1_ScaleStatus_To_extensions_ScaleStatus,
Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus, Convert_extensions_ScaleStatus_To_v1beta1_ScaleStatus,
Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions,
Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions,
Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource, Convert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource,
Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource, Convert_extensions_ThirdPartyResource_To_v1beta1_ThirdPartyResource,
Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData, Convert_v1beta1_ThirdPartyResourceData_To_extensions_ThirdPartyResourceData,
...@@ -646,6 +650,46 @@ func autoConvert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in ...@@ -646,6 +650,46 @@ func autoConvert_extensions_DeploymentStrategy_To_v1beta1_DeploymentStrategy(in
return nil return nil
} }
func autoConvert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in *FSGroupStrategyOptions, out *extensions.FSGroupStrategyOptions, s conversion.Scope) error {
out.Rule = extensions.FSGroupStrategyType(in.Rule)
if in.Ranges != nil {
in, out := &in.Ranges, &out.Ranges
*out = make([]extensions.IDRange, len(*in))
for i := range *in {
if err := Convert_v1beta1_IDRange_To_extensions_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Ranges = nil
}
return nil
}
func Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in *FSGroupStrategyOptions, out *extensions.FSGroupStrategyOptions, s conversion.Scope) error {
return autoConvert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(in, out, s)
}
func autoConvert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in *extensions.FSGroupStrategyOptions, out *FSGroupStrategyOptions, s conversion.Scope) error {
out.Rule = FSGroupStrategyType(in.Rule)
if in.Ranges != nil {
in, out := &in.Ranges, &out.Ranges
*out = make([]IDRange, len(*in))
for i := range *in {
if err := Convert_extensions_IDRange_To_v1beta1_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Ranges = nil
}
return nil
}
func Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in *extensions.FSGroupStrategyOptions, out *FSGroupStrategyOptions, s conversion.Scope) error {
return autoConvert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(in, out, s)
}
func autoConvert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(in *HTTPIngressPath, out *extensions.HTTPIngressPath, s conversion.Scope) error { func autoConvert_v1beta1_HTTPIngressPath_To_extensions_HTTPIngressPath(in *HTTPIngressPath, out *extensions.HTTPIngressPath, s conversion.Scope) error {
out.Path = in.Path out.Path = in.Path
if err := Convert_v1beta1_IngressBackend_To_extensions_IngressBackend(&in.Backend, &out.Backend, s); err != nil { if err := Convert_v1beta1_IngressBackend_To_extensions_IngressBackend(&in.Backend, &out.Backend, s); err != nil {
...@@ -1602,14 +1646,32 @@ func Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(i ...@@ -1602,14 +1646,32 @@ func Convert_extensions_PodSecurityPolicyList_To_v1beta1_PodSecurityPolicyList(i
func autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in *PodSecurityPolicySpec, out *extensions.PodSecurityPolicySpec, s conversion.Scope) error { func autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(in *PodSecurityPolicySpec, out *extensions.PodSecurityPolicySpec, s conversion.Scope) error {
out.Privileged = in.Privileged out.Privileged = in.Privileged
if in.Capabilities != nil { if in.DefaultAddCapabilities != nil {
in, out := &in.Capabilities, &out.Capabilities in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
*out = make([]api.Capability, len(*in))
for i := range *in {
(*out)[i] = api.Capability((*in)[i])
}
} else {
out.DefaultAddCapabilities = nil
}
if in.RequiredDropCapabilities != nil {
in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
*out = make([]api.Capability, len(*in))
for i := range *in {
(*out)[i] = api.Capability((*in)[i])
}
} else {
out.RequiredDropCapabilities = nil
}
if in.AllowedCapabilities != nil {
in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
*out = make([]api.Capability, len(*in)) *out = make([]api.Capability, len(*in))
for i := range *in { for i := range *in {
(*out)[i] = api.Capability((*in)[i]) (*out)[i] = api.Capability((*in)[i])
} }
} else { } else {
out.Capabilities = nil out.AllowedCapabilities = nil
} }
if in.Volumes != nil { if in.Volumes != nil {
in, out := &in.Volumes, &out.Volumes in, out := &in.Volumes, &out.Volumes
...@@ -1640,6 +1702,13 @@ func autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySp ...@@ -1640,6 +1702,13 @@ func autoConvert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySp
if err := Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil { if err := Convert_v1beta1_RunAsUserStrategyOptions_To_extensions_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil {
return err return err
} }
if err := Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, s); err != nil {
return err
}
if err := Convert_v1beta1_FSGroupStrategyOptions_To_extensions_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, s); err != nil {
return err
}
out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
return nil return nil
} }
...@@ -1649,14 +1718,32 @@ func Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(i ...@@ -1649,14 +1718,32 @@ func Convert_v1beta1_PodSecurityPolicySpec_To_extensions_PodSecurityPolicySpec(i
func autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in *extensions.PodSecurityPolicySpec, out *PodSecurityPolicySpec, s conversion.Scope) error { func autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySpec(in *extensions.PodSecurityPolicySpec, out *PodSecurityPolicySpec, s conversion.Scope) error {
out.Privileged = in.Privileged out.Privileged = in.Privileged
if in.Capabilities != nil { if in.DefaultAddCapabilities != nil {
in, out := &in.Capabilities, &out.Capabilities in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities
*out = make([]v1.Capability, len(*in)) *out = make([]v1.Capability, len(*in))
for i := range *in { for i := range *in {
(*out)[i] = v1.Capability((*in)[i]) (*out)[i] = v1.Capability((*in)[i])
} }
} else { } else {
out.Capabilities = nil out.DefaultAddCapabilities = nil
}
if in.RequiredDropCapabilities != nil {
in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities
*out = make([]v1.Capability, len(*in))
for i := range *in {
(*out)[i] = v1.Capability((*in)[i])
}
} else {
out.RequiredDropCapabilities = nil
}
if in.AllowedCapabilities != nil {
in, out := &in.AllowedCapabilities, &out.AllowedCapabilities
*out = make([]v1.Capability, len(*in))
for i := range *in {
(*out)[i] = v1.Capability((*in)[i])
}
} else {
out.AllowedCapabilities = nil
} }
if in.Volumes != nil { if in.Volumes != nil {
in, out := &in.Volumes, &out.Volumes in, out := &in.Volumes, &out.Volumes
...@@ -1687,6 +1774,13 @@ func autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySp ...@@ -1687,6 +1774,13 @@ func autoConvert_extensions_PodSecurityPolicySpec_To_v1beta1_PodSecurityPolicySp
if err := Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil { if err := Convert_extensions_RunAsUserStrategyOptions_To_v1beta1_RunAsUserStrategyOptions(&in.RunAsUser, &out.RunAsUser, s); err != nil {
return err return err
} }
if err := Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(&in.SupplementalGroups, &out.SupplementalGroups, s); err != nil {
return err
}
if err := Convert_extensions_FSGroupStrategyOptions_To_v1beta1_FSGroupStrategyOptions(&in.FSGroup, &out.FSGroup, s); err != nil {
return err
}
out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
return nil return nil
} }
...@@ -1987,6 +2081,46 @@ func Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec, ...@@ -1987,6 +2081,46 @@ func Convert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in *extensions.ScaleSpec,
return autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in, out, s) return autoConvert_extensions_ScaleSpec_To_v1beta1_ScaleSpec(in, out, s)
} }
func autoConvert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in *SupplementalGroupsStrategyOptions, out *extensions.SupplementalGroupsStrategyOptions, s conversion.Scope) error {
out.Rule = extensions.SupplementalGroupsStrategyType(in.Rule)
if in.Ranges != nil {
in, out := &in.Ranges, &out.Ranges
*out = make([]extensions.IDRange, len(*in))
for i := range *in {
if err := Convert_v1beta1_IDRange_To_extensions_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Ranges = nil
}
return nil
}
func Convert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in *SupplementalGroupsStrategyOptions, out *extensions.SupplementalGroupsStrategyOptions, s conversion.Scope) error {
return autoConvert_v1beta1_SupplementalGroupsStrategyOptions_To_extensions_SupplementalGroupsStrategyOptions(in, out, s)
}
func autoConvert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in *extensions.SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, s conversion.Scope) error {
out.Rule = SupplementalGroupsStrategyType(in.Rule)
if in.Ranges != nil {
in, out := &in.Ranges, &out.Ranges
*out = make([]IDRange, len(*in))
for i := range *in {
if err := Convert_extensions_IDRange_To_v1beta1_IDRange(&(*in)[i], &(*out)[i], s); err != nil {
return err
}
}
} else {
out.Ranges = nil
}
return nil
}
func Convert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in *extensions.SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, s conversion.Scope) error {
return autoConvert_extensions_SupplementalGroupsStrategyOptions_To_v1beta1_SupplementalGroupsStrategyOptions(in, out, s)
}
func autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error { func autoConvert_v1beta1_ThirdPartyResource_To_extensions_ThirdPartyResource(in *ThirdPartyResource, out *extensions.ThirdPartyResource, s conversion.Scope) error {
if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil { if err := api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
return err return err
......
...@@ -48,6 +48,7 @@ func init() { ...@@ -48,6 +48,7 @@ func init() {
DeepCopy_v1beta1_DeploymentStatus, DeepCopy_v1beta1_DeploymentStatus,
DeepCopy_v1beta1_DeploymentStrategy, DeepCopy_v1beta1_DeploymentStrategy,
DeepCopy_v1beta1_ExportOptions, DeepCopy_v1beta1_ExportOptions,
DeepCopy_v1beta1_FSGroupStrategyOptions,
DeepCopy_v1beta1_HTTPIngressPath, DeepCopy_v1beta1_HTTPIngressPath,
DeepCopy_v1beta1_HTTPIngressRuleValue, DeepCopy_v1beta1_HTTPIngressRuleValue,
DeepCopy_v1beta1_HorizontalPodAutoscaler, DeepCopy_v1beta1_HorizontalPodAutoscaler,
...@@ -88,6 +89,7 @@ func init() { ...@@ -88,6 +89,7 @@ func init() {
DeepCopy_v1beta1_ScaleSpec, DeepCopy_v1beta1_ScaleSpec,
DeepCopy_v1beta1_ScaleStatus, DeepCopy_v1beta1_ScaleStatus,
DeepCopy_v1beta1_SubresourceReference, DeepCopy_v1beta1_SubresourceReference,
DeepCopy_v1beta1_SupplementalGroupsStrategyOptions,
DeepCopy_v1beta1_ThirdPartyResource, DeepCopy_v1beta1_ThirdPartyResource,
DeepCopy_v1beta1_ThirdPartyResourceData, DeepCopy_v1beta1_ThirdPartyResourceData,
DeepCopy_v1beta1_ThirdPartyResourceDataList, DeepCopy_v1beta1_ThirdPartyResourceDataList,
...@@ -347,6 +349,22 @@ func DeepCopy_v1beta1_ExportOptions(in ExportOptions, out *ExportOptions, c *con ...@@ -347,6 +349,22 @@ func DeepCopy_v1beta1_ExportOptions(in ExportOptions, out *ExportOptions, c *con
return nil return nil
} }
func DeepCopy_v1beta1_FSGroupStrategyOptions(in FSGroupStrategyOptions, out *FSGroupStrategyOptions, c *conversion.Cloner) error {
out.Rule = in.Rule
if in.Ranges != nil {
in, out := in.Ranges, &out.Ranges
*out = make([]IDRange, len(in))
for i := range in {
if err := DeepCopy_v1beta1_IDRange(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Ranges = nil
}
return nil
}
func DeepCopy_v1beta1_HTTPIngressPath(in HTTPIngressPath, out *HTTPIngressPath, c *conversion.Cloner) error { func DeepCopy_v1beta1_HTTPIngressPath(in HTTPIngressPath, out *HTTPIngressPath, c *conversion.Cloner) error {
out.Path = in.Path out.Path = in.Path
if err := DeepCopy_v1beta1_IngressBackend(in.Backend, &out.Backend, c); err != nil { if err := DeepCopy_v1beta1_IngressBackend(in.Backend, &out.Backend, c); err != nil {
...@@ -814,14 +832,32 @@ func DeepCopy_v1beta1_PodSecurityPolicyList(in PodSecurityPolicyList, out *PodSe ...@@ -814,14 +832,32 @@ func DeepCopy_v1beta1_PodSecurityPolicyList(in PodSecurityPolicyList, out *PodSe
func DeepCopy_v1beta1_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *PodSecurityPolicySpec, c *conversion.Cloner) error { func DeepCopy_v1beta1_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *PodSecurityPolicySpec, c *conversion.Cloner) error {
out.Privileged = in.Privileged out.Privileged = in.Privileged
if in.Capabilities != nil { if in.DefaultAddCapabilities != nil {
in, out := in.Capabilities, &out.Capabilities in, out := in.DefaultAddCapabilities, &out.DefaultAddCapabilities
*out = make([]v1.Capability, len(in))
for i := range in {
(*out)[i] = in[i]
}
} else {
out.DefaultAddCapabilities = nil
}
if in.RequiredDropCapabilities != nil {
in, out := in.RequiredDropCapabilities, &out.RequiredDropCapabilities
*out = make([]v1.Capability, len(in))
for i := range in {
(*out)[i] = in[i]
}
} else {
out.RequiredDropCapabilities = nil
}
if in.AllowedCapabilities != nil {
in, out := in.AllowedCapabilities, &out.AllowedCapabilities
*out = make([]v1.Capability, len(in)) *out = make([]v1.Capability, len(in))
for i := range in { for i := range in {
(*out)[i] = in[i] (*out)[i] = in[i]
} }
} else { } else {
out.Capabilities = nil out.AllowedCapabilities = nil
} }
if in.Volumes != nil { if in.Volumes != nil {
in, out := in.Volumes, &out.Volumes in, out := in.Volumes, &out.Volumes
...@@ -852,6 +888,13 @@ func DeepCopy_v1beta1_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *PodSe ...@@ -852,6 +888,13 @@ func DeepCopy_v1beta1_PodSecurityPolicySpec(in PodSecurityPolicySpec, out *PodSe
if err := DeepCopy_v1beta1_RunAsUserStrategyOptions(in.RunAsUser, &out.RunAsUser, c); err != nil { if err := DeepCopy_v1beta1_RunAsUserStrategyOptions(in.RunAsUser, &out.RunAsUser, c); err != nil {
return err return err
} }
if err := DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(in.SupplementalGroups, &out.SupplementalGroups, c); err != nil {
return err
}
if err := DeepCopy_v1beta1_FSGroupStrategyOptions(in.FSGroup, &out.FSGroup, c); err != nil {
return err
}
out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
return nil return nil
} }
...@@ -1030,6 +1073,22 @@ func DeepCopy_v1beta1_SubresourceReference(in SubresourceReference, out *Subreso ...@@ -1030,6 +1073,22 @@ func DeepCopy_v1beta1_SubresourceReference(in SubresourceReference, out *Subreso
return nil return nil
} }
func DeepCopy_v1beta1_SupplementalGroupsStrategyOptions(in SupplementalGroupsStrategyOptions, out *SupplementalGroupsStrategyOptions, c *conversion.Cloner) error {
out.Rule = in.Rule
if in.Ranges != nil {
in, out := in.Ranges, &out.Ranges
*out = make([]IDRange, len(in))
for i := range in {
if err := DeepCopy_v1beta1_IDRange(in[i], &(*out)[i], c); err != nil {
return err
}
}
} else {
out.Ranges = nil
}
return nil
}
func DeepCopy_v1beta1_ThirdPartyResource(in ThirdPartyResource, out *ThirdPartyResource, c *conversion.Cloner) error { func DeepCopy_v1beta1_ThirdPartyResource(in ThirdPartyResource, out *ThirdPartyResource, c *conversion.Cloner) error {
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil { if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
return err return err
......
...@@ -235,6 +235,16 @@ message ExportOptions { ...@@ -235,6 +235,16 @@ message ExportOptions {
optional bool exact = 2; optional bool exact = 2;
} }
// FSGroupStrategyOptions defines the strategy type and options used to create the strategy.
message FSGroupStrategyOptions {
// Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.
optional string rule = 1;
// Ranges are the allowed ranges of fs groups. If you would like to force a single
// fs group then supply a single range with the same start and end.
repeated IDRange ranges = 2;
}
// HTTPIngressPath associates a path regex with a backend. Incoming urls matching // HTTPIngressPath associates a path regex with a backend. Incoming urls matching
// the path are forwarded to the backend. // the path are forwarded to the backend.
message HTTPIngressPath { message HTTPIngressPath {
...@@ -641,30 +651,54 @@ message PodSecurityPolicySpec { ...@@ -641,30 +651,54 @@ message PodSecurityPolicySpec {
// privileged determines if a pod can request to be run as privileged. // privileged determines if a pod can request to be run as privileged.
optional bool privileged = 1; optional bool privileged = 1;
// capabilities is a list of capabilities that can be added. // DefaultAddCapabilities is the default set of capabilities that will be added to the container
repeated string capabilities = 2; // unless the pod spec specifically drops the capability. You may not list a capabiility in both
// DefaultAddCapabilities and RequiredDropCapabilities.
repeated string defaultAddCapabilities = 2;
// RequiredDropCapabilities are the capabilities that will be dropped from the container. These
// are required to be dropped and cannot be added.
repeated string requiredDropCapabilities = 3;
// AllowedCapabilities is a list of capabilities that can be requested to add to the container.
// Capabilities in this field may be added at the pod author's discretion.
// You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.
repeated string allowedCapabilities = 4;
// volumes is a white list of allowed volume plugins. Empty indicates that all plugins // volumes is a white list of allowed volume plugins. Empty indicates that all plugins
// may be used. // may be used.
repeated string volumes = 3; repeated string volumes = 5;
// hostNetwork determines if the policy allows the use of HostNetwork in the pod spec. // hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
optional bool hostNetwork = 4; optional bool hostNetwork = 6;
// hostPorts determines which host port ranges are allowed to be exposed. // hostPorts determines which host port ranges are allowed to be exposed.
repeated HostPortRange hostPorts = 5; repeated HostPortRange hostPorts = 7;
// hostPID determines if the policy allows the use of HostPID in the pod spec. // hostPID determines if the policy allows the use of HostPID in the pod spec.
optional bool hostPID = 6; optional bool hostPID = 8;
// hostIPC determines if the policy allows the use of HostIPC in the pod spec. // hostIPC determines if the policy allows the use of HostIPC in the pod spec.
optional bool hostIPC = 7; optional bool hostIPC = 9;
// seLinux is the strategy that will dictate the allowable labels that may be set. // seLinux is the strategy that will dictate the allowable labels that may be set.
optional SELinuxStrategyOptions seLinux = 8; optional SELinuxStrategyOptions seLinux = 10;
// runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set. // runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
optional RunAsUserStrategyOptions runAsUser = 9; optional RunAsUserStrategyOptions runAsUser = 11;
// SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
optional SupplementalGroupsStrategyOptions supplementalGroups = 12;
// FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.
optional FSGroupStrategyOptions fsGroup = 13;
// ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file
// system. If the container specifically requests to run with a non-read only root file system
// the PSP should deny the pod.
// If set to false the container may run with a read only root file system if it wishes but it
// will not be forced to.
optional bool readOnlyRootFilesystem = 14;
} }
// ReplicaSet represents the configuration of a ReplicaSet. // ReplicaSet represents the configuration of a ReplicaSet.
...@@ -836,6 +870,16 @@ message SubresourceReference { ...@@ -836,6 +870,16 @@ message SubresourceReference {
optional string subresource = 4; optional string subresource = 4;
} }
// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.
message SupplementalGroupsStrategyOptions {
// Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.
optional string rule = 1;
// Ranges are the allowed ranges of supplemental groups. If you would like to force a single
// supplemental group then supply a single range with the same start and end.
repeated IDRange ranges = 2;
}
// A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource // A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource
// types to the API. It consists of one or more Versions of the api. // types to the API. It consists of one or more Versions of the api.
message ThirdPartyResource { message ThirdPartyResource {
......
...@@ -186,6 +186,16 @@ func (ExportOptions) SwaggerDoc() map[string]string { ...@@ -186,6 +186,16 @@ func (ExportOptions) SwaggerDoc() map[string]string {
return map_ExportOptions return map_ExportOptions
} }
var map_FSGroupStrategyOptions = map[string]string{
"": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.",
"rule": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext.",
"ranges": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end.",
}
func (FSGroupStrategyOptions) SwaggerDoc() map[string]string {
return map_FSGroupStrategyOptions
}
var map_HTTPIngressPath = map[string]string{ var map_HTTPIngressPath = map[string]string{
"": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.", "": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.",
"path": "Path is a extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.", "path": "Path is a extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.",
...@@ -467,16 +477,21 @@ func (PodSecurityPolicyList) SwaggerDoc() map[string]string { ...@@ -467,16 +477,21 @@ func (PodSecurityPolicyList) SwaggerDoc() map[string]string {
} }
var map_PodSecurityPolicySpec = map[string]string{ var map_PodSecurityPolicySpec = map[string]string{
"": "Pod Security Policy Spec defines the policy enforced.", "": "Pod Security Policy Spec defines the policy enforced.",
"privileged": "privileged determines if a pod can request to be run as privileged.", "privileged": "privileged determines if a pod can request to be run as privileged.",
"capabilities": "capabilities is a list of capabilities that can be added.", "defaultAddCapabilities": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities.",
"volumes": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.", "requiredDropCapabilities": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.",
"hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", "allowedCapabilities": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities.",
"hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.", "volumes": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used.",
"hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.", "hostNetwork": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.",
"hostIPC": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.", "hostPorts": "hostPorts determines which host port ranges are allowed to be exposed.",
"seLinux": "seLinux is the strategy that will dictate the allowable labels that may be set.", "hostPID": "hostPID determines if the policy allows the use of HostPID in the pod spec.",
"runAsUser": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.", "hostIPC": "hostIPC determines if the policy allows the use of HostIPC in the pod spec.",
"seLinux": "seLinux is the strategy that will dictate the allowable labels that may be set.",
"runAsUser": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.",
"supplementalGroups": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.",
"fsGroup": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext.",
"readOnlyRootFilesystem": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.",
} }
func (PodSecurityPolicySpec) SwaggerDoc() map[string]string { func (PodSecurityPolicySpec) SwaggerDoc() map[string]string {
...@@ -615,6 +630,16 @@ func (SubresourceReference) SwaggerDoc() map[string]string { ...@@ -615,6 +630,16 @@ func (SubresourceReference) SwaggerDoc() map[string]string {
return map_SubresourceReference return map_SubresourceReference
} }
var map_SupplementalGroupsStrategyOptions = map[string]string{
"": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.",
"rule": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext.",
"ranges": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end.",
}
func (SupplementalGroupsStrategyOptions) SwaggerDoc() map[string]string {
return map_SupplementalGroupsStrategyOptions
}
var map_ThirdPartyResource = map[string]string{ var map_ThirdPartyResource = map[string]string{
"": "A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource types to the API. It consists of one or more Versions of the api.", "": "A ThirdPartyResource is a generic representation of a resource, it is used by add-ons and plugins to add new resource types to the API. It consists of one or more Versions of the api.",
"metadata": "Standard object metadata", "metadata": "Standard object metadata",
......
...@@ -27,6 +27,7 @@ type ExtensionsInterface interface { ...@@ -27,6 +27,7 @@ type ExtensionsInterface interface {
DaemonSetsGetter DaemonSetsGetter
DeploymentsGetter DeploymentsGetter
IngressesGetter IngressesGetter
PodSecurityPoliciesGetter
ReplicaSetsGetter ReplicaSetsGetter
ScalesGetter ScalesGetter
ThirdPartyResourcesGetter ThirdPartyResourcesGetter
...@@ -49,6 +50,10 @@ func (c *ExtensionsClient) Ingresses(namespace string) IngressInterface { ...@@ -49,6 +50,10 @@ func (c *ExtensionsClient) Ingresses(namespace string) IngressInterface {
return newIngresses(c, namespace) return newIngresses(c, namespace)
} }
func (c *ExtensionsClient) PodSecurityPolicies() PodSecurityPolicyInterface {
return newPodSecurityPolicies(c)
}
func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface { func (c *ExtensionsClient) ReplicaSets(namespace string) ReplicaSetInterface {
return newReplicaSets(c, namespace) return newReplicaSets(c, namespace)
} }
......
...@@ -38,6 +38,10 @@ func (c *FakeExtensions) Ingresses(namespace string) unversioned.IngressInterfac ...@@ -38,6 +38,10 @@ func (c *FakeExtensions) Ingresses(namespace string) unversioned.IngressInterfac
return &FakeIngresses{c, namespace} return &FakeIngresses{c, namespace}
} }
func (c *FakeExtensions) PodSecurityPolicies() unversioned.PodSecurityPolicyInterface {
return &FakePodSecurityPolicies{c}
}
func (c *FakeExtensions) ReplicaSets(namespace string) unversioned.ReplicaSetInterface { func (c *FakeExtensions) ReplicaSets(namespace string) unversioned.ReplicaSetInterface {
return &FakeReplicaSets{c, namespace} return &FakeReplicaSets{c, namespace}
} }
......
/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package fake
import (
api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
extensions "k8s.io/kubernetes/pkg/apis/extensions"
core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels"
watch "k8s.io/kubernetes/pkg/watch"
)
// FakePodSecurityPolicies implements PodSecurityPolicyInterface
type FakePodSecurityPolicies struct {
Fake *FakeExtensions
}
var podsecuritypoliciesResource = unversioned.GroupVersionResource{Group: "extensions", Version: "", Resource: "podsecuritypolicies"}
func (c *FakePodSecurityPolicies) Create(podSecurityPolicy *extensions.PodSecurityPolicy) (result *extensions.PodSecurityPolicy, err error) {
obj, err := c.Fake.
Invokes(core.NewRootCreateAction(podsecuritypoliciesResource, podSecurityPolicy), &extensions.PodSecurityPolicy{})
if obj == nil {
return nil, err
}
return obj.(*extensions.PodSecurityPolicy), err
}
func (c *FakePodSecurityPolicies) Update(podSecurityPolicy *extensions.PodSecurityPolicy) (result *extensions.PodSecurityPolicy, err error) {
obj, err := c.Fake.
Invokes(core.NewRootUpdateAction(podsecuritypoliciesResource, podSecurityPolicy), &extensions.PodSecurityPolicy{})
if obj == nil {
return nil, err
}
return obj.(*extensions.PodSecurityPolicy), err
}
func (c *FakePodSecurityPolicies) Delete(name string, options *api.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewRootDeleteAction(podsecuritypoliciesResource, name), &extensions.PodSecurityPolicy{})
return err
}
func (c *FakePodSecurityPolicies) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
action := core.NewRootDeleteCollectionAction(podsecuritypoliciesResource, listOptions)
_, err := c.Fake.Invokes(action, &extensions.PodSecurityPolicyList{})
return err
}
func (c *FakePodSecurityPolicies) Get(name string) (result *extensions.PodSecurityPolicy, err error) {
obj, err := c.Fake.
Invokes(core.NewRootGetAction(podsecuritypoliciesResource, name), &extensions.PodSecurityPolicy{})
if obj == nil {
return nil, err
}
return obj.(*extensions.PodSecurityPolicy), err
}
func (c *FakePodSecurityPolicies) List(opts api.ListOptions) (result *extensions.PodSecurityPolicyList, err error) {
obj, err := c.Fake.
Invokes(core.NewRootListAction(podsecuritypoliciesResource, opts), &extensions.PodSecurityPolicyList{})
if obj == nil {
return nil, err
}
label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &extensions.PodSecurityPolicyList{}
for _, item := range obj.(*extensions.PodSecurityPolicyList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}
// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
func (c *FakePodSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewRootWatchAction(podsecuritypoliciesResource, opts))
}
/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package unversioned
import (
api "k8s.io/kubernetes/pkg/api"
extensions "k8s.io/kubernetes/pkg/apis/extensions"
watch "k8s.io/kubernetes/pkg/watch"
)
// PodSecurityPoliciesGetter has a method to return a PodSecurityPolicyInterface.
// A group's client should implement this interface.
type PodSecurityPoliciesGetter interface {
PodSecurityPolicies() PodSecurityPolicyInterface
}
// PodSecurityPolicyInterface has methods to work with PodSecurityPolicy resources.
type PodSecurityPolicyInterface interface {
Create(*extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error)
Update(*extensions.PodSecurityPolicy) (*extensions.PodSecurityPolicy, error)
Delete(name string, options *api.DeleteOptions) error
DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
Get(name string) (*extensions.PodSecurityPolicy, error)
List(opts api.ListOptions) (*extensions.PodSecurityPolicyList, error)
Watch(opts api.ListOptions) (watch.Interface, error)
PodSecurityPolicyExpansion
}
// podSecurityPolicies implements PodSecurityPolicyInterface
type podSecurityPolicies struct {
client *ExtensionsClient
}
// newPodSecurityPolicies returns a PodSecurityPolicies
func newPodSecurityPolicies(c *ExtensionsClient) *podSecurityPolicies {
return &podSecurityPolicies{
client: c,
}
}
// Create takes the representation of a podSecurityPolicy and creates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
func (c *podSecurityPolicies) Create(podSecurityPolicy *extensions.PodSecurityPolicy) (result *extensions.PodSecurityPolicy, err error) {
result = &extensions.PodSecurityPolicy{}
err = c.client.Post().
Resource("podsecuritypolicies").
Body(podSecurityPolicy).
Do().
Into(result)
return
}
// Update takes the representation of a podSecurityPolicy and updates it. Returns the server's representation of the podSecurityPolicy, and an error, if there is any.
func (c *podSecurityPolicies) Update(podSecurityPolicy *extensions.PodSecurityPolicy) (result *extensions.PodSecurityPolicy, err error) {
result = &extensions.PodSecurityPolicy{}
err = c.client.Put().
Resource("podsecuritypolicies").
Name(podSecurityPolicy.Name).
Body(podSecurityPolicy).
Do().
Into(result)
return
}
// Delete takes name of the podSecurityPolicy and deletes it. Returns an error if one occurs.
func (c *podSecurityPolicies) Delete(name string, options *api.DeleteOptions) error {
return c.client.Delete().
Resource("podsecuritypolicies").
Name(name).
Body(options).
Do().
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *podSecurityPolicies) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
return c.client.Delete().
Resource("podsecuritypolicies").
VersionedParams(&listOptions, api.ParameterCodec).
Body(options).
Do().
Error()
}
// Get takes name of the podSecurityPolicy, and returns the corresponding podSecurityPolicy object, and an error if there is any.
func (c *podSecurityPolicies) Get(name string) (result *extensions.PodSecurityPolicy, err error) {
result = &extensions.PodSecurityPolicy{}
err = c.client.Get().
Resource("podsecuritypolicies").
Name(name).
Do().
Into(result)
return
}
// List takes label and field selectors, and returns the list of PodSecurityPolicies that match those selectors.
func (c *podSecurityPolicies) List(opts api.ListOptions) (result *extensions.PodSecurityPolicyList, err error) {
result = &extensions.PodSecurityPolicyList{}
err = c.client.Get().
Resource("podsecuritypolicies").
VersionedParams(&opts, api.ParameterCodec).
Do().
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested podSecurityPolicies.
func (c *podSecurityPolicies) Watch(opts api.ListOptions) (watch.Interface, error) {
return c.client.Get().
Prefix("watch").
Resource("podsecuritypolicies").
VersionedParams(&opts, api.ParameterCodec).
Watch()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment