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
5a1b78ca
Unverified
Commit
5a1b78ca
authored
Jan 30, 2019
by
Daniel (Shijun) Qian
Committed by
GitHub
Jan 30, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into code-generator
parents
eb6fa185
4253e850
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
143 additions
and
64 deletions
+143
-64
Godeps.json
Godeps/Godeps.json
+2
-2
.shellcheck_failures
hack/.shellcheck_failures
+0
-8
util.sh
hack/lib/util.sh
+9
-0
kube_features.go
pkg/features/kube_features.go
+2
-1
Godeps.json
...ing/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json
+1
-1
update-codegen.sh
...sions-apiserver/examples/client-go/hack/update-codegen.sh
+4
-4
verify-codegen.sh
...sions-apiserver/examples/client-go/hack/verify-codegen.sh
+1
-1
build-image.sh
...ng/src/k8s.io/apiextensions-apiserver/hack/build-image.sh
+4
-1
update-codegen.sh
...src/k8s.io/apiextensions-apiserver/hack/update-codegen.sh
+5
-5
verify-codegen.sh
...src/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh
+1
-2
Godeps.json
staging/src/k8s.io/apimachinery/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/apiserver/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/cli-runtime/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/client-go/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/csi-api/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/metrics/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/node-api/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json
+1
-1
build-image.sh
staging/src/k8s.io/sample-apiserver/hack/build-image.sh
+4
-1
update-codegen.sh
staging/src/k8s.io/sample-apiserver/hack/update-codegen.sh
+9
-9
verify-codegen.sh
staging/src/k8s.io/sample-apiserver/hack/verify-codegen.sh
+1
-2
Godeps.json
staging/src/k8s.io/sample-cli-plugin/Godeps/Godeps.json
+1
-1
Godeps.json
staging/src/k8s.io/sample-controller/Godeps/Godeps.json
+1
-1
metrics_util.go
test/e2e/framework/metrics_util.go
+7
-5
load.go
test/e2e/scalability/load.go
+4
-0
Dockerfile
test/images/pets/zookeeper-installer/Dockerfile
+1
-1
VERSION
test/images/pets/zookeeper-installer/VERSION
+1
-1
README.md
vendor/github.com/evanphx/json-patch/README.md
+17
-0
patch.go
vendor/github.com/evanphx/json-patch/patch.go
+59
-9
No files found.
Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -1555,8 +1555,8 @@
...
@@ -1555,8 +1555,8 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Comment"
:
"v4.
0.0-3-g36442dbdb58521
"
,
"Comment"
:
"v4.
1.0-11-gd4020504c68b6b
"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/exponent-io/jsonpath"
,
"ImportPath"
:
"github.com/exponent-io/jsonpath"
,
...
...
hack/.shellcheck_failures
View file @
5a1b78ca
...
@@ -158,11 +158,6 @@
...
@@ -158,11 +158,6 @@
./pkg/kubectl/cmd/edit/testdata/record_testcase.sh
./pkg/kubectl/cmd/edit/testdata/record_testcase.sh
./pkg/util/verify-util-pkg.sh
./pkg/util/verify-util-pkg.sh
./plugin/pkg/admission/imagepolicy/gencerts.sh
./plugin/pkg/admission/imagepolicy/gencerts.sh
./staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/update-codegen.sh
./staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/verify-codegen.sh
./staging/src/k8s.io/apiextensions-apiserver/hack/build-image.sh
./staging/src/k8s.io/apiextensions-apiserver/hack/update-codegen.sh
./staging/src/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh
./staging/src/k8s.io/csi-api/hack/update-codegen.sh
./staging/src/k8s.io/csi-api/hack/update-codegen.sh
./staging/src/k8s.io/csi-api/hack/verify-codegen.sh
./staging/src/k8s.io/csi-api/hack/verify-codegen.sh
./staging/src/k8s.io/kube-aggregator/hack/build-image.sh
./staging/src/k8s.io/kube-aggregator/hack/build-image.sh
...
@@ -174,9 +169,6 @@
...
@@ -174,9 +169,6 @@
./staging/src/k8s.io/metrics/hack/verify-codegen.sh
./staging/src/k8s.io/metrics/hack/verify-codegen.sh
./staging/src/k8s.io/node-api/hack/update-codegen.sh
./staging/src/k8s.io/node-api/hack/update-codegen.sh
./staging/src/k8s.io/node-api/hack/verify-codegen.sh
./staging/src/k8s.io/node-api/hack/verify-codegen.sh
./staging/src/k8s.io/sample-apiserver/hack/build-image.sh
./staging/src/k8s.io/sample-apiserver/hack/update-codegen.sh
./staging/src/k8s.io/sample-apiserver/hack/verify-codegen.sh
./test/cmd/apply.sh
./test/cmd/apply.sh
./test/cmd/apps.sh
./test/cmd/apps.sh
./test/cmd/authorization.sh
./test/cmd/authorization.sh
...
...
hack/lib/util.sh
View file @
5a1b78ca
...
@@ -697,6 +697,15 @@ function kube::util::ensure-cfssl {
...
@@ -697,6 +697,15 @@ function kube::util::ensure-cfssl {
return
0
return
0
fi
fi
host_arch
=
$(
kube::util::host_arch
)
if
[[
"
${
host_arch
}
"
!=
"amd64"
]]
;
then
echo
"Cannot download cfssl on non-amd64 hosts and cfssl does not appear to be installed."
echo
"Please install cfssl and cfssljson and verify they are in
\$
PATH."
echo
"Hint: export PATH=
\$
PATH:
\$
GOPATH/bin; go get -u github.com/cloudflare/cfssl/cmd/..."
exit
1
fi
# Create a temp dir for cfssl if no directory was given
# Create a temp dir for cfssl if no directory was given
local
cfssldir
=
${
1
:-}
local
cfssldir
=
${
1
:-}
if
[[
-z
"
${
cfssldir
}
"
]]
;
then
if
[[
-z
"
${
cfssldir
}
"
]]
;
then
...
...
pkg/features/kube_features.go
View file @
5a1b78ca
...
@@ -121,6 +121,7 @@ const (
...
@@ -121,6 +121,7 @@ const (
// owner: @bsalamat
// owner: @bsalamat
// alpha: v1.8
// alpha: v1.8
// beta: v1.11
// beta: v1.11
// GA: v1.14
//
//
// Add priority to pods. Priority affects scheduling and preemption of pods.
// Add priority to pods. Priority affects scheduling and preemption of pods.
PodPriority
utilfeature
.
Feature
=
"PodPriority"
PodPriority
utilfeature
.
Feature
=
"PodPriority"
...
@@ -432,7 +433,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
...
@@ -432,7 +433,7 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
Sysctls
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
Sysctls
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
DebugContainers
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
DebugContainers
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
PodShareProcessNamespace
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
PodShareProcessNamespace
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
PodPriority
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
PodPriority
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
},
TaintNodesByCondition
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
TaintNodesByCondition
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
MountPropagation
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
,
LockToDefault
:
true
},
// remove in 1.14
MountPropagation
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
GA
,
LockToDefault
:
true
},
// remove in 1.14
QOSReserved
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
QOSReserved
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
...
...
staging/src/k8s.io/apiextensions-apiserver/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -372,7 +372,7 @@
...
@@ -372,7 +372,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/ghodss/yaml"
,
"ImportPath"
:
"github.com/ghodss/yaml"
,
...
...
staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/update-codegen.sh
View file @
5a1b78ca
...
@@ -18,17 +18,17 @@ set -o errexit
...
@@ -18,17 +18,17 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
SCRIPT_ROOT
=
$(
dirname
${
BASH_SOURCE
}
)
/..
SCRIPT_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
CODEGEN_PKG
=
${
CODEGEN_PKG
:-$(
cd
${
SCRIPT_ROOT
}
;
ls
-d
-1
./vendor/k8s.io/code-generator 2>/dev/null
||
echo
../code-generator
)}
CODEGEN_PKG
=
${
CODEGEN_PKG
:-$(
cd
"
${
SCRIPT_ROOT
}
"
;
ls
-d
-1
./vendor/k8s.io/code-generator 2>/dev/null
||
echo
../code-generator
)}
# generate the code with:
# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
# --output-base because this script should also be able to run inside the vendor dir of
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
# instead of the $GOPATH directly. For normal projects this can be dropped.
${
CODEGEN_PKG
}
/generate-groups.sh
all
\
"
${
CODEGEN_PKG
}
/generate-groups.sh"
all
\
k8s.io/apiextensions-apiserver/examples/client-go/pkg/client k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis
\
k8s.io/apiextensions-apiserver/examples/client-go/pkg/client k8s.io/apiextensions-apiserver/examples/client-go/pkg/apis
\
cr:v1
\
cr:v1
\
--output-base
"
$(
dirname
${
BASH_SOURCE
}
)
/../../../../.."
--output-base
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../../../../.."
# To use your own boilerplate text append:
# To use your own boilerplate text append:
# --go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt
# --go-header-file ${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt
staging/src/k8s.io/apiextensions-apiserver/examples/client-go/hack/verify-codegen.sh
View file @
5a1b78ca
...
@@ -18,7 +18,7 @@ set -o errexit
...
@@ -18,7 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
SCRIPT_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
SCRIPT_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
DIFFROOT
=
"
${
SCRIPT_ROOT
}
/pkg"
DIFFROOT
=
"
${
SCRIPT_ROOT
}
/pkg"
TMP_DIFFROOT
=
"
${
SCRIPT_ROOT
}
/_tmp/pkg"
TMP_DIFFROOT
=
"
${
SCRIPT_ROOT
}
/_tmp/pkg"
...
...
staging/src/k8s.io/apiextensions-apiserver/hack/build-image.sh
View file @
5a1b78ca
...
@@ -14,8 +14,11 @@
...
@@ -14,8 +14,11 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
set
-o
errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../../../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../../../../..
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
# Register function to be called on EXIT to remove generated binary.
# Register function to be called on EXIT to remove generated binary.
...
...
staging/src/k8s.io/apiextensions-apiserver/hack/update-codegen.sh
View file @
5a1b78ca
...
@@ -18,8 +18,8 @@ set -o errexit
...
@@ -18,8 +18,8 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
SCRIPT_ROOT
=
$(
dirname
${
BASH_SOURCE
}
)
/..
SCRIPT_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
CODEGEN_PKG
=
${
CODEGEN_PKG
:-$(
cd
${
SCRIPT_ROOT
}
;
ls
-d
-1
./vendor/k8s.io/code-generator 2>/dev/null
||
echo
../code-generator
)}
CODEGEN_PKG
=
${
CODEGEN_PKG
:-$(
cd
"
${
SCRIPT_ROOT
}
"
;
ls
-d
-1
./vendor/k8s.io/code-generator 2>/dev/null
||
echo
../code-generator
)}
# generate the code with:
# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
# --output-base because this script should also be able to run inside the vendor dir of
...
@@ -27,8 +27,8 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge
...
@@ -27,8 +27,8 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${SCRIPT_ROOT}; ls -d -1 ./vendor/k8s.io/code-ge
# instead of the $GOPATH directly. For normal projects this can be dropped.
# instead of the $GOPATH directly. For normal projects this can be dropped.
CLIENTSET_NAME_VERSIONED
=
clientset
\
CLIENTSET_NAME_VERSIONED
=
clientset
\
CLIENTSET_NAME_INTERNAL
=
internalclientset
\
CLIENTSET_NAME_INTERNAL
=
internalclientset
\
${
CODEGEN_PKG
}
/generate-internal-groups.sh
all
\
"
${
CODEGEN_PKG
}
/generate-internal-groups.sh"
all
\
k8s.io/apiextensions-apiserver/pkg/client k8s.io/apiextensions-apiserver/pkg/apis k8s.io/apiextensions-apiserver/pkg/apis
\
k8s.io/apiextensions-apiserver/pkg/client k8s.io/apiextensions-apiserver/pkg/apis k8s.io/apiextensions-apiserver/pkg/apis
\
"apiextensions:v1beta1"
\
"apiextensions:v1beta1"
\
--output-base
"
$(
dirname
${
BASH_SOURCE
}
)
/../../.."
\
--output-base
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../../.."
\
--go-header-file
${
SCRIPT_ROOT
}
/hack/boilerplate.go.txt
--go-header-file
"
${
SCRIPT_ROOT
}
/hack/boilerplate.go.txt"
staging/src/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh
View file @
5a1b78ca
...
@@ -18,8 +18,7 @@ set -o errexit
...
@@ -18,8 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
SCRIPT_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
SCRIPT_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
SCRIPT_BASE
=
${
SCRIPT_ROOT
}
/../..
DIFFROOT
=
"
${
SCRIPT_ROOT
}
/pkg"
DIFFROOT
=
"
${
SCRIPT_ROOT
}
/pkg"
TMP_DIFFROOT
=
"
${
SCRIPT_ROOT
}
/_tmp/pkg"
TMP_DIFFROOT
=
"
${
SCRIPT_ROOT
}
/_tmp/pkg"
...
...
staging/src/k8s.io/apimachinery/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
...
...
staging/src/k8s.io/apiserver/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -372,7 +372,7 @@
...
@@ -372,7 +372,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/ghodss/yaml"
,
"ImportPath"
:
"github.com/ghodss/yaml"
,
...
...
staging/src/k8s.io/cli-runtime/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
...
...
staging/src/k8s.io/client-go/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
...
...
staging/src/k8s.io/csi-api/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
...
...
staging/src/k8s.io/kube-aggregator/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/go-openapi/jsonpointer"
,
"ImportPath"
:
"github.com/go-openapi/jsonpointer"
,
...
...
staging/src/k8s.io/metrics/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
...
...
staging/src/k8s.io/node-api/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
...
...
staging/src/k8s.io/sample-apiserver/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/go-openapi/jsonpointer"
,
"ImportPath"
:
"github.com/go-openapi/jsonpointer"
,
...
...
staging/src/k8s.io/sample-apiserver/hack/build-image.sh
View file @
5a1b78ca
...
@@ -14,8 +14,11 @@
...
@@ -14,8 +14,11 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
set
-o
errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../../../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../../../../..
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
source
"
${
KUBE_ROOT
}
/hack/lib/util.sh"
# Register function to be called on EXIT to remove generated binary.
# Register function to be called on EXIT to remove generated binary.
...
...
staging/src/k8s.io/sample-apiserver/hack/update-codegen.sh
View file @
5a1b78ca
...
@@ -18,24 +18,24 @@ set -o errexit
...
@@ -18,24 +18,24 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
SCRIPT_ROOT
=
$(
dirname
${
BASH_SOURCE
}
)
/..
SCRIPT_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
CODEGEN_PKG
=
${
CODEGEN_PKG
:-$(
cd
${
SCRIPT_ROOT
}
;
ls
-d
-1
./vendor/k8s.io/code-generator 2>/dev/null
||
echo
../code-generator
)}
CODEGEN_PKG
=
${
CODEGEN_PKG
:-$(
cd
"
${
SCRIPT_ROOT
}
"
;
ls
-d
-1
./vendor/k8s.io/code-generator 2>/dev/null
||
echo
../code-generator
)}
# generate the code with:
# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
# --output-base because this script should also be able to run inside the vendor dir of
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
# instead of the $GOPATH directly. For normal projects this can be dropped.
# instead of the $GOPATH directly. For normal projects this can be dropped.
${
CODEGEN_PKG
}
/generate-groups.sh
all
\
"
${
CODEGEN_PKG
}
/generate-groups.sh"
all
\
k8s.io/sample-apiserver/pkg/client k8s.io/sample-apiserver/pkg/apis
\
k8s.io/sample-apiserver/pkg/client k8s.io/sample-apiserver/pkg/apis
\
"wardle:v1alpha1,v1beta1"
\
"wardle:v1alpha1,v1beta1"
\
--output-base
"
$(
dirname
${
BASH_SOURCE
}
)
/../../.."
\
--output-base
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../../.."
\
--go-header-file
${
SCRIPT_ROOT
}
/hack/boilerplate.go.txt
--go-header-file
"
${
SCRIPT_ROOT
}
"
/hack/boilerplate.go.txt
${
CODEGEN_PKG
}
/generate-internal-groups.sh
"deepcopy,defaulter,conversion"
\
"
${
CODEGEN_PKG
}
/generate-internal-groups.sh"
"deepcopy,defaulter,conversion"
\
k8s.io/sample-apiserver/pkg/client k8s.io/sample-apiserver/pkg/apis k8s.io/sample-apiserver/pkg/apis
\
k8s.io/sample-apiserver/pkg/client k8s.io/sample-apiserver/pkg/apis k8s.io/sample-apiserver/pkg/apis
\
"wardle:v1alpha1,v1beta1"
\
"wardle:v1alpha1,v1beta1"
\
--output-base
"
$(
dirname
${
BASH_SOURCE
}
)
/../../.."
\
--output-base
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../../.."
\
--go-header-file
${
SCRIPT_ROOT
}
/hack/boilerplate.go.txt
--go-header-file
"
${
SCRIPT_ROOT
}
/hack/boilerplate.go.txt"
# To use your own boilerplate text use:
# To use your own boilerplate text use:
# --go-header-file
${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt
# --go-header-file
"${SCRIPT_ROOT}/hack/custom-boilerplate.go.txt"
staging/src/k8s.io/sample-apiserver/hack/verify-codegen.sh
View file @
5a1b78ca
...
@@ -18,8 +18,7 @@ set -o errexit
...
@@ -18,8 +18,7 @@ set -o errexit
set
-o
nounset
set
-o
nounset
set
-o
pipefail
set
-o
pipefail
SCRIPT_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
SCRIPT_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
SCRIPT_BASE
=
${
SCRIPT_ROOT
}
/../..
DIFFROOT
=
"
${
SCRIPT_ROOT
}
/pkg"
DIFFROOT
=
"
${
SCRIPT_ROOT
}
/pkg"
TMP_DIFFROOT
=
"
${
SCRIPT_ROOT
}
/_tmp/pkg"
TMP_DIFFROOT
=
"
${
SCRIPT_ROOT
}
/_tmp/pkg"
...
...
staging/src/k8s.io/sample-cli-plugin/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
...
...
staging/src/k8s.io/sample-controller/Godeps/Godeps.json
View file @
5a1b78ca
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
},
},
{
{
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"ImportPath"
:
"github.com/evanphx/json-patch"
,
"Rev"
:
"
36442dbdb585210f8d5a1b45e67aa323c197d5c4
"
"Rev"
:
"
d4020504c68b6bfa818032bedfb48e33e9638506
"
},
},
{
{
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
"ImportPath"
:
"github.com/gogo/protobuf/proto"
,
...
...
test/e2e/framework/metrics_util.go
View file @
5a1b78ca
...
@@ -137,7 +137,9 @@ var SchedulingLatencyMetricName = model.LabelValue(schedulermetric.SchedulerSubs
...
@@ -137,7 +137,9 @@ var SchedulingLatencyMetricName = model.LabelValue(schedulermetric.SchedulerSubs
var
InterestingApiServerMetrics
=
[]
string
{
var
InterestingApiServerMetrics
=
[]
string
{
"apiserver_request_total"
,
"apiserver_request_total"
,
"apiserver_request_latency_seconds_summary"
,
// TODO(krzysied): apiserver_request_latencies_summary is a deprecated metric.
// It should be replaced with new metric.
"apiserver_request_latencies_summary"
,
"etcd_helper_cache_entry_total"
,
"etcd_helper_cache_entry_total"
,
"etcd_helper_cache_hit_total"
,
"etcd_helper_cache_hit_total"
,
"etcd_helper_cache_miss_total"
,
"etcd_helper_cache_miss_total"
,
...
@@ -475,9 +477,9 @@ func readLatencyMetrics(c clientset.Interface) (*APIResponsiveness, error) {
...
@@ -475,9 +477,9 @@ func readLatencyMetrics(c clientset.Interface) (*APIResponsiveness, error) {
for
_
,
sample
:=
range
samples
{
for
_
,
sample
:=
range
samples
{
// Example line:
// Example line:
// apiserver_request_latenc
y_seconds_summary{resource="namespaces",verb="LIST",quantile="0.99"} 0.000
908
// apiserver_request_latenc
ies_summary{resource="namespaces",verb="LIST",quantile="0.99"}
908
// apiserver_request_total{resource="pods",verb="LIST",client="kubectl",code="200",contentType="json"} 233
// apiserver_request_total{resource="pods",verb="LIST",client="kubectl",code="200",contentType="json"} 233
if
sample
.
Metric
[
model
.
MetricNameLabel
]
!=
"apiserver_request_latenc
y_second
s_summary"
&&
if
sample
.
Metric
[
model
.
MetricNameLabel
]
!=
"apiserver_request_latenc
ie
s_summary"
&&
sample
.
Metric
[
model
.
MetricNameLabel
]
!=
"apiserver_request_total"
{
sample
.
Metric
[
model
.
MetricNameLabel
]
!=
"apiserver_request_total"
{
continue
continue
}
}
...
@@ -491,13 +493,13 @@ func readLatencyMetrics(c clientset.Interface) (*APIResponsiveness, error) {
...
@@ -491,13 +493,13 @@ func readLatencyMetrics(c clientset.Interface) (*APIResponsiveness, error) {
}
}
switch
sample
.
Metric
[
model
.
MetricNameLabel
]
{
switch
sample
.
Metric
[
model
.
MetricNameLabel
]
{
case
"apiserver_request_latenc
y_second
s_summary"
:
case
"apiserver_request_latenc
ie
s_summary"
:
latency
:=
sample
.
Value
latency
:=
sample
.
Value
quantile
,
err
:=
strconv
.
ParseFloat
(
string
(
sample
.
Metric
[
model
.
QuantileLabel
]),
64
)
quantile
,
err
:=
strconv
.
ParseFloat
(
string
(
sample
.
Metric
[
model
.
QuantileLabel
]),
64
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
a
.
addMetricRequestLatency
(
resource
,
subresource
,
verb
,
scope
,
quantile
,
time
.
Duration
(
int64
(
latency
))
*
time
.
S
econd
)
a
.
addMetricRequestLatency
(
resource
,
subresource
,
verb
,
scope
,
quantile
,
time
.
Duration
(
int64
(
latency
))
*
time
.
Micros
econd
)
case
"apiserver_request_total"
:
case
"apiserver_request_total"
:
count
:=
sample
.
Value
count
:=
sample
.
Value
a
.
addMetricRequestCount
(
resource
,
subresource
,
verb
,
scope
,
int
(
count
))
a
.
addMetricRequestCount
(
resource
,
subresource
,
verb
,
scope
,
int
(
count
))
...
...
test/e2e/scalability/load.go
View file @
5a1b78ca
...
@@ -377,9 +377,13 @@ func createClients(numberOfClients int) ([]clientset.Interface, []internalclient
...
@@ -377,9 +377,13 @@ func createClients(numberOfClients int) ([]clientset.Interface, []internalclient
KeepAlive
:
30
*
time
.
Second
,
KeepAlive
:
30
*
time
.
Second
,
})
.
DialContext
,
})
.
DialContext
,
})
})
config
.
WrapTransport
=
transportConfig
.
WrapTransport
config
.
Dial
=
transportConfig
.
Dial
// Overwrite TLS-related fields from config to avoid collision with
// Overwrite TLS-related fields from config to avoid collision with
// Transport field.
// Transport field.
config
.
TLSClientConfig
=
restclient
.
TLSClientConfig
{}
config
.
TLSClientConfig
=
restclient
.
TLSClientConfig
{}
config
.
AuthProvider
=
nil
config
.
ExecProvider
=
nil
c
,
err
:=
clientset
.
NewForConfig
(
config
)
c
,
err
:=
clientset
.
NewForConfig
(
config
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
test/images/pets/zookeeper-installer/Dockerfile
View file @
5a1b78ca
...
@@ -18,7 +18,7 @@ FROM BASEIMAGE
...
@@ -18,7 +18,7 @@ FROM BASEIMAGE
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
RUN
clean-install wget netcat
RUN
clean-install wget
bash
netcat
ADD
on-start.sh /
ADD
on-start.sh /
...
...
test/images/pets/zookeeper-installer/VERSION
View file @
5a1b78ca
1.
2
1.
3
vendor/github.com/evanphx/json-patch/README.md
View file @
5a1b78ca
...
@@ -25,6 +25,23 @@ go get -u github.com/evanphx/json-patch
...
@@ -25,6 +25,23 @@ go get -u github.com/evanphx/json-patch
*
[
Comparing JSON documents
](
#comparing-json-documents
)
*
[
Comparing JSON documents
](
#comparing-json-documents
)
*
[
Combine merge patches
](
#combine-merge-patches
)
*
[
Combine merge patches
](
#combine-merge-patches
)
# Configuration
*
There is a global configuration variable
`jsonpatch.SupportNegativeIndices`
.
This defaults to
`true`
and enables the non-standard practice of allowing
negative indices to mean indices starting at the end of an array. This
functionality can be disabled by setting
`jsonpatch.SupportNegativeIndices =
false`
.
*
There is a global configuration variable
`jsonpatch.ArraySizeLimit`
, which
limits the length of any array the patched object can have. It defaults to 0,
which means there is no limit.
*
There is a global configuration variable
`jsonpatch.ArraySizeAdditionLimit`
,
which limits the increase of array length caused by each operation. It
defaults to 0, which means there is no limit.
## Create and apply a merge patch
## Create and apply a merge patch
Given both an original JSON document and a modified JSON document, you can create
Given both an original JSON document and a modified JSON document, you can create
a
[
Merge Patch
](
https://tools.ietf.org/html/rfc7396
)
document.
a
[
Merge Patch
](
https://tools.ietf.org/html/rfc7396
)
document.
...
...
vendor/github.com/evanphx/json-patch/patch.go
View file @
5a1b78ca
...
@@ -14,6 +14,10 @@ const (
...
@@ -14,6 +14,10 @@ const (
eAry
eAry
)
)
var
SupportNegativeIndices
bool
=
true
var
ArraySizeLimit
int
=
0
var
ArraySizeAdditionLimit
int
=
0
type
lazyNode
struct
{
type
lazyNode
struct
{
raw
*
json
.
RawMessage
raw
*
json
.
RawMessage
doc
partialDoc
doc
partialDoc
...
@@ -61,6 +65,19 @@ func (n *lazyNode) UnmarshalJSON(data []byte) error {
...
@@ -61,6 +65,19 @@ func (n *lazyNode) UnmarshalJSON(data []byte) error {
return
nil
return
nil
}
}
func
deepCopy
(
src
*
lazyNode
)
(
*
lazyNode
,
error
)
{
if
src
==
nil
{
return
nil
,
nil
}
a
,
err
:=
src
.
MarshalJSON
()
if
err
!=
nil
{
return
nil
,
err
}
ra
:=
make
(
json
.
RawMessage
,
len
(
a
))
copy
(
ra
,
a
)
return
newLazyNode
(
&
ra
),
nil
}
func
(
n
*
lazyNode
)
intoDoc
()
(
*
partialDoc
,
error
)
{
func
(
n
*
lazyNode
)
intoDoc
()
(
*
partialDoc
,
error
)
{
if
n
.
which
==
eDoc
{
if
n
.
which
==
eDoc
{
return
&
n
.
doc
,
nil
return
&
n
.
doc
,
nil
...
@@ -354,10 +371,19 @@ func (d *partialArray) set(key string, val *lazyNode) error {
...
@@ -354,10 +371,19 @@ func (d *partialArray) set(key string, val *lazyNode) error {
}
}
sz
:=
len
(
*
d
)
sz
:=
len
(
*
d
)
if
diff
:=
idx
+
1
-
sz
;
ArraySizeAdditionLimit
>
0
&&
diff
>
ArraySizeAdditionLimit
{
return
fmt
.
Errorf
(
"Unable to increase the array size by %d, the limit is %d"
,
diff
,
ArraySizeAdditionLimit
)
}
if
idx
+
1
>
sz
{
if
idx
+
1
>
sz
{
sz
=
idx
+
1
sz
=
idx
+
1
}
}
if
ArraySizeLimit
>
0
&&
sz
>
ArraySizeLimit
{
return
fmt
.
Errorf
(
"Unable to create array of size %d, limit is %d"
,
sz
,
ArraySizeLimit
)
}
ary
:=
make
([]
*
lazyNode
,
sz
)
ary
:=
make
([]
*
lazyNode
,
sz
)
cur
:=
*
d
cur
:=
*
d
...
@@ -385,17 +411,29 @@ func (d *partialArray) add(key string, val *lazyNode) error {
...
@@ -385,17 +411,29 @@ func (d *partialArray) add(key string, val *lazyNode) error {
return
err
return
err
}
}
ary
:=
make
([]
*
lazyNode
,
len
(
*
d
)
+
1
)
sz
:=
len
(
*
d
)
+
1
if
ArraySizeLimit
>
0
&&
sz
>
ArraySizeLimit
{
return
fmt
.
Errorf
(
"Unable to create array of size %d, limit is %d"
,
sz
,
ArraySizeLimit
)
}
ary
:=
make
([]
*
lazyNode
,
sz
)
cur
:=
*
d
cur
:=
*
d
if
idx
<
-
len
(
ary
)
||
idx
>=
len
(
ary
)
{
if
idx
>=
len
(
ary
)
{
return
fmt
.
Errorf
(
"Unable to access invalid index: %d"
,
idx
)
return
fmt
.
Errorf
(
"Unable to access invalid index: %d"
,
idx
)
}
}
if
idx
<
0
{
if
SupportNegativeIndices
{
idx
+=
len
(
ary
)
if
idx
<
-
len
(
ary
)
{
return
fmt
.
Errorf
(
"Unable to access invalid index: %d"
,
idx
)
}
if
idx
<
0
{
idx
+=
len
(
ary
)
}
}
}
copy
(
ary
[
0
:
idx
],
cur
[
0
:
idx
])
copy
(
ary
[
0
:
idx
],
cur
[
0
:
idx
])
ary
[
idx
]
=
val
ary
[
idx
]
=
val
copy
(
ary
[
idx
+
1
:
],
cur
[
idx
:
])
copy
(
ary
[
idx
+
1
:
],
cur
[
idx
:
])
...
@@ -426,11 +464,18 @@ func (d *partialArray) remove(key string) error {
...
@@ -426,11 +464,18 @@ func (d *partialArray) remove(key string) error {
cur
:=
*
d
cur
:=
*
d
if
idx
<
-
len
(
cur
)
||
idx
>=
len
(
cur
)
{
if
idx
>=
len
(
cur
)
{
return
fmt
.
Errorf
(
"Unable to
remove
invalid index: %d"
,
idx
)
return
fmt
.
Errorf
(
"Unable to
access
invalid index: %d"
,
idx
)
}
}
if
idx
<
0
{
idx
+=
len
(
cur
)
if
SupportNegativeIndices
{
if
idx
<
-
len
(
cur
)
{
return
fmt
.
Errorf
(
"Unable to access invalid index: %d"
,
idx
)
}
if
idx
<
0
{
idx
+=
len
(
cur
)
}
}
}
ary
:=
make
([]
*
lazyNode
,
len
(
cur
)
-
1
)
ary
:=
make
([]
*
lazyNode
,
len
(
cur
)
-
1
)
...
@@ -567,7 +612,12 @@ func (p Patch) copy(doc *container, op operation) error {
...
@@ -567,7 +612,12 @@ func (p Patch) copy(doc *container, op operation) error {
return
fmt
.
Errorf
(
"jsonpatch copy operation does not apply: doc is missing destination path: %s"
,
path
)
return
fmt
.
Errorf
(
"jsonpatch copy operation does not apply: doc is missing destination path: %s"
,
path
)
}
}
return
con
.
set
(
key
,
val
)
valCopy
,
err
:=
deepCopy
(
val
)
if
err
!=
nil
{
return
err
}
return
con
.
add
(
key
,
valCopy
)
}
}
// Equal indicates if 2 JSON documents have the same structural equality.
// Equal indicates if 2 JSON documents have the same structural equality.
...
...
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