-
Notifications
You must be signed in to change notification settings - Fork 770
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
[BUG] Conflicting name assigned to configmap generated for compose referencing ".env" files #1793
Labels
kind/bug
Categorizes issue or PR as related to a bug.
Comments
Can you check if my PR fix the issue? |
@realgam3 it does not |
sosan
added a commit
to sosan/kompose
that referenced
this issue
Jan 9, 2024
* fix issue 1793 kubernetes#1793 *add tests Signed-off-by: jose luis <[email protected]>
Merged
sosan
added a commit
to sosan/kompose
that referenced
this issue
Jan 22, 2024
* fix issue 1793 kubernetes#1793 *add tests Signed-off-by: jose luis <[email protected]>
sosan
added a commit
to sosan/kompose
that referenced
this issue
Jan 22, 2024
* fix issue 1793 kubernetes#1793 *add tests Signed-off-by: jose luis <[email protected]>
sosan
added a commit
to sosan/kompose
that referenced
this issue
Jan 22, 2024
* fix issue 1793 kubernetes#1793 *add tests Signed-off-by: jose luis <[email protected]>
sosan
added a commit
to sosan/kompose
that referenced
this issue
Jan 24, 2024
* fix issue 1793 kubernetes#1793 *add tests Signed-off-by: jose luis <[email protected]> formated k8utils_test.go Signed-off-by: jose luis <[email protected]> labels formatted as name"-"envName to match fixtures when performing the gitHub action Signed-off-by: jose luis <[email protected]> removed this piece code because apply it later, and it is redundant Signed-off-by: jose luis <[email protected]> Refactor test in k8sutils_test.go to extract the last 63 characters. This addresses the impact of the removed code that previously truncated the input with if len(envName) > 63 { envName = envName[len(envName)-63:] } Signed-off-by: jose luis <[email protected]> changed to name function to getUsableNameEnvFile Signed-off-by: jose luis <[email protected]> fix issue 1793 * fix issue 1793 kubernetes#1793 *add tests Signed-off-by: jose luis <[email protected]> labels formatted as name"-"envName to match fixtures when performing the gitHub action Signed-off-by: jose luis <[email protected]> changed to name function to getUsableNameEnvFile Signed-off-by: jose luis <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
Compose files which refer to environment variables from files such as ".env" or ".env.local" in a simple React application should produce a configmap file whose filename follows the appropriate regex rules required by kubernetes.
Actual Behavior
For compose referencing env_files begining with ".env", the generated file name of configmap does not follow appropriate regex rules, which prevents deployment on minikube or any other platform.
Steps To Reproduce
docker-compose.yaml
kompose convert -f docker-compose.yaml
< path with '/' replace with '-' >-app--env-configmap.yaml
kubectl apply -f app-deployment.yaml
Kompose Version
Docker-Compose file
Anything else?
The issue seems to be in
kompose/pkg/transformer/kubernetes/k8sutils.go
in theFormatEnvName
function where the '.' has been replaced with '-' and can be resolved as shown in the below screen shot .Thanks
The text was updated successfully, but these errors were encountered: