port-allocator: allocates ports on preconfigured ingress-nginx
Replacement of /core/installer/tcp-udp-transport
Change-Id: I3d116b0f4508b462398f69e980ad55771dc88b7c
diff --git a/charts/port-allocator/.helmignore b/charts/port-allocator/.helmignore
new file mode 100644
index 0000000..0e8a0eb
--- /dev/null
+++ b/charts/port-allocator/.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/port-allocator/Chart.yaml b/charts/port-allocator/Chart.yaml
new file mode 100644
index 0000000..faeb616
--- /dev/null
+++ b/charts/port-allocator/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: port-allocator
+description: A Helm chart for PCloud port-allocator
+type: application
+version: 0.0.1
+appVersion: "0.0.1"
diff --git a/charts/port-allocator/templates/install.yaml b/charts/port-allocator/templates/install.yaml
new file mode 100644
index 0000000..ec7a144
--- /dev/null
+++ b/charts/port-allocator/templates/install.yaml
@@ -0,0 +1,60 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: ssh-key
+type: Opaque
+data:
+ private: {{ .Values.sshPrivateKey }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: port-allocator
+ namespace: {{ .Release.Namespace }}
+spec:
+ type: ClusterIP
+ selector:
+ app: port-allocator
+ ports:
+ - name: http
+ port: 80
+ targetPort: http
+ protocol: TCP
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: port-allocator
+ namespace: {{ .Release.Namespace }}
+spec:
+ selector:
+ matchLabels:
+ app: port-allocator
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: port-allocator
+ spec:
+ volumes:
+ - name: ssh-key
+ secret:
+ secretName: ssh-key
+ containers:
+ - name: port-allocator
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - name: http
+ containerPort: 8080
+ protocol: TCP
+ command:
+ - server
+ - --port=8080
+ - --repo-addr={{ .Values.repoAddr }}
+ - --ssh-key=/pcloud/ssh-key/private
+ - --ingress-nginx-path={{ .Values.ingressNginxPath }}
+ volumeMounts:
+ - name: ssh-key
+ readOnly: true
+ mountPath: /pcloud/ssh-key
diff --git a/charts/port-allocator/values.yaml b/charts/port-allocator/values.yaml
new file mode 100644
index 0000000..4cdcf67
--- /dev/null
+++ b/charts/port-allocator/values.yaml
@@ -0,0 +1,7 @@
+image:
+ repository: giolekva/port-allocator
+ tag: latest
+ pullPolicy: Always
+repoAddr: 192.168.0.11
+sshPrivateKey: key
+ingressNginxPath: /path/to/ingress.yaml