Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

bump CPI to version 1.22.3 #1118

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

nicolehanjing
Copy link
Contributor

What this PR does / why we need it

bump CPI to version 1.22.3

Which issue(s) this PR fixes

Fixes #

Describe testing done for PR

generating CPI configs for data values

Release note

bump CPI to version 1.22.3

PR Checklist

  • Squash the commits into one or a small number of logical commits
  • Use good commit messages
  • Ensure PR contains terms all contributors can understand and links all contributors can access

Additional information

Special notes for your reviewer

@blc1996
Copy link
Contributor

blc1996 commented Nov 9, 2021

/test

@github-actions
Copy link

github-actions bot commented Nov 9, 2021

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1118/20211109234140/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@github-actions
Copy link

github-actions bot commented Nov 9, 2021

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1118/20211109234326/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1118/20211110003434/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1118/20211110014149/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@nicolehanjing nicolehanjing force-pushed the topic/nicoleh/bump-cpi branch 2 times, most recently from 5464e76 to 02a8b4f Compare November 10, 2021 04:03
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1118/20211110041437/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1118/20211110041928/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@rajaskakodkar
Copy link
Contributor

/test

@alfredthenarwhal
Copy link
Collaborator

@rajaskakodkar: /test
Commit: 02a8b4f

Tests failed! Build no: 1029

metadata:
labels:
#@overlay/match missing_ok=True
vsphere-cpi/data-values-hash: #@ sha256.sum(yaml.encode(values))
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we move this to an annotation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vijaykatam thanks for the review!
We noticed that CSI also uses label: https://github.com/vmware-tanzu/community-edition/blob/main/addons/packages/vsphere-csi/2.4.0/bundle/config/overlays/update-csi-driver.yaml#L77
Is it okay to just use the label? As we are close to FC, if this needs to be changed, can we update it in the next version?

Copy link
Contributor

Choose a reason for hiding this comment

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

The issue with sha256 value is it can exceed 63 characters(restriction for label values) so you need to trim it and also cast to string to account for the case where truncated string is all numeric and k8s throws an error complaining integer overflow. Also labels means k8s will index the label. CSI needs to be changed but since this is net new I would encourage to not add tech debt.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just want to double check - to update this, we will need to first update in tce repo, and then sync in framework repo and tkg-packages repo, right?

Copy link
Contributor

@vijaykatam vijaykatam Nov 10, 2021

Choose a reason for hiding this comment

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

Yep, the CPI daemonset will fail with the current code(due to label value validation) so a change would have been required either ways.
Also acknowledge the pain for upstream and downstream, we are looking to remove CRS for CPI in a future release so you won't need to sync to framework repo. For tce repo and tkg-packages, we will investigate a cayman mirror or other alternatives.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi the sha256 will give out 256 bit not characters. which is 32 characters and we should be fine if we put it inside label

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok it's 64 characters in generated by ytt. so annotation should cover it, no need to truncate the sha

Copy link
Contributor

@lubronzhan lubronzhan Nov 10, 2021

Choose a reason for hiding this comment

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

In general, sha256 only generates 64 characters length string, and the length constraint for for label's value is 253. So there is no need to change.
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set @vijaykatam

Copy link
Contributor

Choose a reason for hiding this comment

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

Valid label value:

    must be 63 characters or less (can be empty),

sha265 ytt function returns more so needs to be trucated

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yes you are right so the key prefix could be 253, not the value, I got it wrong. And no length limitation for annotation value

@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1118/20211110181718/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/1118/20211110215123/clustergen.diff.txt
Author/reviewers:
Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

@nicolehanjing
Copy link
Contributor Author

@vijaykatam can you help to review this PR? It's passing all the pipelines

@vijaykatam vijaykatam added the ok-to-merge PRs should be labelled with this before merging label Nov 10, 2021
@vijaykatam
Copy link
Contributor

Just FYI, this change should only target 1.22 TKr.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-not-required ok-to-merge PRs should be labelled with this before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants