feat: add docs and cabinet apps, fix data-test chart
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
apiVersion: v2
|
||||
name: cabinet
|
||||
description: Symfony personal cabinet (LK)
|
||||
type: application
|
||||
version: 0.1.0
|
||||
@@ -0,0 +1,180 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: cabinet-env
|
||||
namespace: {{ .Values.namespace }}
|
||||
annotations:
|
||||
helm.sh/hook: pre-install,pre-upgrade
|
||||
helm.sh/hook-weight: "-10"
|
||||
helm.sh/hook-delete-policy: before-hook-creation
|
||||
type: Opaque
|
||||
stringData:
|
||||
{{- range $key, $val := .Values.secrets }}
|
||||
{{ $key }}: {{ $val | quote }}
|
||||
{{- end }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cabinet-nginx-config
|
||||
namespace: {{ .Values.namespace }}
|
||||
data:
|
||||
default.conf: |
|
||||
server {
|
||||
listen 8080;
|
||||
server_name _;
|
||||
root /app/public;
|
||||
index index.php;
|
||||
client_max_body_size 108M;
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|css|js|svg|woff2)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
access_log off;
|
||||
try_files $uri =404;
|
||||
}
|
||||
location ~ ^/index\.php(/|$) {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
fastcgi_param HTTP_PROXY "";
|
||||
internal;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: cabinet
|
||||
namespace: {{ .Values.namespace }}
|
||||
labels:
|
||||
app: cabinet
|
||||
env: test
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: cabinet
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: cabinet
|
||||
env: test
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: php-fpm
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: 9000
|
||||
name: fpm
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: cabinet-env
|
||||
env:
|
||||
{{- range $key, $val := .Values.env }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: app-public
|
||||
mountPath: /app/public
|
||||
- name: var-cache
|
||||
mountPath: /app/var/cache
|
||||
- name: var-log
|
||||
mountPath: /app/var/log
|
||||
resources:
|
||||
{{- toYaml .Values.resources.php | nindent 12 }}
|
||||
- name: nginx
|
||||
image: {{ .Values.nginx.image }}
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: app-public
|
||||
mountPath: /app/public
|
||||
readOnly: true
|
||||
- name: nginx-config
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
resources:
|
||||
{{- toYaml .Values.resources.nginx | nindent 12 }}
|
||||
initContainers:
|
||||
- name: warmup-cache
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
command: ["php", "bin/console", "cache:warmup", "--env=prod"]
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: cabinet-env
|
||||
env:
|
||||
{{- range $key, $val := .Values.env }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $val | quote }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: var-cache
|
||||
mountPath: /app/var/cache
|
||||
- name: var-log
|
||||
mountPath: /app/var/log
|
||||
- name: copy-public
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
command: ["sh", "-c", "cp -a /app/public/. /public/"]
|
||||
volumeMounts:
|
||||
- name: app-public
|
||||
mountPath: /public
|
||||
volumes:
|
||||
- name: app-public
|
||||
emptyDir: {}
|
||||
- name: nginx-config
|
||||
configMap:
|
||||
name: cabinet-nginx-config
|
||||
- name: var-cache
|
||||
emptyDir: {}
|
||||
- name: var-log
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: cabinet
|
||||
namespace: {{ .Values.namespace }}
|
||||
spec:
|
||||
selector:
|
||||
app: cabinet
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
---
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: cabinet
|
||||
namespace: {{ .Values.namespace }}
|
||||
spec:
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
rules:
|
||||
- host: {{ .Values.ingress.host }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: cabinet
|
||||
port:
|
||||
number: 80
|
||||
{{- end }}
|
||||
@@ -0,0 +1,8 @@
|
||||
ingress:
|
||||
host: cabinet.test.sova.local
|
||||
image:
|
||||
tag: cabinet-v1.0.1-test
|
||||
pullPolicy: IfNotPresent
|
||||
repository: git.sova.local/sova/cabinet
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry
|
||||
@@ -0,0 +1,59 @@
|
||||
namespace: sova-test
|
||||
|
||||
image:
|
||||
repository: sova-cabinet
|
||||
tag: local-test
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
imagePullSecrets: []
|
||||
|
||||
nginx:
|
||||
image: nginx:1.27-alpine
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
host: cabinet.test.sova.local
|
||||
|
||||
resources:
|
||||
php:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
nginx:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 128Mi
|
||||
|
||||
env:
|
||||
APP_ENV: prod
|
||||
APP_DEBUG: "0"
|
||||
TRUSTED_PROXIES: "127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
|
||||
TRUSTED_HEADERS: '["x-forwarded-for","x-forwarded-host","x-forwarded-proto","x-forwarded-port","x-forwarded-prefix"]'
|
||||
MIS: http://mis-mock.sova-mocks.svc.cluster.local:8080
|
||||
BITRIX24_URL: http://mis-mock.sova-mocks.svc.cluster.local:8080/rest/noop
|
||||
TECH_MAINTENANCE: "false"
|
||||
CORS_ALLOW_ORIGIN: "^https?://(cabinet\\.test\\.sova\\.local|localhost)(:[0-9]+)?$"
|
||||
|
||||
secrets:
|
||||
APP_SECRET: change-me-cabinet-test-secret
|
||||
DATABASE_URL: postgresql://sova_test:sova_test_pass@postgresql-test.sova-data-test.svc.cluster.local:5432/sova_cabinet_test?serverVersion=16&charset=utf8
|
||||
DATABASE_BITRIX_URL: mysql://bitrix_test:bitrix_test_pass@mysql-bitrix-test.sova-data-test.svc.cluster.local:3306/sova_bitrix_test?serverVersion=8.0
|
||||
REDIS_URL: redis://:redis_test_pass@redis-test-master.sova-data-test.svc.cluster.local:6379/1
|
||||
MAILER_DSN: smtp://mailpit.sova-mocks.svc.cluster.local:1025
|
||||
SMSRU_KEY_API: noop
|
||||
SMSRU_FROM_SOVAMED: noop
|
||||
SMS4B_TOKEN: noop
|
||||
SMS4B_FROM_WMTMED: noop
|
||||
SMARTCAPTCHA_SERVER_KEY: test-key
|
||||
|
||||
migrate:
|
||||
enabled: false
|
||||
@@ -0,0 +1,5 @@
|
||||
apiVersion: v2
|
||||
name: docs
|
||||
description: Static documentation site for Sova test contour
|
||||
type: application
|
||||
version: 0.1.0
|
||||
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: docs
|
||||
namespace: {{ .Values.namespace }}
|
||||
labels:
|
||||
app: docs
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: docs
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: docs
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: docs
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: docs
|
||||
namespace: {{ .Values.namespace }}
|
||||
spec:
|
||||
selector:
|
||||
app: docs
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
---
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: docs
|
||||
namespace: {{ .Values.namespace }}
|
||||
spec:
|
||||
ingressClassName: {{ .Values.ingress.className }}
|
||||
rules:
|
||||
- host: {{ .Values.ingress.host }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: docs
|
||||
port:
|
||||
number: 80
|
||||
{{- end }}
|
||||
@@ -0,0 +1,8 @@
|
||||
ingress:
|
||||
host: docs.sova.local
|
||||
image:
|
||||
tag: docs-v1.0.1-test
|
||||
pullPolicy: IfNotPresent
|
||||
repository: git.sova.local/sova/docs
|
||||
imagePullSecrets:
|
||||
- name: gitea-registry
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace: sova-test
|
||||
|
||||
image:
|
||||
repository: sova-docs
|
||||
tag: local-test
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
imagePullSecrets: []
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
host: docs.sova.local
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
Reference in New Issue
Block a user