diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..f5c5fea
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,7 @@
+FROM docker.io/nginx:1.27-alpine
+
+COPY index.html /usr/share/nginx/html/index.html
+COPY nginx.conf /etc/nginx/conf.d/default.conf
+
+
+EXPOSE 80
diff --git a/helm/Chart.yaml b/helm/Chart.yaml
new file mode 100644
index 0000000..36bb104
--- /dev/null
+++ b/helm/Chart.yaml
@@ -0,0 +1,6 @@
+apiVersion: v2
+name: test-front
+description: Test-Front — техпульт Binary Rocket (HTML/JS), статика
+type: application
+version: "9.9.9"
+appVersion: "9.9.9"
diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml
new file mode 100644
index 0000000..c4beee3
--- /dev/null
+++ b/helm/templates/deployment.yaml
@@ -0,0 +1,52 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: "{{ $.Release.Name }}-{{ $.Chart.Name }}"
+ labels:
+ app.kubernetes.io/name: {{ $.Chart.Name }}
+ app.kubernetes.io/instance: {{ $.Release.Name }}
+ app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}
+spec:
+ replicas: {{ $.Values.replicaCount }}
+ selector:
+ matchLabels:
+ app.kubernetes.io/name: {{ $.Chart.Name }}
+ app.kubernetes.io/instance: {{ $.Release.Name }}
+ template:
+ metadata:
+ labels:
+ app.kubernetes.io/name: {{ $.Chart.Name }}
+ app.kubernetes.io/instance: {{ $.Release.Name }}
+ spec:
+ {{- with $.Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ securityContext:
+ {{- toYaml $.Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ $.Chart.Name }}
+ securityContext:
+ {{- toYaml $.Values.securityContext | nindent 12 }}
+ image: "{{ $.Values.image.name }}:{{ default $.Chart.AppVersion $.Values.image.tag }}"
+ imagePullPolicy: {{ $.Values.image.pullPolicy }}
+ ports:
+ - name: http
+ containerPort: {{ $.Values.port }}
+ protocol: TCP
+ livenessProbe:
+ httpGet:
+ path: /
+ port: http
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ readinessProbe:
+ httpGet:
+ path: /
+ port: http
+ initialDelaySeconds: 3
+ periodSeconds: 10
+ {{- if $.Values.resources }}
+ resources:
+ {{- toYaml $.Values.resources | nindent 12 }}
+ {{- end }}
diff --git a/helm/templates/ingress.yaml b/helm/templates/ingress.yaml
new file mode 100644
index 0000000..7c9e744
--- /dev/null
+++ b/helm/templates/ingress.yaml
@@ -0,0 +1,31 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: "{{ $.Release.Name }}-{{ $.Chart.Name }}"
+ annotations: {}
+spec:
+ rules:
+ - host: {{ .Values.ingress.host }}
+ http:
+ paths:
+ - path: /api
+ pathType: Prefix
+ backend:
+ service:
+ name: {{ $.Values.gateway.serviceName }}
+ port:
+ number: {{ $.Values.gateway.port }}
+ - path: /ws
+ pathType: Prefix
+ backend:
+ service:
+ name: {{ $.Values.gateway.serviceName }}
+ port:
+ number: {{ $.Values.gateway.port }}
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: "{{ $.Release.Name }}-{{ $.Chart.Name }}"
+ port:
+ number: {{ $.Values.port }}
diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml
new file mode 100644
index 0000000..2d192db
--- /dev/null
+++ b/helm/templates/service.yaml
@@ -0,0 +1,17 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: "{{ $.Release.Name }}-{{ $.Chart.Name }}"
+ labels:
+ app.kubernetes.io/name: {{ $.Chart.Name }}
+ app.kubernetes.io/instance: {{ $.Release.Name }}
+spec:
+ type: ClusterIP
+ ports:
+ - name: http
+ port: {{ $.Values.port }}
+ targetPort: http
+ protocol: TCP
+ selector:
+ app.kubernetes.io/name: {{ $.Chart.Name }}
+ app.kubernetes.io/instance: {{ $.Release.Name }}
diff --git a/helm/values.yaml b/helm/values.yaml
new file mode 100644
index 0000000..e93f081
--- /dev/null
+++ b/helm/values.yaml
@@ -0,0 +1,26 @@
+replicaCount: 1
+
+image:
+ name: 'images.binom.pw/smart/test-front'
+ pullPolicy: IfNotPresent
+
+imagePullSecrets:
+ - name: regcred
+
+port: 80
+
+ingress:
+ # Один домен на два контейнера: / -> эта статика, /api и /ws -> шлюз.
+ # Разные пути в одном Ingress нельзя (nginx-ingress-контроллер не умеет),
+ # поэтому ингресс фронта обслуживает только `/`, а шлюз подключается
+ # вторым IngressObject с тем же host и path /api, /ws.
+ host: testfront.binom.pw
+ enabled: true
+
+# Второй бэкенд (шлюз) — в другом релизе/чарте, но на том же хосте.
+gateway:
+ enabled: true
+ serviceName: testfront-gateway-smart-updown-relayer
+ port: 8895
+
+resources: {}
diff --git a/index.html b/index.html
index 1168038..6e459fb 100644
--- a/index.html
+++ b/index.html
@@ -23,6 +23,22 @@
Binary Rocket :: техтест через HTTP-шлюз (фантики, без Phantom)
+
+