amimof / node-cert-exporter

An SSL certificate Prometheus exporter
Apache License 2.0
173 stars 35 forks source link

Customise host path #94

Open amehub opened 7 months ago

amehub commented 7 months ago

Description Allow support of parameterised value for host path in the daemonset.yaml instead of assuming that the certificates are always under /etc.

https://github.com/amimof/node-cert-exporter/blob/master/charts/node-cert-exporter/templates/daemonset.yaml

amimof commented 6 months ago

Hi @amehub thanks for your feedback. Have a look at #95 and let me know what you think

SowmiyaJeevanandham commented 1 week ago

Any update iam having my certificates in the host of the VM and iam having different paths instead of /etc. i added volumes and volumeMounts in the values.yaml but not reflecting inside the pod.

amimof commented 1 week ago

95 is an open PR so you can't configure volume mounts in the current release. I'll make sure to have a working version of it released soon. It would help a lot if you could test it out in your environment. I'll let you know asap.

amimof commented 1 week ago

Just release 1.1.7 of the helm chart. Do helm repo update and you should see it. Then you should be able to perform a helm upgrade with an updated values.yaml file. For example:

image:
  repository: ghcr.io/amimof/node-cert-exporter
  pullPolicy: IfNotPresent
  tag: "latest"

imagePullSecrets: []

paths:
  - /host/etc/origin/node/
  - /host/etc/origin/master/
  - /host/etc/etcd/
  - /host/etc/kubernetes/pki/
  - /host/opts/certs

podAnnotations:
  prometheus.io/scrape: "true"
  prometheus.io/port: "9117"

tolerations:
  # Allow running on masters:
  - key: node-role.kubernetes.io/master
    effect: NoSchedule

serviceAccount:
  create: true

resources:
  limits:
    cpu: 250m
    memory: 256Mi
  requests:
    cpu: 100m
    memory: 128Mi

volumes:
  - hostPath:
      path: /etc
      type: ""
    name: etc
  - hostPath:
      path: /opt/certs
      type: ""
    name: opt-certs

volumeMounts:
  - mountPath: /host/etc
    name: etc
    readOnly: true
  - mountPath: /host/opt/certs
    name: opt-certs
    readOnly: true