Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
87e85e25
Commit
87e85e25
authored
May 08, 2015
by
Abhi Shah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Added ISCSI to PV structs"
parent
9b2a0df8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
0 additions
and
63 deletions
+0
-63
types.go
pkg/api/types.go
+0
-3
conversion.go
pkg/api/v1/conversion.go
+0
-6
types.go
pkg/api/v1/types.go
+0
-3
types.go
pkg/api/v1beta1/types.go
+0
-3
types.go
pkg/api/v1beta2/types.go
+0
-3
conversion_generated.go
pkg/api/v1beta3/conversion_generated.go
+0
-16
types.go
pkg/api/v1beta3/types.go
+0
-3
validation.go
pkg/api/validation/validation.go
+0
-4
iscsi_test.go
pkg/volume/iscsi/iscsi_test.go
+0
-22
No files found.
pkg/api/types.go
View file @
87e85e25
...
@@ -220,9 +220,6 @@ type PersistentVolumeSource struct {
...
@@ -220,9 +220,6 @@ type PersistentVolumeSource struct {
// This is useful for development and testing only.
// This is useful for development and testing only.
// on-host storage is not supported in any way
// on-host storage is not supported in any way
HostPath
*
HostPathVolumeSource
`json:"hostPath"`
HostPath
*
HostPathVolumeSource
`json:"hostPath"`
// ISCSIVolumeSource represents an ISCSI resource that is attached to a
// kubelet's host machine and then exposed to the pod.
ISCSI
*
ISCSIVolumeSource
`json:"iscsi"`
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs"`
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs"`
// NFS represents an NFS mount on the host that shares a pod's lifetime
// NFS represents an NFS mount on the host that shares a pod's lifetime
...
...
pkg/api/v1/conversion.go
View file @
87e85e25
...
@@ -1606,9 +1606,6 @@ func init() {
...
@@ -1606,9 +1606,6 @@ func init() {
if
err
:=
s
.
Convert
(
&
in
.
HostPath
,
&
out
.
HostPath
,
0
);
err
!=
nil
{
if
err
:=
s
.
Convert
(
&
in
.
HostPath
,
&
out
.
HostPath
,
0
);
err
!=
nil
{
return
err
return
err
}
}
if
err
:=
s
.
Convert
(
&
in
.
ISCSI
,
&
out
.
ISCSI
,
0
);
err
!=
nil
{
return
err
}
if
err
:=
s
.
Convert
(
&
in
.
Glusterfs
,
&
out
.
Glusterfs
,
0
);
err
!=
nil
{
if
err
:=
s
.
Convert
(
&
in
.
Glusterfs
,
&
out
.
Glusterfs
,
0
);
err
!=
nil
{
return
err
return
err
}
}
...
@@ -1627,9 +1624,6 @@ func init() {
...
@@ -1627,9 +1624,6 @@ func init() {
if
err
:=
s
.
Convert
(
&
in
.
HostPath
,
&
out
.
HostPath
,
0
);
err
!=
nil
{
if
err
:=
s
.
Convert
(
&
in
.
HostPath
,
&
out
.
HostPath
,
0
);
err
!=
nil
{
return
err
return
err
}
}
if
err
:=
s
.
Convert
(
&
in
.
ISCSI
,
&
out
.
ISCSI
,
0
);
err
!=
nil
{
return
err
}
if
err
:=
s
.
Convert
(
&
in
.
Glusterfs
,
&
out
.
Glusterfs
,
0
);
err
!=
nil
{
if
err
:=
s
.
Convert
(
&
in
.
Glusterfs
,
&
out
.
Glusterfs
,
0
);
err
!=
nil
{
return
err
return
err
}
}
...
...
pkg/api/v1/types.go
View file @
87e85e25
...
@@ -245,9 +245,6 @@ type PersistentVolumeSource struct {
...
@@ -245,9 +245,6 @@ type PersistentVolumeSource struct {
// This is useful for development and testing only.
// This is useful for development and testing only.
// on-host storage is not supported in any way.
// on-host storage is not supported in any way.
HostPath
*
HostPathVolumeSource
`json:"hostPath" description:"a HostPath provisioned by a developer or tester; for develment use only"`
HostPath
*
HostPathVolumeSource
`json:"hostPath" description:"a HostPath provisioned by a developer or tester; for develment use only"`
// ISCSI represents an ISCSI Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
ISCSI
*
ISCSIVolumeSource
`json:"iscsi" description:"an iSCSI disk resource provisioned by an admin"`
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs" description:"Glusterfs volume resource provisioned by an admin"`
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs" description:"Glusterfs volume resource provisioned by an admin"`
// NFS represents an NFS mount on the host
// NFS represents an NFS mount on the host
...
...
pkg/api/v1beta1/types.go
View file @
87e85e25
...
@@ -143,9 +143,6 @@ type PersistentVolumeSource struct {
...
@@ -143,9 +143,6 @@ type PersistentVolumeSource struct {
// This is useful for development and testing only.
// This is useful for development and testing only.
// on-host storage is not supported in any way.
// on-host storage is not supported in any way.
HostPath
*
HostPathVolumeSource
`json:"hostPath" description:"a HostPath provisioned by a developer or tester; for develment use only"`
HostPath
*
HostPathVolumeSource
`json:"hostPath" description:"a HostPath provisioned by a developer or tester; for develment use only"`
// ISCSI represents an ISCSI Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
ISCSI
*
ISCSIVolumeSource
`json:"iscsi" description:"an iSCSI disk resource provisioned by an admin"`
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs" description:"Glusterfs volume resource provisioned by an admin"`
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs" description:"Glusterfs volume resource provisioned by an admin"`
// NFS represents an NFS mount on the host
// NFS represents an NFS mount on the host
...
...
pkg/api/v1beta2/types.go
View file @
87e85e25
...
@@ -105,9 +105,6 @@ type PersistentVolumeSource struct {
...
@@ -105,9 +105,6 @@ type PersistentVolumeSource struct {
// This is useful for development and testing only.
// This is useful for development and testing only.
// on-host storage is not supported in any way.
// on-host storage is not supported in any way.
HostPath
*
HostPathVolumeSource
`json:"hostPath" description:"a HostPath provisioned by a developer or tester; for develment use only"`
HostPath
*
HostPathVolumeSource
`json:"hostPath" description:"a HostPath provisioned by a developer or tester; for develment use only"`
// ISCSI represents an ISCSI Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
ISCSI
*
ISCSIVolumeSource
`json:"iscsi" description:"an iSCSI disk resource provisioned by an admin"`
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs" description:"Glusterfs volume resource provisioned by an admin"`
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs" description:"Glusterfs volume resource provisioned by an admin"`
// NFS represents an NFS mount on the host
// NFS represents an NFS mount on the host
...
...
pkg/api/v1beta3/conversion_generated.go
View file @
87e85e25
...
@@ -2245,14 +2245,6 @@ func convert_v1beta3_PersistentVolumeSource_To_api_PersistentVolumeSource(in *Pe
...
@@ -2245,14 +2245,6 @@ func convert_v1beta3_PersistentVolumeSource_To_api_PersistentVolumeSource(in *Pe
}
else
{
}
else
{
out
.
HostPath
=
nil
out
.
HostPath
=
nil
}
}
if
in
.
ISCSI
!=
nil
{
out
.
ISCSI
=
new
(
newer
.
ISCSIVolumeSource
)
if
err
:=
convert_v1beta3_ISCSIVolumeSource_To_api_ISCSIVolumeSource
(
in
.
ISCSI
,
out
.
ISCSI
,
s
);
err
!=
nil
{
return
err
}
}
else
{
out
.
ISCSI
=
nil
}
if
in
.
Glusterfs
!=
nil
{
if
in
.
Glusterfs
!=
nil
{
out
.
Glusterfs
=
new
(
newer
.
GlusterfsVolumeSource
)
out
.
Glusterfs
=
new
(
newer
.
GlusterfsVolumeSource
)
if
err
:=
convert_v1beta3_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource
(
in
.
Glusterfs
,
out
.
Glusterfs
,
s
);
err
!=
nil
{
if
err
:=
convert_v1beta3_GlusterfsVolumeSource_To_api_GlusterfsVolumeSource
(
in
.
Glusterfs
,
out
.
Glusterfs
,
s
);
err
!=
nil
{
...
@@ -2300,14 +2292,6 @@ func convert_api_PersistentVolumeSource_To_v1beta3_PersistentVolumeSource(in *ne
...
@@ -2300,14 +2292,6 @@ func convert_api_PersistentVolumeSource_To_v1beta3_PersistentVolumeSource(in *ne
}
else
{
}
else
{
out
.
HostPath
=
nil
out
.
HostPath
=
nil
}
}
if
in
.
ISCSI
!=
nil
{
out
.
ISCSI
=
new
(
ISCSIVolumeSource
)
if
err
:=
convert_api_ISCSIVolumeSource_To_v1beta3_ISCSIVolumeSource
(
in
.
ISCSI
,
out
.
ISCSI
,
s
);
err
!=
nil
{
return
err
}
}
else
{
out
.
ISCSI
=
nil
}
if
in
.
Glusterfs
!=
nil
{
if
in
.
Glusterfs
!=
nil
{
out
.
Glusterfs
=
new
(
GlusterfsVolumeSource
)
out
.
Glusterfs
=
new
(
GlusterfsVolumeSource
)
if
err
:=
convert_api_GlusterfsVolumeSource_To_v1beta3_GlusterfsVolumeSource
(
in
.
Glusterfs
,
out
.
Glusterfs
,
s
);
err
!=
nil
{
if
err
:=
convert_api_GlusterfsVolumeSource_To_v1beta3_GlusterfsVolumeSource
(
in
.
Glusterfs
,
out
.
Glusterfs
,
s
);
err
!=
nil
{
...
...
pkg/api/v1beta3/types.go
View file @
87e85e25
...
@@ -245,9 +245,6 @@ type PersistentVolumeSource struct {
...
@@ -245,9 +245,6 @@ type PersistentVolumeSource struct {
// This is useful for development and testing only.
// This is useful for development and testing only.
// on-host storage is not supported in any way.
// on-host storage is not supported in any way.
HostPath
*
HostPathVolumeSource
`json:"hostPath" description:"a HostPath provisioned by a developer or tester; for develment use only"`
HostPath
*
HostPathVolumeSource
`json:"hostPath" description:"a HostPath provisioned by a developer or tester; for develment use only"`
// ISCSI represents an ISCSI Disk resource that is attached to a
// kubelet's host machine and then exposed to the pod.
ISCSI
*
ISCSIVolumeSource
`json:"iscsi" description:"an iSCSI disk resource provisioned by an admin"`
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
// Glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs" description:"Glusterfs volume resource provisioned by an admin"`
Glusterfs
*
GlusterfsVolumeSource
`json:"glusterfs" description:"Glusterfs volume resource provisioned by an admin"`
// NFS represents an NFS mount on the host
// NFS represents an NFS mount on the host
...
...
pkg/api/validation/validation.go
View file @
87e85e25
...
@@ -461,10 +461,6 @@ func ValidatePersistentVolume(pv *api.PersistentVolume) errs.ValidationErrorList
...
@@ -461,10 +461,6 @@ func ValidatePersistentVolume(pv *api.PersistentVolume) errs.ValidationErrorList
numVolumes
++
numVolumes
++
allErrs
=
append
(
allErrs
,
validateAWSElasticBlockStoreVolumeSource
(
pv
.
Spec
.
AWSElasticBlockStore
)
.
Prefix
(
"awsElasticBlockStore"
)
...
)
allErrs
=
append
(
allErrs
,
validateAWSElasticBlockStoreVolumeSource
(
pv
.
Spec
.
AWSElasticBlockStore
)
.
Prefix
(
"awsElasticBlockStore"
)
...
)
}
}
if
pv
.
Spec
.
ISCSI
!=
nil
{
numVolumes
++
allErrs
=
append
(
allErrs
,
validateISCSIVolumeSource
(
pv
.
Spec
.
ISCSI
)
.
Prefix
(
"iscsi"
)
...
)
}
if
pv
.
Spec
.
Glusterfs
!=
nil
{
if
pv
.
Spec
.
Glusterfs
!=
nil
{
numVolumes
++
numVolumes
++
allErrs
=
append
(
allErrs
,
validateGlusterfs
(
pv
.
Spec
.
Glusterfs
)
.
Prefix
(
"glusterfs"
)
...
)
allErrs
=
append
(
allErrs
,
validateGlusterfs
(
pv
.
Spec
.
Glusterfs
)
.
Prefix
(
"glusterfs"
)
...
)
...
...
pkg/volume/iscsi/iscsi_test.go
View file @
87e85e25
...
@@ -39,28 +39,6 @@ func TestCanSupport(t *testing.T) {
...
@@ -39,28 +39,6 @@ func TestCanSupport(t *testing.T) {
}
}
}
}
func
TestGetAccessModes
(
t
*
testing
.
T
)
{
plugMgr
:=
volume
.
VolumePluginMgr
{}
plugMgr
.
InitPlugins
(
ProbeVolumePlugins
(),
volume
.
NewFakeVolumeHost
(
"/tmp/fake"
,
nil
,
nil
))
plug
,
err
:=
plugMgr
.
FindPersistentPluginByName
(
"kubernetes.io/iscsi"
)
if
err
!=
nil
{
t
.
Errorf
(
"Can't find the plugin by name"
)
}
if
!
contains
(
plug
.
GetAccessModes
(),
api
.
ReadWriteOnce
)
||
!
contains
(
plug
.
GetAccessModes
(),
api
.
ReadOnlyMany
)
{
t
.
Errorf
(
"Expected two AccessModeTypes: %s and %s"
,
api
.
ReadWriteOnce
,
api
.
ReadOnlyMany
)
}
}
func
contains
(
modes
[]
api
.
AccessModeType
,
mode
api
.
AccessModeType
)
bool
{
for
_
,
m
:=
range
modes
{
if
m
==
mode
{
return
true
}
}
return
false
}
type
fakeDiskManager
struct
{
type
fakeDiskManager
struct
{
attachCalled
bool
attachCalled
bool
detachCalled
bool
detachCalled
bool
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment