diff --git a/pkg/server/skyconfig/config.go b/pkg/server/skyconfig/config.go index 425c70ce4..a6ddc0a9a 100644 --- a/pkg/server/skyconfig/config.go +++ b/pkg/server/skyconfig/config.go @@ -72,6 +72,12 @@ type Configuration struct { SecretToken string `json:"secret_key"` Region string `json:"region"` Bucket string `json:"bucket"` + + // followings only used when ImplName = cloud + CloudAssetHost string `json:"cloud_asset_host"` + CloudAssetToken string `json:"cloud_asset_token"` + CloudAssetPublicPrefix string `json:"cloud_asset_public_prefix"` + CloudAssetPrivatePrefix string `json:"cloud_asset_private_prefix"` } `json:"asset_store"` AssetURLSigner struct { URLPrefix string `json:"url_prefix"` @@ -296,6 +302,24 @@ func (config *Configuration) readAssetStore() { if assetStoreBucket != "" { config.AssetStore.Bucket = assetStoreBucket } + + // Cloud Asset related + cloudAssetHost := os.Getenv("CLOUD_ASSET_HOST") + if cloudAssetHost != "" { + config.AssetStore.CloudAssetHost = cloudAssetHost + } + cloudAssetToken := os.Getenv("CLOUD_ASSET_TOKEN") + if cloudAssetToken != "" { + config.AssetStore.CloudAssetToken = cloudAssetToken + } + cloudAssetPublicPrefix := os.Getenv("CLOUD_ASSET_PUBLIC_PREFIX") + if cloudAssetPublicPrefix != "" { + config.AssetStore.CloudAssetPublicPrefix = cloudAssetPublicPrefix + } + cloudAssetPrivatePrefix := os.Getenv("CLOUD_ASSET_PRIVATE_PREFIX") + if cloudAssetPrivatePrefix != "" { + config.AssetStore.CloudAssetPrivatePrefix = cloudAssetPrivatePrefix + } } func (config *Configuration) readAPNS() {