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
bed2c396
Commit
bed2c396
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 `CSIDriver` CRD API Object
parent
5ceb26d2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
180 additions
and
0 deletions
+180
-0
BUILD
pkg/generated/openapi/BUILD
+1
-0
BUILD
staging/src/BUILD
+1
-0
BUILD
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/BUILD
+32
-0
doc.go
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/doc.go
+20
-0
register.go
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/register.go
+50
-0
types.go
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/types.go
+76
-0
No files found.
pkg/generated/openapi/BUILD
View file @
bed2c396
...
...
@@ -69,6 +69,7 @@ openapi_library(
"k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1",
"k8s.io/client-go/pkg/apis/clientauthentication/v1beta1",
"k8s.io/client-go/pkg/version",
"k8s.io/csi-api/pkg/apis/csi/v1alpha1",
"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1",
"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1",
"k8s.io/metrics/pkg/apis/custom_metrics/v1beta1",
...
...
staging/src/BUILD
View file @
bed2c396
...
...
@@ -201,6 +201,7 @@ filegroup(
"//staging/src/k8s.io/code-generator/hack:all-srcs",
"//staging/src/k8s.io/code-generator/pkg/util:all-srcs",
"//staging/src/k8s.io/code-generator/third_party/forked/golang/reflect:all-srcs",
"//staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1:all-srcs",
"//staging/src/k8s.io/csi-api/pkg/client/listers/csi/v1alpha1:all-srcs",
"//staging/src/k8s.io/kube-aggregator:all-srcs",
"//staging/src/k8s.io/kube-proxy/config/v1alpha1:all-srcs",
...
...
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/BUILD
0 → 100644
View file @
bed2c396
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"register.go",
"types.go",
],
importmap = "k8s.io/kubernetes/vendor/k8s.io/csi-api/pkg/apis/csi/v1alpha1",
importpath = "k8s.io/csi-api/pkg/apis/csi/v1alpha1",
visibility = ["//visibility:public"],
deps = [
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/doc.go
0 → 100644
View file @
bed2c396
/*
Copyright 2018 The Kubernetes Authors.
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.
*/
// +k8s:deepcopy-gen=package,register
// +groupName=csi.storage.k8s.io
// +k8s:openapi-gen=true
package
v1alpha1
// import "k8s.io/csi-api/pkg/apis/csi/v1alpha1"
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/register.go
0 → 100644
View file @
bed2c396
/*
Copyright 2018 The Kubernetes Authors.
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
v1alpha1
import
(
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
)
// GroupName is the group name use in this package
const
GroupName
=
"csi.storage.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var
SchemeGroupVersion
=
schema
.
GroupVersion
{
Group
:
GroupName
,
Version
:
"v1alpha1"
}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func
Resource
(
resource
string
)
schema
.
GroupResource
{
return
SchemeGroupVersion
.
WithResource
(
resource
)
.
GroupResource
()
}
var
(
SchemeBuilder
=
runtime
.
NewSchemeBuilder
(
addKnownTypes
)
AddToScheme
=
SchemeBuilder
.
AddToScheme
)
// Adds the list of known types to the given scheme.
func
addKnownTypes
(
scheme
*
runtime
.
Scheme
)
error
{
scheme
.
AddKnownTypes
(
SchemeGroupVersion
,
&
CSIDriver
{},
&
CSIDriverList
{},
)
metav1
.
AddToGroupVersion
(
scheme
,
SchemeGroupVersion
)
return
nil
}
staging/src/k8s.io/csi-api/pkg/apis/csi/v1alpha1/types.go
0 → 100644
View file @
bed2c396
/*
Copyright 2018 The Kubernetes Authors.
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
v1alpha1
import
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// CSIDriver captures information about a Container Storage Interface (CSI)
// volume driver deployed on the cluster.
// CSIDriver objects are non-namespaced.
type
CSIDriver
struct
{
metav1
.
TypeMeta
`json:",inline"`
// Standard object metadata.
// metadata.Name indicates the name of the CSI driver that this object
// refers to; it MUST be the same name returned by the CSI GetPluginName()
// call for that driver.
// More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
metav1
.
ObjectMeta
`json:"metadata,omitempty"`
// Specification of the CSI Driver.
Spec
CSIDriverSpec
`json:"spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// CSIDriverList is a collection of CSIDriver objects.
type
CSIDriverList
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 CSIDriver
Items
[]
CSIDriver
`json:"items"`
}
// CSIDriverSpec is the specification of a CSIDriver.
type
CSIDriverSpec
struct
{
// Indicates this CSI volume driver requires an attach operation (because it
// implements the CSI ControllerPublishVolume() method), and that Kubernetes
// should call attach and wait for any attach operation to complete before
// proceeding to mounting.
// If value is not specified, default is false -- meaning attach will not be
// called.
// +optional
AttachRequired
*
bool
`json:"attachRequired"`
// Indicates this CSI volume driver requires additional pod information
// (like podName, podUID, etc.) during mount operations.
// If this is set to true, Kubelet will pass pod information as
// VolumeAttributes in the CSI NodePublishVolume() calls.
// If value is not specified, default is false -- meaning pod information
// will not be passed on mount.
// +optional
PodInfoRequiredOnMount
*
bool
`json:"podInfoRequiredOnMount"`
}
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