Skip to content

Commit

Permalink
fix: need add s2i secret id to workload when create s2i service
Browse files Browse the repository at this point in the history
  • Loading branch information
ymh1028 committed Jan 9, 2020
1 parent 231de73 commit 516a150
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/stores/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const updateS2iServiceParams = data => {
'spec.template.spec.containers[0].name',
''
)

let repoUrl = get(
data,
`S2i.metadata.annotations["kubesphere.io/repoUrl"]`,
Expand All @@ -68,7 +69,14 @@ const updateS2iServiceParams = data => {
data.S2i,
'spec.config.tag'
)}`

// set private image repo secret to deployment
const pullSecret = get(
data.S2i,
'spec.config.pushAuthentication.secretRef.name',
''
)
set(serviceData, 'spec.template.spec.containers[0].pullSecret', pullSecret)
set(serviceData, 'spec.template.spec.imagePullSecrets[0].name', pullSecret)
set(data, 'S2i.metadata.annotations.serviceName', serviceName)
data.S2i.metadata.name = builderName
set(serviceData, 'metadata.labels.s2ibuilder', builderName)
Expand Down

0 comments on commit 516a150

Please sign in to comment.