Skip to content

BUILD-281: wire in OCM feature gate config fields to allow eventual use of CSI volumes when BUILD-275 lands#199

Merged
openshift-merge-robot merged 2 commits intoopenshift:masterfrom
gabemontero:bld-csi-vol-mnt-cfg-ocm
Oct 1, 2021
Merged

BUILD-281: wire in OCM feature gate config fields to allow eventual use of CSI volumes when BUILD-275 lands#199
openshift-merge-robot merged 2 commits intoopenshift:masterfrom
gabemontero:bld-csi-vol-mnt-cfg-ocm

Conversation

@gabemontero
Copy link
Copy Markdown
Contributor

No description provided.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 10, 2021
Comment thread go.mod Outdated
k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9
)

replace github.com/openshift/api => github.com/gabemontero/api v0.0.0-20210910154316-eaa29e1f16df
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this captures the latest state of openshift/api#1007

when that merges, we'll just change the version for openshift/api up above

Comment thread go.mod Outdated

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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread pkg/cmd/controller/build.go Outdated
Comment on lines +61 to +62
case "CSIDriverSharedResource":
foundCSIDriverSharedResource = true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to check this feature gate - this gate is used to install the shared resource CSI driver on the cluster.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated @adambkaplan PTAL

Comment thread pkg/cmd/controller/build.go Outdated
SecurityClient: securityClient.SecurityV1(),
Image: imageTemplate.ExpandOrDie("docker-builder"),
SecurityClient: securityClient.SecurityV1(),
BuildCSIVolumesAvailable: foundBuildCSIVolumes && foundCSIDriverSharedResource,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only check the build flag:

Suggested change
BuildCSIVolumesAvailable: foundBuildCSIVolumes && foundCSIDriverSharedResource,
BuildCSIVolumesAvailable: foundBuildCSIVolumes,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated @adambkaplan PTAL

@gabemontero gabemontero force-pushed the bld-csi-vol-mnt-cfg-ocm branch from 3ff27d1 to ea0f01d Compare September 13, 2021 18:30
@gabemontero
Copy link
Copy Markdown
Contributor Author

/test e2e-aws

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 22, 2021
@gabemontero gabemontero force-pushed the bld-csi-vol-mnt-cfg-ocm branch from d1c095f to 932116a Compare September 22, 2021 19:05
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 22, 2021
@gabemontero
Copy link
Copy Markdown
Contributor Author

unrelated fails

/retest

@gabemontero gabemontero force-pushed the bld-csi-vol-mnt-cfg-ocm branch 2 times, most recently from fc5cce3 to fdcc9d6 Compare September 29, 2021 13:44
@gabemontero gabemontero changed the title WIP: BUILD-281: wire in OCM feature gate config fields to allow eventual use of CSI volumes BUILD-281: wire in OCM feature gate config fields to allow eventual use of CSI volumes when BUILD-275 lands Sep 29, 2021
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 29, 2021
@gabemontero
Copy link
Copy Markdown
Contributor Author

/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

@gabemontero
Copy link
Copy Markdown
Contributor Author

unit test appears to be unrelated flake that passes for me locally ... let's see

/test unit

@gabemontero
Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@gabemontero
Copy link
Copy Markdown
Contributor Author

/retest

@gabemontero
Copy link
Copy Markdown
Contributor Author

/retest

@gabemontero
Copy link
Copy Markdown
Contributor Author

install time networking fail in e2e-aws-proxy

will wait on retest in case our aws is overloaded

@gabemontero
Copy link
Copy Markdown
Contributor Author

inability to access registry.redhat.io with latest e2e-gcp-builds

/retest

@gabemontero
Copy link
Copy Markdown
Contributor Author

less than before, but still inability to access registry.redhat.io with latest e2e-gcp-builds

/retest

Copy link
Copy Markdown
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
buildCSIVolumesAvailable bool
buildCSIVolumesEnabled bool

Comment thread pkg/build/controller/strategy/docker.go Outdated
type DockerBuildStrategy struct {
Image string
Image string
BuildCSIVolumesAvailable bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BuildCSIVolumesAvailable bool
BuildCSIVolumesEnabled bool

Comment thread pkg/build/controller/strategy/docker.go Outdated
// 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 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 {

Comment thread pkg/build/controller/strategy/sti.go Outdated
SecurityClient securityclient.SecurityV1Interface
Image string
SecurityClient securityclient.SecurityV1Interface
BuildCSIVolumesAvailable bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BuildCSIVolumesAvailable bool
BuildCSIVolumesEnabled bool

Comment thread pkg/build/controller/strategy/sti.go Outdated
// 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 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 {

Comment thread pkg/build/controller/strategy/util.go Outdated

// 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 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func setupBuildVolumes(pod *corev1.Pod, buildVolumes []buildv1.BuildVolume, buildCSIVolumes bool) error {
func setupBuildVolumes(pod *corev1.Pod, buildVolumes []buildv1.BuildVolume, csiVolumesEnabled bool) error {

Comment thread pkg/cmd/controller/build.go Outdated
Comment on lines +55 to +63
foundBuildCSIVolumes := false
if fg != nil {
for _, v := range fg {
v = strings.TrimSpace(v)
if v == "BuildCSIVolumes=true" {
foundBuildCSIVolumes = true
}
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
}
}
}

Comment thread pkg/cmd/controller/build.go Outdated
DockerBuildStrategy: &buildstrategy.DockerBuildStrategy{
Image: imageTemplate.ExpandOrDie("docker-builder"),
Image: imageTemplate.ExpandOrDie("docker-builder"),
BuildCSIVolumesAvailable: foundBuildCSIVolumes,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BuildCSIVolumesAvailable: foundBuildCSIVolumes,
BuildCSIVolumesEnabled: csiVolumesEnabled,

Comment thread pkg/cmd/controller/build.go Outdated
SecurityClient: securityClient.SecurityV1(),
Image: imageTemplate.ExpandOrDie("docker-builder"),
SecurityClient: securityClient.SecurityV1(),
BuildCSIVolumesAvailable: foundBuildCSIVolumes,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BuildCSIVolumesAvailable: foundBuildCSIVolumes,
BuildCSIVolumesEnabled: csiVolumesEnabled,

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 1, 2021
@gabemontero gabemontero force-pushed the bld-csi-vol-mnt-cfg-ocm branch from fdcc9d6 to ebe9867 Compare October 1, 2021 17:04
@gabemontero
Copy link
Copy Markdown
Contributor Author

renames pulled and re pushed, commits squashed @adambkaplan

ptal / thanks

Copy link
Copy Markdown
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 1, 2021
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Oct 1, 2021

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Copy Markdown
Contributor

/retest-required

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit fd48f0a into openshift:master Oct 1, 2021
@gabemontero gabemontero deleted the bld-csi-vol-mnt-cfg-ocm branch October 2, 2021 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants