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
7475efbc
Commit
7475efbc
authored
Apr 21, 2015
by
Eric Tune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend PR#5470 for AWS and Vagrant
parent
4b9a64bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
create-dynamic-salt-files.sh
cluster/aws/templates/create-dynamic-salt-files.sh
+11
-0
provision-master.sh
cluster/vagrant/provision-master.sh
+11
-0
No files found.
cluster/aws/templates/create-dynamic-salt-files.sh
View file @
7475efbc
...
@@ -52,3 +52,14 @@ known_tokens_file="/srv/salt-overlay/salt/kube-apiserver/known_tokens.csv"
...
@@ -52,3 +52,14 @@ known_tokens_file="/srv/salt-overlay/salt/kube-apiserver/known_tokens.csv"
mkdir
-p
/srv/salt-overlay/salt/kubelet
mkdir
-p
/srv/salt-overlay/salt/kubelet
kubelet_auth_file
=
"/srv/salt-overlay/salt/kubelet/kubernetes_auth"
kubelet_auth_file
=
"/srv/salt-overlay/salt/kubelet/kubernetes_auth"
(
umask
u
=
rw,go
=
;
echo
"{
\"
BearerToken
\"
:
\"
$kubelet_token
\"
,
\"
Insecure
\"
: true }"
>
$kubelet_auth_file
)
(
umask
u
=
rw,go
=
;
echo
"{
\"
BearerToken
\"
:
\"
$kubelet_token
\"
,
\"
Insecure
\"
: true }"
>
$kubelet_auth_file
)
# Generate tokens for other "service accounts". Append to known_tokens.
#
# NB: If this list ever changes, this script actually has to
# change to detect the existence of this file, kill any deleted
# old tokens and add any new tokens (to handle the upgrade case).
local
-r
service_accounts
=(
"system:scheduler"
"system:controller_manager"
"system:logging"
"system:monitoring"
"system:dns"
)
for
account
in
"
${
service_accounts
[@]
}
"
;
do
token
=
$(
dd
if
=
/dev/urandom
bs
=
128
count
=
1 2>/dev/null |
base64
|
tr
-d
"=+/"
|
dd
bs
=
32
count
=
1 2>/dev/null
)
echo
"
${
token
}
,
${
account
}
,
${
account
}
"
>>
"
${
KNOWN_TOKENS_FILE
}
"
done
cluster/vagrant/provision-master.sh
View file @
7475efbc
...
@@ -145,6 +145,17 @@ if [[ ! -f "${known_tokens_file}" ]]; then
...
@@ -145,6 +145,17 @@ if [[ ! -f "${known_tokens_file}" ]]; then
mkdir
-p
/srv/salt-overlay/salt/kubelet
mkdir
-p
/srv/salt-overlay/salt/kubelet
kubelet_auth_file
=
"/srv/salt-overlay/salt/kubelet/kubernetes_auth"
kubelet_auth_file
=
"/srv/salt-overlay/salt/kubelet/kubernetes_auth"
(
umask
u
=
rw,go
=
;
echo
"{
\"
BearerToken
\"
:
\"
$kubelet_token
\"
,
\"
Insecure
\"
: true }"
>
$kubelet_auth_file
)
(
umask
u
=
rw,go
=
;
echo
"{
\"
BearerToken
\"
:
\"
$kubelet_token
\"
,
\"
Insecure
\"
: true }"
>
$kubelet_auth_file
)
# Generate tokens for other "service accounts". Append to known_tokens.
#
# NB: If this list ever changes, this script actually has to
# change to detect the existence of this file, kill any deleted
# old tokens and add any new tokens (to handle the upgrade case).
local
-r
service_accounts
=(
"system:scheduler"
"system:controller_manager"
"system:logging"
"system:monitoring"
"system:dns"
)
for
account
in
"
${
service_accounts
[@]
}
"
;
do
token
=
$(
dd
if
=
/dev/urandom
bs
=
128
count
=
1 2>/dev/null |
base64
|
tr
-d
"=+/"
|
dd
bs
=
32
count
=
1 2>/dev/null
)
echo
"
${
token
}
,
${
account
}
,
${
account
}
"
>>
"
${
KNOWN_TOKENS_FILE
}
"
done
fi
fi
# Configure nginx authorization
# Configure nginx authorization
...
...
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