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
ae5b93a2
Commit
ae5b93a2
authored
Feb 12, 2021
by
Brad Davidson
Committed by
Brad Davidson
Feb 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use HasSuffixI utility function
Signed-off-by:
Brad Davidson
<
brad.davidson@rancher.com
>
parent
ec661c67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
controller.go
pkg/deploy/controller.go
+3
-10
No files found.
pkg/deploy/controller.go
View file @
ae5b93a2
...
@@ -15,6 +15,7 @@ import (
...
@@ -15,6 +15,7 @@ import (
"time"
"time"
errors2
"github.com/pkg/errors"
errors2
"github.com/pkg/errors"
"github.com/rancher/k3s/pkg/agent/util"
v12
"github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1"
v12
"github.com/rancher/k3s/pkg/apis/k3s.cattle.io/v1"
v1
"github.com/rancher/k3s/pkg/generated/controllers/k3s.cattle.io/v1"
v1
"github.com/rancher/k3s/pkg/generated/controllers/k3s.cattle.io/v1"
"github.com/rancher/wrangler/pkg/apply"
"github.com/rancher/wrangler/pkg/apply"
...
@@ -309,11 +310,7 @@ func skipFile(fileName string, skips map[string]bool) bool {
...
@@ -309,11 +310,7 @@ func skipFile(fileName string, skips map[string]bool) bool {
return
true
return
true
case
skips
[
fileName
]
:
case
skips
[
fileName
]
:
return
true
return
true
case
strings
.
HasSuffix
(
fileName
,
".json"
)
:
case
util
.
HasSuffixI
(
fileName
,
".yaml"
,
".yml"
,
".json"
)
:
return
false
case
strings
.
HasSuffix
(
fileName
,
".yml"
)
:
return
false
case
strings
.
HasSuffix
(
fileName
,
".yaml"
)
:
return
false
return
false
default
:
default
:
return
true
return
true
...
@@ -329,11 +326,7 @@ func shouldDisableService(base, fileName string, disables map[string]bool) bool
...
@@ -329,11 +326,7 @@ func shouldDisableService(base, fileName string, disables map[string]bool) bool
return
true
return
true
}
}
}
}
switch
{
if
!
util
.
HasSuffixI
(
fileName
,
".yaml"
,
".yml"
,
".json"
)
{
case
strings
.
HasSuffix
(
fileName
,
".json"
)
:
case
strings
.
HasSuffix
(
fileName
,
".yml"
)
:
case
strings
.
HasSuffix
(
fileName
,
".yaml"
)
:
default
:
return
false
return
false
}
}
baseFile
:=
filepath
.
Base
(
fileName
)
baseFile
:=
filepath
.
Base
(
fileName
)
...
...
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