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
7e14a80f
Commit
7e14a80f
authored
Apr 21, 2015
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ServiceAccount admission plugin
parent
db1f0dc9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
27 additions
and
7 deletions
+27
-7
config-default.sh
cluster/aws/config-default.sh
+1
-1
config-default.sh
cluster/azure/config-default.sh
+1
-1
config-default.sh
cluster/gce/config-default.sh
+1
-1
config-test.sh
cluster/gce/config-test.sh
+1
-1
config-default.sh
cluster/vagrant/config-default.sh
+1
-1
plugins.go
cmd/kube-apiserver/app/plugins.go
+1
-0
apiserver.j2
contrib/ansible/roles/master/templates/apiserver.j2
+1
-1
local-up-cluster.sh
hack/local-up-cluster.sh
+1
-1
admission.go
plugin/pkg/admission/serviceaccount/admission.go
+0
-0
admission_test.go
plugin/pkg/admission/serviceaccount/admission_test.go
+0
-0
doc.go
plugin/pkg/admission/serviceaccount/doc.go
+19
-0
No files found.
cluster/aws/config-default.sh
View file @
7e14a80f
...
...
@@ -72,7 +72,7 @@ DNS_DOMAIN="kubernetes.local"
DNS_REPLICAS
=
1
# Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ResourceQuota
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,
ServiceAccount,
ResourceQuota
# Optional: Enable/disable public IP assignment for minions.
# Important Note: disable only if you have setup a NAT instance for internet access and configured appropriate routes!
...
...
cluster/azure/config-default.sh
View file @
7e14a80f
...
...
@@ -49,4 +49,4 @@ ELASTICSEARCH_LOGGING_REPLICAS=1
ENABLE_CLUSTER_MONITORING
=
"
${
KUBE_ENABLE_CLUSTER_MONITORING
:-
true
}
"
# Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ResourceQuota
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,
ServiceAccount,
ResourceQuota
cluster/gce/config-default.sh
View file @
7e14a80f
...
...
@@ -76,4 +76,4 @@ DNS_DOMAIN="kubernetes.local"
DNS_REPLICAS
=
1
# Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ResourceQuota
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,
ServiceAccount,
ResourceQuota
cluster/gce/config-test.sh
View file @
7e14a80f
...
...
@@ -74,4 +74,4 @@ DNS_SERVER_IP="10.0.0.10"
DNS_DOMAIN
=
"kubernetes.local"
DNS_REPLICAS
=
1
ADMISSION_CONTROL
=
NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ResourceQuota
ADMISSION_CONTROL
=
NamespaceAutoProvision,LimitRanger,SecurityContextDeny,
ServiceAccount,
ResourceQuota
cluster/vagrant/config-default.sh
View file @
7e14a80f
...
...
@@ -50,7 +50,7 @@ MASTER_USER=vagrant
MASTER_PASSWD
=
vagrant
# Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ResourceQuota
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,
ServiceAccount,
ResourceQuota
# Optional: Install node monitoring.
ENABLE_NODE_MONITORING
=
true
...
...
cmd/kube-apiserver/app/plugins.go
View file @
7e14a80f
...
...
@@ -37,4 +37,5 @@ import (
_
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/namespace/lifecycle"
_
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/resourcequota"
_
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/securitycontext/scdeny"
_
"github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/serviceaccount"
)
contrib/ansible/roles/master/templates/apiserver.j2
View file @
7e14a80f
...
...
@@ -20,7 +20,7 @@ KUBE_SERVICE_ADDRESSES="--portal_net={{ kube_service_addresses }}"
KUBE_ETCD_SERVERS="--etcd_servers=http://{{ groups['etcd'][0] }}:2379"
# default admission control policies
KUBE_ADMISSION_CONTROL="--admission_control=NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ResourceQuota"
KUBE_ADMISSION_CONTROL="--admission_control=NamespaceAutoProvision,LimitRanger,SecurityContextDeny,
ServiceAccount,
ResourceQuota"
# Add your own!
KUBE_API_ARGS=""
hack/local-up-cluster.sh
View file @
7e14a80f
...
...
@@ -140,7 +140,7 @@ if [[ ! -f "${SERVICE_ACCOUNT_KEY}" ]]; then
fi
# Admission Controllers to invoke prior to persisting objects in cluster
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ResourceQuota
ADMISSION_CONTROL
=
NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,
ServiceAccount,
ResourceQuota
APISERVER_LOG
=
/tmp/kube-apiserver.log
sudo
-E
"
${
GO_OUT
}
/kube-apiserver"
\
...
...
plugin/pkg/admission/serviceaccount/admission.go
0 → 100644
View file @
7e14a80f
This diff is collapsed.
Click to expand it.
plugin/pkg/admission/serviceaccount/admission_test.go
0 → 100644
View file @
7e14a80f
This diff is collapsed.
Click to expand it.
plugin/pkg/admission/serviceaccount/doc.go
0 → 100644
View file @
7e14a80f
/*
Copyright 2014 The Kubernetes Authors All rights reserved.
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.
*/
// serviceaccount enforces all pods having an associated serviceaccount,
// and all containers mounting the API token for that serviceaccount at a known location
package
serviceaccount
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