{"id":478482,"date":"2026-05-04T09:36:34","date_gmt":"2026-05-04T09:36:34","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=478482"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=478482","title":{"rendered":"\u041a\u0430\u043a \u043c\u044b \u043f\u043e\u0439\u043c\u0430\u043b\u0438 drift \u0432 Kubernetes \u0438 \u0437\u0430\u0447\u0435\u043c \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0448\u043b\u0438 \u043d\u0430 GitOps"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u043e \u0431\u044b\u043b \u043d\u0435 \u043d\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442 \u0438 \u043d\u0435 \u0440\u0435\u043b\u0438\u0437 \u043f\u043e\u0434 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0434\u0435\u043d\u044c, \u043f\u043b\u0430\u043d\u043e\u0432\u0430\u044f \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u0434\u043d\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0443\u0436\u0435 \u043d\u0438\u0436\u0435 \u043f\u0438\u043a\u0430. \u0421\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439: \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e Deployment\u2019\u043e\u0432, PostgreSQL, PgBouncer, Redis, \u0444\u043e\u043d\u043e\u0432\u044b\u0435 workers, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 CronJob\u2019\u044b, Helm chart \u0441 values \u043f\u043e\u0434 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0414\u0435\u043f\u043b\u043e\u0439 \u0442\u043e\u0433\u0434\u0430 \u0431\u044b\u043b \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u043e: GitLab CI \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u043b \u0442\u0435\u0441\u0442\u044b, \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043e\u0431\u0440\u0430\u0437, \u043f\u0443\u0448\u0438\u043b \u0435\u0433\u043e \u0432 registry \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b <code>helm upgrade<\/code>.<\/p>\n<p>\u0421\u0445\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"yaml\">deploy:prod:  stage: deploy  image: alpine\/helm:3.14.0  script:    - helm upgrade --install users-api .\/helm\/users-api      --namespace users      --values .\/helm\/users-api\/values-prod.yaml      --set image.tag=${CI_COMMIT_SHA}      --atomic      --timeout 5m  only:    - main<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0430 \u0431\u0443\u043c\u0430\u0433\u0435 \u0432\u0441\u0451 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. <code>--atomic<\/code> \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u0440\u0435\u043b\u0438\u0437, \u0435\u0441\u043b\u0438 Helm \u043d\u0435 \u0434\u043e\u0436\u0434\u0451\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u0423 CI \u0431\u044b\u043b kubeconfig \u0432 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0414\u043e Kubernetes API \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0440\u0430\u043d\u043d\u0435\u0440\u044b. \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043b\u0435\u0436\u0430\u043b\u0430 \u0432 values. \u041d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0442\u0438\u043f\u043e\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0436\u0438\u0432\u0451\u0442 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p>\u0412\u0430\u0436\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441: <code>--atomic<\/code> \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c production rollback-\u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c. \u041e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e Helm \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c upgrade. \u0415\u0441\u043b\u0438 Kubernetes \u0443\u0441\u043f\u0435\u043b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c rollout \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c, \u0430 \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0437\u0436\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u043c\u0435\u0442\u0440\u0438\u043a, \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0435\u043b\u0451\u043d\u044b\u043c.<\/p>\n<p>\u0422\u0430\u043a \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043f\u0440\u043e\u0448\u0451\u043b \u0437\u0435\u043b\u0451\u043d\u044b\u043c. \u041e\u0431\u0440\u0430\u0437 \u0441\u043e\u0431\u0440\u0430\u043b\u0441\u044f, \u0447\u0430\u0440\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 ReplicaSet. \u0427\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u0437\u0430\u0433\u043e\u0440\u0435\u043b\u0438\u0441\u044c \u0430\u043b\u0435\u0440\u0442\u044b: \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u0434\u043e\u043b\u044f 5xx, \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0433\u043e\u0440\u0430\u043d\u0438\u0435 SLO-\u0431\u044e\u0434\u0436\u0435\u0442\u0430, readiness \u0443 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0434\u043e\u0432 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b. \u0421\u043d\u0430\u0440\u0443\u0436\u0438 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043a\u0430\u043a \u0440\u0435\u0433\u0440\u0435\u0441\u0441 \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041c\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0442\u0435\u0433 \u043e\u0431\u0440\u0430\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432.<\/p>\n<p>\u0418 \u0442\u0443\u0442 \u0432\u0441\u0451 \u0441\u0442\u0430\u043b\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c: \u0441\u0442\u0430\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u043e\u0434\u043d\u044f\u043b\u0430\u0441\u044c. \u0422\u043e\u0447\u043d\u0435\u0435, \u043e\u043d\u0430 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c. Pod \u0443\u0445\u043e\u0434\u0438\u043b \u0432 <code>CrashLoopBackOff<\/code>, \u0432 \u043b\u043e\u0433\u0430\u0445 \u0431\u044b\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u0434\u0430\u043b\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u043e \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041b\u043e\u0433\u0438 \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u043c\u0438:<\/p>\n<pre><code>failed to initialize storage:  pq: password authentication failed for user \"users_app\"ordial tcp: lookup pg-users.prod.svc.cluster.local: no such host<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0448\u044c \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438: \u0436\u0438\u0432 \u043b\u0438 endpoint \u0431\u0430\u0437\u044b, \u0435\u0441\u0442\u044c \u043b\u0438 \u0437\u0430 \u043d\u0438\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e\u0434\u043e\u0432, \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0441\u044f \u043b\u0438 Secret, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 pod\u2019\u0435 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 Helm values, \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 admission-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f \u043b\u0438 pull \u043e\u0431\u0440\u0430\u0437\u0430, \u043d\u0435 \u0443\u043f\u0430\u043b \u043b\u0438 sidecar. \u041f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u00ab\u0431\u0438\u0442\u044b\u043c \u0440\u0435\u043b\u0438\u0437\u043e\u043c\u00bb \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u044b\u043f\u0430\u0442\u044c\u0441\u044f. \u041e\u0431\u0440\u0430\u0437\u044b \u0431\u044b\u043b\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438. Secret \u043d\u0435 \u0440\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412 Git \u0432 <code>values-prod.yaml<\/code> \u043b\u0435\u0436\u0430\u043b\u043e \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u0432 \u0436\u0438\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0434\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u0431\u044b\u043b\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>DB_HOST<\/code>. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u043c, \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441 \u0445\u043e\u0434\u0438\u043b \u043d\u0435 \u0432 \u0442\u043e\u0442 endpoint, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<p><code>DB_HOST<\/code> \u0443 \u043d\u0430\u0441 \u043f\u043e\u043f\u0430\u0434\u0430\u043b \u0432 pod \u0447\u0435\u0440\u0435\u0437 ConfigMap <code>users-api-env<\/code>: Helm \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043b \u044d\u0442\u043e\u0442 ConfigMap \u0438\u0437 <code>values-prod.yaml<\/code>, \u0430 Deployment \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u043b \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 <code>envFrom<\/code>. \u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u0434\u0430\u0432\u043d\u043e, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 PgBouncer, \u044d\u0442\u043e\u0442 ConfigMap \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0440\u0443\u043a\u0430\u043c\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 production namespace \u0447\u0435\u0440\u0435\u0437 <code>kubectl edit<\/code>. \u0412 Git \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u043e \u0438 \u0447\u0430\u0441\u0442\u044c\u044e Helm release \u043d\u0435 \u0441\u0442\u0430\u043b\u043e. \u0412 \u0438\u0442\u043e\u0433\u0435 live object \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438 desired state \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0440\u0430\u0437\u043e\u0448\u043b\u0438\u0441\u044c.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448 production \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u0432 Git.<\/p>\n<p>\u0410 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043b pod\u2019\u044b. \u041e\u043d\u0438 \u0432\u0437\u044f\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u0437 chart\u2019\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0438\u0437 Git, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u00ab\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439\u00bb \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f <code>DB_HOST<\/code>. \u0422\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0442 <code>DB_HOST<\/code> \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u0431\u044b\u043b \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e production, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0443\u043f\u0430\u043b\u0430. \u0410 rollback image tag \u043d\u0435 \u043f\u043e\u043c\u043e\u0433, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u043d\u0435 \u0432 \u043e\u0431\u0440\u0430\u0437\u0435. \u0421\u0442\u0430\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u0430 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438\u0437 Git \u0438 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043f\u0430\u0434\u0430\u043b\u0430.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043d\u0430\u0441 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0440\u0435\u043d\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u00ab\u0440\u0435\u043b\u0438\u0437 \u0441\u043b\u043e\u043c\u0430\u043b \u0441\u0435\u0440\u0432\u0438\u0441\u00bb. \u0421\u0430\u043c \u0440\u0435\u043b\u0438\u0437 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u043b. \u041e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u044f\u0432\u0438\u043b \u0440\u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d \u043c\u0435\u0436\u0434\u0443 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0438\u0437 Git \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.<\/p>\n<h3>\u0427\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430<\/h3>\n<p>\u041f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0431\u044b\u043b\u043e \u043d\u0435 \u00ab\u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c GitOps\u00bb, \u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441. \u041c\u044b \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0438 \u0435\u0433\u043e \u0441 Git \u0438 \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435, \u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u044c ConfigMap \u0440\u0443\u043a\u0430\u043c\u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437, \u0430 \u0432\u043d\u0435\u0441\u0442\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0440\u043e\u0434\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0443 \u0443\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d.<\/p>\n<p>\u0414\u0430, \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0440\u0443\u0447\u043d\u043e\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u041d\u043e \u043c\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0446\u0435\u043d\u0443 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u0430\u0432\u043a\u0438. \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0442\u0440\u0430\u043d\u043d\u043e.<\/p>\n<p>\u041c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 MR \u0432 infra repo:<\/p>\n<pre><code class=\"diff\"> env:-  DB_HOST: \"pgbouncer.users.svc.cluster.local\"+  DB_HOST: \"pgbouncer-primary.users.svc.cluster.local\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0434 merge \u043c\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 service name \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 production namespace, \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0436\u0438\u0432\u044b\u0435 endpoints \u0438 \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0434\u0451\u0442 \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 PgBouncer-\u043f\u0443\u043b\u0443. \u041f\u043e\u0441\u043b\u0435 merge pipeline \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b chart, pod\u2019\u044b \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043b\u0438\u0441\u044c \u0438 readiness \u043d\u0430\u0447\u0430\u043b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c, \u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0438\u0441\u0447\u0435\u0437\u043b\u0438.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c Deployment\u2019\u0430. \u041c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 health endpoint, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439, \u043f\u0443\u043b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a PostgreSQL \u0438 \u0444\u043e\u043d\u043e\u0432\u044b\u0435 workers. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: Kubernetes readiness \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e pod \u0433\u043e\u0442\u043e\u0432 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u0442\u0435\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0441\u0430\u043c\u0438 \u043e\u043f\u0438\u0441\u0430\u043b\u0438. \u041e\u043d \u043d\u0435 \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0436\u0438\u0432\u044b. \u0423 \u043d\u0430\u0441 readiness \u0431\u044b\u043b \u0437\u0430\u0432\u044f\u0437\u0430\u043d \u043d\u0430 HTTP endpoint, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435, \u043d\u043e \u043e\u043d \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u043c\u044b \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b\u0438, \u043d\u043e \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c readiness \u0432 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 synthetic test. \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u0442\u044f\u0436\u0451\u043b\u0430\u044f readiness-\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0430\u043c\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f, \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 postmortem. \u0418 \u0442\u0430\u043c \u0441\u0442\u0430\u043b\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 ConfigMap.<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0430\u0431\u044b\u0445 \u043c\u0435\u0441\u0442.<\/p>\n<p>CI \u0438\u043c\u0435\u043b \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a production-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443. Kubeconfig \u043b\u0435\u0436\u0430\u043b \u0432 GitLab CI variables. \u0414\u0430, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u043c\u0438 \u0438 \u0441\u043a\u0440\u044b\u0442\u044b\u043c\u0438. \u0414\u0430, \u0434\u043e\u0441\u0442\u0443\u043f \u0431\u044b\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0443 production job\u2019\u044b. \u041d\u043e \u043f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u044b\u043b \u043a\u043b\u044e\u0447 \u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 production.<\/p>\n<p>Production API server \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f runner\u2019\u043e\u0432. \u041c\u044b \u043f\u0440\u0438\u043a\u0440\u044b\u0432\u0430\u043b\u0438 \u044d\u0442\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043d\u043e \u0441\u0430\u043c\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a Kubernetes API \u0438\u0437 CI-\u0441\u0440\u0435\u0434\u044b.<\/p>\n<p>Git \u043d\u0435 \u0431\u044b\u043b \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043f\u0440\u0430\u0432\u0434\u044b. \u041e\u043d \u0431\u044b\u043b \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0434\u0443\u043c\u0430\u043b\u0438 \u043e production. \u0420\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0433\u043b\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u0438 \u043c\u044b \u0443\u0437\u043d\u0430\u0432\u0430\u043b\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435 pod\u2019\u043e\u0432 \u0438\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u0432\u0430\u0440\u0438\u0438.<\/p>\n<p>\u0423 \u043d\u0430\u0441 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 drift. \u041d\u0438\u043a\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b live-\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u0436\u0438\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0434\u043e\u043b\u0433\u043e.<\/p>\n<p>\u0418 \u0433\u043b\u0430\u0432\u043d\u043e\u0435: rollback \u0431\u044b\u043b \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u043c. \u041c\u044b \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u043b\u0438 image tag, \u043d\u043e \u043d\u0435 \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u043c \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 GitOps, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b\u0438 \u0440\u0443\u0447\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438\u00bb<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0439\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0443\u0442\u0451\u043c: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u0434\u0443\u0445\u0435 \u00ab\u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u044c production \u0440\u0443\u043a\u0430\u043c\u0438\u00bb, \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u0443 \u0447\u0430\u0441\u0442\u0438 \u043b\u044e\u0434\u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442 \u0432 runbook. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u043e \u043d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u041b\u044e\u0434\u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0443\u0447\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u043e\u0447\u044c\u044e, \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0440\u0438\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043c\u0435\u0442\u0440\u0438\u043a\u0430.<\/p>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u043b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432, \u043d\u043e \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<p>\u041c\u044b \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0446\u0435\u043b\u044c \u0442\u0430\u043a: production \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u0438\u0437 Git \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e. \u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u044f\u0434\u0440\u043e GitOps: \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0438 continuous reconciliation.<\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 Argo CD. \u041d\u043e \u043d\u0435 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. Flux \u0442\u043e\u0436\u0435 \u043c\u043e\u0433 \u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Argo CD \u0431\u044b\u043b \u043f\u0440\u043e\u0449\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e: UI, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044b <code>Synced<\/code> \/ <code>OutOfSync<\/code>, \u0432\u0438\u0434\u0438\u043c\u044b\u0439 diff, \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Helm \u0438 Kustomize. \u0418 \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e platform-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b, \u043d\u043e \u0438 backend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c: \u0432\u043e\u0442 \u0447\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 Git, \u0432\u043e\u0442 \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u0432\u043e\u0442 \u0433\u0434\u0435 \u043e\u043d\u043e \u0440\u0430\u0437\u044a\u0435\u0445\u0430\u043b\u043e\u0441\u044c.<br \/> \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u0431\u044b\u043b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d: \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 protected \u0438 masked, job \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f production. \u041d\u043e \u0441\u0443\u0442\u044c \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c: \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0439 CI-\u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043b\u0435\u0436\u0430\u043b credential, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043c\u0435\u043d\u044f\u0442\u044c production-\u043a\u043b\u0430\u0441\u0442\u0435\u0440.<br \/> \u041d\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0442\u0430\u043b\u0430 \u0442\u0430\u043a\u043e\u0439: GitLab CI \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0434\u0435\u043f\u043b\u043e\u0438\u0442 \u0432 Kubernetes. \u041e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0437, \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043f\u0443\u0448\u0438\u0442 \u043e\u0431\u0440\u0430\u0437 \u0432 registry \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 infra repo. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u043d\u044f\u0435\u0442 tag \u0432 values:<\/p>\n<pre><code class=\"yaml\">image:  repository: registry.example.com\/users-api  tag: \"9f4c2a1\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 Argo CD, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0441\u0430\u043c \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 Git \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0445. \u0412\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043b\u044e\u0441: \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u043d \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0438 \u043a Kubernetes API, \u043d\u0438 \u043a Argo CD API. CI\/CD \u0432 \u0442\u0430\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 Git, \u0430 deployment \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440.<\/p>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1kind: Applicationmetadata:  name: users-api  namespace: argocdspec:  project: production  source:    repoURL: https:\/\/git.example.com\/platform\/prod-manifests.git    targetRevision: main    path: services\/users-api    helm:      valueFiles:        - values-prod.yaml  destination:    server: https:\/\/kubernetes.default.svc    namespace: users  syncPolicy:    automated:      prune: false      selfHeal: false<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 <code>prune<\/code> \u0438 <code>selfHeal<\/code>.<\/p>\n<p>\u042d\u0442\u043e \u0432\u0430\u0436\u043d\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c. \u041e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<pre><code class=\"yaml\">syncPolicy:  automated:    prune: true    selfHeal: true<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e \u0432 \u0433\u0440\u044f\u0437\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u00ab\u043d\u0443\u0436\u043d\u044b\u043c\u00bb, \u0445\u043e\u0442\u044f \u0432 Git \u0435\u0433\u043e \u043d\u0435\u0442. \u041d\u0435 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e Argo CD \u043e\u043f\u0430\u0441\u043d\u044b\u0439, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0443\u0436\u0435 \u043d\u0430\u043a\u043e\u043f\u0438\u043b \u0443\u0441\u0442\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e.<\/p>\n<p>\u041c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 Argo CD \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b <code>OutOfSync<\/code>, \u043d\u043e \u043d\u0435 \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0432\u0441\u0451 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u042d\u0442\u043e \u0434\u0430\u043b\u043e \u043d\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439. \u0427\u0430\u0441\u0442\u044c \u0431\u044b\u043b\u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0439: runtime annotations, \u043f\u043e\u043b\u044f status, \u0432\u0435\u0449\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b. \u0427\u0430\u0441\u0442\u044c \u0431\u044b\u043b\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c \u043c\u0443\u0441\u043e\u0440\u043e\u043c: \u0441\u0442\u0430\u0440\u044b\u0435 ConfigMap, \u0437\u0430\u0431\u044b\u0442\u044b\u0435 Service, RoleBinding\u2019\u0438 \u043f\u043e\u0441\u043b\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 Ingress annotations, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u0432\u043d\u043e \u043d\u0430\u0434\u043e \u0431\u044b\u043b\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432 Git.<\/p>\n<p>\u0421\u0430\u043c\u044b\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043d\u0435 \u0441\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a, \u0430 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u0432\u043e\u043a\u0440\u0443\u0433 \u043d\u0435\u0433\u043e. \u041a\u0430\u0436\u0434\u043e\u0435 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c: \u044d\u0442\u043e \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430\u0434\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 Git; \u044d\u0442\u043e \u043c\u0443\u0441\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c; \u044d\u0442\u043e \u043f\u043e\u043b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u0435 GitOps, \u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440; \u044d\u0442\u043e \u0440\u0443\u0447\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u0437\u0430\u044f\u0432\u043a\u0443 \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 auto-sync \u0434\u043b\u044f \u0447\u0430\u0441\u0442\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432, \u043f\u043e\u0442\u043e\u043c self-heal, \u0438 \u0443\u0436\u0435 \u043f\u043e\u0437\u0436\u0435 \u2014 prune. \u041d\u0435 \u043d\u0430 \u0432\u0441\u0451\u043c \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u0441\u0440\u0430\u0437\u0443, \u0430 \u043f\u043e \u0433\u0440\u0443\u043f\u043f\u0430\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0441\u0442\u0430\u043b \u0431\u043b\u0438\u0436\u0435 \u043a \u0442\u0430\u043a\u043e\u043c\u0443:<\/p>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1kind: Applicationmetadata:  name: users-api  namespace: argocdspec:  project: production  source:    repoURL: https:\/\/git.example.com\/platform\/prod-manifests.git    targetRevision: main    path: services\/users-api    helm:      valueFiles:        - values-prod.yaml  destination:    server: https:\/\/kubernetes.default.svc    namespace: users  syncPolicy:    automated:      prune: true      selfHeal: true    syncOptions:      - CreateNamespace=false      - ApplyOutOfSyncOnly=true<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>selfHeal<\/code> \u0434\u043b\u044f \u043d\u0430\u0441 \u0431\u044b\u043b \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u0435\u043d. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442 ConfigMap \u0440\u0443\u043a\u0430\u043c\u0438, \u044d\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0436\u0438\u0442\u044c \u043f\u043e\u043b\u0433\u043e\u0434\u0430. \u041e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u0441\u0442\u0430\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c, \u043b\u0438\u0431\u043e \u0438\u0441\u0447\u0435\u0437\u043d\u0443\u0442\u044c. \u041a\u043e\u0433\u0434\u0430 Argo CD \u0432\u0438\u0434\u0438\u0442 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u043c\u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430\u043c\u0438 \u0432 Git \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u043d\u043e\u0432\u0430 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0410 <code>selfHeal<\/code> \u043a\u0430\u043a \u0440\u0430\u0437 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c\u0443 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<p><code>prune<\/code> \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u043b\u0438 \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u0435\u0435. \u041e\u043d \u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u044b\u0435 \u0438\u0437 Git \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0443\u0434\u0430\u043b\u044f\u043b\u0438\u0441\u044c \u0438\u0437 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0438\u043d\u0430\u0447\u0435 Git \u043d\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435: \u0432 \u043f\u0440\u043e\u0434\u0435 \u043c\u043e\u0433\u0443\u0442 \u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0442\u0430\u0440\u044b\u0435 ConfigMap, Service, RoleBinding \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443\u0436\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u043d\u0430\u0435\u0442. \u041d\u043e <code>prune<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u0440\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432 Git \u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u043e \u0447\u0442\u043e-\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0434 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c prune \u043c\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0448\u043b\u0438\u0441\u044c \u043f\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c \u0432 namespace \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u043a\u0442\u043e \u0437\u0430 \u0447\u0442\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442: \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 Helm, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440, \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0447\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<h3>\u0427\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u043e\u043a\u0440\u0443\u0433 GitOps<\/h3>\n<p>\u0421\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435 Argo CD \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0437\u0440\u0435\u043b\u043e\u0439. \u041e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0447\u0435\u0441\u0442\u043d\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0433\u0434\u0435 \u0443 \u0432\u0430\u0441 \u0431\u0435\u0441\u043f\u043e\u0440\u044f\u0434\u043e\u043a.<\/p>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043c\u044b \u0443\u0431\u0440\u0430\u043b\u0438, \u2014 kubeconfig \u0438\u0437 GitLab CI variables. CI \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u044b \u0432 production. \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0435\u043c\u0443 \u0445\u0432\u0430\u0442\u0430\u043b\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a registry. \u0414\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u043a\u043e\u043c\u043c\u0438\u0442 \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043e\u0442\u0430 \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0430\u043c\u0438. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435: CI \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442, Git \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, Argo CD \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e18\/71f\/d4e\/e1871fd4e0f2ceb08373646ad35130e4.jpg\" alt=\"\u0421\u0445\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043e\u0442 push-\u0434\u0435\u043f\u043b\u043e\u044f \u043a GitOps pull-\u043c\u043e\u0434\u0435\u043b\u0438\" title=\"\u0421\u0445\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043e\u0442 push-\u0434\u0435\u043f\u043b\u043e\u044f \u043a GitOps pull-\u043c\u043e\u0434\u0435\u043b\u0438\" width=\"1280\" height=\"658\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e18\/71f\/d4e\/e1871fd4e0f2ceb08373646ad35130e4.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e18\/71f\/d4e\/e1871fd4e0f2ceb08373646ad35130e4.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><strong>\u0421\u0445\u0435\u043c\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043e\u0442 push-\u0434\u0435\u043f\u043b\u043e\u044f \u043a GitOps pull-\u043c\u043e\u0434\u0435\u043b\u0438<\/strong><\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u0442\u043e\u0440\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 RBAC \u0434\u043b\u044f Argo CD. \u0411\u044b\u043b\u043e \u0431\u044b \u0433\u043b\u0443\u043f\u043e \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0430 \u0443 CI \u0438 \u0432\u044b\u0434\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u043f\u0440\u0430\u0432\u0430 GitOps-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 \u0431\u0435\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439. \u041c\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e Argo CD Projects: production-\u0441\u0435\u0440\u0432\u0438\u0441\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, platform-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 namespaces \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e. \u0414\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e application project \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b\u0438 cluster-scoped \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u043d\u0435 \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c <code>ClusterRole<\/code>, <code>MutatingWebhookConfiguration<\/code> \u0438\u043b\u0438 CRD. \u0415\u0441\u043b\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u043d\u0430 \u0432\u0435\u0441\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440, \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439\/platform-\u043f\u0440\u043e\u0446\u0435\u0441\u0441.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u043d\u0430\u0448\u0430 \u0438\u0434\u0435\u044f project-level \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1kind: AppProjectmetadata:  name: production-apps  namespace: argocdspec:  sourceRepos:    - https:\/\/git.example.com\/platform\/prod-manifests.git  destinations:    - namespace: users      server: https:\/\/kubernetes.default.svc    - namespace: billing      server: https:\/\/kubernetes.default.svc  clusterResourceWhitelist: []  namespaceResourceWhitelist:    - group: \"\"      kind: ConfigMap    - group: \"\"      kind: Secret    - group: \"\"      kind: Service    - group: apps      kind: Deployment    - group: networking.k8s.io      kind: Ingress<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u042d\u0442\u043e \u043d\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u044b \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u0435. \u041d\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0432\u0430\u0436\u0435\u043d: GitOps-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f cluster-admin \u00ab\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435\u00bb.<\/p>\n<p>\u0422\u0440\u0435\u0442\u044c\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u0441\u0435\u043a\u0440\u0435\u0442\u044b. \u0414\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u043c\u044b \u0438 \u0442\u0430\u043a \u043d\u0435 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043b\u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0432 Git, \u043d\u043e \u0432 <code>Helm values<\/code> \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u0441\u043a\u043e\u043b\u044c\u0437\u043a\u0438\u0435 \u043c\u0435\u0441\u0442\u0430: \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u0435\u0439, \u0438\u043c\u0435\u043d\u0430 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432, \u0438\u043d\u043e\u0433\u0434\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c. \u041c\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u0443: Git \u043c\u043e\u0436\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0441\u0435\u043a\u0440\u0435\u0442\u0430, \u043d\u043e \u043d\u0435 \u0441\u0430\u043c \u0441\u0435\u043a\u0440\u0435\u0442 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>Kubernetes Secret \u2014 \u044d\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u043e\u0434\u0435 \u043f\u0430\u0440\u043e\u043b\u0435\u0439 \u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0435\u0433\u043e YAML \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043a\u043e\u043c\u043c\u0438\u0442\u0438\u0442\u044c \u043a\u0430\u043a \u0435\u0441\u0442\u044c. \u0412 Kubernetes \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 base64-\u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u0438 base64 \u2014 \u044d\u0442\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u043a\u0430\u043a \u0432\u0430\u043c \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0430 \u043d\u0435 \u043a\u0440\u0438\u043f\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0449\u0438\u0442\u0430.<\/p>\n<p>\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 External Secrets Operator. \u0412 Git \u043e\u0441\u0442\u0430\u043b\u0441\u044f <code>ExternalSecret<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u0441\u0435\u043a\u0440\u0435\u0442 \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0438 \u0438\u0437 \u043a\u0430\u043a\u043e\u0433\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0435\u0433\u043e \u0432\u0437\u044f\u0442\u044c. \u0421\u0430\u043c\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0435\u0436\u0438\u0442 \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u043e\u0432. External Secrets Operator \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u0435\u043a\u0440\u0435\u0442\u044b \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 API \u0432 Kubernetes Secrets.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"yaml\">apiVersion: external-secrets.io\/v1kind: ExternalSecretmetadata:  name: users-api-db  namespace: usersspec:  refreshInterval: 1h  secretStoreRef:    name: prod-secrets    kind: ClusterSecretStore  target:    name: users-api-db    creationPolicy: Owner  data:    - secretKey: password      remoteRef:        key: prod\/users-api\/db        property: password<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043c\u044b\u0441\u043b \u043d\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e External Secrets \u00ab\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0435\u00bb \u0441\u0430\u043c \u043f\u043e \u0441\u0435\u0431\u0435. \u0421\u043c\u044b\u0441\u043b \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438. Git \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u043d\u0443\u0436\u0435\u043d \u0441\u0435\u043a\u0440\u0435\u0442. \u0425\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0441\u0435\u043a\u0440\u0435\u0442\u0430 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0440\u043e\u0442\u0430\u0446\u0438\u044e, \u0430\u0443\u0434\u0438\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. Kubernetes \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 Secret, \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<p>\u0427\u0435\u0442\u0432\u0451\u0440\u0442\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430. \u041d\u0435\u043b\u044c\u0437\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043b\u044e\u0434\u044f\u043c: \u00ab\u0422\u0435\u043f\u0435\u0440\u044c \u043b\u044e\u0431\u044b\u0435 \u0440\u0443\u0447\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b\u00bb. \u0412 production \u0431\u044b\u0432\u0430\u044e\u0442 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e. \u041d\u043e \u043c\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0444\u043e\u0440\u043c\u0443 \u0442\u0430\u043a\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u0441\u0440\u0430\u0437\u0443 \u0438\u0434\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 Git, \u043b\u0438\u0431\u043e, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e\u0436\u0430\u0440, \u0440\u0443\u0447\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u043c. \u041f\u0440\u0438 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u043c self-heal \u0440\u0443\u0447\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0442\u0451\u0440\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0440\u0435\u0434\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430: \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c auto-sync \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435, \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441, \u0442\u0443\u0442 \u0436\u0435 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 Git \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c auto-sync. \u042d\u0442\u043e \u043d\u0438\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435 best practices \u0438 \u043d\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u043d\u043e \u044d\u0442\u043e \u0447\u0435\u0441\u0442\u043d\u044b\u0439 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u044b\u0439 \u043f\u0443\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0432 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438.<\/p>\n<p>\u041f\u044f\u0442\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u0433\u0438\u0433\u0438\u0435\u043d\u0430 \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439. \u041f\u043e\u0441\u043b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f GitOps \u0443 \u043d\u0430\u0441 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0431\u044b\u043b\u0438 <code>OutOfSync<\/code>, \u0445\u043e\u0442\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0431\u044b\u043b\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0430\u0441\u0442\u044c annotations \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b\u0430\u0441\u044c admission controller\u2019\u043e\u043c, <code>status<\/code> \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0441\u044f Kubernetes\u2019\u043e\u043c, HPA \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0435\u043f\u043b\u0438\u043a. \u0415\u0441\u043b\u0438 \u043d\u0430 \u044d\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0431\u0435\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430, \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u0434\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043c.<\/p>\n<p>\u041c\u044b \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u043f\u043e\u0434\u0440\u044f\u0434. \u042d\u0442\u043e \u043e\u043f\u0430\u0441\u043d\u043e: \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0448\u0438\u0440\u043e\u043a\u0438\u0439 ignore \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442 GitOps \u0432 \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 dashboard. \u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438 ownership \u043f\u043e \u043f\u043e\u043b\u044f\u043c. \u0415\u0441\u043b\u0438 replicas \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 HPA, \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0435 \u043d\u0430\u0434\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0438\u0434, \u0447\u0442\u043e Git \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u044d\u0442\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u0415\u0441\u043b\u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 diff customization. \u0415\u0441\u043b\u0438 \u043f\u043e\u043b\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0440\u0443\u043a\u0430\u043c\u0438 \u2014 \u044d\u0442\u043e \u043d\u0435 ignore, \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430.<\/p>\n<h3>\u0427\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430<\/h3>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043d\u0435 \u0432 UI Argo CD \u0438 \u043d\u0435 \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d. \u0418\u0437\u043c\u0435\u043d\u0438\u043b\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430 \u043e production.<\/p>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u0447\u0430\u0441\u0442\u043e \u0437\u0432\u0443\u0447\u0430\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0432\u0440\u043e\u0434\u0435: \u00ab\u0410 \u0447\u0442\u043e \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435?\u00bb, \u00ab\u0410 \u044d\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c?\u00bb, \u00ab\u0410 \u043a\u0442\u043e \u043c\u0435\u043d\u044f\u043b ConfigMap?\u00bb, \u00ab\u0410 \u043f\u043e\u0447\u0435\u043c\u0443 \u0432 Git \u043e\u0434\u043d\u043e, \u0430 \u0432 namespace \u0434\u0440\u0443\u0433\u043e\u0435?\u00bb. \u041f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f GitOps \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043d\u0435 \u0438\u0441\u0447\u0435\u0437\u043b\u0438 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u043d\u043e \u0441\u0442\u0430\u043b\u0438 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <code>Synced<\/code>, \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e live state \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 Git \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 <code>OutOfSync<\/code>, \u043c\u044b \u0432\u0438\u0434\u0438\u043c diff.<\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 rollback \u0441\u0442\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c. \u041c\u044b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u0435\u043c production \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438. \u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f tag \u043e\u0431\u0440\u0430\u0437\u0430, \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 tag \u0432 Git. \u0415\u0441\u043b\u0438 \u0441\u043b\u043e\u043c\u0430\u043b\u0430\u0441\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f, \u043c\u044b revert\u2019\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0438\u0442. \u0410 \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u043c, \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043d\u0430\u0431\u043e\u0440 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c. \u042d\u0442\u043e \u0432\u0441\u0451 \u0435\u0449\u0451 \u043d\u0435 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0447\u0435\u0440\u0435\u0434\u044f\u043c\u0438 \u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u043c\u0438. GitOps \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0442\u0438\u043c\u044b\u043c\u0438. \u041d\u043e \u043e\u043d \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0430\u0432\u0430\u0440\u0438\u0439, \u0433\u0434\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043a\u0430\u0442\u0438\u043b\u0438, \u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438.<\/p>\n<p>\u0422\u0440\u0435\u0442\u044c\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u0440\u0443\u0447\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u0431\u044b\u0442\u044c \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u043c\u0438. \u042d\u0442\u043e, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442. \u0420\u0430\u043d\u044c\u0448\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 ConfigMap \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u043c\u043e\u0433\u043b\u043e \u043f\u0435\u0440\u0435\u0436\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u043b\u0438\u0437\u043e\u0432 \u0438 \u0441\u0442\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u044c\u044e production-\u0444\u043e\u043b\u044c\u043a\u043b\u043e\u0440\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 \u043b\u0438\u0431\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f <code>OutOfSync<\/code>, \u043b\u0438\u0431\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0442\u0438\u0440\u0430\u0435\u0442\u0441\u044f self-heal\u2019\u043e\u043c. \u042d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u043c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0441\u0440\u0430\u0437\u0443. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u0435\u043c, \u043a\u0442\u043e \u043f\u0440\u0438\u0432\u044b\u043a \u0447\u0438\u043d\u0438\u0442\u044c production \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. \u041d\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u043e\u0432 \u0441\u0442\u0430\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e GitOps \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0447\u0438\u043d\u0438\u0442\u044c. \u041e\u043d \u043c\u0435\u0448\u0430\u0435\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u044b \u043f\u043e\u0447\u0438\u043d\u0438\u043b\u0438.<\/p>\n<p>\u0427\u0435\u0442\u0432\u0451\u0440\u0442\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u2014 \u043c\u044b \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0438 \u0434\u0430\u0432\u0430\u0442\u044c CI \u043b\u0438\u0448\u043d\u044e\u044e \u0432\u043b\u0430\u0441\u0442\u044c \u0438 \u044d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043b\u043e \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u0441 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0438\u043a\u0430\u043c\u0438. \u0420\u0430\u043d\u044c\u0448\u0435 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0430\u0446\u0438\u044f CI \u043e\u0437\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a production-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443. \u041f\u043e\u0441\u043b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0430\u0442\u0430\u043a\u0443\u044e\u0449\u0435\u043c\u0443 \u0443\u0436\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c deploy job \u0441 kubeconfig, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e kubeconfig \u0442\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0442. \u0414\u0430, \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0440\u0438\u0441\u043a\u0438: \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0442\u0430\u0449\u0438\u0442\u044c \u0432\u0440\u0435\u0434\u043d\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 infra repo, \u043c\u043e\u0436\u043d\u043e \u0430\u0442\u0430\u043a\u043e\u0432\u0430\u0442\u044c registry, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c Argo CD. \u041d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0430\u0449\u0438\u0442\u044b: \u0437\u0430\u0449\u0438\u0442\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0438, \u0440\u0435\u0432\u044c\u044e \u043a\u043e\u0434\u0430, \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u043f\u0440\u0443\u0432\u044b, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0434\u043e\u043f\u0443\u0441\u043a\u0430 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440, RBAC \u0434\u043b\u044f Argo CD. \u041f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u044c \u0430\u0442\u0430\u043a\u0438 \u0441\u0442\u0430\u043b\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435 \u0438 \u0443\u0436\u0435.<\/p>\n<p>\u0418 \u043f\u044f\u0442\u043e\u0435 \u2014 \u043c\u044b \u043d\u0430\u0447\u0430\u043b\u0438 \u043b\u0443\u0447\u0448\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u0433\u0434\u0435 GitOps \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0445\u0435\u043c\u0443 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u0431\u0435\u0437\u0434\u0443\u043c\u043d\u043e \u0437\u0430\u043f\u0438\u0445\u0438\u0432\u0430\u0442\u044c \u0432 sync hooks. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u0434\u043b\u044f \u0442\u044f\u0436\u0451\u043b\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u043b\u0443\u0447\u0448\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044f: \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, expand\/contract, feature flags, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 jobs, \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0441\u0442\u044c. GitOps \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 Kubernetes. \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 PostgreSQL, \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e YAML.<\/p>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c: \u043d\u0430\u0448 production \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f \u043d\u0435 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0440\u0435\u043b\u0438\u0437\u0430. \u041e\u043d \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f \u0437\u0430 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u0434\u043e \u043d\u0435\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u0440\u0443\u0447\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u043a\u0430 ConfigMap \u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u0430 \u0432 Git. \u041f\u0440\u043e\u0441\u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b. \u0420\u0435\u043b\u0438\u0437 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u0440\u043e\u044f\u0432\u0438\u043b \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u043b\u0433.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u0442\u0430\u043b \u0438\u043d\u0430\u0447\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0444\u0440\u0430\u0437\u0443 \u00abGit \u2014 \u0435\u0434\u0438\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438\u0441\u0442\u0438\u043d\u044b\u00bb. \u042d\u0442\u043e \u043d\u0435 \u043b\u043e\u0437\u0443\u043d\u0433 \u0438 \u043d\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0441\u043b\u0430\u0439\u0434. \u042d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e. \u041c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c namespace, \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0438\u0445 \u0438\u0437 Git? \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 live-\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 desired? \u041c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 revert, \u0430 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0431\u043e\u0440 \u0440\u0443\u0447\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0438\u0437 Slack? \u041c\u043e\u0436\u043d\u043e \u0443\u0431\u0440\u0430\u0442\u044c \u0443 CI \u0434\u043e\u0441\u0442\u0443\u043f \u043a Kubernetes API \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c?<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e Git \u0443 \u043d\u0430\u0441 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u0440\u0430\u0432\u0434\u044b, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u043b\u0435\u0436\u0438\u0442 \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u0434\u044b.<\/p>\n<p>GitOps \u0434\u043b\u044f \u043d\u0430\u0441 \u0441\u0442\u0430\u043b \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0435\u043f\u043b\u043e\u0439 \u043c\u043e\u0434\u043d\u0435\u0435. \u041e\u043d \u0441\u0442\u0430\u043b \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0442\u044c \u0436\u0438\u0442\u044c \u043d\u0430 production-\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b \u0435\u0433\u043e \u0440\u0443\u043a\u0430\u043c\u0438 \u0438 \u0437\u0430\u0431\u044b\u043b.<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1031108\/\">https:\/\/habr.com\/ru\/articles\/1031108\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042d\u0442\u043e \u0431\u044b\u043b \u043d\u0435 \u043d\u043e\u0447\u043d\u043e\u0439 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442 \u0438 \u043d\u0435 \u0440\u0435\u043b\u0438\u0437 \u043f\u043e\u0434 \u0434\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c. \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0434\u0435\u043d\u044c, \u043f\u043b\u0430\u043d\u043e\u0432\u0430\u044f \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435 \u0434\u043d\u044f, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0443\u0436\u0435 \u043d\u0438\u0436\u0435 \u043f\u0438\u043a\u0430. \u0421\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439: \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e Deployment\u2019\u043e\u0432, PostgreSQL, PgBouncer, Redis, \u0444\u043e\u043d\u043e\u0432\u044b\u0435 workers, \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 CronJob\u2019\u044b, Helm chart \u0441 values \u043f\u043e\u0434 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0414\u0435\u043f\u043b\u043e\u0439 \u0442\u043e\u0433\u0434\u0430 \u0431\u044b\u043b \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u0440\u043e\u0441\u0442\u043e: GitLab CI \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u043b \u0442\u0435\u0441\u0442\u044b, \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043e\u0431\u0440\u0430\u0437, \u043f\u0443\u0448\u0438\u043b \u0435\u0433\u043e \u0432 registry \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b helm upgrade.\u0421\u0445\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0439:deploy:prod:  stage: deploy  image: alpine\/helm:3.14.0  script:    &#8212; helm upgrade &#8212;install users-api .\/helm\/users-api      &#8212;namespace users      &#8212;values .\/helm\/users-api\/values-prod.yaml      &#8212;set image.tag=${CI_COMMIT_SHA}      &#8212;atomic      &#8212;timeout 5m  only:    &#8212; main\u041d\u0430 \u0431\u0443\u043c\u0430\u0433\u0435 \u0432\u0441\u0451 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. &#8212;atomic \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u0440\u0435\u043b\u0438\u0437, \u0435\u0441\u043b\u0438 Helm \u043d\u0435 \u0434\u043e\u0436\u0434\u0451\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f. \u0423 CI \u0431\u044b\u043b kubeconfig \u0432 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0414\u043e Kubernetes API \u043c\u043e\u0433\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u0440\u0430\u043d\u043d\u0435\u0440\u044b. \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043b\u0435\u0436\u0430\u043b\u0430 \u0432 values. \u041d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e, \u043d\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u0442\u0438\u043f\u043e\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0436\u0438\u0432\u0451\u0442 \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u0430\u043d\u0434.\u0412\u0430\u0436\u043d\u044b\u0439 \u043d\u044e\u0430\u043d\u0441: &#8212;atomic \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c production rollback-\u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c. \u041e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e Helm \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043d\u0435\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c upgrade. \u0415\u0441\u043b\u0438 Kubernetes \u0443\u0441\u043f\u0435\u043b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c rollout \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c, \u0430 \u0434\u0435\u0433\u0440\u0430\u0434\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0437\u0436\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0431\u0438\u0437\u043d\u0435\u0441-\u043c\u0435\u0442\u0440\u0438\u043a, \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0443\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0435\u043b\u0451\u043d\u044b\u043c.\u0422\u0430\u043a \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043f\u0440\u043e\u0448\u0451\u043b \u0437\u0435\u043b\u0451\u043d\u044b\u043c. \u041e\u0431\u0440\u0430\u0437 \u0441\u043e\u0431\u0440\u0430\u043b\u0441\u044f, \u0447\u0430\u0440\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0441\u044f, \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0432\u044b\u0439 ReplicaSet. \u0427\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u0437\u0430\u0433\u043e\u0440\u0435\u043b\u0438\u0441\u044c \u0430\u043b\u0435\u0440\u0442\u044b: \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u0434\u043e\u043b\u044f 5xx, \u0443\u0441\u043a\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u044b\u0433\u043e\u0440\u0430\u043d\u0438\u0435 SLO-\u0431\u044e\u0434\u0436\u0435\u0442\u0430, readiness \u0443 \u0447\u0430\u0441\u0442\u0438 \u043f\u043e\u0434\u043e\u0432 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b. \u0421\u043d\u0430\u0440\u0443\u0436\u0438 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043a\u0430\u043a \u0440\u0435\u0433\u0440\u0435\u0441\u0441 \u0432 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438. \u041c\u044b \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0442\u0435\u0433 \u043e\u0431\u0440\u0430\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432.\u0418 \u0442\u0443\u0442 \u0432\u0441\u0451 \u0441\u0442\u0430\u043b\u043e \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c: \u0441\u0442\u0430\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0442\u043e\u0436\u0435 \u043d\u0435 \u043f\u043e\u0434\u043d\u044f\u043b\u0430\u0441\u044c. \u0422\u043e\u0447\u043d\u0435\u0435, \u043e\u043d\u0430 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u0442\u044c. Pod \u0443\u0445\u043e\u0434\u0438\u043b \u0432 CrashLoopBackOff, \u0432 \u043b\u043e\u0433\u0430\u0445 \u0431\u044b\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0430\u0434\u0430\u043b\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u043a\u043e\u0433\u0434\u0430 \u0441\u043e\u0431\u0438\u0440\u0430\u043b\u043e \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.\u041b\u043e\u0433\u0438 \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u043c\u0438:failed to initialize storage:  pq: password authentication failed for user &#171;users_app&#187;ordial tcp: lookup pg-users.prod.svc.cluster.local: no such host\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0448\u044c \u0432 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438: \u0436\u0438\u0432 \u043b\u0438 endpoint \u0431\u0430\u0437\u044b, \u0435\u0441\u0442\u044c \u043b\u0438 \u0437\u0430 \u043d\u0438\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u043f\u043e\u0434\u043e\u0432, \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0441\u044f \u043b\u0438 Secret, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 pod\u2019\u0435 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 Helm values, \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043b\u0438 \u043d\u043e\u0432\u044b\u0439 \u043e\u0442\u043a\u0430\u0437 \u043e\u0442 admission-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u043b\u0441\u044f \u043b\u0438 pull \u043e\u0431\u0440\u0430\u0437\u0430, \u043d\u0435 \u0443\u043f\u0430\u043b \u043b\u0438 sidecar. \u041f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u00ab\u0431\u0438\u0442\u044b\u043c \u0440\u0435\u043b\u0438\u0437\u043e\u043c\u00bb \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0441\u0441\u044b\u043f\u0430\u0442\u044c\u0441\u044f. \u041e\u0431\u0440\u0430\u0437\u044b \u0431\u044b\u043b\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438. Secret \u043d\u0435 \u0440\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0445\u043e\u0434\u0438\u043b\u0430\u0441\u044c \u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f.\u0412 Git \u0432 values-prod.yaml \u043b\u0435\u0436\u0430\u043b\u043e \u043e\u0434\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u0432 \u0436\u0438\u0432\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0434\u043e \u0440\u0435\u043b\u0438\u0437\u0430 \u0431\u044b\u043b\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 DB_HOST. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u044b\u043c, \u043d\u043e \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u0441\u0435\u0440\u0432\u0438\u0441 \u0445\u043e\u0434\u0438\u043b \u043d\u0435 \u0432 \u0442\u043e\u0442 endpoint, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.DB_HOST \u0443 \u043d\u0430\u0441 \u043f\u043e\u043f\u0430\u0434\u0430\u043b \u0432 pod \u0447\u0435\u0440\u0435\u0437 ConfigMap users-api-env: Helm \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043b \u044d\u0442\u043e\u0442 ConfigMap \u0438\u0437 values-prod.yaml, \u0430 Deployment \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u043b \u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 envFrom. \u041a\u043e\u0433\u0434\u0430-\u0442\u043e \u0434\u0430\u0432\u043d\u043e, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 PgBouncer, \u044d\u0442\u043e\u0442 ConfigMap \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0440\u0443\u043a\u0430\u043c\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 production namespace \u0447\u0435\u0440\u0435\u0437 kubectl edit. \u0412 Git \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u043b\u043e \u0438 \u0447\u0430\u0441\u0442\u044c\u044e Helm release \u043d\u0435 \u0441\u0442\u0430\u043b\u043e. \u0412 \u0438\u0442\u043e\u0433\u0435 live object \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0438 desired state \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0440\u0430\u0437\u043e\u0448\u043b\u0438\u0441\u044c.\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043d\u0430\u0448 production \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u043e \u0432 Git.\u0410 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u043b\u0438\u0437 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043b pod\u2019\u044b. \u041e\u043d\u0438 \u0432\u0437\u044f\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u0437 chart\u2019\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0438\u0437 Git, \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u00ab\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439\u00bb \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f DB_HOST. \u0422\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0442 DB_HOST \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u043d\u0435 \u0431\u044b\u043b \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e production, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0443\u043f\u0430\u043b\u0430. \u0410 rollback image tag \u043d\u0435 \u043f\u043e\u043c\u043e\u0433, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u043d\u0435 \u0432 \u043e\u0431\u0440\u0430\u0437\u0435. \u0421\u0442\u0430\u0440\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u0430 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0438\u0437 Git \u0438 \u0442\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043f\u0430\u0434\u0430\u043b\u0430.\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043d\u0430\u0441 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0440\u0435\u043d\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u0430 \u00ab\u0440\u0435\u043b\u0438\u0437 \u0441\u043b\u043e\u043c\u0430\u043b \u0441\u0435\u0440\u0432\u0438\u0441\u00bb. \u0421\u0430\u043c \u0440\u0435\u043b\u0438\u0437 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u043b. \u041e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u044f\u0432\u0438\u043b \u0440\u0430\u0441\u0441\u0438\u043d\u0445\u0440\u043e\u043d \u043c\u0435\u0436\u0434\u0443 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0438\u0437 Git \u0438 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435.\u0427\u0442\u043e \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430\u041f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0431\u044b\u043b\u043e \u043d\u0435 \u00ab\u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c GitOps\u00bb, \u0430 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441. \u041c\u044b \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0441\u0440\u0430\u0432\u043d\u0438\u043b\u0438 \u0435\u0433\u043e \u0441 Git \u0438 \u043f\u0440\u0438\u043d\u044f\u043b\u0438 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0435, \u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u044c ConfigMap \u0440\u0443\u043a\u0430\u043c\u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437, \u0430 \u0432\u043d\u0435\u0441\u0442\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0440\u043e\u0434\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c \u0432\u044b\u043a\u043b\u0430\u0434\u043a\u0443 \u0443\u0436\u0435 \u0447\u0435\u0440\u0435\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d.\u0414\u0430, \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0440\u0443\u0447\u043d\u043e\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435. \u041d\u043e \u043c\u044b \u0443\u0436\u0435 \u0432\u0438\u0434\u0435\u043b\u0438 \u0446\u0435\u043d\u0443 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u0430\u0432\u043a\u0438. \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0442\u0440\u0430\u043d\u043d\u043e.\u041c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 MR \u0432 infra repo: env:-  DB_HOST: &#171;pgbouncer.users.svc.cluster.local&#187;+  DB_HOST: &#171;pgbouncer-primary.users.svc.cluster.local&#187;\u041f\u0435\u0440\u0435\u0434 merge \u043c\u044b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 service name \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 production namespace, \u0447\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0436\u0438\u0432\u044b\u0435 endpoints \u0438 \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0434\u0451\u0442 \u043a \u043d\u0443\u0436\u043d\u043e\u043c\u0443 PgBouncer-\u043f\u0443\u043b\u0443. \u041f\u043e\u0441\u043b\u0435 merge pipeline \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b chart, pod\u2019\u044b \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043b\u0438\u0441\u044c \u0438 readiness \u043d\u0430\u0447\u0430\u043b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c, \u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u0431\u0430\u0437\u0435 \u0438\u0441\u0447\u0435\u0437\u043b\u0438.\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043b\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u0443\u0441\u043e\u043c Deployment\u2019\u0430. \u041c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b\u0438 health endpoint, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432, \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439, \u043f\u0443\u043b \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a PostgreSQL \u0438 \u0444\u043e\u043d\u043e\u0432\u044b\u0435 workers. \u042d\u0442\u043e \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: Kubernetes readiness \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e pod \u0433\u043e\u0442\u043e\u0432 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u0440\u0430\u0444\u0438\u043a \u043f\u043e \u0442\u0435\u043c \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0441\u0430\u043c\u0438 \u043e\u043f\u0438\u0441\u0430\u043b\u0438. \u041e\u043d \u043d\u0435 \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0431\u0438\u0437\u043d\u0435\u0441-\u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0436\u0438\u0432\u044b. \u0423 \u043d\u0430\u0441 readiness \u0431\u044b\u043b \u0437\u0430\u0432\u044f\u0437\u0430\u043d \u043d\u0430 HTTP endpoint, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435, \u043d\u043e \u043e\u043d \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439. \u041f\u043e\u0441\u043b\u0435 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u043c\u044b \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043b\u0438, \u043d\u043e \u043d\u0435 \u0441\u0442\u0430\u043b\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0442\u044c readiness \u0432 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 synthetic test. \u0421\u043b\u0438\u0448\u043a\u043e\u043c \u0442\u044f\u0436\u0451\u043b\u0430\u044f readiness-\u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u0430\u043c\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u043e\u0439 \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438.\u041a\u043e\u0433\u0434\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u0432\u0435\u0440\u043d\u0443\u043b\u0441\u044f, \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 postmortem. \u0418 \u0442\u0430\u043c \u0441\u0442\u0430\u043b\u043e \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043e\u0434\u043d\u043e\u043c\u0443 ConfigMap.\u0423 \u043d\u0430\u0441 \u0431\u044b\u043b\u043e \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u0430\u0431\u044b\u0445 \u043c\u0435\u0441\u0442.CI \u0438\u043c\u0435\u043b \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a production-\u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0443. Kubeconfig \u043b\u0435\u0436\u0430\u043b \u0432 GitLab CI variables. \u0414\u0430, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0449\u0438\u0449\u0451\u043d\u043d\u044b\u043c\u0438 \u0438 \u0441\u043a\u0440\u044b\u0442\u044b\u043c\u0438. \u0414\u0430, \u0434\u043e\u0441\u0442\u0443\u043f \u0431\u044b\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0443 production job\u2019\u044b. \u041d\u043e \u043f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u044b\u043b \u043a\u043b\u044e\u0447 \u043e\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 production.Production API server \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f runner\u2019\u043e\u0432. \u041c\u044b \u043f\u0440\u0438\u043a\u0440\u044b\u0432\u0430\u043b\u0438 \u044d\u0442\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u043d\u043e \u0441\u0430\u043c\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430 \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a Kubernetes API \u0438\u0437 CI-\u0441\u0440\u0435\u0434\u044b.Git \u043d\u0435 \u0431\u044b\u043b \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u043f\u0440\u0430\u0432\u0434\u044b. \u041e\u043d \u0431\u044b\u043b \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0434\u0443\u043c\u0430\u043b\u0438 \u043e production. \u0420\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0433\u043b\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u0438 \u043c\u044b \u0443\u0437\u043d\u0430\u0432\u0430\u043b\u0438 \u043e\u0431 \u044d\u0442\u043e\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0435 pod\u2019\u043e\u0432 \u0438\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0430\u0432\u0430\u0440\u0438\u0438.\u0423 \u043d\u0430\u0441 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 drift. \u041d\u0438\u043a\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b live-\u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u0436\u0438\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u0434\u043e\u043b\u0433\u043e.\u0418 \u0433\u043b\u0430\u0432\u043d\u043e\u0435: rollback \u0431\u044b\u043b \u043d\u0435\u043f\u043e\u043b\u043d\u044b\u043c. \u041c\u044b \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u043b\u0438 image tag, \u043d\u043e \u043d\u0435 \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u043b\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. \u0412 \u044d\u0442\u043e\u043c \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439.\u041f\u043e\u0447\u0435\u043c\u0443 \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 GitOps, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0437\u0430\u043f\u0440\u0435\u0442\u0438\u043b\u0438 \u0440\u0443\u0447\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438\u00bb\u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0438\u043d\u0446\u0438\u0434\u0435\u043d\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u043e\u0439\u0442\u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043f\u0443\u0442\u0451\u043c: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432 \u0434\u0443\u0445\u0435 \u00ab\u043d\u0435 \u043f\u0440\u0430\u0432\u0438\u0442\u044c production \u0440\u0443\u043a\u0430\u043c\u0438\u00bb, \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u0443 \u0447\u0430\u0441\u0442\u0438 \u043b\u044e\u0434\u0435\u0439, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0443\u043d\u043a\u0442 \u0432 runbook. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e, \u043d\u043e \u043d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443. \u041b\u044e\u0434\u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0443\u0447\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u043a\u0438, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0441\u0430\u043c\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043d\u043e\u0447\u044c\u044e, \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0440\u0438\u0442 \u0431\u0438\u0437\u043d\u0435\u0441-\u043c\u0435\u0442\u0440\u0438\u043a\u0430.\u041d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0431\u044b\u043b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432, \u043d\u043e \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.\u041c\u044b \u0441\u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0446\u0435\u043b\u044c \u0442\u0430\u043a: production \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u0438\u0437 Git \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e. \u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u044f\u0434\u0440\u043e GitOps: \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0430\u0433\u0435\u043d\u0442\u043e\u043c \u0438 continuous reconciliation.\u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 Argo CD. \u041d\u043e \u043d\u0435 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043e\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. Flux \u0442\u043e\u0436\u0435 \u043c\u043e\u0433 \u0431\u044b \u0437\u0430\u043a\u0440\u044b\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Argo CD \u0431\u044b\u043b \u043f\u0440\u043e\u0449\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u043e: UI, \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044b Synced \/ OutOfSync, \u0432\u0438\u0434\u0438\u043c\u044b\u0439 diff, \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Helm \u0438 Kustomize. \u0418 \u043d\u0430\u043c \u0431\u044b\u043b\u043e \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e platform-\u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b, \u043d\u043e \u0438 backend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0443\u0432\u0438\u0434\u0435\u0442\u044c: \u0432\u043e\u0442 \u0447\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 Git, \u0432\u043e\u0442 \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u0432\u043e\u0442 \u0433\u0434\u0435 \u043e\u043d\u043e \u0440\u0430\u0437\u044a\u0435\u0445\u0430\u043b\u043e\u0441\u044c. \u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u0431\u044b\u043b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d: \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 protected \u0438 masked, job \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f production. \u041d\u043e \u0441\u0443\u0442\u044c \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c: \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0435\u0439 CI-\u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043b\u0435\u0436\u0430\u043b credential, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043c\u0435\u043d\u044f\u0442\u044c production-\u043a\u043b\u0430\u0441\u0442\u0435\u0440. \u041d\u043e\u0432\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0442\u0430\u043b\u0430 \u0442\u0430\u043a\u043e\u0439: GitLab CI \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0434\u0435\u043f\u043b\u043e\u0438\u0442 \u0432 Kubernetes. \u041e\u043d \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0437, \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043f\u0443\u0448\u0438\u0442 \u043e\u0431\u0440\u0430\u0437 \u0432 registry \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442 infra repo. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u0435\u043d\u044f\u0435\u0442 tag \u0432 values:image:  repository: registry.example.com\/users-api  tag: &#171;9f4c2a1&#8243;\u0414\u0430\u043b\u044c\u0448\u0435 Argo CD, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0441\u0430\u043c \u0437\u0430\u0431\u0438\u0440\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438\u0437 Git \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0445. \u0412\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043b\u044e\u0441: \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u043d \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u044f\u043c\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0438 \u043a Kubernetes API, \u043d\u0438 \u043a Argo CD API. CI\/CD \u0432 \u0442\u0430\u043a\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043d\u043e\u0432\u043e\u0435 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432 Git, \u0430 deployment \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440.\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:apiVersion: argoproj.io\/v1alpha1kind: Applicationmetadata:  name: users-api  namespace: argocdspec:  project: production  source:    repoURL: https:\/\/git.example.com\/platform\/prod-manifests.git    targetRevision: main    path: services\/users-api    helm:      valueFiles:        &#8212; values-prod.yaml  destination:    server: https:\/\/kubernetes.default.svc    namespace: users  syncPolicy:    automated:      prune: false      selfHeal: false\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 prune \u0438 selfHeal.\u042d\u0442\u043e \u0432\u0430\u0436\u043d\u0430\u044f \u0434\u0435\u0442\u0430\u043b\u044c. \u041e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433:syncPolicy:  automated:    prune: true    selfHeal: true\u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u044d\u0442\u043e \u0432 \u0433\u0440\u044f\u0437\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u00ab\u043d\u0443\u0436\u043d\u044b\u043c\u00bb, \u0445\u043e\u0442\u044f \u0432 Git \u0435\u0433\u043e \u043d\u0435\u0442. \u041d\u0435 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e Argo CD \u043e\u043f\u0430\u0441\u043d\u044b\u0439, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0443\u0436\u0435 \u043d\u0430\u043a\u043e\u043f\u0438\u043b \u0443\u0441\u0442\u043d\u0443\u044e \u0438\u0441\u0442\u043e\u0440\u0438\u044e.\u041c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0438 Argo CD \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f. \u041e\u043d \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b OutOfSync, \u043d\u043e \u043d\u0435 \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0432\u0441\u0451 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u042d\u0442\u043e \u0434\u0430\u043b\u043e \u043d\u0430\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439. \u0427\u0430\u0441\u0442\u044c \u0431\u044b\u043b\u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0439: runtime annotations, \u043f\u043e\u043b\u044f status, \u0432\u0435\u0449\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-478482","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/478482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=478482"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/478482\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=478482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=478482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=478482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}