-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Air gap support #491
Air gap support #491
Conversation
e7f0949
to
4ac605d
Compare
pkg/types/autok3s.go
Outdated
PackagePath string `json:"packagePath,omitempty" yaml:"packagePath,omitempty"` | ||
PackageName string `json:"packageName,omitempty" yaml:"packageName,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use the same format
PackagePath json:"package-path,omitempty" yaml:"package-path,omitempty"
PackageName json:"package-name,omitempty" yaml:"package-name,omitempty"
cmd/airgap/remove.go
Outdated
if err := common.DefaultDB.DeletePackage(name); err != nil { | ||
return err | ||
} | ||
|
||
if err := pkgairgap.RemovePackage(name); err != nil { | ||
return err | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to delete it physically first and then delete it from the DB?
pkg/common/package.go
Outdated
|
||
type Package struct { | ||
Name string `json:"name,omitempty" gorm:"primaryKey;->;<-:create"` | ||
K3sVersion string `json:"k3sVeersion,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
pkg/airgap/file_scp.go
Outdated
defer scpClient.RemoveDirectory(tmpDir) | ||
|
||
for local, remote := range files { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove useless line
4ac605d
to
f0b1bdf
Compare
As design, following actions are supported: - create - update - remove - ls - import - export - update-install-script The downloaded resource will be stored in package dir under CfgPath. The design can be found in cnrancher#480.
When creating or upgrading cluster, you can specify the packageName or packagePath to use airgap install.
f0b1bdf
to
33b347c
Compare
Updated |
Refer to issue: #448