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
6d2c2ef1
Commit
6d2c2ef1
authored
Jul 06, 2018
by
Cao Shufeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upgrade advanced Audit to stable
parent
28b6fb5f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
3 deletions
+90
-3
.golint_failures
hack/.golint_failures
+1
-0
update-generated-protobuf-dockerized.sh
hack/update-generated-protobuf-dockerized.sh
+1
-0
install.go
...ng/src/k8s.io/apiserver/pkg/apis/audit/install/install.go
+3
-1
doc.go
staging/src/k8s.io/apiserver/pkg/apis/audit/v1/doc.go
+23
-0
register.go
staging/src/k8s.io/apiserver/pkg/apis/audit/v1/register.go
+58
-0
types.go
staging/src/k8s.io/apiserver/pkg/apis/audit/v1/types.go
+0
-0
scheme.go
staging/src/k8s.io/apiserver/pkg/audit/scheme.go
+4
-2
No files found.
hack/.golint_failures
View file @
6d2c2ef1
...
@@ -527,6 +527,7 @@ staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating
...
@@ -527,6 +527,7 @@ staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating
staging/src/k8s.io/apiserver/pkg/apis/apiserver
staging/src/k8s.io/apiserver/pkg/apis/apiserver
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1
staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1alpha1
staging/src/k8s.io/apiserver/pkg/apis/audit
staging/src/k8s.io/apiserver/pkg/apis/audit
staging/src/k8s.io/apiserver/pkg/apis/audit/v1
staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1
staging/src/k8s.io/apiserver/pkg/apis/audit/v1alpha1
staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1
staging/src/k8s.io/apiserver/pkg/apis/audit/v1beta1
staging/src/k8s.io/apiserver/pkg/apis/audit/validation
staging/src/k8s.io/apiserver/pkg/apis/audit/validation
...
...
hack/update-generated-protobuf-dockerized.sh
View file @
6d2c2ef1
...
@@ -84,6 +84,7 @@ PACKAGES=(
...
@@ -84,6 +84,7 @@ PACKAGES=(
k8s.io/metrics/pkg/apis/external_metrics/v1beta1
k8s.io/metrics/pkg/apis/external_metrics/v1beta1
k8s.io/apiserver/pkg/apis/audit/v1alpha1
k8s.io/apiserver/pkg/apis/audit/v1alpha1
k8s.io/apiserver/pkg/apis/audit/v1beta1
k8s.io/apiserver/pkg/apis/audit/v1beta1
k8s.io/apiserver/pkg/apis/audit/v1
k8s.io/apiserver/pkg/apis/example2/v1
k8s.io/apiserver/pkg/apis/example2/v1
)
)
...
...
staging/src/k8s.io/apiserver/pkg/apis/audit/install/install.go
View file @
6d2c2ef1
...
@@ -22,6 +22,7 @@ import (
...
@@ -22,6 +22,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime"
utilruntime
"k8s.io/apimachinery/pkg/util/runtime"
utilruntime
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apiserver/pkg/apis/audit"
"k8s.io/apiserver/pkg/apis/audit"
"k8s.io/apiserver/pkg/apis/audit/v1"
"k8s.io/apiserver/pkg/apis/audit/v1alpha1"
"k8s.io/apiserver/pkg/apis/audit/v1alpha1"
"k8s.io/apiserver/pkg/apis/audit/v1beta1"
"k8s.io/apiserver/pkg/apis/audit/v1beta1"
)
)
...
@@ -29,7 +30,8 @@ import (
...
@@ -29,7 +30,8 @@ import (
// Install registers the API group and adds types to a scheme
// Install registers the API group and adds types to a scheme
func
Install
(
scheme
*
runtime
.
Scheme
)
{
func
Install
(
scheme
*
runtime
.
Scheme
)
{
utilruntime
.
Must
(
audit
.
AddToScheme
(
scheme
))
utilruntime
.
Must
(
audit
.
AddToScheme
(
scheme
))
utilruntime
.
Must
(
v1
.
AddToScheme
(
scheme
))
utilruntime
.
Must
(
v1beta1
.
AddToScheme
(
scheme
))
utilruntime
.
Must
(
v1beta1
.
AddToScheme
(
scheme
))
utilruntime
.
Must
(
v1alpha1
.
AddToScheme
(
scheme
))
utilruntime
.
Must
(
v1alpha1
.
AddToScheme
(
scheme
))
utilruntime
.
Must
(
scheme
.
SetVersionPriority
(
v1beta1
.
SchemeGroupVersion
,
v1alpha1
.
SchemeGroupVersion
))
utilruntime
.
Must
(
scheme
.
SetVersionPriority
(
v1
.
SchemeGroupVersion
,
v1
beta1
.
SchemeGroupVersion
,
v1alpha1
.
SchemeGroupVersion
))
}
}
staging/src/k8s.io/apiserver/pkg/apis/audit/v1/doc.go
0 → 100644
View file @
6d2c2ef1
/*
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
// +k8s:conversion-gen=k8s.io/apiserver/pkg/apis/audit
// +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta
// +groupName=audit.k8s.io
package
v1
// import "k8s.io/apiserver/pkg/apis/audit/v1"
staging/src/k8s.io/apiserver/pkg/apis/audit/v1/register.go
0 → 100644
View file @
6d2c2ef1
/*
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
v1
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
=
"audit.k8s.io"
// SchemeGroupVersion is group version used to register these objects
var
SchemeGroupVersion
=
schema
.
GroupVersion
{
Group
:
GroupName
,
Version
:
"v1"
}
// 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
.
SchemeBuilder
localSchemeBuilder
=
&
SchemeBuilder
AddToScheme
=
localSchemeBuilder
.
AddToScheme
)
func
init
()
{
// We only register manually written functions here. The registration of the
// generated functions takes place in the generated files. The separation
// makes the code compile even when the generated files are missing.
localSchemeBuilder
.
Register
(
addKnownTypes
)
}
func
addKnownTypes
(
scheme
*
runtime
.
Scheme
)
error
{
scheme
.
AddKnownTypes
(
SchemeGroupVersion
,
&
Event
{},
&
EventList
{},
&
Policy
{},
&
PolicyList
{},
)
metav1
.
AddToGroupVersion
(
scheme
,
SchemeGroupVersion
)
return
nil
}
staging/src/k8s.io/apiserver/pkg/apis/audit/v1/types.go
0 → 100644
View file @
6d2c2ef1
This diff is collapsed.
Click to expand it.
staging/src/k8s.io/apiserver/pkg/audit/scheme.go
View file @
6d2c2ef1
...
@@ -18,11 +18,12 @@ limitations under the License.
...
@@ -18,11 +18,12 @@ limitations under the License.
package
audit
package
audit
import
(
import
(
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/apimachinery/pkg/runtime/serializer"
utilruntime
"k8s.io/apimachinery/pkg/util/runtime"
utilruntime
"k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apiserver/pkg/apis/audit/v1"
"k8s.io/apiserver/pkg/apis/audit/v1alpha1"
"k8s.io/apiserver/pkg/apis/audit/v1alpha1"
"k8s.io/apiserver/pkg/apis/audit/v1beta1"
"k8s.io/apiserver/pkg/apis/audit/v1beta1"
)
)
...
@@ -31,7 +32,8 @@ var Scheme = runtime.NewScheme()
...
@@ -31,7 +32,8 @@ var Scheme = runtime.NewScheme()
var
Codecs
=
serializer
.
NewCodecFactory
(
Scheme
)
var
Codecs
=
serializer
.
NewCodecFactory
(
Scheme
)
func
init
()
{
func
init
()
{
v1
.
AddToGroupVersion
(
Scheme
,
schema
.
GroupVersion
{
Version
:
"v1"
})
metav1
.
AddToGroupVersion
(
Scheme
,
schema
.
GroupVersion
{
Version
:
"v1"
})
utilruntime
.
Must
(
v1
.
AddToScheme
(
Scheme
))
utilruntime
.
Must
(
v1alpha1
.
AddToScheme
(
Scheme
))
utilruntime
.
Must
(
v1alpha1
.
AddToScheme
(
Scheme
))
utilruntime
.
Must
(
v1beta1
.
AddToScheme
(
Scheme
))
utilruntime
.
Must
(
v1beta1
.
AddToScheme
(
Scheme
))
}
}
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