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
c3a27525
Commit
c3a27525
authored
Aug 22, 2018
by
Jan Safranek
Committed by
saad-ali
Aug 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce new `CSINodeInfo` CRD API Object
parent
bed2c396
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
1 deletion
+47
-1
doc.go
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/doc.go
+1
-0
register.go
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/register.go
+5
-1
types.go
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/types.go
+41
-0
No files found.
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/doc.go
View file @
c3a27525
...
...
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1alpha1 provides alpha API for CSI API objects.
// +k8s:deepcopy-gen=package,register
// +groupName=csi.storage.k8s.io
// +k8s:openapi-gen=true
...
...
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/register.go
View file @
c3a27525
...
...
@@ -34,8 +34,10 @@ func Resource(resource string) schema.GroupResource {
}
var
(
// SchemeBuilder collects schemas to build.
SchemeBuilder
=
runtime
.
NewSchemeBuilder
(
addKnownTypes
)
AddToScheme
=
SchemeBuilder
.
AddToScheme
// AddToScheme is used by generated client to add this scheme to the generated client.
AddToScheme
=
SchemeBuilder
.
AddToScheme
)
// Adds the list of known types to the given scheme.
...
...
@@ -43,6 +45,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme
.
AddKnownTypes
(
SchemeGroupVersion
,
&
CSIDriver
{},
&
CSIDriverList
{},
&
CSINodeInfo
{},
&
CSINodeInfoList
{},
)
metav1
.
AddToGroupVersion
(
scheme
,
SchemeGroupVersion
)
...
...
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/types.go
View file @
c3a27525
...
...
@@ -74,3 +74,44 @@ type CSIDriverSpec struct {
// +optional
PodInfoRequiredOnMount
*
bool
`json:"podInfoRequiredOnMount"`
}
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// CSINodeInfo holds information about all CSI drivers installed on a node.
type
CSINodeInfo
struct
{
metav1
.
TypeMeta
`json:",inline"`
// ObjectMeta.Name must be node name.
metav1
.
ObjectMeta
`json:"metadata,omitempty"`
// List of CSI drivers running on the node and their properties.
CSIDrivers
[]
CSIDriverInfo
`json:"csiDrivers"`
}
// CSIDriverInfo contains information about one CSI driver installed on a node.
type
CSIDriverInfo
struct
{
// Driver is the name of the CSI driver that this object refers to.
// This MUST be the same name returned by the CSI GetPluginName() call for
// that driver.
Driver
string
`json:"driver"`
// ID of the node from the driver point of view.
NodeID
string
`json:"nodeID"`
// Topology keys reported by the driver on the node.
TopologyKeys
[]
string
`json:"topologyKeys"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// CSINodeInfoList is a collection of CSINodeInfo objects.
type
CSINodeInfoList
struct
{
metav1
.
TypeMeta
`json:",inline"`
// Standard list metadata
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
// +optional
metav1
.
ListMeta
`json:"metadata,omitempty"`
// Items is the list of CSINodeInfo
Items
[]
CSINodeInfo
`json:"items"`
}
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