kubedirector
kubedirector copied to clipboard
/bin/sh kd-JSON file config
Hi Team, How can I adjust the kd-JSON file config, if my Image does not have bash but only sh?
Error Message
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown
{
"apiVersion": "kubedirector.hpe.com/v1beta1",
"kind": "KubeDirectorApp",
"metadata": {
"name" : "httpd"
},
"spec" : {
"systemdRequired": true,
"defaultPersistDirs" : ["/usr/local/apache2/htdocs"],
"config": {
"roleServices": [
{
"serviceIDs": [
"http"
],
"roleID": "httpd"
}
],
"selectedRoles": [
"httpd"
]
},
"label": {
"name": "HTTPD",
"description": "Httpd apps"
},
"distroID": "apache/httpd",
"version": "2.4.46-alpine",
"configSchemaVersion": 8,
"services": [
{
"endpoint": {
"urlScheme": "http",
"path": "/",
"isDashboard": true,
"port": 80
},
"id": "http",
"label": {
"name": "http"
}
}
],
"defaultImageRepoTag": "httpd:2.4.46-alpine",
"defaultConfigPackage": null,
"roles": [
{
"cardinality": "1+",
"id": "httpd"
}
]
}
}
Hmm. bash is a requirement at the moment. I'm not sure though if any of the current shell executions rely on bash features, so we may be able to change that.
But some light images only provide /bin/sh, for example apache https and busybody.
Yup very true. I think I'm not clear on why you would need/want to use KubeDirector for those particular examples, but I can easily imagine there being other cases where bash would not be available.
Because I hope that customers can deploy the service through HPECP kd dashboard one click, our current deployment service dashboard through kubectl YAML is not friendly.
I'm back from leave; will take this up. Note to self... the wiki currently (now) lists bash as an image requirement, so I would need to revert that if we use sh instead.
Moving stuff not related to API deprecation into 0.11.0.
We'll get this one in 0.11.0 for sure!
To avoid making this a backward-incompatible change, probably there would be a kdapp field to optionally specify the shell used, defaulting to bash.