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
546dc247
Unverified
Commit
546dc247
authored
Jul 31, 2023
by
Simon Kirsten
Committed by
GitHub
Jul 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for `{{ template "base" . }}` in etc/containerd/config.toml.tmpl (#7991)
Signed-off-by:
Simon Kirsten
<
simonkirsten24@gmail.com
>
parent
6d360e64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
templates_linux.go
pkg/agent/templates/templates_linux.go
+1
-0
templates_windows.go
pkg/agent/templates/templates_windows.go
+1
-0
No files found.
pkg/agent/templates/templates_linux.go
View file @
546dc247
...
...
@@ -131,6 +131,7 @@ enable_keychain = true
func
ParseTemplateFromConfig
(
templateBuffer
string
,
config
interface
{})
(
string
,
error
)
{
out
:=
new
(
bytes
.
Buffer
)
t
:=
template
.
Must
(
template
.
New
(
"compiled_template"
)
.
Parse
(
templateBuffer
))
template
.
Must
(
t
.
New
(
"base"
)
.
Parse
(
ContainerdConfigTemplate
))
if
err
:=
t
.
Execute
(
out
,
config
);
err
!=
nil
{
return
""
,
err
}
...
...
pkg/agent/templates/templates_windows.go
View file @
546dc247
...
...
@@ -179,6 +179,7 @@ func ParseTemplateFromConfig(templateBuffer string, config interface{}) (string,
},
}
t
:=
template
.
Must
(
template
.
New
(
"compiled_template"
)
.
Funcs
(
funcs
)
.
Parse
(
templateBuffer
))
template
.
Must
(
t
.
New
(
"base"
)
.
Parse
(
ContainerdConfigTemplate
))
if
err
:=
t
.
Execute
(
out
,
config
);
err
!=
nil
{
return
""
,
err
}
...
...
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