Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for latest CSI driver image post issues/167 #17

Merged
merged 5 commits into from
Jun 26, 2020

Conversation

2uasimojo
Copy link
Member

@2uasimojo 2uasimojo commented Jun 23, 2020

Since the fix for issue #167 merged upstream, the AWS EFS CSI driver team overwrote the latest image tag to include it.

For starters, this means we can update this operator to use the new method of specifying access points via a colon-delimited volumeHandle as opposed to in mountOptions.

However, the same update to latest also brought in a commit that requires an additional mount in the efs-plugin container of the DaemonSet. So we need to update our YAML for that resource at the same time, or everything is broken (this might be upstream issue #192). This update to the DaemonSet YAML also syncs with upstream by bumping the image versions for the other two containers (csi-node-driver-registrar: v1.1.0 => v1.3.0; and livenessprobe: v1.1.0 => livenessprobe:v2.0.0).

Jira: OSD-4187

Since the [fix](kubernetes-sigs/aws-efs-csi-driver#185) for [issue #167](kubernetes-sigs/aws-efs-csi-driver#167) merged, the AWS EFS CSI driver overwrote the [`latest` image tag](sha256-962619a5deb34e1c4257f2120dd941ab026fc96adde003e27f70b65023af5a07?context=explore) to include it.

For starters, this means we can update this operator to use the [new method of specifying access points](https://github.com/kubernetes-sigs/aws-efs-csi-driver/tree/0ae998c5a95fe6dbee7f43c182997e64872695e6/examples/kubernetes/access_points#edit-persistent-volume-spec) via a colon-delimited `volumeHandle` as opposed to in `mountOptions`.

However, the same update to `latest` also brought in a [commit](kubernetes-sigs/aws-efs-csi-driver@b3baff8) that requires an additional mount in the `efs-plugin` container of the DaemonSet. So we need to update our YAML for that resource at the same time, or everything is broken (this might be upstream [issue #192](kubernetes-sigs/aws-efs-csi-driver#192). This update to the DaemonSet YAML also syncs with [upstream](https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/0ae998c5a95fe6dbee7f43c182997e64872695e6/deploy/kubernetes/base/node.yaml) by bumping the image versions for the other two containers (csi-node-driver-registrar: v1.1.0 => v1.3.0; and livenessprobe: v1.1.0 => livenessprobe:v2.0.0).
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2020

Codecov Report

Merging #17 into master will decrease coverage by 0.04%.
The diff coverage is 85.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
- Coverage   74.11%   74.06%   -0.05%     
==========================================
  Files          18       18              
  Lines         618      617       -1     
==========================================
- Hits          458      457       -1     
  Misses        153      153              
  Partials        7        7              
Impacted Files Coverage Δ
pkg/controller/sharedvolume/pvc_ensurable.go 100.00% <ø> (ø)
pkg/controller/statics/statics.go 84.46% <42.85%> (-0.59%) ⬇️
pkg/controller/sharedvolume/pv_ensurable.go 100.00% <100.00%> (ø)
...controller/sharedvolume/sharedvolume_controller.go 86.04% <100.00%> (+0.59%) ⬆️
pkg/util/ensurable.go 100.00% <100.00%> (ø)

Make these methods exported from the util package, next to the Ensurable
interface, since a) a subsequent commit is going to use the former from
the sharedvolume side, and b) they make sense there anyway, since
there's nothing statics-specific about them.
PVs are immutable once created. This *should* mean we can never hit a
code path where we would *need* to `Update` a PV (via `Ensure`). And if
we did, it would bounce anyway because... PVs are immutable once
created.

There's a weird edge case, though: if the shape of a PV created by this
operator changes from one version to the next, the latter will come up
and think the PV needs to be changed to the new shape, and will try to
`Update`. That would bounce and put the operator into a hot loop.

So this commit simply disables `Update`s of PVs by pretending they never
change. We'll still restore one if deleted (which probably also won't
work, for reasons).
@2uasimojo
Copy link
Member Author

I live tested this with a couple of SV/PV/PVC groups from the previous version, and they are left alone as expected. No hot looping in the operator. Deleting the old SVs deletes their respective PV/PVC pairs without complaint. This is ready to go.

Per [review](https://github.com/openshift/aws-efs-operator/pull/17/files#r445217067), use `fmt.Sprintf` rather than `+` to construct strings.
Some comments referred to "0.0.2" as the version before we changed the shape of PVs to use the colon-delimited VolumeHandle. But 0.0.2 refers to the [community-operators](https://github.com/operator-framework/community-operators/tree/master/community-operators/aws-efs-operator/0.0.2) (OperatorHub) version, which is just one of many possible version numbers that could refer to the same thing.

Clarify these by instead referring to the commit where the change happened. Let the reader figure out what version that corresponds to in whatever context they care about.
Copy link
Member Author

@2uasimojo 2uasimojo left a comment

Choose a reason for hiding this comment

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

Thanks James. Two commits on the way.

Copy link
Contributor

@jharrington22 jharrington22 left a comment

Choose a reason for hiding this comment

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

/lgtm

@jharrington22
Copy link
Contributor

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 25, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 2uasimojo, jharrington22

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [2uasimojo,jharrington22]

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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 25, 2020
@jharrington22
Copy link
Contributor

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 25, 2020
@2uasimojo
Copy link
Member Author

Grr, why isn't PR check completing?

@2uasimojo
Copy link
Member Author

/retest

1 similar comment
@2uasimojo
Copy link
Member Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 3305dc2 into openshift:master Jun 26, 2020
@2uasimojo 2uasimojo deleted the update-for-167 branch June 26, 2020 16:51
2uasimojo added a commit to 2uasimojo/aws-efs-operator that referenced this pull request Jun 30, 2020
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.

5 participants