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

add configmaps derived from file and dir #1852

Merged
merged 4 commits into from
Apr 25, 2024

Conversation

sosan
Copy link
Contributor

@sosan sosan commented Apr 7, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

added configmaps derived from files and directories,
added tests and e2e, and created a function isconfigfile to check if we need to use a configmap and mount as readonly
I also noticed that readonly mount is not assigned because it cause the e2e tests to fail

Which issue(s) this PR fixes:

Fixes #1794

Special notes for your reviewer:

// return useconfigmap and readonly,
// not used asigned readonly because dont break e2e
useConfigMap, _ = isConfigFile(volume.Host)

setVolumeAccessMode added more access modes
previous:

if mode == "ro" {
		pvc.Spec.AccessModes = []api.PersistentVolumeAccessMode{api.ReadOnlyMany}
	} else {
		pvc.Spec.AccessModes = []api.PersistentVolumeAccessMode{api.ReadWriteOnce}
	}

add tests and e2e
function isconfigfile check if we need to use configmap and mount in readonly
readonly not asigned because not fail e2e

Signed-off-by: jose luis <[email protected]>
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 7, 2024
@k8s-ci-robot k8s-ci-robot requested review from cdrage and kadel April 7, 2024 19:42
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 7, 2024
sosan added 2 commits April 10, 2024 00:33
fallback to skip volume mount and log warning when path cannot be resolved, as /sys, /root, /var/lib/docker

in e2e TestMultipleContainersInPod directory /data replaced with /data-dir

Signed-off-by: jose luis <[email protected]>
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Apr 9, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 19, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 22, 2024
@cdrage
Copy link
Member

cdrage commented Apr 25, 2024

/lgtm

@cdrage
Copy link
Member

cdrage commented Apr 25, 2024

/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 25, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cdrage, sosan

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 25, 2024
@k8s-ci-robot k8s-ci-robot merged commit 601900d into kubernetes:main Apr 25, 2024
10 checks passed
@sosan sosan deleted the feature-1794-auto-configmaps branch April 25, 2024 19:04
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create ConfigMaps automatically from existing docker-compose volume mounts.
3 participants