Git Product home page Git Product logo

csi-livenessprobe's Introduction

Liveness Probe

The liveness probe is a sidecar container that exposes an HTTP /healthz endpoint, which serves as kubelet's livenessProbe hook to monitor health of a CSI driver.

The liveness probe uses Probe() call to check the CSI driver is healthy. See CSI spec for more information about Probe API call. Container Storage Interface (CSI)

Compatibility

This information reflects the head of this branch.

Compatible with CSI Version Container Image Min K8s Version
CSI Spec v1.0.0 k8s.gcr.io/sig-storage/livenessprobe 1.13

Usage

See hostpath-with-livenessprobe.yaml for example how to use the liveness probe with a CSI driver. Notice that actual livenessProbe is set on the container with the CSI driver. This way, Kubernetes restarts the CSI driver container when the probe fails. The liveness probe sidecar container only provides the HTTP endpoint for the probe and does not contain livenessProbe section by itself.

kind: Pod
spec:
  containers:
  # Container with CSI driver
  - name: hostpath-driver
    image: quay.io/k8scsi/hostpathplugin:v0.2.0
    # Defining port which will be used to GET plugin health status
    # 9808 is default, but can be changed.
    ports:
    - containerPort: 9808
      name: healthz
      protocol: TCP
    # The probe
    livenessProbe:
      failureThreshold: 5
      httpGet:
        path: /healthz
        port: healthz
      initialDelaySeconds: 10
      timeoutSeconds: 3
      periodSeconds: 2
    volumeMounts:
    - mountPath: /csi
      name: socket-dir
    # ...
 # The liveness probe sidecar container
 - name: liveness-probe
    imagePullPolicy: Always
    image: quay.io/k8scsi/livenessprobe:v1.1.0
    args:
    - --csi-address=/csi/csi.sock
    volumeMounts:
    - mountPath: /csi
      name: socket-dir
    # ...

Command line options

Recommended optional arguments

  • --csi-address <path to CSI socket>: This is the path to the CSI driver socket inside the pod that the external-provisioner container will use to issue CSI operations (/run/csi/socket is used by default).

Other recognized arguments

  • --health-port <number>: TCP ports for listening for HTTP requests (default "9808")

  • --probe-timeout <duration>: Maximum duration of single Probe() call (default "1s").

  • --metrics-address <port>: The TCP network address where the prometheus metrics endpoint will listen (example: :8080). The default is empty string, which means metrics endpoint is disabled.

  • --metrics-path <path>: The HTTP path where prometheus metrics will be exposed. Default is /metrics."

  • All glog / klog arguments are supported, such as -v <log level> or -alsologtostderr.

Community, discussion, contribution, and support

Learn how to engage with the Kubernetes community on the community page.

You can reach the maintainers of this project at:

Code of conduct

Participation in the Kubernetes community is governed by the Kubernetes Code of Conduct.

csi-livenessprobe's People

Contributors

andrewsykim avatar animeshk08 avatar darkowlzz avatar ddebroy avatar ggriffiths avatar gnufied avatar gongwilliam avatar humblec avatar jiawei0227 avatar jsafrane avatar k8s-ci-robot avatar lpabon avatar madhu-1 avatar morrislaw avatar msau42 avatar mucahitkurt avatar namrata-ibm avatar nettoclaudio avatar openshift-bot avatar openshift-merge-robot avatar pohly avatar saad-ali avatar sbezverk avatar scuzhanglei avatar smarterclayton avatar spiffxp avatar stefansedich avatar verult avatar wozniakjan avatar xing-yang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.