BUILD-281: wire in OCM feature gate config fields to allow eventual use of CSI volumes when BUILD-275 lands#199
Conversation
| k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9 | ||
| ) | ||
|
|
||
| replace github.com/openshift/api => github.com/gabemontero/api v0.0.0-20210910154316-eaa29e1f16df |
There was a problem hiding this comment.
this captures the latest state of openshift/api#1007
when that merges, we'll just change the version for openshift/api up above
|
|
||
| replace github.com/openshift/api => github.com/gabemontero/api v0.0.0-20210910154316-eaa29e1f16df | ||
|
|
||
| replace github.com/openshift/library-go => github.com/gabemontero/library-go v0.0.0-20210910154638-8565ba189275 |
There was a problem hiding this comment.
this captures the latest state of openshift/library-go#1201
when that merges, we'll just change the version for openshift/library-go up above
| case "CSIDriverSharedResource": | ||
| foundCSIDriverSharedResource = true |
There was a problem hiding this comment.
We don't need to check this feature gate - this gate is used to install the shared resource CSI driver on the cluster.
| SecurityClient: securityClient.SecurityV1(), | ||
| Image: imageTemplate.ExpandOrDie("docker-builder"), | ||
| SecurityClient: securityClient.SecurityV1(), | ||
| BuildCSIVolumesAvailable: foundBuildCSIVolumes && foundCSIDriverSharedResource, |
There was a problem hiding this comment.
Only check the build flag:
| BuildCSIVolumesAvailable: foundBuildCSIVolumes && foundCSIDriverSharedResource, | |
| BuildCSIVolumesAvailable: foundBuildCSIVolumes, |
3ff27d1 to
ea0f01d
Compare
|
/test e2e-aws |
d1c095f to
932116a
Compare
|
unrelated fails /retest |
fc5cce3 to
fdcc9d6
Compare
|
/assign @adambkaplan OK this has been updated with the merged versions of openshift/api and openshift/library-go and is ready for approve and/or review |
|
unit test appears to be unrelated flake that passes for me locally ... let's see /test unit |
|
/retest |
2 similar comments
|
/retest |
|
/retest |
|
install time networking fail in e2e-aws-proxy will wait on retest in case our aws is overloaded |
|
inability to access registry.redhat.io with latest e2e-gcp-builds /retest |
|
less than before, but still inability to access registry.redhat.io with latest e2e-gcp-builds /retest |
adambkaplan
left a comment
There was a problem hiding this comment.
/approve
Generally looks good. Main suggestion is to use the phrase "CSIVolumesEnabled" instead of "Available" - I think this is better communicates intent.
| buildDefaults builddefaults.BuildDefaults | ||
| buildOverrides buildoverrides.BuildOverrides | ||
| internalRegistryHostname string | ||
| buildCSIVolumesAvailable bool |
There was a problem hiding this comment.
| buildCSIVolumesAvailable bool | |
| buildCSIVolumesEnabled bool |
| type DockerBuildStrategy struct { | ||
| Image string | ||
| Image string | ||
| BuildCSIVolumesAvailable bool |
There was a problem hiding this comment.
| BuildCSIVolumesAvailable bool | |
| BuildCSIVolumesEnabled bool |
| // setupContainersNodeStorage(pod, &pod.Spec.Containers[0]) // for privileged builds | ||
| setupBlobCache(pod) | ||
| if err := setupBuildVolumes(pod, build.Spec.Strategy.DockerStrategy.Volumes); err != nil { | ||
| if err := setupBuildVolumes(pod, build.Spec.Strategy.DockerStrategy.Volumes, bs.BuildCSIVolumesAvailable); err != nil { |
There was a problem hiding this comment.
| if err := setupBuildVolumes(pod, build.Spec.Strategy.DockerStrategy.Volumes, bs.BuildCSIVolumesAvailable); err != nil { | |
| if err := setupBuildVolumes(pod, build.Spec.Strategy.DockerStrategy.Volumes, bs.BuildCSIVolumesEnabled); err != nil { |
| SecurityClient securityclient.SecurityV1Interface | ||
| Image string | ||
| SecurityClient securityclient.SecurityV1Interface | ||
| BuildCSIVolumesAvailable bool |
There was a problem hiding this comment.
| BuildCSIVolumesAvailable bool | |
| BuildCSIVolumesEnabled bool |
| // setupContainersNodeStorage(pod, &pod.Spec.Containers[0]) // for privileged builds | ||
| setupBlobCache(pod) | ||
| if err := setupBuildVolumes(pod, build.Spec.Strategy.SourceStrategy.Volumes); err != nil { | ||
| if err := setupBuildVolumes(pod, build.Spec.Strategy.SourceStrategy.Volumes, bs.BuildCSIVolumesAvailable); err != nil { |
There was a problem hiding this comment.
| if err := setupBuildVolumes(pod, build.Spec.Strategy.SourceStrategy.Volumes, bs.BuildCSIVolumesAvailable); err != nil { | |
| if err := setupBuildVolumes(pod, build.Spec.Strategy.SourceStrategy.Volumes, bs.BuildCSIVolumesEnabled); err != nil { |
|
|
||
| // setupBuildVolumes sets up user defined BuildVolumes | ||
| func setupBuildVolumes(pod *corev1.Pod, buildVolumes []buildv1.BuildVolume) error { | ||
| func setupBuildVolumes(pod *corev1.Pod, buildVolumes []buildv1.BuildVolume, buildCSIVolumes bool) error { |
There was a problem hiding this comment.
| func setupBuildVolumes(pod *corev1.Pod, buildVolumes []buildv1.BuildVolume, buildCSIVolumes bool) error { | |
| func setupBuildVolumes(pod *corev1.Pod, buildVolumes []buildv1.BuildVolume, csiVolumesEnabled bool) error { |
| foundBuildCSIVolumes := false | ||
| if fg != nil { | ||
| for _, v := range fg { | ||
| v = strings.TrimSpace(v) | ||
| if v == "BuildCSIVolumes=true" { | ||
| foundBuildCSIVolumes = true | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
| foundBuildCSIVolumes := false | |
| if fg != nil { | |
| for _, v := range fg { | |
| v = strings.TrimSpace(v) | |
| if v == "BuildCSIVolumes=true" { | |
| foundBuildCSIVolumes = true | |
| } | |
| } | |
| } | |
| csiVolumesEnabled := false | |
| if fg != nil { | |
| for _, v := range fg { | |
| v = strings.TrimSpace(v) | |
| if v == "BuildCSIVolumes=true" { | |
| csiVolumesEnabled = true | |
| } | |
| } | |
| } |
| DockerBuildStrategy: &buildstrategy.DockerBuildStrategy{ | ||
| Image: imageTemplate.ExpandOrDie("docker-builder"), | ||
| Image: imageTemplate.ExpandOrDie("docker-builder"), | ||
| BuildCSIVolumesAvailable: foundBuildCSIVolumes, |
There was a problem hiding this comment.
| BuildCSIVolumesAvailable: foundBuildCSIVolumes, | |
| BuildCSIVolumesEnabled: csiVolumesEnabled, |
| SecurityClient: securityClient.SecurityV1(), | ||
| Image: imageTemplate.ExpandOrDie("docker-builder"), | ||
| SecurityClient: securityClient.SecurityV1(), | ||
| BuildCSIVolumesAvailable: foundBuildCSIVolumes, |
There was a problem hiding this comment.
| BuildCSIVolumesAvailable: foundBuildCSIVolumes, | |
| BuildCSIVolumesEnabled: csiVolumesEnabled, |
fdcc9d6 to
ebe9867
Compare
|
renames pulled and re pushed, commits squashed @adambkaplan ptal / thanks |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adambkaplan, gabemontero The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
No description provided.