Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
europdx
k8s
cbio-on-demand
API
Commits
e1bff1a6
Commit
e1bff1a6
authored
Aug 06, 2019
by
Ľuboslav Pivarč
Browse files
add init container
parent
31dc1a84
Pipeline
#21737
passed with stages
in 5 minutes and 49 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cbioondemandK8S/src/main/java/cz/muni/ics/edirex/cbioondemandK8S/service/KubernetesImpl.java
View file @
e1bff1a6
...
...
@@ -212,6 +212,7 @@ public class KubernetesImpl implements CBioOnDemandService {
V1ReplicaSet
replicaSet
=
Utils
.
deepCopy
(
cbioReplicaSet
,
V1ReplicaSet
.
class
);
addLabelsAndSelectors
(
replicaSet
,
userID
,
id
);
addDbHost
(
replicaSet
,
Host
);
addDbHostToInit
(
replicaSet
,
Host
);
addMoveAndID
(
replicaSet
,
move
,
samplesId
);
addUrl
(
replicaSet
,
url
);
V1ReplicaSet
result
=
api
.
createReplicaSet
(
replicaSet
,
NAMESPACE
);
...
...
@@ -280,6 +281,15 @@ public class KubernetesImpl implements CBioOnDemandService {
.
setValue
(
Host
);
}
private
void
addDbHostToInit
(
V1ReplicaSet
replicaSet
,
String
Host
){
replicaSet
.
getSpec
()
.
getTemplate
()
.
getSpec
()
.
getInitContainers
().
get
(
0
)
.
getEnv
().
get
(
0
)
.
setValue
(
Host
);
}
private
void
addUrl
(
V1ReplicaSet
replicaSet
,
String
url
)
{
replicaSet
.
getSpec
()
.
getTemplate
()
...
...
cbioondemandK8S/src/main/resources/cbio-replicaset.yml
View file @
e1bff1a6
...
...
@@ -28,6 +28,13 @@ spec:
# generated by API unique for user
#instance: "1"
spec
:
initContainers
:
-
name
:
waitForDb
image
:
lpivo/wait_for_db
env
:
-
name
:
DBHOST
# generated by API from service name
value
:
cbio-on-demand-dbpjvrw
imagePullSecrets
:
-
name
:
dataloding
containers
:
...
...
Ľuboslav Pivarč
@456130
mentioned in commit
d3334dd3
·
Aug 06, 2019
mentioned in commit
d3334dd3
mentioned in commit d3334dd37a2528bb165b789ac48d02c3bfd2682c
Toggle commit list
Ľuboslav Pivarč
@456130
mentioned in merge request
!3 (merged)
·
Aug 06, 2019
mentioned in merge request
!3 (merged)
mentioned in merge request !3
Toggle commit list
Ľuboslav Pivarč
@456130
mentioned in commit
d32ebc92
·
Aug 06, 2019
mentioned in commit
d32ebc92
mentioned in commit d32ebc922db0bd198ab388cfa20ac6005febddd2
Toggle commit list
Write
Preview
Markdown
is supported
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