Add NONRTRIC Kong storage PV configuration flag 31/14331/1
authoraravind.est <aravindhan.a@est.tech>
Tue, 22 Apr 2025 11:07:07 +0000 (12:07 +0100)
committeraravind.est <aravindhan.a@est.tech>
Tue, 22 Apr 2025 11:07:07 +0000 (12:07 +0100)
Creating PV for kongstorage may not be necessary in all the target environments.
Kong storage PV should be created only when there is no default storage class is configured in the cluster

Issue-ID: NONRTRIC-1020
Change-Id: I180fdb7c634293869b8b22f8036b00109557c511
Signed-off-by: aravind.est <aravindhan.a@est.tech>
nonrtric/helm/kongstorage/templates/kongpv.yaml
nonrtric/helm/kongstorage/templates/kongpvc.yaml
nonrtric/helm/kongstorage/values.yaml
smo-install/helm-override/default/oran-override.yaml

index 1015a24..d96fcb1 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+#  Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
 #  ========================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
 #  limitations under the License.
 #  ============LICENSE_END=================================================
 #
+{{- if .Values.kongpv.enabled }}
 apiVersion: v1
 kind: PersistentVolume
 metadata:
@@ -28,3 +29,4 @@ spec:
   hostPath:
     path: "{{ .Values.kongpv.persistence.path }}"
   persistentVolumeReclaimPolicy: "{{ .Values.kongpv.persistence.volumeReclaimPolicy }}"
+{{- end }}
\ No newline at end of file
index 67fef19..1a8762d 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+#  Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
 #  ========================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -24,4 +24,6 @@ spec:
   resources:
     requests:
       storage: "{{ .Values.kongpvc.persistence.size }}"
+{{- if .Values.kongpv.enabled }}
   volumeName: kongpv
+{{- end }}
index e022b85..f05dfa4 100644 (file)
@@ -1,5 +1,5 @@
 #  ============LICENSE_START===============================================
-#  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+#  Copyright (C) 2024-2025 OpenInfra Foundation Europe. All rights reserved.
 #  ========================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
 # Default values for Kong PV and PVC
 
 kongpv:
-  enabled: true # Disabled for Minikube
+  # This enables/disables the PV creation for kong
+  # PV creation is necessary when there is no default storage class
+  # This should be set to false when there is a default storage class, Which lets the PVC provisions the PV dynamically.
+  enabled: true
   persistence:
     volumeReclaimPolicy: Delete
     accessMode: ReadWriteOnce
index c724693..949be9a 100644 (file)
@@ -81,6 +81,11 @@ kong:
     installCRDs: false
   admin:
     enabled: true
+  kongpv:
+    # This enables/disables the PV creation for kong
+    # PV creation is necessary when there is no default storage class
+    # This should be set to false when there is a default storage class, Which lets the PVC provisions the PV dynamically.
+    enabled: true
 
 controlpanel:
   ingress: