Giter Club home page Giter Club logo

Comments (6)

No9 avatar No9 commented on May 31, 2024

That's a nasty one that was missed because the default is to create the core directory as a sub-folder of the host directory.

Looking at the docs this can be fixed with a reservation using a claimRef.

diff --git a/charts/core-dump-handler/templates/core-storage-pv.yaml b/charts/core-dump-handler/templates/core-storage-pv.yaml
index a89c5a7..c8ed150 100644
--- a/charts/core-dump-handler/templates/core-storage-pv.yaml
+++ b/charts/core-dump-handler/templates/core-storage-pv.yaml
@@ -6,6 +6,9 @@ metadata:
     type: local
 spec:
   storageClassName: {{ .Values.storageClass }}
+  claimRef:
+    name: core-storage-pvc
+    namespace: {{ .Release.Namespace }}
   capacity:
     storage: {{ .Values.coreStorage }}
   accessModes:
diff --git a/charts/core-dump-handler/templates/host-storage-pv.yaml b/charts/core-dump-handler/templates/host-storage-pv.yaml
index 840a4fd..2e69897 100644
--- a/charts/core-dump-handler/templates/host-storage-pv.yaml
+++ b/charts/core-dump-handler/templates/host-storage-pv.yaml
@@ -6,6 +6,9 @@ metadata:
     type: local
 spec:
   storageClassName: {{ .Values.storageClass }}
+  claimRef:
+    name: host-storage-pvc
+    namespace: {{ .Release.Namespace }}
   capacity:
     storage: {{ .Values.hostStorage }}
   accessModes:

This now gives the intended result

$ kubectl get pv core-volume
NAME          CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                      STORAGECLASS   REASON   AGE
core-volume   10Gi       RWO            Retain           Bound    observe/core-storage-pvc   hostclass               6m32s

$ kubectl get pv host-volume
NAME          CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                      STORAGECLASS   REASON   AGE
host-volume   1Gi        RWO            Retain           Bound    observe/host-storage-pvc   hostclass               6m42s

$ kubectl get pvc -n observe
NAME               STATUS   VOLUME        CAPACITY   ACCESS MODES   STORAGECLASS   AGE
core-storage-pvc   Bound    core-volume   10Gi       RWO            hostclass      6m55s
host-storage-pvc   Bound    host-volume   1Gi        RWO            hostclass      6m55s

And passes the integration tests.

.Release.namespace is picked up by helm template so it should work for you.
If your in agreement I'll commit and release.

from core-dump-handler.

No9 avatar No9 commented on May 31, 2024

Added to this branch https://github.com/IBM/core-dump-handler/tree/claim-ref

from core-dump-handler.

pkit avatar pkit commented on May 31, 2024

I think claimRef should work, yeah. Thanks!
Will test it later though, doing some different stuff rn.

from core-dump-handler.

pkit avatar pkit commented on May 31, 2024

Yup, works fine

from core-dump-handler.

No9 avatar No9 commented on May 31, 2024

Hey @pkit
Released in v8.1.1

from core-dump-handler.

pkit avatar pkit commented on May 31, 2024

Thanks!

from core-dump-handler.

Related Issues (20)

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.