From 6fd30449e055756d3cc76af85f9966ca40f9f4dd Mon Sep 17 00:00:00 2001
From: Jan Krystof <jan.krystof@cesnet.cz>
Date: Wed, 2 Oct 2024 13:44:26 +0200
Subject: [PATCH 1/3] introducing a HTTP storage helm chart

---
 http-storage/templates/00-namespace.yaml | 4 ----
 http-storage/templates/deployment.yaml   | 1 -
 http-storage/templates/pvc.yaml          | 1 -
 http-storage/templates/service.yam       | 1 -
 http-storage/values.yaml                 | 3 ---
 5 files changed, 10 deletions(-)
 delete mode 100644 http-storage/templates/00-namespace.yaml

diff --git a/http-storage/templates/00-namespace.yaml b/http-storage/templates/00-namespace.yaml
deleted file mode 100644
index fb46db7..0000000
--- a/http-storage/templates/00-namespace.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-apiVersion: v1
-kind: Namespace
-metadata:
-  name: {{ .Values.namespace.name }}
diff --git a/http-storage/templates/deployment.yaml b/http-storage/templates/deployment.yaml
index a736fb0..6166b89 100644
--- a/http-storage/templates/deployment.yaml
+++ b/http-storage/templates/deployment.yaml
@@ -2,7 +2,6 @@ apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: http-storage
-  namespace: {{ .Values.namespace.name }}
   labels:
     {{- toYaml .Values.labels | nindent 4 }}
 spec:
diff --git a/http-storage/templates/pvc.yaml b/http-storage/templates/pvc.yaml
index 2529574..ef002f1 100644
--- a/http-storage/templates/pvc.yaml
+++ b/http-storage/templates/pvc.yaml
@@ -2,7 +2,6 @@ apiVersion: v1
 kind: PersistentVolumeClaim
 metadata:
   name: {{ .Values.name }}
-  namespace: {{ .Values.namespace.name }}
 spec:
   storageClassName: {{ .Values.persistence.storageClass }}
   accessModes:
diff --git a/http-storage/templates/service.yam b/http-storage/templates/service.yam
index a23df98..3f04f82 100644
--- a/http-storage/templates/service.yam
+++ b/http-storage/templates/service.yam
@@ -2,7 +2,6 @@ apiVersion: v1
 kind: Service
 metadata:
   name: service-http-storage
-  namespace: {{ .Values.namespace.name }}
 spec:
   type: NodePort
   selector:
diff --git a/http-storage/values.yaml b/http-storage/values.yaml
index 5794be2..b7a14f8 100644
--- a/http-storage/values.yaml
+++ b/http-storage/values.yaml
@@ -3,9 +3,6 @@ name: &app_name http-storage
 labels:
   app: *app_name
 
-namespace:
-  name: tests
-
 deployment:
   labels:
     app: *app_name
-- 
GitLab


From f15281fd185be1c55953341baa0be69a21181138 Mon Sep 17 00:00:00 2001
From: Jan Krystof <jan.krystof@cesnet.cz>
Date: Wed, 2 Oct 2024 13:45:03 +0200
Subject: [PATCH 2/3] introducing a HTTP storage helm chart

---
 http-storage/values.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/http-storage/values.yaml b/http-storage/values.yaml
index b7a14f8..bd760ef 100644
--- a/http-storage/values.yaml
+++ b/http-storage/values.yaml
@@ -6,12 +6,12 @@ labels:
 deployment:
   labels:
     app: *app_name
-
+    
 image:
   repository: registry.gitlab.ics.muni.cz:443/cloud/g2/custom-images/tools/http-storage
   tag: 0.1
   pullPolicy: Always
-
+  
 persistence:  
   storageClass: default
   size: default
-- 
GitLab


From 487dcfcfe95446ca7b840e80d22946dfbe797318 Mon Sep 17 00:00:00 2001
From: Jan Krystof <jan.krystof@cesnet.cz>
Date: Wed, 2 Oct 2024 17:54:57 +0200
Subject: [PATCH 3/3] introducing a HTTP storage helm chart

---
 http-storage/Chart.yaml            | 2 +-
 http-storage/templates/service.yam | 4 ++--
 http-storage/values.yaml           | 4 ++++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/http-storage/Chart.yaml b/http-storage/Chart.yaml
index 09f7b94..d73625b 100644
--- a/http-storage/Chart.yaml
+++ b/http-storage/Chart.yaml
@@ -1,3 +1,3 @@
 apiVersion: v1
 name: http-storage
-version: 0.1.0
+version: 0.1.1
diff --git a/http-storage/templates/service.yam b/http-storage/templates/service.yam
index 3f04f82..a9adeea 100644
--- a/http-storage/templates/service.yam
+++ b/http-storage/templates/service.yam
@@ -3,10 +3,10 @@ kind: Service
 metadata:
   name: service-http-storage
 spec:
-  type: NodePort
+  type: {{ .Values.service.type }}
   selector:
     app: http-storage
   ports:
     - protocol: TCP
-      port: 80
+      port: {{ .Values.service.port }}
       targetPort: 8000
diff --git a/http-storage/values.yaml b/http-storage/values.yaml
index bd760ef..d79260b 100644
--- a/http-storage/values.yaml
+++ b/http-storage/values.yaml
@@ -15,3 +15,7 @@ image:
 persistence:  
   storageClass: default
   size: default
+
+service:
+  type: ClusterIP
+  port: ClusterIP
-- 
GitLab