Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Wksctl
Commits
fcf5e1f1
Commit
fcf5e1f1
authored
5 years ago
by
Chanwit Kaewkasi
Browse files
Options
Download
Email Patches
Plain Diff
make comment more clear on set selinux permissive after installing docker
parent
e2f5ec7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/plan/recipe/install_plans.go
+6
-3
pkg/plan/recipe/install_plans.go
with
6 additions
and
3 deletions
+6
-3
pkg/plan/recipe/install_plans.go
+
6
-
3
View file @
fcf5e1f1
...
...
@@ -108,12 +108,15 @@ func BuildCRIPlan(criSpec *baremetalspecv1.ContainerRuntime, cfg *envcfg.EnvSpec
plan
.
DependOn
(
"install:docker"
))
}
// this is a special case: if SELinux is not there on RH, CentOS Linux family
// installing Docker will also installing SELinux
// then we set SELinux mode to be permissive right after the docker installation step
if
IsDockerOnCentOS
{
b
.
AddResource
(
"selinux:permissive"
,
&
resource
.
Run
{
Script
:
object
.
String
(
"setenforce 0 && sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config"
),
// sometime, SELinux not installed yet
// sometime, SELinux not installed yet
so || true to ignore the error
UndoScript
:
object
.
String
(
"setenforce 1 && sed -i 's/^SELINUX=permissive$/SELINUX=enforcing/' /etc/selinux/config || true"
),
},
plan
.
DependOn
(
"install:docker"
))
...
...
@@ -174,8 +177,8 @@ func BuildK8SPlan(kubernetesVersion string, kubeletNodeIP string, seLinuxInstall
},
plan
.
DependOn
(
"configure:kubernetes-repo-key"
))
}
// If we need to set SELinux to permissive mode
.
if
setSELinuxPermissive
{
// If
SELinux is already installed and
we need to set SELinux to permissive mode
, do it
if
seLinuxInstalled
&&
setSELinuxPermissive
{
b
.
AddResource
(
"selinux:permissive"
,
&
resource
.
Run
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help