@@ -45,11 +45,11 @@ type AddonResponseMeta struct {
4545}
4646
4747type AddonResponseData struct {
48- Kind * string `json:"kind,omitempty"`
49- ApiVersion * string `json:"apiVersion,omitempty"`
50- Metadata * AddonResponseMeta `json:"metadata,omitempty"`
51- Spec * AddonSpec `json:"spec,omitempty"`
52- Status map [string ]* string `json:"status,omitempty"`
48+ Kind * string `json:"kind,omitempty"`
49+ ApiVersion * string `json:"apiVersion,omitempty"`
50+ Metadata * AddonResponseMeta `json:"metadata,omitempty"`
51+ Spec * AddonSpec `json:"spec,omitempty"`
52+ Status map [string ]interface {} `json:"status,omitempty"`
5353}
5454
5555func (me * TkeService ) GetTkeAppChartList (ctx context.Context , request * tke.GetTkeAppChartListRequest ) (info []* tke.AppChart , errRet error ) {
@@ -79,10 +79,10 @@ func (me *TkeService) GetTkeAppChartList(ctx context.Context, request *tke.GetTk
7979
8080func (me * TkeService ) PollingAddonsPhase (ctx context.Context , clusterId , addonName string , addonResponseData * AddonResponseData ) (string , bool , error ) {
8181 var (
82- err error
83- phase string
82+ err error
83+ phase string
8484 response string
85- has bool
85+ has bool
8686 )
8787
8888 if addonResponseData == nil {
@@ -104,13 +104,13 @@ func (me *TkeService) PollingAddonsPhase(ctx context.Context, clusterId, addonNa
104104
105105 reason := addonResponseData .Status ["reason" ]
106106 if addonResponseData .Status ["phase" ] != nil {
107- phase = * addonResponseData .Status ["phase" ]
107+ phase = addonResponseData .Status ["phase" ].( string )
108108 }
109109 if reason == nil {
110110 reason = helper .String ("unknown error" )
111111 }
112112
113- if phase == "Upgrading" || phase == "Installing" || phase == "ChartFetched" || phase == "RollingBack" || phase == "Terminating" {
113+ if phase == "Upgrading" || phase == "Installing" || phase == "ChartFetched" || phase == "RollingBack" || phase == "Terminating" {
114114 return resource .RetryableError (fmt .Errorf ("addon %s is %s, retrying" , addonName , phase ))
115115 }
116116
0 commit comments