From 52c0211436919628116065492f2a5566b7e4def1 Mon Sep 17 00:00:00 2001 From: Roman Pytkov Date: Wed, 22 Oct 2025 19:16:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 33 +++++++++++++++++++ help.txt | 12 ------- .../templates/certificate-issuer.yaml | 21 ------------ .../.helmignore | 0 {liquid-code-chart => liquid-code}/Chart.yaml | 2 +- .../Deployments/backend-deployment.yaml | 2 -- .../Deployments/frontend-deployment.yaml | 0 .../Deployments/queue-deployment.yaml | 0 .../templates/Services/backend-service.yaml | 0 .../templates/Services/frontend-service.yaml | 0 .../templates/Services/queue-service.yaml | 0 .../templates/default-ingress.yaml | 5 --- .../templates/pre-install-drob.yaml | 0 .../templates/pre-install-migration.yaml | 0 .../values.yaml | 3 +- 15 files changed, 35 insertions(+), 43 deletions(-) create mode 100644 README.md delete mode 100644 help.txt delete mode 100644 liquid-code-chart/templates/certificate-issuer.yaml rename {liquid-code-chart => liquid-code}/.helmignore (100%) rename {liquid-code-chart => liquid-code}/Chart.yaml (97%) rename {liquid-code-chart => liquid-code}/templates/Deployments/backend-deployment.yaml (93%) rename {liquid-code-chart => liquid-code}/templates/Deployments/frontend-deployment.yaml (100%) rename {liquid-code-chart => liquid-code}/templates/Deployments/queue-deployment.yaml (100%) rename {liquid-code-chart => liquid-code}/templates/Services/backend-service.yaml (100%) rename {liquid-code-chart => liquid-code}/templates/Services/frontend-service.yaml (100%) rename {liquid-code-chart => liquid-code}/templates/Services/queue-service.yaml (100%) rename {liquid-code-chart => liquid-code}/templates/default-ingress.yaml (85%) rename {liquid-code-chart => liquid-code}/templates/pre-install-drob.yaml (100%) rename {liquid-code-chart => liquid-code}/templates/pre-install-migration.yaml (100%) rename {liquid-code-chart => liquid-code}/values.yaml (91%) diff --git a/README.md b/README.md new file mode 100644 index 0000000..563c88c --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Установка + +## Установка первой ноды +``` +curl -sfL https://get.k3s.io | sh -s - --cluster-init --tls-san 10.90.90.99 +``` + +## Добавление серверной ноды +``` +curl -sfL https://get.k3s.io | K3S_TOKEN= K3S_URL=https://10.90.90.99:6443 sh -s - server --server https://10.90.90.99:6443 +``` + +## Добавление агента +``` +curl -sfL https://get.k3s.io | K3S_TOKEN= K3S_URL=https://10.90.90.99:6443 sh -s - agent --server https://10.90.90.99:6443 +``` + +# Секреты + +## JWT secrets +``` +kubectl create secret generic jwt-secrets \ + --from-literal=JWT_ISSUER="liquid" \ + --from-literal=JWT_AUDIENCE="audience"\ + --from-literal=JWT_SINGING_KEY="supersecretkey_supersecretkey_supersecretkey_supersecretkey" +``` + +## S3 secrets +``` +kubectl create secret generic s3-credentials \ + --from-literal=ACCESS_KEY_ID="accesskey" \ + --from-literal=ACCESS_SECRET_KEY="secretkey" +``` \ No newline at end of file diff --git a/help.txt b/help.txt deleted file mode 100644 index 12c6da5..0000000 --- a/help.txt +++ /dev/null @@ -1,12 +0,0 @@ -# For pull private dockerhub -``` -kubectl create secret docker-registry regcred --docker-server= --docker-username= --docker-password= --docker-email= -``` - -# For jwt secrets -``` -kubectl create secret generic jwt-secrets \ - --from-literal=JWT_ISSUER="liquid" \ - --from-literal=JWT_AUDIENCE="audience"\ - --from-literal=JWT_SINGING_KEY="supersecretkey_supersecretkey_supersecretkey_supersecretkey" -``` diff --git a/liquid-code-chart/templates/certificate-issuer.yaml b/liquid-code-chart/templates/certificate-issuer.yaml deleted file mode 100644 index a8491f0..0000000 --- a/liquid-code-chart/templates/certificate-issuer.yaml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: cert-manager.io/v1 -kind: Issuer -metadata: - name: {{ .Release.Name }}-certificate-issuer -spec: - acme: - {{ if .Values.staging }} - server: https://acme-staging-v02.api.letsencrypt.org/directory - {{ else }} - server: https://acme-v02.api.letsencrypt.org/directory - {{ end }} - # Email address used for ACME registration - email: mr.pytkov@gmail.com - # Name of a secret used to store the ACME account private key - privateKeySecretRef: - name: {{ .Release.Name }}-acme-private-key - # Enable the HTTP-01 challenge provider - solvers: - - http01: - ingress: - ingressClassName: traefik \ No newline at end of file diff --git a/liquid-code-chart/.helmignore b/liquid-code/.helmignore similarity index 100% rename from liquid-code-chart/.helmignore rename to liquid-code/.helmignore diff --git a/liquid-code-chart/Chart.yaml b/liquid-code/Chart.yaml similarity index 97% rename from liquid-code-chart/Chart.yaml rename to liquid-code/Chart.yaml index 4a360a9..c8d16be 100644 --- a/liquid-code-chart/Chart.yaml +++ b/liquid-code/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: liquid-code-chart +name: liquid-code description: A Helm chart for Kubernetes # A chart can be either an 'application' or a 'library' chart. diff --git a/liquid-code-chart/templates/Deployments/backend-deployment.yaml b/liquid-code/templates/Deployments/backend-deployment.yaml similarity index 93% rename from liquid-code-chart/templates/Deployments/backend-deployment.yaml rename to liquid-code/templates/Deployments/backend-deployment.yaml index 11efc6d..afcca0f 100644 --- a/liquid-code-chart/templates/Deployments/backend-deployment.yaml +++ b/liquid-code/templates/Deployments/backend-deployment.yaml @@ -25,8 +25,6 @@ spec: value: {{ required "s3 endpoint!" .Values.s3.endpointUrl | quote }} - name: S3_PRIVATE_BUCKET value: {{ required "privateBucket!" .Values.s3.privateBucket | quote }} - - name: S3_PUBLIC_BUCKET - value: {{ required "publicBucket!" .Values.s3.publicBucket | quote }} - name: S3_ACCESS_KEY valueFrom: secretKeyRef: diff --git a/liquid-code-chart/templates/Deployments/frontend-deployment.yaml b/liquid-code/templates/Deployments/frontend-deployment.yaml similarity index 100% rename from liquid-code-chart/templates/Deployments/frontend-deployment.yaml rename to liquid-code/templates/Deployments/frontend-deployment.yaml diff --git a/liquid-code-chart/templates/Deployments/queue-deployment.yaml b/liquid-code/templates/Deployments/queue-deployment.yaml similarity index 100% rename from liquid-code-chart/templates/Deployments/queue-deployment.yaml rename to liquid-code/templates/Deployments/queue-deployment.yaml diff --git a/liquid-code-chart/templates/Services/backend-service.yaml b/liquid-code/templates/Services/backend-service.yaml similarity index 100% rename from liquid-code-chart/templates/Services/backend-service.yaml rename to liquid-code/templates/Services/backend-service.yaml diff --git a/liquid-code-chart/templates/Services/frontend-service.yaml b/liquid-code/templates/Services/frontend-service.yaml similarity index 100% rename from liquid-code-chart/templates/Services/frontend-service.yaml rename to liquid-code/templates/Services/frontend-service.yaml diff --git a/liquid-code-chart/templates/Services/queue-service.yaml b/liquid-code/templates/Services/queue-service.yaml similarity index 100% rename from liquid-code-chart/templates/Services/queue-service.yaml rename to liquid-code/templates/Services/queue-service.yaml diff --git a/liquid-code-chart/templates/default-ingress.yaml b/liquid-code/templates/default-ingress.yaml similarity index 85% rename from liquid-code-chart/templates/default-ingress.yaml rename to liquid-code/templates/default-ingress.yaml index dfb42e3..41fdb5b 100644 --- a/liquid-code-chart/templates/default-ingress.yaml +++ b/liquid-code/templates/default-ingress.yaml @@ -5,11 +5,6 @@ metadata: annotations: cert-manager.io/issuer: "{{ .Release.Name }}-certificate-issuer" spec: - tls: - - hosts: - - liquidcode.ru - - api.liquidcode.ru - secretName: {{ .Release.Name }}-tls-secret rules: - host: api.liquidcode.ru http: diff --git a/liquid-code-chart/templates/pre-install-drob.yaml b/liquid-code/templates/pre-install-drob.yaml similarity index 100% rename from liquid-code-chart/templates/pre-install-drob.yaml rename to liquid-code/templates/pre-install-drob.yaml diff --git a/liquid-code-chart/templates/pre-install-migration.yaml b/liquid-code/templates/pre-install-migration.yaml similarity index 100% rename from liquid-code-chart/templates/pre-install-migration.yaml rename to liquid-code/templates/pre-install-migration.yaml diff --git a/liquid-code-chart/values.yaml b/liquid-code/values.yaml similarity index 91% rename from liquid-code-chart/values.yaml rename to liquid-code/values.yaml index 44811fa..302f6a8 100644 --- a/liquid-code-chart/values.yaml +++ b/liquid-code/values.yaml @@ -9,8 +9,7 @@ jwt: database: secretName: liquid-db-app migrateDb: true - dropDb: false -staging: true + dropDb: true frontend: enable: false queue: