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

Include binaryData when mounting a configmap via subpath volumeMounts #1156

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

amisevsk
Copy link
Collaborator

What does this PR do?

Include binaryData field when mounting a configmap as subpath volumeMounts

What issues does this PR fix or reference?

Closes #1155

Is it tested? How?

  1. Apply configmap
    kind: ConfigMap
    apiVersion: v1
    metadata:
      name: test-cm
      labels:
        controller.devfile.io/mount-to-devworkspace: 'true'
        controller.devfile.io/watch-configmap: 'true'
      annotations:
        controller.devfile.io/mount-as: subpath
        controller.devfile.io/mount-path: /tmp/
    binaryData:
      testfile: aGVsbG8K # "hello"
  2. Start a workspace
  3. Verify that /tmp/testfile is mounted and contains text hello

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Include keys in binaryData when auto-mounting a configmap as subpaths
volumeMounts.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04 🎉

Comparison is base (051eed7) 52.39% compared to head (77d5ddb) 52.43%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1156      +/-   ##
==========================================
+ Coverage   52.39%   52.43%   +0.04%     
==========================================
  Files          81       81              
  Lines        7381     7390       +9     
==========================================
+ Hits         3867     3875       +8     
- Misses       3233     3235       +2     
+ Partials      281      280       -1     
Impacted Files Coverage Δ
pkg/provision/automount/configmap.go 87.37% <100.00%> (+1.20%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@AObuchow AObuchow left a comment

Choose a reason for hiding this comment

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

Looks good to me & works as expected 👍

@openshift-ci
Copy link

openshift-ci bot commented Jul 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amisevsk, AObuchow

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:

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

@amisevsk amisevsk merged commit f3ee8b5 into devfile:main Jul 20, 2023
6 checks passed
@amisevsk amisevsk deleted the subpath-binarydata branch July 20, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mounting an automount configmap as subpath ignores binaryData field
2 participants