@@ -45,11 +45,11 @@ type AddonResponseMeta struct {
45
45
}
46
46
47
47
type 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"`
53
53
}
54
54
55
55
func (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
79
79
80
80
func (me * TkeService ) PollingAddonsPhase (ctx context.Context , clusterId , addonName string , addonResponseData * AddonResponseData ) (string , bool , error ) {
81
81
var (
82
- err error
83
- phase string
82
+ err error
83
+ phase string
84
84
response string
85
- has bool
85
+ has bool
86
86
)
87
87
88
88
if addonResponseData == nil {
@@ -104,13 +104,13 @@ func (me *TkeService) PollingAddonsPhase(ctx context.Context, clusterId, addonNa
104
104
105
105
reason := addonResponseData .Status ["reason" ]
106
106
if addonResponseData .Status ["phase" ] != nil {
107
- phase = * addonResponseData .Status ["phase" ]
107
+ phase = addonResponseData .Status ["phase" ].( string )
108
108
}
109
109
if reason == nil {
110
110
reason = helper .String ("unknown error" )
111
111
}
112
112
113
- if phase == "Upgrading" || phase == "Installing" || phase == "ChartFetched" || phase == "RollingBack" || phase == "Terminating" {
113
+ if phase == "Upgrading" || phase == "Installing" || phase == "ChartFetched" || phase == "RollingBack" || phase == "Terminating" {
114
114
return resource .RetryableError (fmt .Errorf ("addon %s is %s, retrying" , addonName , phase ))
115
115
}
116
116
0 commit comments