Skip to content

Commit decd0d4

Browse files
Fix saveNCGoalState bug for WebApps containerType (#407)
In case of WebApps the NC goal state gets saved with CNS if the loopback adapter creation is successful. This change fixes the bug where the goal state wasn't getting saved because the condition for WebApps containerType would run into default case and error out.
1 parent 9ece879 commit decd0d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cns/restserver/restserver.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,8 @@ func (service *HTTPRestService) saveNetworkContainerGoalState(req cns.CreateNetw
10321032
case cns.JobObject:
10331033
fallthrough
10341034
case cns.COW:
1035+
fallthrough
1036+
case cns.WebApps:
10351037
switch service.state.OrchestratorType {
10361038
case cns.Kubernetes:
10371039
fallthrough
@@ -1042,6 +1044,8 @@ func (service *HTTPRestService) saveNetworkContainerGoalState(req cns.CreateNetw
10421044
case cns.DBforPostgreSQL:
10431045
fallthrough
10441046
case cns.AzureFirstParty:
1047+
fallthrough
1048+
case cns.WebApps:
10451049
var podInfo cns.KubernetesPodInfo
10461050
err := json.Unmarshal(req.OrchestratorContext, &podInfo)
10471051
if err != nil {

0 commit comments

Comments
 (0)