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 · 5 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

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

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 28, 2025
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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants