Some checks failed
Native Verification / Build Docs (pull_request) Successful in 1m12s
Native Verification / Build App-Service Native (pull_request) Successful in 1m27s
Native Verification / Build Daemon Native (pull_request) Successful in 42s
Lint and Test Charts / lint-test (pull_request_target) Failing after 19s
Lint and Test Charts / test-version (pull_request_target) Successful in 0s
Lint and Test Charts / push-image (pull_request_target) Failing after 15s
Lint and Test Charts / upload-cli (pull_request_target) Failing after 1m15s
Lint and Test Charts / upload-daemon (pull_request_target) Failing after 1m12s
Lint and Test Charts / push-deps (pull_request_target) Has been skipped
Lint and Test Charts / push-deps-arm64 (pull_request_target) Has been skipped
Lint and Test Charts / push-image-arm64 (pull_request_target) Has been cancelled
Lint and Test Charts / upload-package (pull_request_target) Has been cancelled
Lint and Test Charts / install-test (pull_request_target) Has been cancelled
84 lines
3.2 KiB
Go
84 lines
3.2 KiB
Go
package config
|
|
|
|
import (
|
|
"github.com/beclab/beos/cli/pkg/common"
|
|
cc "github.com/beclab/beos/cli/pkg/core/common"
|
|
"github.com/beclab/beos/cli/version"
|
|
)
|
|
|
|
func AddStorageFlagsBy(flagSetter CommandFlagSetter) {
|
|
// Storage backend type: managed-minio, s3, oss, cos, minio
|
|
flagSetter.Add(common.FlagStorageType,
|
|
"",
|
|
"",
|
|
"Set storage backend type: managed-minio, s3, oss, cos, minio",
|
|
).WithAlias(common.FlagLegacyStorageType)
|
|
|
|
flagSetter.Add(common.FlagS3Bucket, "", "", "Object storage bucket name")
|
|
flagSetter.Add(common.FlagBackupKeyPrefix, "", "", "Object storage key prefix for backups")
|
|
flagSetter.Add(common.FlagAWSAccessKeyIDSetup, "", "", "Access key ID for object storage")
|
|
flagSetter.Add(common.FlagAWSSecretAccessKeySetup, "", "", "Secret access key for object storage")
|
|
flagSetter.Add(common.FlagAWSSessionTokenSetup, "", "", "Session token for temporary credentials")
|
|
flagSetter.Add(common.FlagClusterID, "", "", "Cluster ID used as JuiceFS filesystem name in cloud environments")
|
|
flagSetter.Add(common.FlagBackupSecret, "", "", "Backup sync secret for Terminus cloud")
|
|
flagSetter.Add(common.FlagBackupClusterBucket, "", "", "Backup cluster bucket name")
|
|
flagSetter.Add(common.FlagIsCloudVersion, "", "", "Set to true when running in Terminus cloud environment")
|
|
}
|
|
|
|
func AddVersionFlagBy(flagSetter CommandFlagSetter) {
|
|
flagSetter.Add(common.FlagVersion,
|
|
"v",
|
|
version.VERSION,
|
|
"Set beOS version, e.g., 1.10.0, 1.10.0-20241109",
|
|
)
|
|
}
|
|
|
|
func AddBaseDirFlagBy(flagSetter CommandFlagSetter) {
|
|
flagSetter.Add(common.FlagBaseDir,
|
|
"b",
|
|
"",
|
|
"Set beOS package base dir, defaults to $HOME/"+cc.DefaultBaseDir,
|
|
)
|
|
}
|
|
|
|
func AddMiniKubeProfileFlagBy(flagSetter CommandFlagSetter) {
|
|
flagSetter.Add(common.FlagMiniKubeProfile,
|
|
"p",
|
|
"",
|
|
"Set Minikube profile name, only in MacOS platform, defaults to "+common.MinikubeDefaultProfile,
|
|
).WithAlias(common.FlagLegacyMiniKubeProfile)
|
|
}
|
|
|
|
func AddKubeTypeFlagBy(flagSetter CommandFlagSetter) {
|
|
flagSetter.Add(common.FlagKubeType,
|
|
"",
|
|
common.K3s,
|
|
"Set kube type, e.g., k3s or k8s",
|
|
).WithAlias(common.FlagLegacyKubeType)
|
|
}
|
|
|
|
func AddCDNServiceFlagBy(flagSetter CommandFlagSetter) {
|
|
flagSetter.Add(common.FlagCDNService,
|
|
"",
|
|
cc.DefaultBeOSCDNService,
|
|
"Set an optional CDN download address in the format https://cdn.example.com. If not set, configured defaults will be used",
|
|
).WithEnv(common.ENV_OLARES_CDN_SERVICE)
|
|
}
|
|
|
|
func AddManifestFlagBy(flagSetter CommandFlagSetter) {
|
|
flagSetter.Add(common.FlagManifest,
|
|
"",
|
|
"",
|
|
"Set package manifest file, defaults to ${base-dir}/versions/v{version}/installation.manifest",
|
|
)
|
|
}
|
|
|
|
func AddMasterHostFlagsBy(flagSetter CommandFlagSetter) {
|
|
flagSetter.Add(common.FlagMasterHost, "", "", "IP address of the master node")
|
|
flagSetter.Add(common.FlagMasterNodeName, "", "", "Name of the master node")
|
|
flagSetter.Add(common.FlagMasterSSHUser, "", "", "Username of the master node, defaults to root")
|
|
flagSetter.Add(common.FlagMasterSSHPassword, "", "", "Password of the master node")
|
|
flagSetter.Add(common.FlagMasterSSHPrivateKeyPath, "", "", "Path to the SSH key to access the master node, defaults to ~/.ssh/id_rsa")
|
|
flagSetter.Add(common.FlagMasterSSHPort, "", 0, "SSH Port of the master node, defaults to 22")
|
|
}
|