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
89b0b0b8
Commit
89b0b0b8
authored
Jan 25, 2019
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up initializer-related comments, test data
parent
f5f5d9a5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
6 additions
and
73 deletions
+6
-73
selfhosting_test.go
cmd/kubeadm/app/phases/selfhosting/selfhosting_test.go
+2
-2
.shellcheck_failures
hack/.shellcheck_failures
+0
-1
initializer-clusterrolebinding.yaml
hack/testdata/initializer-clusterrolebinding.yaml
+0
-17
initializer-deployments.yaml
hack/testdata/initializer-deployments.yaml
+0
-25
initializer-redis-master-service.yaml
hack/testdata/initializer-redis-master-service.yaml
+0
-19
admission_test.go
pkg/kubeapiserver/options/admission_test.go
+2
-2
scale.go
pkg/kubectl/scale.go
+0
-2
strategy.go
.../sample-apiserver/pkg/registry/wardle/fischer/strategy.go
+1
-2
strategy.go
.../sample-apiserver/pkg/registry/wardle/flunder/strategy.go
+1
-2
initializers.sh
test/cmd/initializers.sh
+0
-0
legacy-script.sh
test/cmd/legacy-script.sh
+0
-1
No files found.
cmd/kubeadm/app/phases/selfhosting/selfhosting_test.go
View file @
89b0b0b8
...
@@ -58,7 +58,7 @@ spec:
...
@@ -58,7 +58,7 @@ spec:
- --requestheader-username-headers=X-Remote-User
- --requestheader-username-headers=X-Remote-User
- --requestheader-extra-headers-prefix=X-Remote-Extra-
- --requestheader-extra-headers-prefix=X-Remote-Extra-
- --requestheader-allowed-names=front-proxy-client
- --requestheader-allowed-names=front-proxy-client
- --admission-control=
Initializers,
NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,ResourceQuota
- --admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,ResourceQuota
- --allow-privileged=true
- --allow-privileged=true
- --client-ca-file=/etc/kubernetes/pki/ca.crt
- --client-ca-file=/etc/kubernetes/pki/ca.crt
- --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
- --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
...
@@ -139,7 +139,7 @@ spec:
...
@@ -139,7 +139,7 @@ spec:
- --requestheader-username-headers=X-Remote-User
- --requestheader-username-headers=X-Remote-User
- --requestheader-extra-headers-prefix=X-Remote-Extra-
- --requestheader-extra-headers-prefix=X-Remote-Extra-
- --requestheader-allowed-names=front-proxy-client
- --requestheader-allowed-names=front-proxy-client
- --admission-control=
Initializers,
NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,ResourceQuota
- --admission-control=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,ResourceQuota
- --allow-privileged=true
- --allow-privileged=true
- --client-ca-file=/etc/kubernetes/pki/ca.crt
- --client-ca-file=/etc/kubernetes/pki/ca.crt
- --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
- --tls-private-key-file=/etc/kubernetes/pki/apiserver.key
...
...
hack/.shellcheck_failures
View file @
89b0b0b8
...
@@ -200,7 +200,6 @@
...
@@ -200,7 +200,6 @@
./test/cmd/discovery.sh
./test/cmd/discovery.sh
./test/cmd/generic-resources.sh
./test/cmd/generic-resources.sh
./test/cmd/get.sh
./test/cmd/get.sh
./test/cmd/initializers.sh
./test/cmd/legacy-script.sh
./test/cmd/legacy-script.sh
./test/cmd/node-management.sh
./test/cmd/node-management.sh
./test/cmd/old-print.sh
./test/cmd/old-print.sh
...
...
hack/testdata/initializer-clusterrolebinding.yaml
deleted
100644 → 0
View file @
f5f5d9a5
apiVersion
:
rbac.authorization.k8s.io/v1beta1
kind
:
ClusterRoleBinding
metadata
:
name
:
super-admin
initializers
:
pending
:
-
name
:
podimage.initializer.com
labels
:
clusterrolebinding
:
super
roleRef
:
apiGroup
:
rbac.authorization.k8s.io
kind
:
ClusterRole
name
:
admin
subjects
:
-
apiGroup
:
rbac.authorization.k8s.io
kind
:
User
name
:
super-admin
hack/testdata/initializer-deployments.yaml
deleted
100644 → 0
View file @
f5f5d9a5
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
web
initializers
:
pending
:
-
name
:
podimage.initializer.com
labels
:
run
:
web
spec
:
replicas
:
5
selector
:
matchLabels
:
run
:
web
template
:
metadata
:
labels
:
run
:
web
spec
:
containers
:
-
image
:
nginx:1.10
name
:
web
ports
:
-
containerPort
:
80
protocol
:
TCP
hack/testdata/initializer-redis-master-service.yaml
deleted
100644 → 0
View file @
f5f5d9a5
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
redis-master
labels
:
app
:
redis
role
:
master
tier
:
backend
initializers
:
pending
:
-
name
:
podimage.initializer.com
spec
:
ports
:
-
port
:
6379
targetPort
:
6379
selector
:
app
:
redis
role
:
master
tier
:
backend
pkg/kubeapiserver/options/admission_test.go
View file @
89b0b0b8
...
@@ -25,7 +25,7 @@ func TestValidate(t *testing.T) {
...
@@ -25,7 +25,7 @@ func TestValidate(t *testing.T) {
// 1. Both `--admission-control` and `--enable-admission-plugins` are specified
// 1. Both `--admission-control` and `--enable-admission-plugins` are specified
options
:=
NewAdmissionOptions
()
options
:=
NewAdmissionOptions
()
options
.
PluginNames
=
[]
string
{
"ServiceAccount"
}
options
.
PluginNames
=
[]
string
{
"ServiceAccount"
}
options
.
GenericAdmission
.
EnablePlugins
=
[]
string
{
"
Initializers
"
}
options
.
GenericAdmission
.
EnablePlugins
=
[]
string
{
"
NodeRestriction
"
}
if
len
(
options
.
Validate
())
==
0
{
if
len
(
options
.
Validate
())
==
0
{
t
.
Errorf
(
"Expect error, but got none"
)
t
.
Errorf
(
"Expect error, but got none"
)
}
}
...
@@ -33,7 +33,7 @@ func TestValidate(t *testing.T) {
...
@@ -33,7 +33,7 @@ func TestValidate(t *testing.T) {
// 2. Both `--admission-control` and `--disable-admission-plugins` are specified
// 2. Both `--admission-control` and `--disable-admission-plugins` are specified
options
=
NewAdmissionOptions
()
options
=
NewAdmissionOptions
()
options
.
PluginNames
=
[]
string
{
"ServiceAccount"
}
options
.
PluginNames
=
[]
string
{
"ServiceAccount"
}
options
.
GenericAdmission
.
DisablePlugins
=
[]
string
{
"
Initializers
"
}
options
.
GenericAdmission
.
DisablePlugins
=
[]
string
{
"
NodeRestriction
"
}
if
len
(
options
.
Validate
())
==
0
{
if
len
(
options
.
Validate
())
==
0
{
t
.
Errorf
(
"Expect error, but got none"
)
t
.
Errorf
(
"Expect error, but got none"
)
}
}
...
...
pkg/kubectl/scale.go
View file @
89b0b0b8
...
@@ -29,8 +29,6 @@ import (
...
@@ -29,8 +29,6 @@ import (
scaleclient
"k8s.io/client-go/scale"
scaleclient
"k8s.io/client-go/scale"
)
)
// TODO: Figure out if we should be waiting on initializers in the Scale() functions below.
// Scaler provides an interface for resources that can be scaled.
// Scaler provides an interface for resources that can be scaled.
type
Scaler
interface
{
type
Scaler
interface
{
// Scale scales the named resource after checking preconditions. It optionally
// Scale scales the named resource after checking preconditions. It optionally
...
...
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer/strategy.go
View file @
89b0b0b8
...
@@ -36,8 +36,7 @@ func NewStrategy(typer runtime.ObjectTyper) fischerStrategy {
...
@@ -36,8 +36,7 @@ func NewStrategy(typer runtime.ObjectTyper) fischerStrategy {
return
fischerStrategy
{
typer
,
names
.
SimpleNameGenerator
}
return
fischerStrategy
{
typer
,
names
.
SimpleNameGenerator
}
}
}
// GetAttrs returns labels.Set, fields.Set, the presence of Initializers if any
// GetAttrs returns labels.Set, fields.Set, and error in case the given runtime.Object is not a Fischer
// and error in case the given runtime.Object is not a Fischer
func
GetAttrs
(
obj
runtime
.
Object
)
(
labels
.
Set
,
fields
.
Set
,
error
)
{
func
GetAttrs
(
obj
runtime
.
Object
)
(
labels
.
Set
,
fields
.
Set
,
error
)
{
apiserver
,
ok
:=
obj
.
(
*
wardle
.
Fischer
)
apiserver
,
ok
:=
obj
.
(
*
wardle
.
Fischer
)
if
!
ok
{
if
!
ok
{
...
...
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder/strategy.go
View file @
89b0b0b8
...
@@ -37,8 +37,7 @@ func NewStrategy(typer runtime.ObjectTyper) flunderStrategy {
...
@@ -37,8 +37,7 @@ func NewStrategy(typer runtime.ObjectTyper) flunderStrategy {
return
flunderStrategy
{
typer
,
names
.
SimpleNameGenerator
}
return
flunderStrategy
{
typer
,
names
.
SimpleNameGenerator
}
}
}
// GetAttrs returns labels.Set, fields.Set, the presence of Initializers if any
// GetAttrs returns labels.Set, fields.Set, and error in case the given runtime.Object is not a Flunder
// and error in case the given runtime.Object is not a Flunder
func
GetAttrs
(
obj
runtime
.
Object
)
(
labels
.
Set
,
fields
.
Set
,
error
)
{
func
GetAttrs
(
obj
runtime
.
Object
)
(
labels
.
Set
,
fields
.
Set
,
error
)
{
apiserver
,
ok
:=
obj
.
(
*
wardle
.
Flunder
)
apiserver
,
ok
:=
obj
.
(
*
wardle
.
Flunder
)
if
!
ok
{
if
!
ok
{
...
...
test/cmd/initializers.sh
deleted
100755 → 0
View file @
f5f5d9a5
This diff is collapsed.
Click to expand it.
test/cmd/legacy-script.sh
View file @
89b0b0b8
...
@@ -39,7 +39,6 @@ source "${KUBE_ROOT}/test/cmd/diff.sh"
...
@@ -39,7 +39,6 @@ source "${KUBE_ROOT}/test/cmd/diff.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/discovery.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/discovery.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/generic-resources.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/generic-resources.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/get.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/get.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/initializers.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/kubeconfig.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/kubeconfig.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/node-management.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/node-management.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/old-print.sh"
source
"
${
KUBE_ROOT
}
/test/cmd/old-print.sh"
...
...
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