coderanger / kitchen-kubernetes

A Test Kitchen driver for testing on top of a Kubernetes cluster.
Apache License 2.0
29 stars 10 forks source link

downcase podname #9

Closed 2k0ri closed 5 years ago

2k0ri commented 5 years ago

Kubernetes pods cannot be named with upper case characters due to DNS-1123. This PR certains pod name is lower cased.

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of ["kubectl", "create", "--filename", "-"] ----
STDOUT:
STDERR: The Pod "testel6-2k0ri-MBP-yop1a4w5" is invalid: metadata.name: Invalid value: "testel6-2k0ri-MBP-yop1a4w5": a DNS-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]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
---- End output of ["kubectl", "create", "--filename", "-"] ----
Ran ["kubectl", "create", "--filename", "-"] returned 1] on test-el6
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
coderanger commented 5 years ago

Thanks for the fix!