Skip to content
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

Merged
merged 2 commits into from
Aug 18, 2022
Merged

Air gap support #491

merged 2 commits into from
Aug 18, 2022

Conversation

orangedeng
Copy link
Member

Refer to issue: #448

@orangedeng orangedeng requested a review from Jason-ZW August 11, 2022 09:22
@orangedeng orangedeng force-pushed the air-gap-support branch 4 times, most recently from e7f0949 to 4ac605d Compare August 15, 2022 01:48
Comment on lines 52 to 53
PackagePath string `json:"packagePath,omitempty" yaml:"packagePath,omitempty"`
PackageName string `json:"packageName,omitempty" yaml:"packageName,omitempty"`
Copy link
Collaborator

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"

Comment on lines 36 to 42
if err := common.DefaultDB.DeletePackage(name); err != nil {
return err
}

if err := pkgairgap.RemovePackage(name); err != nil {
return err
}
Copy link
Collaborator

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?


type Package struct {
Name string `json:"name,omitempty" gorm:"primaryKey;->;<-:create"`
K3sVersion string `json:"k3sVeersion,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

defer scpClient.RemoveDirectory(tmpDir)

for local, remote := range files {

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove useless line

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.
@orangedeng
Copy link
Member Author

Updated

@Jason-ZW Jason-ZW merged commit c4685d2 into cnrancher:master Aug 18, 2022
@orangedeng orangedeng deleted the air-gap-support branch December 7, 2023 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants