kubedirector icon indicating copy to clipboard operation
kubedirector copied to clipboard

/bin/sh kd-JSON file config

Open hoycdanny opened this issue 4 years ago • 7 comments

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"
            }
        ]
    }
}

hoycdanny avatar Aug 28 '20 07:08 hoycdanny

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.

joel-bluedata avatar Aug 28 '20 14:08 joel-bluedata

But some light images only provide /bin/sh, for example apache https and busybody.

hoycdanny avatar Aug 28 '20 14:08 hoycdanny

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.

joel-bluedata avatar Aug 28 '20 15:08 joel-bluedata

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.

hoycdanny avatar Sep 01 '20 05:09 hoycdanny

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.

joel-bluedata avatar Apr 08 '21 16:04 joel-bluedata

Moving stuff not related to API deprecation into 0.11.0.

We'll get this one in 0.11.0 for sure!

joel-bluedata avatar Apr 07 '22 17:04 joel-bluedata

To avoid making this a backward-incompatible change, probably there would be a kdapp field to optionally specify the shell used, defaulting to bash.

joel-bluedata avatar Apr 14 '22 16:04 joel-bluedata