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
e375f360
Commit
e375f360
authored
Feb 22, 2018
by
Karol Wychowaniec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include generated files
parent
f9c4b52a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
375 additions
and
0 deletions
+375
-0
.golint_failures
hack/.golint_failures
+2
-0
update-generated-protobuf-dockerized.sh
hack/update-generated-protobuf-dockerized.sh
+1
-0
BUILD
pkg/generated/openapi/BUILD
+1
-0
BUILD
...rc/k8s.io/metrics/pkg/apis/external_metrics/v1beta1/BUILD
+8
-0
generated.pb.go
...metrics/pkg/apis/external_metrics/v1beta1/generated.pb.go
+0
-0
generated.proto
...metrics/pkg/apis/external_metrics/v1beta1/generated.proto
+63
-0
zz_generated.conversion.go
.../apis/external_metrics/v1beta1/zz_generated.conversion.go
+94
-0
zz_generated.deepcopy.go
...kg/apis/external_metrics/v1beta1/zz_generated.deepcopy.go
+103
-0
zz_generated.deepcopy.go
...etrics/pkg/apis/external_metrics/zz_generated.deepcopy.go
+103
-0
No files found.
hack/.golint_failures
View file @
e375f360
...
...
@@ -728,6 +728,8 @@ staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice
staging/src/k8s.io/kube-aggregator/pkg/registry/apiservice/etcd
staging/src/k8s.io/metrics/pkg/apis/custom_metrics
staging/src/k8s.io/metrics/pkg/apis/custom_metrics/v1beta1
staging/src/k8s.io/metrics/pkg/apis/external_metrics
staging/src/k8s.io/metrics/pkg/apis/external_metrics/v1beta1
staging/src/k8s.io/metrics/pkg/apis/metrics
staging/src/k8s.io/metrics/pkg/apis/metrics/v1alpha1
staging/src/k8s.io/metrics/pkg/apis/metrics/v1beta1
...
...
hack/update-generated-protobuf-dockerized.sh
View file @
e375f360
...
...
@@ -79,6 +79,7 @@ PACKAGES=(
k8s.io/metrics/pkg/apis/metrics/v1alpha1
k8s.io/metrics/pkg/apis/metrics/v1beta1
k8s.io/metrics/pkg/apis/custom_metrics/v1beta1
k8s.io/metrics/pkg/apis/external_metrics/v1beta1
k8s.io/apiserver/pkg/apis/audit/v1alpha1
k8s.io/apiserver/pkg/apis/audit/v1beta1
k8s.io/apiserver/pkg/apis/example2/v1
...
...
pkg/generated/openapi/BUILD
View file @
e375f360
...
...
@@ -67,6 +67,7 @@ openapi_library(
"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1",
"k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1",
"k8s.io/metrics/pkg/apis/custom_metrics/v1beta1",
"k8s.io/metrics/pkg/apis/external_metrics/v1beta1",
"k8s.io/metrics/pkg/apis/metrics/v1alpha1",
"k8s.io/metrics/pkg/apis/metrics/v1beta1",
],
...
...
staging/src/k8s.io/metrics/pkg/apis/external_metrics/v1beta1/BUILD
View file @
e375f360
...
...
@@ -9,6 +9,7 @@ go_library(
name = "go_default_library",
srcs = [
"doc.go",
"generated.pb.go",
"register.go",
"types.go",
"zz_generated.conversion.go",
...
...
@@ -16,6 +17,8 @@ go_library(
],
importpath = "k8s.io/metrics/pkg/apis/external_metrics/v1beta1",
deps = [
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
...
...
@@ -37,3 +40,8 @@ filegroup(
srcs = [":package-srcs"],
tags = ["automanaged"],
)
filegroup(
name = "go_default_library_protos",
srcs = ["generated.proto"],
)
staging/src/k8s.io/metrics/pkg/apis/external_metrics/v1beta1/generated.pb.go
0 → 100644
View file @
e375f360
This diff is collapsed.
Click to expand it.
staging/src/k8s.io/metrics/pkg/apis/external_metrics/v1beta1/generated.proto
0 → 100644
View file @
e375f360
/*
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.
*/
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
syntax
=
'proto2'
;
package
k8s
.
io.metrics.pkg.apis.external_metrics.v1beta1
;
import
"k8s.io/apimachinery/pkg/api/resource/generated.proto"
;
import
"k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"
;
import
"k8s.io/apimachinery/pkg/runtime/generated.proto"
;
import
"k8s.io/apimachinery/pkg/runtime/schema/generated.proto"
;
import
"k8s.io/apimachinery/pkg/util/intstr/generated.proto"
;
// Package-wide variables from generator "generated".
option
go_package
=
"v1beta1"
;
// a metric value for external metric
// A single metric value is identified by metric name and a set of string labels.
// For one metric there can be multiple values with different sets of labels.
message
ExternalMetricValue
{
// the name of the metric
optional
string
metricName
=
1
;
// a set of labels that identify a single time series for the metric
map
<
string
,
string
>
metricLabels
=
2
;
// indicates the time at which the metrics were produced
optional
k8s.io.apimachinery.pkg.apis.meta.v1.Time
timestamp
=
3
;
// indicates the window ([Timestamp-Window, Timestamp]) from
// which these metrics were calculated, when returning rate
// metrics calculated from cumulative metrics (or zero for
// non-calculated instantaneous metrics).
optional
int64
window
=
4
;
// the value of the metric
optional
k8s.io.apimachinery.pkg.api.resource.Quantity
value
=
5
;
}
// a list of values for a given metric for some set labels
message
ExternalMetricValueList
{
optional
k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta
metadata
=
1
;
// value of the metric matching a given set of labels
repeated
ExternalMetricValue
items
=
2
;
}
staging/src/k8s.io/metrics/pkg/apis/external_metrics/v1beta1/zz_generated.conversion.go
0 → 100644
View file @
e375f360
// +build !ignore_autogenerated
/*
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.
*/
// This file was autogenerated by conversion-gen. Do not edit it manually!
package
v1beta1
import
(
unsafe
"unsafe"
conversion
"k8s.io/apimachinery/pkg/conversion"
runtime
"k8s.io/apimachinery/pkg/runtime"
external_metrics
"k8s.io/metrics/pkg/apis/external_metrics"
)
func
init
()
{
localSchemeBuilder
.
Register
(
RegisterConversions
)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func
RegisterConversions
(
scheme
*
runtime
.
Scheme
)
error
{
return
scheme
.
AddGeneratedConversionFuncs
(
Convert_v1beta1_ExternalMetricValue_To_external_metrics_ExternalMetricValue
,
Convert_external_metrics_ExternalMetricValue_To_v1beta1_ExternalMetricValue
,
Convert_v1beta1_ExternalMetricValueList_To_external_metrics_ExternalMetricValueList
,
Convert_external_metrics_ExternalMetricValueList_To_v1beta1_ExternalMetricValueList
,
)
}
func
autoConvert_v1beta1_ExternalMetricValue_To_external_metrics_ExternalMetricValue
(
in
*
ExternalMetricValue
,
out
*
external_metrics
.
ExternalMetricValue
,
s
conversion
.
Scope
)
error
{
out
.
MetricName
=
in
.
MetricName
out
.
MetricLabels
=
*
(
*
map
[
string
]
string
)(
unsafe
.
Pointer
(
&
in
.
MetricLabels
))
out
.
Timestamp
=
in
.
Timestamp
out
.
WindowSeconds
=
(
*
int64
)(
unsafe
.
Pointer
(
in
.
WindowSeconds
))
out
.
Value
=
in
.
Value
return
nil
}
// Convert_v1beta1_ExternalMetricValue_To_external_metrics_ExternalMetricValue is an autogenerated conversion function.
func
Convert_v1beta1_ExternalMetricValue_To_external_metrics_ExternalMetricValue
(
in
*
ExternalMetricValue
,
out
*
external_metrics
.
ExternalMetricValue
,
s
conversion
.
Scope
)
error
{
return
autoConvert_v1beta1_ExternalMetricValue_To_external_metrics_ExternalMetricValue
(
in
,
out
,
s
)
}
func
autoConvert_external_metrics_ExternalMetricValue_To_v1beta1_ExternalMetricValue
(
in
*
external_metrics
.
ExternalMetricValue
,
out
*
ExternalMetricValue
,
s
conversion
.
Scope
)
error
{
out
.
MetricName
=
in
.
MetricName
out
.
MetricLabels
=
*
(
*
map
[
string
]
string
)(
unsafe
.
Pointer
(
&
in
.
MetricLabels
))
out
.
Timestamp
=
in
.
Timestamp
out
.
WindowSeconds
=
(
*
int64
)(
unsafe
.
Pointer
(
in
.
WindowSeconds
))
out
.
Value
=
in
.
Value
return
nil
}
// Convert_external_metrics_ExternalMetricValue_To_v1beta1_ExternalMetricValue is an autogenerated conversion function.
func
Convert_external_metrics_ExternalMetricValue_To_v1beta1_ExternalMetricValue
(
in
*
external_metrics
.
ExternalMetricValue
,
out
*
ExternalMetricValue
,
s
conversion
.
Scope
)
error
{
return
autoConvert_external_metrics_ExternalMetricValue_To_v1beta1_ExternalMetricValue
(
in
,
out
,
s
)
}
func
autoConvert_v1beta1_ExternalMetricValueList_To_external_metrics_ExternalMetricValueList
(
in
*
ExternalMetricValueList
,
out
*
external_metrics
.
ExternalMetricValueList
,
s
conversion
.
Scope
)
error
{
out
.
ListMeta
=
in
.
ListMeta
out
.
Items
=
*
(
*
[]
external_metrics
.
ExternalMetricValue
)(
unsafe
.
Pointer
(
&
in
.
Items
))
return
nil
}
// Convert_v1beta1_ExternalMetricValueList_To_external_metrics_ExternalMetricValueList is an autogenerated conversion function.
func
Convert_v1beta1_ExternalMetricValueList_To_external_metrics_ExternalMetricValueList
(
in
*
ExternalMetricValueList
,
out
*
external_metrics
.
ExternalMetricValueList
,
s
conversion
.
Scope
)
error
{
return
autoConvert_v1beta1_ExternalMetricValueList_To_external_metrics_ExternalMetricValueList
(
in
,
out
,
s
)
}
func
autoConvert_external_metrics_ExternalMetricValueList_To_v1beta1_ExternalMetricValueList
(
in
*
external_metrics
.
ExternalMetricValueList
,
out
*
ExternalMetricValueList
,
s
conversion
.
Scope
)
error
{
out
.
ListMeta
=
in
.
ListMeta
out
.
Items
=
*
(
*
[]
ExternalMetricValue
)(
unsafe
.
Pointer
(
&
in
.
Items
))
return
nil
}
// Convert_external_metrics_ExternalMetricValueList_To_v1beta1_ExternalMetricValueList is an autogenerated conversion function.
func
Convert_external_metrics_ExternalMetricValueList_To_v1beta1_ExternalMetricValueList
(
in
*
external_metrics
.
ExternalMetricValueList
,
out
*
ExternalMetricValueList
,
s
conversion
.
Scope
)
error
{
return
autoConvert_external_metrics_ExternalMetricValueList_To_v1beta1_ExternalMetricValueList
(
in
,
out
,
s
)
}
staging/src/k8s.io/metrics/pkg/apis/external_metrics/v1beta1/zz_generated.deepcopy.go
0 → 100644
View file @
e375f360
// +build !ignore_autogenerated
/*
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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package
v1beta1
import
(
runtime
"k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
ExternalMetricValue
)
DeepCopyInto
(
out
*
ExternalMetricValue
)
{
*
out
=
*
in
out
.
TypeMeta
=
in
.
TypeMeta
if
in
.
MetricLabels
!=
nil
{
in
,
out
:=
&
in
.
MetricLabels
,
&
out
.
MetricLabels
*
out
=
make
(
map
[
string
]
string
,
len
(
*
in
))
for
key
,
val
:=
range
*
in
{
(
*
out
)[
key
]
=
val
}
}
in
.
Timestamp
.
DeepCopyInto
(
&
out
.
Timestamp
)
if
in
.
WindowSeconds
!=
nil
{
in
,
out
:=
&
in
.
WindowSeconds
,
&
out
.
WindowSeconds
if
*
in
==
nil
{
*
out
=
nil
}
else
{
*
out
=
new
(
int64
)
**
out
=
**
in
}
}
out
.
Value
=
in
.
Value
.
DeepCopy
()
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricValue.
func
(
in
*
ExternalMetricValue
)
DeepCopy
()
*
ExternalMetricValue
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
ExternalMetricValue
)
in
.
DeepCopyInto
(
out
)
return
out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func
(
in
*
ExternalMetricValue
)
DeepCopyObject
()
runtime
.
Object
{
if
c
:=
in
.
DeepCopy
();
c
!=
nil
{
return
c
}
else
{
return
nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
ExternalMetricValueList
)
DeepCopyInto
(
out
*
ExternalMetricValueList
)
{
*
out
=
*
in
out
.
TypeMeta
=
in
.
TypeMeta
out
.
ListMeta
=
in
.
ListMeta
if
in
.
Items
!=
nil
{
in
,
out
:=
&
in
.
Items
,
&
out
.
Items
*
out
=
make
([]
ExternalMetricValue
,
len
(
*
in
))
for
i
:=
range
*
in
{
(
*
in
)[
i
]
.
DeepCopyInto
(
&
(
*
out
)[
i
])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricValueList.
func
(
in
*
ExternalMetricValueList
)
DeepCopy
()
*
ExternalMetricValueList
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
ExternalMetricValueList
)
in
.
DeepCopyInto
(
out
)
return
out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func
(
in
*
ExternalMetricValueList
)
DeepCopyObject
()
runtime
.
Object
{
if
c
:=
in
.
DeepCopy
();
c
!=
nil
{
return
c
}
else
{
return
nil
}
}
staging/src/k8s.io/metrics/pkg/apis/external_metrics/zz_generated.deepcopy.go
0 → 100644
View file @
e375f360
// +build !ignore_autogenerated
/*
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.
*/
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
package
external_metrics
import
(
runtime
"k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
ExternalMetricValue
)
DeepCopyInto
(
out
*
ExternalMetricValue
)
{
*
out
=
*
in
out
.
TypeMeta
=
in
.
TypeMeta
if
in
.
MetricLabels
!=
nil
{
in
,
out
:=
&
in
.
MetricLabels
,
&
out
.
MetricLabels
*
out
=
make
(
map
[
string
]
string
,
len
(
*
in
))
for
key
,
val
:=
range
*
in
{
(
*
out
)[
key
]
=
val
}
}
in
.
Timestamp
.
DeepCopyInto
(
&
out
.
Timestamp
)
if
in
.
WindowSeconds
!=
nil
{
in
,
out
:=
&
in
.
WindowSeconds
,
&
out
.
WindowSeconds
if
*
in
==
nil
{
*
out
=
nil
}
else
{
*
out
=
new
(
int64
)
**
out
=
**
in
}
}
out
.
Value
=
in
.
Value
.
DeepCopy
()
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricValue.
func
(
in
*
ExternalMetricValue
)
DeepCopy
()
*
ExternalMetricValue
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
ExternalMetricValue
)
in
.
DeepCopyInto
(
out
)
return
out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func
(
in
*
ExternalMetricValue
)
DeepCopyObject
()
runtime
.
Object
{
if
c
:=
in
.
DeepCopy
();
c
!=
nil
{
return
c
}
else
{
return
nil
}
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func
(
in
*
ExternalMetricValueList
)
DeepCopyInto
(
out
*
ExternalMetricValueList
)
{
*
out
=
*
in
out
.
TypeMeta
=
in
.
TypeMeta
out
.
ListMeta
=
in
.
ListMeta
if
in
.
Items
!=
nil
{
in
,
out
:=
&
in
.
Items
,
&
out
.
Items
*
out
=
make
([]
ExternalMetricValue
,
len
(
*
in
))
for
i
:=
range
*
in
{
(
*
in
)[
i
]
.
DeepCopyInto
(
&
(
*
out
)[
i
])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalMetricValueList.
func
(
in
*
ExternalMetricValueList
)
DeepCopy
()
*
ExternalMetricValueList
{
if
in
==
nil
{
return
nil
}
out
:=
new
(
ExternalMetricValueList
)
in
.
DeepCopyInto
(
out
)
return
out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func
(
in
*
ExternalMetricValueList
)
DeepCopyObject
()
runtime
.
Object
{
if
c
:=
in
.
DeepCopy
();
c
!=
nil
{
return
c
}
else
{
return
nil
}
}
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