-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support custom cluster root path
Signed-off-by: Nianyu Shen <[email protected]>
- Loading branch information
Showing
10 changed files
with
343 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# install pre-commit on your system and then | ||
# run pre-commit install in this repository. | ||
# You can by pass commit hooks with: | ||
# git commit -n | ||
repos: | ||
- repo: https://github.com/compilerla/conventional-pre-commit | ||
rev: v2.4.0 | ||
hooks: | ||
- id: conventional-pre-commit | ||
stages: [commit-msg] | ||
- repo: https://github.com/tekwizely/pre-commit-golang | ||
rev: v1.0.0-rc.1 | ||
hooks: | ||
- id: go-mod-tidy | ||
- repo: https://github.com/golangci/golangci-lint | ||
rev: v1.61.0 | ||
hooks: | ||
- id: golangci-lint | ||
name: golangci-lint | ||
description: Fast linters runner for Go. Note that only modified files are linted, so linters like 'unused' that need to scan all files won't work as expected. | ||
entry: golangci-lint run --new-from-rev HEAD --whole-files -v | ||
types: [go] | ||
language: golang | ||
require_serial: true | ||
pass_filenames: false | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package constants | ||
|
||
const ( | ||
ConfigurationPath = "/etc/rancher/rke2/config.d" | ||
ContainerdEnvConfigPath = "/etc/default" | ||
|
||
ServerSystemName = "rke2-server" | ||
AgentSystemName = "rke2-agent" | ||
K8SNoProxy = ".svc,.svc.cluster,.svc.cluster.local" | ||
LocalImagesPath = "/opt/content/images" | ||
) | ||
|
||
const ( | ||
ClusterRootPath = "cluster_root_path" | ||
RunSystemdSystemDir = "/run/systemd/system" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Unit] | ||
Description={{.Name}} mount unit | ||
Before=local-fs.target k3s.service k3s-agent.service | ||
|
||
[Mount] | ||
What={{.Source}} | ||
Where={{.Target}} | ||
Type=none | ||
Options=bind | ||
|
||
[Install] | ||
WantedBy=local-fs.target |
Oops, something went wrong.