Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Rainbond2
Commits
b72e5396
Commit
b72e5396
authored
5 years ago
by
barnett
Browse files
Options
Download
Email Patches
Plain Diff
fix service cluster ip repeat bug
parent
7a9d2476
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
worker/appm/controller/upgrade.go
+2
-3
worker/appm/controller/upgrade.go
with
2 additions
and
3 deletions
+2
-3
worker/appm/controller/upgrade.go
+
2
-
3
View file @
b72e5396
...
...
@@ -113,7 +113,6 @@ func (s *upgradeController) upgradeService(newapp v1.AppService) {
for
_
,
new
:=
range
newService
{
if
nowConfig
,
ok
:=
nowServiceMaps
[
new
.
Name
];
ok
{
new
.
UID
=
nowConfig
.
UID
new
.
Spec
.
ClusterIP
=
nowConfig
.
Spec
.
ClusterIP
new
.
ResourceVersion
=
nowConfig
.
ResourceVersion
newc
,
err
:=
s
.
manager
.
client
.
CoreV1
()
.
Services
(
nowApp
.
TenantID
)
.
Update
(
new
)
if
err
!=
nil
{
...
...
@@ -123,11 +122,11 @@ func (s *upgradeController) upgradeService(newapp v1.AppService) {
nowServiceMaps
[
new
.
Name
]
=
nil
logrus
.
Debugf
(
"update service %s for service %s"
,
new
.
Name
,
newapp
.
ServiceID
)
}
else
{
newc
,
err
:=
s
.
manager
.
client
.
CoreV1
()
.
Services
(
nowApp
.
TenantID
)
.
Create
(
new
)
err
:=
CreateKubeService
(
s
.
manager
.
client
,
nowApp
.
TenantID
,
new
)
if
err
!=
nil
{
logrus
.
Errorf
(
"update service failure %s"
,
err
.
Error
())
}
nowApp
.
SetService
(
new
c
)
nowApp
.
SetService
(
new
)
logrus
.
Debugf
(
"create service %s for service %s"
,
new
.
Name
,
newapp
.
ServiceID
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment