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

Use consistent quoting for file-based backup annotations #2575

Merged
merged 1 commit into from Mar 17, 2021

Conversation

smlx
Copy link
Member

@smlx smlx commented Mar 16, 2021

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for changelog and subsystem label(s) applied

The old quoting was causing backup breakage.

Before we had:

annotations:
  k8up.syn.tools/backupcommand: /bin/sh -c "/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path | quote }} ."

After templating this will have invalid quoting (" inside "):

annotations:
  k8up.syn.tools/backupcommand: /bin/sh -c "/bin/busybox tar -cf - -C "/my/path/example" ."

This PR changes the template to:

annotations:
  k8up.syn.tools/backupcommand: /bin/sh -c '/bin/busybox tar -cf - -C {{ .Values.persistentStorage.path | quote }} .'

After templating the quoting is valid for the shell command:

annotations:
  k8up.syn.tools/backupcommand: /bin/sh -c '/bin/busybox tar -cf - -C "/my/path/example" .'

Closing issues

n/a

@smlx smlx added the 0-kubernetes Vanilla kubernetes support label Mar 16, 2021
@smlx
Copy link
Member Author

smlx commented Mar 16, 2021

@tobybellwood this one will also need to be pulled into 2.x

@Schnitzel Schnitzel added this to the v1.14.3 milestone Mar 16, 2021
@Schnitzel Schnitzel merged commit 300048a into master Mar 17, 2021
@smlx smlx deleted the consistent-quoting branch March 17, 2021 05:54
tobybellwood pushed a commit that referenced this pull request Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-kubernetes Vanilla kubernetes support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants