Skip to content

Include the ceph-nvmeof script in the quay.io/ceph/nvmeof-cli image #1421

@nixpanic

Description

@nixpanic

While testing things in a Kubernetes environment, it is convenient to start a container that keeps running and can be used for multiple ceph-nvmeof commands. Currentlty the ceph-nvmeof is not available, so I'm using a workaround to have a script in my deployed Pod.

---
apiVersion: v1
kind: Pod
metadata:
  labels:
    app: nvmeof-cli
  name: nvmeof-cli
spec:
  containers:
  - command:
    - sh
    - -c
    - "echo '#!/bin/sh\nexec python3 -m control.cli $@' > /usr/local/bin/ceph-nvmeof && chmod +x /usr/local/bin/ceph-nvmeof && tail -f /dev/null"
    image: quay.io/ceph/nvmeof-cli:latest
    imagePullPolicy: IfNotPresent
    name: nvmeof-cli

When creating the above Pod, a small script /usr/local/bin/ceph-nvmeof is created, and the main process is blocked on fail -f /dev/null so that the Pod keeps available for additional kubectl exec commands.

It would be nice if I can drop the workaround, and the ceph-nvmeof command is directly available in the $PATH.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions