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

[velero] Bump velero version to v1.7.0 #311

Merged
merged 7 commits into from
Oct 14, 2021
Merged

Conversation

jenting
Copy link
Collaborator

@jenting jenting commented Sep 30, 2021

Special notes for your reviewer:

Since from v1.7.0, the velero container image a distroless, there is no shell command anymore.
We leverage the bitnami/kubectl in the initContainer phase, copy the sh and kubectl command to /tmp folder.
After that, the velero container is able to use the sh (pipe redirection) and kubectl command to upgrade the CRDs by shared mount point /tmp with command

/velero install --crds-only --dry-run -o yaml | /tmp/kubectl apply -f -

Note that: we deprecate the kubectl.initResources and use .resources instead since the Velero container image CPU/Memory request/limit should be the same as Velero Deployment.

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the values.yaml or README.md
  • Title of the PR starts with chart name (e.g. [velero])

JenTing Hsiao added 4 commits October 5, 2021 08:35
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
@jenting jenting marked this pull request as ready for review October 5, 2021 15:31
Comment on lines +66 to +69
- /tmp/sh
args:
- -c
- kubectl apply -f /tmp/crds.yaml
{{- with .Values.kubectl.resources }}
- /velero install --crds-only --dry-run -o yaml | /tmp/kubectl apply -f -
Copy link

@sarahhodne sarahhodne Oct 6, 2021

Choose a reason for hiding this comment

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

I don't think the sh or kubectl is required anymore, I was able to get this to work in our cluster by just running velero install --crds-only, it uses the same credentials that kubectl apply would be using.

Copy link
Collaborator Author

@jenting jenting Oct 6, 2021

Choose a reason for hiding this comment

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

Thanks for the suggestion.

But the velero install --crds-only only applies when the CRD resource does not exist.
Velero won't apply the patch/put change when the CRD resource exists already. Ref to code.

Therefore, if the user upgrades from the old Velero version to the new Velero version, after successfully update, the CRD resource is still the old Velero version.

Choose a reason for hiding this comment

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

Ah, the help text of the --crds-only argument ("Useful for updating CRDs for an existing Velero install.") had me confused, and I didn't realise that it failed 🤦🏻‍♀️

Filed a ticket about the help text: vmware-tanzu/velero#4236

JenTing Hsiao added 2 commits October 7, 2021 07:19
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
@simon-anz
Copy link

Bump? We're keen to deploy distroless Velero, and we use these charts.

sseago
sseago previously approved these changes Oct 12, 2021
Signed-off-by: JenTing Hsiao <jenting.hsiao@suse.com>
@jenting jenting merged commit 58e695b into vmware-tanzu:main Oct 14, 2021
@jenting jenting deleted the v1.7.0 branch October 14, 2021 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants