converged-computing / oras-csi

ORAS (OCI registry as storage) container storage interface
https://converged-computing.github.io/oras-csi/#/
MIT License
13 stars 3 forks source link

Enable k8s labels that align CSI for grouping logging #8

Open sajayantony opened 1 year ago

sajayantony commented 1 year ago

Grouping the labels enables us to query for all pods from components that might be a part of the CSI driver.

For e.g.

kubectl logs --follow $(kubectl get pods -l 'app.kubernetes.io/name=csi-hostpathplugin' --all-namespaces -o jsonpath='{.items[*].metadata.name}')

Basically update the chart/deployments to componentized labels.

  labels:
    app.kubernetes.io/instance: csi.oras.land 
    app.kubernetes.io/part-of: csi-driver-oras
    app.kubernetes.io/name: csi.oras.land
    app.kubernetes.io/component: oras-csi-driver

See - https://github.com/converged-computing/oras-csi/compare/main...sajayantony:oras-csi:labels#diff-a8700dba16974edcf2b009ae853444d94109db94d7538ea2038d72ae2966f68b

vsoch commented 1 year ago

This will be added with my next PR (already done locally!)

vsoch commented 1 year ago

@sajayantony I did some more testing, and when I added instance/name it strangely made two versions of the plugin driver pod, one with the name oras-oci-node-xxxx and the other oras.oci.land-xxx. I think it likely is that the developer isn't supposed to define the label (name or instance?) along with metadata: name, so for the time being I'm just going to add part-of for the filter, and we can look into debugging this further after these first early PRs.