mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 02:08:13 +00:00 
			
		
		
		
	Enable service account token lookup by default
```release-note kube-apiserver: --service-account-lookup now defaults to true. This enables service account tokens to be revoked by deleting the Secret object containing the token. ```
This commit is contained in:
		| @@ -26,7 +26,7 @@ source "$ROOT/${KUBE_CONFIG_FILE:-"config-default.sh"}" | ||||
| source "$KUBE_ROOT/cluster/common.sh" | ||||
|  | ||||
| export LIBVIRT_DEFAULT_URI=qemu:///system | ||||
| export SERVICE_ACCOUNT_LOOKUP=${SERVICE_ACCOUNT_LOOKUP:-false} | ||||
| export SERVICE_ACCOUNT_LOOKUP=${SERVICE_ACCOUNT_LOOKUP:-true} | ||||
| export ADMISSION_CONTROL=${ADMISSION_CONTROL:-NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,ResourceQuota} | ||||
| readonly POOL=kubernetes | ||||
| readonly POOL_PATH=/var/lib/libvirt/images/kubernetes | ||||
|   | ||||
| @@ -135,7 +135,7 @@ coreos: | ||||
|         --token-auth-file=/var/lib/kube-apiserver/known_tokens.csv \ | ||||
|         --v=2 \ | ||||
|         --service-account-key-file=/var/run/kubernetes/kube-serviceaccount.key \ | ||||
|         --service-account-lookup=false \ | ||||
|         --service-account-lookup=true \ | ||||
|         --admission-control=NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ServiceAccount,DefaultTolerationSeconds,ResourceQuota | ||||
|         Restart=always | ||||
|         RestartSec=5 | ||||
|   | ||||
| @@ -361,7 +361,7 @@ function start_etcd { | ||||
| } | ||||
|  | ||||
| function set_service_accounts { | ||||
|     SERVICE_ACCOUNT_LOOKUP=${SERVICE_ACCOUNT_LOOKUP:-false} | ||||
|     SERVICE_ACCOUNT_LOOKUP=${SERVICE_ACCOUNT_LOOKUP:-true} | ||||
|     SERVICE_ACCOUNT_KEY=${SERVICE_ACCOUNT_KEY:-/tmp/kube-serviceaccount.key} | ||||
|     # Generate ServiceAccount key if needed | ||||
|     if [[ ! -f "${SERVICE_ACCOUNT_KEY}" ]]; then | ||||
|   | ||||
| @@ -147,7 +147,7 @@ func (s *BuiltInAuthenticationOptions) WithRequestHeader() *BuiltInAuthenticatio | ||||
| } | ||||
|  | ||||
| func (s *BuiltInAuthenticationOptions) WithServiceAccounts() *BuiltInAuthenticationOptions { | ||||
| 	s.ServiceAccounts = &ServiceAccountAuthenticationOptions{} | ||||
| 	s.ServiceAccounts = &ServiceAccountAuthenticationOptions{Lookup: true} | ||||
| 	return s | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -90,7 +90,7 @@ coreos: | ||||
|         ExecStartPre=/opt/bin/wupiao 127.0.0.1:2379/v2/machines | ||||
|         ExecStart=/opt/bin/kube-apiserver \ | ||||
|         --service-account-key-file=/opt/bin/kube-serviceaccount.key \ | ||||
|         --service-account-lookup=false \ | ||||
|         --service-account-lookup=true \ | ||||
|         --admission-control=NamespaceLifecycle,NamespaceAutoProvision,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota \ | ||||
|         --runtime-config=api/v1 \ | ||||
|         --allow-privileged=true \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jordan Liggitt
					Jordan Liggitt