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

Failure on PVC creation: Invalid value: "scooldUploads": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters ... #1942

Open
hurzelpurzel opened this issue Oct 24, 2024 · 4 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@hurzelpurzel
Copy link
Contributor

Expected Behavior

Kompose should produce a syntactic valid PVC

Actual Behavior

templates/scooldUploads-persistentvolumeclaim.yaml: object name does not conform to Kubernetes naming requirements: "scooldUploads": metadata.name: Invalid value: "scooldUploads": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*')

Steps To Reproduce

Use the File below and put it an helm chart and lint it

Kompose Version

1.34.0 (cbf2835db)

Docker-Compose file

version: '3.4'

services:
   para:
     image: erudikaltd/para:latest_stable
     ports:
       - "8080:8080"
     volumes:
       - type: volume
         source: paraData
         target: /para/data
       - type: volume
         source: paraLib
         target: /para/lib
       - type: bind
         source: ./para-application.conf
         target: /para/application.conf
     restart: always
     environment:
       - JAVA_OPTS=-Dconfig.file=/para/application.conf -Dloader.path=/para/lib

   scoold:
     depends_on:
       - para
     image: 374874639893.dkr.ecr.eu-west-1.amazonaws.com/scoold-pro:latest_stable
     ports:
       - "8000:8000"
     volumes:
       - type: volume
         source: scooldUploads
         target: /scoold-pro/uploads
       - type: bind
         source: ./scoold-application.conf
         target: /scoold-pro/application.conf
       - type: bind
         source: ./para-application.conf
         target: /scoold-pro/para-application.conf
     restart: always
     environment:
       - JAVA_OPTS=-Dconfig.file=/scoold-pro/application.conf -Dscoold.autoinit.para_config_file=/scoold-pro/para-application.conf -Dscoold.para_endpoint=http://para:8080
       - BOOT_SLEEP=5
volumes:
  paraData:
  paraLib:
  scooldUploads:

Anything else?

volumes should be lower cased

@hurzelpurzel hurzelpurzel added the kind/bug Categorizes issue or PR as related to a bug. label Oct 24, 2024
@hurzelpurzel hurzelpurzel changed the title [BUG] <title> Failure on PVC creation: Invalid value: "scooldUploads": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters ... Oct 24, 2024
hurzelpurzel added a commit to hurzelpurzel/kompose that referenced this issue Oct 24, 2024
@hurzelpurzel
Copy link
Contributor Author

I will try to fix it, please assign me

@cdrage cdrage assigned cdrage and hurzelpurzel and unassigned cdrage Oct 25, 2024
@cdrage
Copy link
Member

cdrage commented Oct 25, 2024

I will try to fix it, please assign me

Assigned! Go ahead :)

@hurzelpurzel
Copy link
Contributor Author

Could you please give an advise ? I got an dependency error, when I try to build:
make bin
CGO_ENABLED=0 GO111MODULE=on go build -ldflags="-w -s -X github.com/kubernetes/kompose/pkg/version.GITCOMMIT=a103f37f" -o kompose main.go
go: downloading github.com/openshift/api v3.9.0+incompatible
pkg/kobject/kobject.go:25:2: reading github.com/openshift/api/go.mod at revision v3.9.0: unknown revision v3.9.0
pkg/transformer/kubernetes/kubernetes.go:39:2: reading github.com/openshift/api/go.mod at revision v3.9.0: unknown revision v3.9.0
pkg/transformer/openshift/openshift.go:29:2: reading github.com/openshift/api/go.mod at revision v3.9.0: unknown revision v3.9.0
pkg/transformer/openshift/openshift.go:30:2: reading github.com/openshift/api/go.mod at revision v3.9.0: unknown revision v3.9.0

I found other projects got the problem as well : openshift/api#2049
Did I miss somthing or is this a problem of the openshift api module ?

@hurzelpurzel
Copy link
Contributor Author

Did find a solution to make it compile add the following in the beginning of the go.mod before require to replace the non existing version with the tag commit reference pointing to the v.0.0.1 tag

replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20230704153349-abb98ff04d03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants