Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
theodolite
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
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sören Henning
theodolite
Commits
d1e83654
Commit
d1e83654
authored
Jan 21, 2022
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
Minor code quality fixes
parent
c4283e7b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#6138
failed
Jan 21, 2022
Stage: build
Stage: test
Stage: check
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt
+14
-12
14 additions, 12 deletions
.../main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt
with
14 additions
and
12 deletions
theodolite/src/main/kotlin/theodolite/benchmark/ConfigMapResourceSet.kt
+
14
−
12
View file @
d1e83654
...
@@ -41,15 +41,20 @@ class ConfigMapResourceSet: ResourceSet, KubernetesResource {
...
@@ -41,15 +41,20 @@ class ConfigMapResourceSet: ResourceSet, KubernetesResource {
return
try
{
return
try
{
resources
resources
.
map
{
Pair
(
.
map
{
Pair
(
getKind
(
resource
=
it
.
value
),
getKind
(
resource
=
it
.
value
),
it
)
}
it
)
}
.
map
{
.
map
{
Pair
(
Pair
(
it
.
second
.
key
,
it
.
second
.
key
,
loader
.
loadK8sResource
(
it
.
first
,
it
.
second
.
value
))
}
loader
.
loadK8sResource
(
it
.
first
,
it
.
second
.
value
)
)
}
}
catch
(
e
:
IllegalArgumentException
)
{
}
catch
(
e
:
IllegalArgumentException
)
{
throw
DeploymentFailedException
(
"Can
not create resource set from specified
c
onfig
m
ap"
,
e
)
throw
DeploymentFailedException
(
"Cannot create resource set from specified
C
onfig
M
ap"
,
e
)
}
}
}
}
...
@@ -58,10 +63,7 @@ class ConfigMapResourceSet: ResourceSet, KubernetesResource {
...
@@ -58,10 +63,7 @@ class ConfigMapResourceSet: ResourceSet, KubernetesResource {
val
parser
=
YamlParserFromString
()
val
parser
=
YamlParserFromString
()
val
resourceAsMap
=
parser
.
parse
(
resource
,
HashMap
<
String
,
String
>()
::
class
.
java
)
val
resourceAsMap
=
parser
.
parse
(
resource
,
HashMap
<
String
,
String
>()
::
class
.
java
)
return
try
{
return
resourceAsMap
?.
get
(
"kind"
)
resourceAsMap
?.
get
(
"kind"
)
!!
?:
throw
DeploymentFailedException
(
"Could not find field kind of Kubernetes resource: ${resourceAsMap?.get("
name
")}"
)
}
catch
(
e
:
NullPointerException
)
{
throw
DeploymentFailedException
(
"Could not find field kind of Kubernetes resource: ${resourceAsMap?.get("
name
")}"
,
e
)
}
}
}
}
}
\ No newline at end of file
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
sign in
to comment