@@ -110,9 +110,15 @@ export default class Service extends Base {
110110 await this . _pushImage ( ) ;
111111 }
112112 }
113-
114113 // 部署函数
115114 const config = _ . defaults ( this . local , FC_RESOURCES_EMPTY_CONFIG ) ;
115+ if (
116+ ! _ . isEmpty ( config . sessionAffinityConfig ) &&
117+ typeof config . sessionAffinityConfig !== 'string'
118+ ) {
119+ logger . debug ( 'sessionAffinityConfig' , config . sessionAffinityConfig ) ;
120+ config . sessionAffinityConfig = JSON . stringify ( config . sessionAffinityConfig ) ;
121+ }
116122 await this . fcSdk . deployFunction ( config , {
117123 slsAuto : ! _ . isEmpty ( this . createResource . sls ) ,
118124 type : this . type ,
@@ -146,6 +152,14 @@ export default class Service extends Base {
146152 _ . unset ( this . remote , 'resourceGroupId' ) ;
147153 }
148154
155+ if ( _ . get ( this . remote , 'instanceIsolationMode' ) === 'SHARE' ) {
156+ _ . unset ( this . remote , 'instanceIsolationMode' ) ;
157+ }
158+
159+ if ( _ . get ( this . remote , 'sessionAffinity' ) === 'NONE' ) {
160+ _ . unset ( this . remote , 'sessionAffinity' ) ;
161+ }
162+
149163 _ . unset ( this . local , 'endpoint' ) ;
150164 const { code } = this . local ;
151165 _ . unset ( this . local , 'code' ) ;
@@ -390,7 +404,7 @@ vpcConfig:
390404 _ . set ( this . local , 'vpcConfig' , vpcConfig ) ;
391405 }
392406 if ( nasAuto ) {
393- let modelConfig = supplement ?. modelConfig || annotations ?. modelConfig ;
407+ const modelConfig = supplement ?. modelConfig || annotations ?. modelConfig ;
394408
395409 logger . write (
396410 yellow ( `Created nas resource succeeded, please replace nasConfig: auto in yaml with:
0 commit comments