installer: welcome
diff --git a/charts/welcome/.helmignore b/charts/welcome/.helmignore
new file mode 100644
index 0000000..0e8a0eb
--- /dev/null
+++ b/charts/welcome/.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/welcome/Chart.yaml b/charts/welcome/Chart.yaml
new file mode 100644
index 0000000..ad3ce6d
--- /dev/null
+++ b/charts/welcome/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: welcome
+description: A Helm chart for PCloud welcome
+type: application
+version: 0.0.1
+appVersion: "0.0.1"
diff --git a/charts/welcome/templates/install.yaml b/charts/welcome/templates/install.yaml
new file mode 100644
index 0000000..9dd639a
--- /dev/null
+++ b/charts/welcome/templates/install.yaml
@@ -0,0 +1,86 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: ssh-key
+type: Opaque
+data:
+ private: {{ .Values.sshPrivateKey }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: welcome
+ namespace: {{ .Release.Namespace }}
+spec:
+ type: ClusterIP
+ selector:
+ app: welcome
+ ports:
+ - name: http
+ port: 80
+ targetPort: http
+ protocol: TCP
+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: ingress
+ namespace: {{ .Release.Namespace }}
+ annotations:
+ acme.cert-manager.io/http01-edit-in-place: "true"
+ cert-manager.io/cluster-issuer: {{ .Values.ingress.certificateIssuer}}
+spec:
+ ingressClassName: {{ .Values.ingress.className }}
+ tls:
+ - hosts:
+ - {{ .Values.ingress.domain }}
+ secretName: cert-welcome
+ rules:
+ - host: {{ .Values.ingress.domain }}
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: welcome
+ port:
+ name: http
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: welcome
+ namespace: {{ .Release.Namespace }}
+spec:
+ selector:
+ matchLabels:
+ app: welcome
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: welcome
+ spec:
+ volumes:
+ - name: ssh-key
+ secret:
+ secretName: ssh-key
+ containers:
+ - name: welcome
+ image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - name: http
+ containerPort: 8080
+ protocol: TCP
+ command:
+ - pcloud-installer
+ - welcome
+ - --repo-addr={{ .Values.repoAddr }}
+ - --ssh-key=/pcloud/ssh-key/private
+ - --port=8080
+ volumeMounts:
+ - name: ssh-key
+ readOnly: true
+ mountPath: /pcloud/ssh-key
diff --git a/charts/welcome/values.yaml b/charts/welcome/values.yaml
new file mode 100644
index 0000000..d83ffd1
--- /dev/null
+++ b/charts/welcome/values.yaml
@@ -0,0 +1,10 @@
+image:
+ repository: giolekva/pcloud-installer
+ tag: latest
+ pullPolicy: Always
+repoAddr: 192.168.0.11
+sshPrivateKey: key
+ingress:
+ className: pcloud-ingress-public
+ domain: welcome.example.com
+ certificateIssuer: example-public