Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nmaas Platform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nmaas
nmaas Platform
Commits
6bff48cf
Commit
6bff48cf
authored
3 weeks ago
by
kbeyro
Browse files
Options
Downloads
Patches
Plain Diff
remote cluster change domainnames
parent
83265091
Branches
Branches containing commit
No related tags found
1 merge request
!211
Update webhooks update
Pipeline
#94378
passed
3 weeks ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/net/geant/nmaas/externalservices/kubernetes/RemoteClusterManager.java
+13
-6
13 additions, 6 deletions
...aas/externalservices/kubernetes/RemoteClusterManager.java
with
13 additions
and
6 deletions
src/main/java/net/geant/nmaas/externalservices/kubernetes/RemoteClusterManager.java
+
13
−
6
View file @
6bff48cf
...
@@ -151,11 +151,7 @@ public class RemoteClusterManager implements ClusterMonitoringService {
...
@@ -151,11 +151,7 @@ public class RemoteClusterManager implements ClusterMonitoringService {
.
state
(
KClusterState
.
UNKNOWN
)
.
state
(
KClusterState
.
UNKNOWN
)
.
contactEmail
(
view
.
getContactEmail
())
.
contactEmail
(
view
.
getContactEmail
())
.
currentStateSince
(
OffsetDateTime
.
now
())
.
currentStateSince
(
OffsetDateTime
.
now
())
.
domains
(!
view
.
getDomainNames
().
isEmpty
()
?
view
.
getDomainNames
().
stream
().
map
(
d
->
{
.
domains
(
prepareList
(
view
))
Optional
<
Domain
>
dom
=
domainService
.
findDomain
(
d
);
return
dom
.
orElse
(
null
);
}
).
toList
()
:
Collections
.
emptyList
())
.
build
(),
.
build
(),
file
);
file
);
...
@@ -170,6 +166,17 @@ public class RemoteClusterManager implements ClusterMonitoringService {
...
@@ -170,6 +166,17 @@ public class RemoteClusterManager implements ClusterMonitoringService {
return
null
;
return
null
;
}
}
private
List
<
Domain
>
prepareList
(
RemoteClusterView
view
)
{
if
(
view
==
null
||
view
.
getDomainNames
()
==
null
)
{
return
Collections
.
emptyList
();
}
return
view
.
getDomainNames
().
stream
().
map
(
d
->
{
Optional
<
Domain
>
dom
=
domainService
.
findDomain
(
d
);
return
dom
.
orElse
(
null
);
}
).
toList
();
}
public
RemoteClusterView
updateCluster
(
RemoteClusterView
cluster
,
Long
id
)
{
public
RemoteClusterView
updateCluster
(
RemoteClusterView
cluster
,
Long
id
)
{
Optional
<
KCluster
>
entity
=
clusterRepository
.
findById
(
id
);
Optional
<
KCluster
>
entity
=
clusterRepository
.
findById
(
id
);
...
@@ -332,7 +339,7 @@ public class RemoteClusterManager implements ClusterMonitoringService {
...
@@ -332,7 +339,7 @@ public class RemoteClusterManager implements ClusterMonitoringService {
public
void
removeCluster
(
Long
id
)
{
public
void
removeCluster
(
Long
id
)
{
try
{
try
{
if
(
clusterRepository
.
existsById
(
id
))
{
if
(
clusterRepository
.
existsById
(
id
))
{
this
.
clusterRepository
.
deleteById
(
id
);
this
.
clusterRepository
.
deleteById
(
id
);
}
}
}
catch
(
RuntimeException
ex
)
{
}
catch
(
RuntimeException
ex
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment