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
6524fd07
Unverified
Commit
6524fd07
authored
Aug 18, 2016
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add metadata.name fieldSelector support to csr API
parent
ada58f5f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
conversion.go
pkg/apis/certificates/v1alpha1/conversion.go
+17
-2
strategy.go
pkg/registry/certificates/strategy.go
+1
-1
No files found.
pkg/apis/certificates/v1alpha1/conversion.go
View file @
6524fd07
...
@@ -16,9 +16,24 @@ limitations under the License.
...
@@ -16,9 +16,24 @@ limitations under the License.
package
v1alpha1
package
v1alpha1
import
"k8s.io/kubernetes/pkg/runtime"
import
(
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/runtime"
)
func
addConversionFuncs
(
scheme
*
runtime
.
Scheme
)
error
{
func
addConversionFuncs
(
scheme
*
runtime
.
Scheme
)
error
{
// Add non-generated conversion functions here. Currently there are none.
// Add non-generated conversion functions here. Currently there are none.
return
nil
return
api
.
Scheme
.
AddFieldLabelConversionFunc
(
SchemeGroupVersion
.
String
(),
"CertificateSigningRequest"
,
func
(
label
,
value
string
)
(
string
,
string
,
error
)
{
switch
label
{
case
"metadata.name"
:
return
label
,
value
,
nil
default
:
return
""
,
""
,
fmt
.
Errorf
(
"field label not supported: %s"
,
label
)
}
},
)
}
}
pkg/registry/certificates/strategy.go
View file @
6524fd07
...
@@ -184,5 +184,5 @@ func Matcher(label labels.Selector, field fields.Selector) *generic.SelectionPre
...
@@ -184,5 +184,5 @@ func Matcher(label labels.Selector, field fields.Selector) *generic.SelectionPre
// SelectableFields returns a field set that can be used for filter selection
// SelectableFields returns a field set that can be used for filter selection
func
SelectableFields
(
obj
*
certificates
.
CertificateSigningRequest
)
fields
.
Set
{
func
SelectableFields
(
obj
*
certificates
.
CertificateSigningRequest
)
fields
.
Set
{
return
nil
return
generic
.
ObjectMetaFieldsSet
(
obj
.
ObjectMeta
,
false
)
}
}
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