update
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 }}