update
diff --git a/charts/url-shortener/.helmignore b/charts/url-shortener/.helmignore
new file mode 100644
index 0000000..0e8a0eb
--- /dev/null
+++ b/charts/url-shortener/.helmignore
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/charts/url-shortener/Chart.yaml b/charts/url-shortener/Chart.yaml
new file mode 100644
index 0000000..bb2151d
--- /dev/null
+++ b/charts/url-shortener/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: url-shortener
+description: A Helm chart for URL shortener application
+type: application
+version: 0.0.1
+appVersion: "0.0.1"
diff --git a/charts/url-shortener/templates/install.yaml b/charts/url-shortener/templates/install.yaml
new file mode 100644
index 0000000..a0fc858
--- /dev/null
+++ b/charts/url-shortener/templates/install.yaml
@@ -0,0 +1,49 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: url-shortener
+ namespace: {{ .Release.Namespace }}
+spec:
+ type: ClusterIP
+ selector:
+ app: url-shortener
+ ports:
+ - name: {{ .Values.portName }}
+ protocol: TCP
+ port: 80
+ targetPort: {{ .Values.portName }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: url-shortener
+ namespace: {{ .Release.Namespace }}
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: url-shortener
+ template:
+ metadata:
+ labels:
+ app: url-shortener
+ spec:
+ containers:
+ - name: url-shortener
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
+ ports:
+ - name: {{ .Values.portName }}
+ containerPort: 8080
+ protocol: TCP
+ command:
+ - url-shortener
+ - --port=8080
+ - --db-path=/data/urls.db
+ - --require-auth={{ .Values.requireAuth }}
+ volumeMounts:
+ - name: url-shortener
+ mountPath: /data
+ volumes:
+ - name: url-shortener
+ persistentVolumeClaim:
+ claimName: url-shortener
diff --git a/charts/url-shortener/templates/volume.yaml b/charts/url-shortener/templates/volume.yaml
new file mode 100644
index 0000000..992e601
--- /dev/null
+++ b/charts/url-shortener/templates/volume.yaml
@@ -0,0 +1,11 @@
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: url-shortener
+ namespace: {{ .Release.Namespace }}
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: {{ .Values.storage.size }}
diff --git a/charts/url-shortener/values.yaml b/charts/url-shortener/values.yaml
new file mode 100644
index 0000000..dd3da7d
--- /dev/null
+++ b/charts/url-shortener/values.yaml
@@ -0,0 +1,8 @@
+image:
+ repository: giolekva/url-shortener
+ tag: latest
+ pullPolicy: Always
+storage:
+ size: 1Gi
+portName: http
+requireAuth: false