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
4e5218b6
Unverified
Commit
4e5218b6
authored
Feb 24, 2021
by
Erik Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply suggestions from code review
Logging cleanup Co-authored-by:
Brad Davidson
<
brad@oatmail.org
>
parent
4aac6b6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
server.go
pkg/server/server.go
+4
-3
No files found.
pkg/server/server.go
View file @
4e5218b6
...
...
@@ -226,17 +226,18 @@ func stageFiles(ctx context.Context, sc *Context, controlConfig *config.Control)
return
deploy
.
WatchFiles
(
ctx
,
sc
.
Apply
,
sc
.
K3s
.
K3s
()
.
V1
()
.
Addon
(),
controlConfig
.
Disables
,
dataDir
)
}
// isHelmChartTraefikV1 checks the chart with "traefik-1." prefix.
// isHelmChartTraefikV1 checks for an existing HelmChart resource with spec.chart containing traefik-1,
// as deployed by the legacy chart (https://%{KUBERNETES_API}%/static/charts/traefik-1.81.0.tgz)
func
isHelmChartTraefikV1
(
sc
*
Context
)
bool
{
prefix
:=
"traefik-1."
helmChart
,
err
:=
sc
.
Helm
.
Helm
()
.
V1
()
.
HelmChart
()
.
Get
(
metav1
.
NamespaceSystem
,
"traefik"
,
metav1
.
GetOptions
{})
if
err
!=
nil
{
logrus
.
WithError
(
err
)
.
Info
(
"
Not find traefik
"
)
logrus
.
WithError
(
err
)
.
Info
(
"
Failed to get existing traefik HelmChart
"
)
return
false
}
chart
:=
path
.
Base
(
helmChart
.
Spec
.
Chart
)
if
strings
.
HasPrefix
(
chart
,
prefix
)
{
logrus
.
WithField
(
"chart"
,
chart
)
.
Info
(
"Found
traefik v1 running
"
)
logrus
.
WithField
(
"chart"
,
chart
)
.
Info
(
"Found
existing traefik v1 HelmChart
"
)
return
true
}
return
false
...
...
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