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
d5c871d4
Commit
d5c871d4
authored
Feb 16, 2017
by
Jan Safranek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
local-up-cluster.sh should create a default storage class
To make dynamic provisioning working out of the box in local cluster a default storage class needs to be instantiated.
parent
8faa9b5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
local-up-cluster.sh
hack/local-up-cluster.sh
+22
-0
No files found.
hack/local-up-cluster.sh
View file @
d5c871d4
...
@@ -68,6 +68,9 @@ ENABLE_RBAC=${ENABLE_RBAC:-false}
...
@@ -68,6 +68,9 @@ ENABLE_RBAC=${ENABLE_RBAC:-false}
KUBECONFIG_TOKEN
=
${
KUBECONFIG_TOKEN
:-
""
}
KUBECONFIG_TOKEN
=
${
KUBECONFIG_TOKEN
:-
""
}
AUTH_ARGS
=
${
AUTH_ARGS
:-
""
}
AUTH_ARGS
=
${
AUTH_ARGS
:-
""
}
# Install a default storage class (enabled by default)
DEFAULT_STORAGE_CLASS
=
${
KUBE_DEFAULT_STORAGE_CLASS
:-
true
}
# start the cache mutation detector by default so that cache mutators will be found
# start the cache mutation detector by default so that cache mutators will be found
KUBE_CACHE_MUTATION_DETECTOR
=
"
${
KUBE_CACHE_MUTATION_DETECTOR
:-
true
}
"
KUBE_CACHE_MUTATION_DETECTOR
=
"
${
KUBE_CACHE_MUTATION_DETECTOR
:-
true
}
"
export
KUBE_CACHE_MUTATION_DETECTOR
export
KUBE_CACHE_MUTATION_DETECTOR
...
@@ -694,6 +697,21 @@ function create_psp_policy {
...
@@ -694,6 +697,21 @@ function create_psp_policy {
${
KUBECTL
}
--kubeconfig
=
"
${
CERT_DIR
}
/admin.kubeconfig"
create
-f
${
KUBE_ROOT
}
/examples/podsecuritypolicy/rbac/bindings.yaml
${
KUBECTL
}
--kubeconfig
=
"
${
CERT_DIR
}
/admin.kubeconfig"
create
-f
${
KUBE_ROOT
}
/examples/podsecuritypolicy/rbac/bindings.yaml
}
}
function
create_storage_class
{
if
[
-z
"
$CLOUD_PROVIDER
"
]
;
then
# No cloud provider -> no default storage class
return
fi
CLASS_FILE
=
${
KUBE_ROOT
}
/cluster/addons/storage-class/
${
CLOUD_PROVIDER
}
/default.yaml
if
[
-e
$CLASS_FILE
]
;
then
echo
"Create default storage class for
$CLOUD_PROVIDER
"
${
KUBECTL
}
--kubeconfig
=
"
${
CERT_DIR
}
/admin.kubeconfig"
create
-f
$CLASS_FILE
else
echo
"No storage class available for
$CLOUD_PROVIDER
."
fi
}
function
print_success
{
function
print_success
{
if
[[
"
${
START_MODE
}
"
!=
"kubeletonly"
]]
;
then
if
[[
"
${
START_MODE
}
"
!=
"kubeletonly"
]]
;
then
cat
<<
EOF
cat
<<
EOF
...
@@ -803,6 +821,10 @@ if [[ -n "${PSP_ADMISSION}" && "${ENABLE_RBAC}" = true ]]; then
...
@@ -803,6 +821,10 @@ if [[ -n "${PSP_ADMISSION}" && "${ENABLE_RBAC}" = true ]]; then
create_psp_policy
create_psp_policy
fi
fi
if
[[
"
$DEFAULT_STORAGE_CLASS
"
=
"true"
]]
;
then
create_storage_class
fi
print_success
print_success
if
[[
"
${
ENABLE_DAEMON
}
"
=
false
]]
;
then
if
[[
"
${
ENABLE_DAEMON
}
"
=
false
]]
;
then
...
...
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