{"id":345851,"date":"2023-02-24T21:02:15","date_gmt":"2023-02-24T21:02:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=345851"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2023-02-24T21:02:15","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=345851","title":{"rendered":"<span>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e SaaS \u0440\u0435\u0448\u0435\u043d\u0438\u044f via ArgoCD &amp; Terraform<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/96d\/e22\/faa\/96de22faaeed2774c1015952406f5157.png\" width=\"2500\" height=\"1500\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/96d\/e22\/faa\/96de22faaeed2774c1015952406f5157.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041c\u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439 SaaS, \u0433\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0430\u043c\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438 \u0449\u0435\u043b\u043a\u043d\u0443\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u0433\u043e\u0442\u043e\u0432\u043e. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Kubernetes (\u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 namespace \u0432 \u043e\u0431\u0449\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0430\u0440\u0438\u0444\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u043d\u0430) \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043d\u0430\u0431\u043e\u0440\u044b \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043e\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u043c\u043e\u0439 GitOps \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043d\u0430 \u0447\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d ArgoCD \u0438 Terraform.<\/p>\n<h2>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0430\u044e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c \u201c\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u201d (application) \u0438\u0437 <a href=\"https:\/\/argo-cd.readthedocs.io\/en\/stable\/core_concepts\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438 <\/a>ArgoCD, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 k8s. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e &#8212; \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c ArgoCD.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>\u0418\u043c\u0435\u0435\u043c Module1 \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (app1, app2) \u0438 Module2 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e (app3).<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/010\/023\/44a\/01002344aba70311c30b912fe9cb7621.png\" width=\"919\" height=\"816\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/010\/023\/44a\/01002344aba70311c30b912fe9cb7621.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u21161 \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u0434\u0432\u0430 \u043c\u043e\u0434\u0443\u043b\u044f (\u21161 \u0438 \u21162 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e), \u0432\u0441\u0435\u0433\u043e \u0432 \u0435\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0440\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u0432\u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u21162 \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u21161, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0435\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0412\u044b\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430<\/h2>\n<p>\u0414\u0443\u043c\u0430\u044e, \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0442\u0430\u043b\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u0433\u043e\u043b\u043e\u0432\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438\u0448\u043b\u043e \u0434\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 (\u043d\u0430 PowerShell \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445) \u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435. \u041a\u043e\u043b\u043b\u0435\u0433\u0430 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 ArgoCD, \u0438 \u044f \u043d\u0430\u0447\u0430\u043b \u043a\u043e\u043f\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<\/p>\n<p>\u0411\u044b\u043b\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0430\u0447\u043a\u0430\u043c\u0438, \u0438 \u043a\u0430\u043a \u043d\u0430\u0437\u043b\u043e, \u043c\u044b\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u043d\u0430\u0448\u0435\u043f\u0442\u044b\u0432\u0430\u043b\u0438 \u2013 \u0434\u0430\u0432\u0430\u0439 \u0432\u043e\u0437\u044c\u043c\u0451\u043c API ArgoCD \u0438 \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0446\u0438\u043a\u043b\u043e\u043c. \u0422\u0430\u043a\u043e\u0439 \u043f\u043b\u0430\u043d \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e.<\/p>\n<h2>\u0427\u0442\u043e \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 ArgoCD?\u00a0 <\/h2>\n<p>\u0412 ArgoCD \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0449\u044c, \u043a\u0430\u043a <a href=\"https:\/\/argo-cd.readthedocs.io\/en\/stable\/operator-manual\/applicationset\/\" rel=\"noopener noreferrer nofollow\">ApplicationSet<\/a>. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c Application \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/argo-cd.readthedocs.io\/en\/stable\/operator-manual\/applicationset\/Generators\/\" rel=\"noopener noreferrer nofollow\">\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432<\/a>. <\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>List:\u00a0 \u0424\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>Cluster: \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 ArgoCD.<\/p>\n<\/li>\n<li>\n<p>Git: \u041c\u043e\u0436\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0430\u043f\u043a\u0430\u043c\u0438 \u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438\u0437 git \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>Matrix: \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>Merge: \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>SCM Provider: \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c git \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>Pull Request: \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e Pull Request.<\/p>\n<\/li>\n<li>\n<p>Cluster Decision Resource: \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 Kubernetes.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Cluster \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u041d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0432\u0435\u0441\u0438\u0442\u044c labels \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0443\u0439\u0442\u0438 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443.<\/p>\n<p>\u041d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0448\u0435\u043b git \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440. \u0427\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e \u0444\u0430\u0439\u043b\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435?!<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. <\/p>\n<p><em>\u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <\/em><a href=\"https:\/\/github.com\/1kvin\/argocd-module-saas.git\" rel=\"noopener noreferrer nofollow\"><em>\u0442\u0443\u0442<\/em><\/a><em> (\u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435).<\/em><\/p>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u21161<\/h3>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c ApplicationSet.<\/p>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1 kind: ApplicationSet metadata:   name: app1-appset # \u041d\u0430\u0448 ApplicationSet \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435   namespace: argocd spec:   generators:   - git: # \u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438       repoURL: https:\/\/github.com\/1kvin\/argocd-module-saas.git       revision: implementation1       files:       - path: \"cluster-config\/module1\/*.json\" # \u0411\u0435\u0440\u0451\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b .json \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f   template:     metadata:       name: 'app1-{{destination.namespace}}' # \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 ArgoCD, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u0445 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438     spec:       project: default       source:  # \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435         repoURL: '{{source.repoURL}}'         targetRevision: '{{source.targetRevision}}'         path: '{{source.path}}'       destination: # \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f         server: '{{destination.server}}'         namespace: '{{destination.namespace}}'       syncPolicy:         automated:           prune: true # \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c           selfHeal: true  # \u0418 \u0432\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c         syncOptions:         - CreateNamespace=true # \u0421\u043e\u0437\u0434\u0430\u0451\u043c namespace, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442<\/code><\/pre>\n<p>\u0418 \u043a\u043e\u043d\u0444\u0438\u0433 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"json\">{     \"destination\":     {         \"server\" : \"https:\/\/kubernetes.default.svc\",         \"namespace\" : \"user1\"     },     \"source\":     {         \"repoURL\" : \"https:\/\/github.com\/argoproj\/argo-cd.git\",         \"path\" : \"applicationset\/examples\/git-generator-files-discovery\/apps\/guestbook\",         \"targetRevision\" : \"HEAD\"     } }<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/246\/537\/c04\/246537c0413aa18b052467076a53eda5.png\" width=\"724\" height=\"95\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/246\/537\/c04\/246537c0413aa18b052467076a53eda5.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d JSON \u0444\u0430\u0439\u043b.<\/p>\n<pre><code class=\"json\">{     \"destination\":     {         \"server\" : \"https:\/\/kubernetes.default.svc\",         \"namespace\" : \"user2\"     },     \"source\":     {         \"repoURL\" : \"https:\/\/github.com\/argoproj\/argo-cd.git\",         \"path\" : \"applicationset\/examples\/git-generator-files-discovery\/apps\/guestbook\",         \"targetRevision\" : \"HEAD\"     } } <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/961\/2a4\/35f\/9612a435faaf97b60afe4c0008a317cf.png\" width=\"974\" height=\"222\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/961\/2a4\/35f\/9612a435faaf97b60afe4c0008a317cf.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f: ApplicationSet \u0431\u0435\u0440\u0451\u0442 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u0432\u0441\u0435 JSON \u0444\u0430\u0439\u043b\u044b \u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 Application. <\/p>\n<p>\u00a0\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0423\u0440\u0430, \u043d\u0435 \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\/\u0443\u0434\u0430\u043b\u044f\u0442\u044c Application \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 ArgoCD \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e ApplicationSet \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u21162<\/h3>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f (server+ namespace). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e List \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Matrix \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. <\/p>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1 kind: ApplicationSet metadata:   name: module1-appset # \u041d\u0430\u0448 ApplicationSet \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c   namespace: argocd spec:   generators:     # \u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439     - matrix:         generators:           # \u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438           - git:               repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'               revision: implementation2               files:                 - path: cluster-config\/module1\/*.json           # \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0438 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432           - list:               elements:               - app-name: app1                 app-repoURL: https:\/\/github.com\/argoproj\/argo-cd.git                 app-path: applicationset\/examples\/git-generator-files-discovery\/apps\/guestbook                 app-targetRevision: HEAD               - app-name: app2                 app-repoURL: https:\/\/github.com\/argoproj\/argocd-example-apps\/                 app-path: guestbook                 app-targetRevision: HEAD   template:     metadata:       name: '{{app-name}}-{{destination.namespace}}'     spec:       project: default       source: # \u0411\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 list generator         repoURL: '{{app-repoURL}}'         targetRevision: '{{app-targetRevision}}'         path: '{{app-path}}'       destination: # \u0411\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 git generator         server: '{{destination.server}}'         namespace: '{{destination.namespace}}'       syncPolicy:         automated:           prune: true           selfHeal: true         syncOptions:           - CreateNamespace=true <\/code><\/pre>\n<p>\u041a\u0430\u043a \u0436\u0435 \u043f\u043e\u0445\u0443\u0434\u0435\u043b \u043d\u0430\u0448 JSON \u0444\u0430\u0439\u043b!<\/p>\n<pre><code class=\"json\">{     \"destination\":     {         \"server\" : \"https:\/\/kubernetes.default.svc\",         \"namespace\" : \"user1\"     } }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u21162 \u0441 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c (app3) \u0438 \u043f\u043e\u0441\u0435\u043b\u044e \u0435\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/298\/9c4\/fec\/2989c4fec66974de5c60bc1bfdc867ec.png\" width=\"974\" height=\"531\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/298\/9c4\/fec\/2989c4fec66974de5c60bc1bfdc867ec.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0435\u0441\u0442\u044c \u043e\u0431\u0430 \u043c\u043e\u0434\u0443\u043b\u044f, \u0430 \u0443 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d. <\/p>\n<p>\u0415\u0441\u043b\u0438 \u044f \u0437\u0430\u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u043c\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0437\u0430\u043f\u0443\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0433\u0438\u0442.<\/p>\n<p>\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0438 \u0444\u0430\u0439\u043b.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0430 \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 ApplicationSet.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 ApplicationSet.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u21163<\/h3>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e List \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 git \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440.<\/p>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1 kind: ApplicationSet metadata:   name: module1-appset # \u041d\u0430\u0448 ApplicationSet \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c   namespace: argocd spec:   generators:     # \u0421\u043e\u0435\u0434\u043d\u0438\u044f\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439     - matrix:         generators:           # \u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438           - git:               repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'               revision: implementation3               files:                 - path: cluster-config\/module1\/*.json           # \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0438 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432           - git:               repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'               revision: implementation3               files:                 - path: apps\/module1\/*.json   goTemplate: true   template:     metadata:       name: '{{.appName}}-{{.destination.namespace}}'     spec:       project: default       source:         repoURL: '{{.appRepoURL}}'         targetRevision: '{{.appTargetRevision}}'         path: '{{.appPath}}'       destination:         server: '{{.destination.server}}'         namespace: '{{.destination.namespace}}'       syncPolicy:         automated:           prune: true           selfHeal: true         syncOptions:           - CreateNamespace=true <\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0443<strong> goTemplate: true<\/strong> \u0438 \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u0447\u043a\u0430. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u044e, \u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0442 \u043d\u0435\u0451 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <a href=\"https:\/\/argo-cd.readthedocs.io\/en\/stable\/operator-manual\/applicationset\/GoTemplate\/\" rel=\"noopener noreferrer nofollow\">Go \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/a>. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b\u0430 \u0432 git:<\/p>\n<pre><code class=\"json\">{     \"appName\" : \"app1\",     \"appRepoURL\" : \"https:\/\/github.com\/argoproj\/argo-cd.git\",     \"appPath\" : \"applicationset\/examples\/git-generator-files-discovery\/apps\/guestbook\",     \"appTargetRevision\" : \"HEAD\" }<\/code><\/pre>\n<p>\u041a\u0440\u0430\u0441\u043e\u0442\u0430! \u041c\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 \u043d\u0430\u0448\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435! \u0418\u043b\u0438 \u043d\u0435\u0442? \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0435\u0449\u0451 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u2639<\/p>\n<p>\u041d\u043e \u043d\u0435 \u0431\u0435\u0434\u0430, \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438 \u043e\u0442 \u043d\u0435\u0433\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u043c\u0441\u044f!<\/p>\n<p>\u041a\u0430\u043a?<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d Matrix \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440!<\/p>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u21164<\/h3>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1 kind: ApplicationSet # \u041d\u0430\u0448 ApplicationSet \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 metadata:   name: modules-appset   namespace: argocd spec:   goTemplate: true   generators:     - matrix:         generators:           # \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439           - list:               elements:               - moduleName: module1               - moduleName: module2           # \u0421\u043e\u0435\u0434\u043d\u0438\u044f\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439           - matrix:               generators:                 # \u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438                 - git:                     repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'                     revision: implementation4                     files:                       - path: 'cluster-config\/{{.moduleName}}\/*.json'                 # \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0438 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432                 - git:                     repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'                     revision: implementation4                     files:                       - path: 'apps\/{{.moduleName}}\/*.json'    template:     metadata:       name: '{{.appName}}-{{.destination.namespace}}'     spec:       project: default       source:         repoURL: '{{.appRepoURL}}'         targetRevision: '{{.appTargetRevision}}'         path: '{{.appPath}}'       destination:         server: '{{.destination.server}}'         namespace: '{{.destination.namespace}}'       syncPolicy:         automated:           prune: true           selfHeal: true         syncOptions:           - CreateNamespace=true <\/code><\/pre>\n<p>\u041e\u0442\u043b\u0438\u0447\u043d\u043e! \u041e\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442! \u0414\u0430\u043d\u043d\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u0437 List \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0432 Git, \u043d\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432\u0441\u0451 \u0435\u0449\u0451 \u043e\u0441\u0442\u0430\u043b\u0438\u0441\u044c. <\/p>\n<p>\u0423 git \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0440\u0435\u0436\u0438\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<ol>\n<li>\n<p>Files \u2013 \u0441 \u043d\u0438\u043c \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>Directories \u2013 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0432\u044b\u0442\u0430\u0441\u043a\u0438\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u0434\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432.<\/p>\n<\/li>\n<\/ol>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0436\u0438\u043c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435.<\/p>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u21165<\/h3>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1 kind: ApplicationSet # \u041d\u0430\u0448 ApplicationSet \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 metadata:   name: modules-appset   namespace: argocd spec:   goTemplate: true   generators:     - matrix:         generators:           # \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0431\u0435\u0440\u0451\u043c \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u043f\u0430\u043f\u043e\u043a           - git:               repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'               revision: implementation5               directories:               - path: apps\/*            # \u0421\u043e\u0435\u0434\u043d\u0438\u044f\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439           - matrix:               generators:                 # \u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438                 - git:                     repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'                     revision: implementation5                     files:                       - path: 'cluster-config\/{{.path.basename}}\/*.json'                # \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0438 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432                 - git:                     repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'                     revision: implementation5                     files:                       - path: 'apps\/{{.path.basename}}\/*.json'    template:     metadata:       name: '{{.appName}}-{{.destination.namespace}}'     spec:       project: default       source:         repoURL: '{{.appRepoURL}}'         targetRevision: '{{.appTargetRevision}}'         path: '{{.appPath}}'       destination:         server: '{{.destination.server}}'         namespace: '{{.destination.namespace}}'       syncPolicy:         automated:           prune: true           selfHeal: true         syncOptions:           - CreateNamespace=true <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6a0\/940\/a47\/6a0940a47ec979f737ac4d06551eb195.png\" width=\"974\" height=\"451\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6a0\/940\/a47\/6a0940a47ec979f737ac4d06551eb195.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043d\u0435\u0442 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u043b\u0435\u0439, \u0432\u0441\u0451 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f git \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<h2>Terraform<\/h2>\n<p><em>Terraform\u2019\u043e\u043c \u044f \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0441\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0436\u0438\u0437\u043d\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0443\u0432\u0435\u0440\u0435\u043d \u043d\u0430 100%, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u0438\u0437\u044f\u0449\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/em><\/p>\n<p>\u0412\u043e\u0437\u043b\u043e\u0436\u0438\u043c \u043d\u0430 Terraform \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ol>\n<li>\n<p>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f ArgoCD.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u043d\u044f\u0442\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445).<\/p>\n<\/li>\n<li>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f namespace \u0432 k8s \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0441\u043b\u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 Terraform \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u0430\u043c\u044b\u043c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c, \u0442\u043e \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0438 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043e\u043d \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043d\u0430 \u0443\u0440\u0430!<\/p>\n<p>\u041e\u043f\u0438\u0448\u0435\u043c \u043d\u0430\u0448\u0443 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043e\u0434\u043d\u0438\u043c \u0444\u0430\u0439\u043b\u043e\u043c:<\/p>\n<pre><code class=\"json\">[     {         \"user\" : \"user1\",         \"server\" : \"https:\/\/kubernetes.default.svc\",         \"namespace\" : \"user1\",         \"modules\" : [             \"module1\",             \"module2\"         ]     },     {         \"user\" : \"user2\",         \"server\" : \"https:\/\/kubernetes.default.svc\",         \"namespace\" : \"user2\",         \"modules\" : [             \"module1\"         ]     } ] <\/code><\/pre>\n<p>\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 namespace \u0432 \u043a\u0443\u0431\u0438\u043a\u0435.<\/p>\n<pre><code class=\"json\">locals {   users_configuration_json = jsondecode(file(\"${path.module}\/configs\/users-configuration.json\")) }  resource \"kubernetes_namespace\" \"user_namespaces\" {   for_each = { for u in local.users_configuration_json : u.namespace => u.namespace}   metadata {     name = each.value   } }<\/code><\/pre>\n<p>\u0412 \u0446\u0435\u043b\u043e\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 JSON \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u043c namespace. \u041f\u043e\u0435\u0445\u0430\u043b\u0438 \u0434\u0430\u043b\u044c\u0448\u0435, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f ArgoCD.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"json\">locals {   users_configuration_json = jsondecode(file(\"${path.module}\/configs\/users-configuration.json\"))    users_configuration_combinations = distinct(flatten([     for cfg in local.users_configuration_json : [ # \u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c       for mdl in cfg.modules : { # \u041c\u043e\u0434\u0443\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f         module    = mdl         user      = cfg.user         server    = cfg.server         namespace = cfg.namespace       }     ]   ])) }<\/code><\/pre>\n<p>\u0411\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f integrations\/github \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440:<\/p>\n<pre><code class=\"json\">resource \"github_repository_file\" \"module_setup\" {   for_each = { for t in local.users_configuration_combinations : \"${t.user} ${t.module}\" => t }   repository          = \"argocd-module-saas\"   branch              = \"main\"   file                = \"cluster-config\/${each.value.module}\/${each.value.user}.json\"   content             = jsonencode({\"destination\" = {\"server\"= each.value.server, \"namespace\" = each.value.namespace}} )   commit_message      = \"Managed by Terraform\"   commit_author       = \"Terraform User\"   commit_email        = \"terraform@example.com\"   overwrite_on_create = true }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0441\u0432\u0435\u043b\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443 \u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043b\u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435, \u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u0438 \u043b\u0435\u0433\u043a\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 Terraform \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c databases:<\/p>\n<pre><code class=\"json\">{     \"appName\" : \"app1\",     \"appRepoURL\" : \"https:\/\/github.com\/argoproj\/argo-cd.git\",     \"appPath\" : \"applicationset\/examples\/git-generator-files-discovery\/apps\/guestbook\",     \"appTargetRevision\" : \"HEAD\",     \"databases\" : [ \"app1-db\"] }<\/code><\/pre>\n<p>\u041d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"json\">locals {   users_configuration_json = jsondecode(file(\"${path.module}\/configs\/users-configuration.json\"))    users_configuration_combinations = distinct(flatten([     for cfg in local.users_configuration_json : [ # \u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c       for mdl in cfg.modules : { # \u041c\u043e\u0434\u0443\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f         module    = mdl         user      = cfg.user         server    = cfg.server         namespace = cfg.namespace       }     ]   ]))    dbs = distinct(flatten([     for cfg in local.users_configuration_json : [ # \u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c       for mdl in cfg.modules : [ # \u041c\u043e\u0434\u0443\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f         for app in fileset(\"${path.module}\/..\/apps\/${mdl}\", \"**\/*.json\") : [ # \u041f\u043e\u0438\u0441\u043a \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043f\u0430\u043f\u043a\u0435           for db in (jsondecode(file(\"${path.module}\/..\/apps\/${mdl}\/${app}\"))).databases : # \u041f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0431\u0430\u0437\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f           {             namespace = cfg.namespace              module    = mdl             user      = cfg.user             dbname    = db           }         ]       ]     ]   ])) }<\/code><\/pre>\n<p>\u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"json\">module \"postgresql\" {   for_each = { for t in local.dbs : \"${t.user} ${t.module} ${t.dbname} \" => t }   source        = \"ballj\/postgresql\/kubernetes\"   version       = \"~> 1.2\"   namespace     = each.value.namespace   object_prefix = \"${each.value.user}-${each.value.module}-${each.value.dbname}\"   name = each.value.dbname }<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bb4\/323\/40b\/bb432340bea38b52dbd82d246addf0f4.png\" alt=\"user1\" title=\"user1\" width=\"974\" height=\"283\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bb4\/323\/40b\/bb432340bea38b52dbd82d246addf0f4.png\"\/><figcaption>user1<\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/30e\/c6e\/a9d\/30ec6ea9d4bf5379123ff2e85793d0bc.png\" alt=\"user2\" title=\"user2\" width=\"974\" height=\"200\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/30e\/c6e\/a9d\/30ec6ea9d4bf5379123ff2e85793d0bc.png\"\/><figcaption>user2<\/figcaption><\/figure>\n<p>\u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\n<p>\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, namespace \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0434\u0443\u043b\u0435\u0439).<\/p>\n<\/li>\n<li>\n<p>Terraform \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u044d\u0442\u043e, \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f ArgoCD \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443.<\/p>\n<\/li>\n<li>\n<p>ArgoCD \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u0437\u0430\u0441\u0435\u043b\u044f\u0435\u0442 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u0434\u043e\u0431\u0440\u043e\u043c, \u0433\u0434\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d-\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. <\/p>\n<h2>\u0421 \u043a\u0430\u043a\u0438\u043c\u0438 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435<\/h2>\n<p><em>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u044b\u043b\u043e \u043d\u0430\u0442\u0440\u0430\u0432\u0438\u0442\u044c ArgoCD \u043d\u0430 \u043d\u0430\u0448 \u0435\u0434\u0438\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Terraform \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432?<\/em><\/p>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 Git generator \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u0442\u044c \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u043a\u043e\u0441\u0442\u044b\u043b\u044e, \u043d\u0430\u0434\u0435\u044e\u0441\u044c \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043d\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043f\u043e\u043b\u0435\u0439.<\/p>\n<p><em>\u042f \u043d\u0435 \u0445\u043e\u0447\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f! \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043c\u043d\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438!<\/em><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0439\u0442\u0438 \u043d\u0430 \u0443\u0441\u0442\u0443\u043f\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0442\u043e \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0442\u0438 \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439.<\/p>\n<p><em>\u0410 \u043a\u0430\u043a \u043c\u043d\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u0439? <\/em><\/p>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043c\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043d\u0430\u0431\u043e\u0440 \u0434\u043b\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0435\u0433\u043e \u0442\u0438\u043f. \u042f \u043d\u0430\u0448\u0435\u043b \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0447\u0435\u0440\u0435\u0437 Azure App Configuration, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c Label \u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0434 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 <a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/azure-app-configuration\/howto-labels-aspnet-core?tabs=core5x\" rel=\"noopener noreferrer nofollow\">\u0442\u0443\u0442<\/a>.<\/p>\n<p><em>\u041a\u0430\u043a \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u0438\u0441\u044c \u0438\u043b\u0438 \u0443\u043f\u0430\u043b\u0438 \u0441 \u043e\u0448\u0438\u0431\u043a\u043e\u0439? <\/em><\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c ArgoCD API, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041d\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0439\u0442\u0438 \u043f\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043f\u0443\u0442\u0438 \u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c ArgoCD \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u044f\u0442\u044c \u043d\u0430\u0441 \u043e \u0432\u0441\u0435\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0445 \u0438 \u0443\u0441\u043f\u0435\u0445\u0430\u0445 \u0447\u0435\u0440\u0435\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 <a href=\"https:\/\/argo-cd.readthedocs.io\/en\/stable\/operator-manual\/notifications\/\" rel=\"noopener noreferrer nofollow\">\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439<\/a>.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u042f \u043d\u0435 DevOps \u0438\u043d\u0436\u0435\u043d\u0435\u0440, \u0438 \u0443 \u043c\u0435\u043d\u044f \u043c\u0430\u043b\u043e \u043e\u043f\u044b\u0442\u0430 \u0441 Kubernetes, \u043d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 ArgoCD \u0438 Terraform \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e. \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0438 \u043f\u0440\u0438\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0444\u0438\u0447\u0438.<\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 <a href=\"https:\/\/github.com\/1kvin\/argocd-module-saas.git\" rel=\"noopener noreferrer nofollow\">\u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438<\/a> (\u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435).<\/p>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0412\u0430\u0448\u0443 \u0438\u0434\u0435\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043c\u043e\u044e \u0432\u0435\u0440\u0441\u0438\u044e.<\/p>\n<p>P.S. \u0420\u0430\u0441\u0441\u043a\u0430\u0436\u0438\u0442\u0435 \u043e \u0412\u0430\u0448\u0435\u043c \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e\u043c \u043a\u0435\u0439\u0441\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ArgoCD \u0438 Terraform.<\/p>\n<p><em>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u041a\u0438\u0440\u0438\u043b\u043b\u0443 \u041b\u044b\u0441\u0430\u043a\u0443 \u0437\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u0443\u044e \u043e\u0431\u043b\u043e\u0436\u043a\u0443.<\/em><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/post\/718866\/\"> https:\/\/habr.com\/ru\/post\/718866\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h2>\n<p>\u041c\u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439 SaaS, \u0433\u0434\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0430\u043c\u0438 \u043d\u0443\u0436\u043d\u044b\u0435 \u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438 \u0449\u0435\u043b\u043a\u043d\u0443\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u0433\u043e\u0442\u043e\u0432\u043e. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Kubernetes (\u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 namespace \u0432 \u043e\u0431\u0449\u0435\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0430\u0440\u0438\u0444\u043d\u043e\u0433\u043e \u043f\u043b\u0430\u043d\u0430) \u0441 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043d\u0430\u0431\u043e\u0440\u044b \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043e\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u043c\u043e\u0439 GitOps \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043d\u0430 \u0447\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d ArgoCD \u0438 Terraform.<\/p>\n<h2>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0430\u044e\u0441\u044c \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u043c \u201c\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u201d (application) \u0438\u0437 <a href=\"https:\/\/argo-cd.readthedocs.io\/en\/stable\/core_concepts\/\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0440\u043c\u0438\u043d\u043e\u043b\u043e\u0433\u0438\u0438 <\/a>ArgoCD, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 k8s. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e &#8212; \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u043e\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c ArgoCD.<\/p>\n<h2>\u041f\u0440\u0438\u043c\u0435\u0440<\/h2>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>\u0418\u043c\u0435\u0435\u043c Module1 \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (app1, app2) \u0438 Module2 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e (app3).<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u21161 \u0432\u044b\u0431\u0440\u0430\u043d\u043e \u0434\u0432\u0430 \u043c\u043e\u0434\u0443\u043b\u044f (\u21161 \u0438 \u21162 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e), \u0432\u0441\u0435\u0433\u043e \u0432 \u0435\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u0440\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u0432\u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u21162 \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u21161, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0435\u0433\u043e \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0412\u044b\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430<\/h2>\n<p>\u0414\u0443\u043c\u0430\u044e, \u043f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441\u0442\u0430\u043b\u0430 \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0412 \u0433\u043e\u043b\u043e\u0432\u0443 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0438\u0448\u043b\u043e \u0434\u0432\u0430 \u0440\u0435\u0448\u0435\u043d\u0438\u044f: \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 (\u043d\u0430 PowerShell \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445) \u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435. \u041a\u043e\u043b\u043b\u0435\u0433\u0430 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u043b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 ArgoCD, \u0438 \u044f \u043d\u0430\u0447\u0430\u043b \u043a\u043e\u043f\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<\/p>\n<p>\u0411\u044b\u043b\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0430\u0447\u043a\u0430\u043c\u0438, \u0438 \u043a\u0430\u043a \u043d\u0430\u0437\u043b\u043e, \u043c\u044b\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430 \u043d\u0430\u0448\u0435\u043f\u0442\u044b\u0432\u0430\u043b\u0438 \u2013 \u0434\u0430\u0432\u0430\u0439 \u0432\u043e\u0437\u044c\u043c\u0451\u043c API ArgoCD \u0438 \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u0445 \u0446\u0438\u043a\u043b\u043e\u043c. \u0422\u0430\u043a\u043e\u0439 \u043f\u043b\u0430\u043d \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435, \u043d\u043e \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0442\u0438\u0432\u043d\u043e.<\/p>\n<h2>\u0427\u0442\u043e \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 ArgoCD?\u00a0 <\/h2>\n<p>\u0412 ArgoCD \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0430\u044f \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0449\u044c, \u043a\u0430\u043a <a href=\"https:\/\/argo-cd.readthedocs.io\/en\/stable\/operator-manual\/applicationset\/\" rel=\"noopener noreferrer nofollow\">ApplicationSet<\/a>. \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c Application \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/argo-cd.readthedocs.io\/en\/stable\/operator-manual\/applicationset\/Generators\/\" rel=\"noopener noreferrer nofollow\">\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432<\/a>. <\/p>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>List:\u00a0 \u0424\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<li>\n<p>Cluster: \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u0445 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 ArgoCD.<\/p>\n<\/li>\n<li>\n<p>Git: \u041c\u043e\u0436\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043f\u0430\u043f\u043a\u0430\u043c\u0438 \u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0438\u0437 git \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>Matrix: \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>Merge: \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>SCM Provider: \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c git \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>Pull Request: \u041f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e Pull Request.<\/p>\n<\/li>\n<li>\n<p>Cluster Decision Resource: \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 Kubernetes.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u044f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Cluster \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u041d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0432\u0435\u0441\u0438\u0442\u044c labels \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u0439, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0443\u0439\u0442\u0438 \u043a \u0434\u0440\u0443\u0433\u043e\u043c\u0443.<\/p>\n<p>\u041d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0448\u0435\u043b git \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440. \u0427\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0449\u0435, \u0447\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e \u0444\u0430\u0439\u043b\u0443 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u0438, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435?!<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. <\/p>\n<p><em>\u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <\/em><a href=\"https:\/\/github.com\/1kvin\/argocd-module-saas.git\" rel=\"noopener noreferrer nofollow\"><em>\u0442\u0443\u0442<\/em><\/a><em> (\u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435).<\/em><\/p>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u21161<\/h3>\n<p>\u041e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c ApplicationSet.<\/p>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1 kind: ApplicationSet metadata:   name: app1-appset # \u041d\u0430\u0448 ApplicationSet \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u043d\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435   namespace: argocd spec:   generators:   - git: # \u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438       repoURL: https:\/\/github.com\/1kvin\/argocd-module-saas.git       revision: implementation1       files:       - path: \"cluster-config\/module1\/*.json\" # \u0411\u0435\u0440\u0451\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b .json \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f   template:     metadata:       name: 'app1-{{destination.namespace}}' # \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0441\u0435\u043a\u0430\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 ArgoCD, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u0445 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438     spec:       project: default       source:  # \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0451\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435         repoURL: '{{source.repoURL}}'         targetRevision: '{{source.targetRevision}}'         path: '{{source.path}}'       destination: # \u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f         server: '{{destination.server}}'         namespace: '{{destination.namespace}}'       syncPolicy:         automated:           prune: true # \u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u043c           selfHeal: true  # \u0418 \u0432\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c         syncOptions:         - CreateNamespace=true # \u0421\u043e\u0437\u0434\u0430\u0451\u043c namespace, \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442<\/code><\/pre>\n<p>\u0418 \u043a\u043e\u043d\u0444\u0438\u0433 \u0444\u0430\u0439\u043b:<\/p>\n<pre><code class=\"json\">{     \"destination\":     {         \"server\" : \"https:\/\/kubernetes.default.svc\",         \"namespace\" : \"user1\"     },     \"source\":     {         \"repoURL\" : \"https:\/\/github.com\/argoproj\/argo-cd.git\",         \"path\" : \"applicationset\/examples\/git-generator-files-discovery\/apps\/guestbook\",         \"targetRevision\" : \"HEAD\"     } }<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d JSON \u0444\u0430\u0439\u043b.<\/p>\n<pre><code class=\"json\">{     \"destination\":     {         \"server\" : \"https:\/\/kubernetes.default.svc\",         \"namespace\" : \"user2\"     },     \"source\":     {         \"repoURL\" : \"https:\/\/github.com\/argoproj\/argo-cd.git\",         \"path\" : \"applicationset\/examples\/git-generator-files-discovery\/apps\/guestbook\",         \"targetRevision\" : \"HEAD\"     } } <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f: ApplicationSet \u0431\u0435\u0440\u0451\u0442 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u0432\u0441\u0435 JSON \u0444\u0430\u0439\u043b\u044b \u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 Application. <\/p>\n<p>\u00a0\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0423\u0440\u0430, \u043d\u0435 \u043d\u0430\u0434\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\/\u0443\u0434\u0430\u043b\u044f\u0442\u044c Application \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0438\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 ArgoCD \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e ApplicationSet \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u21162<\/h3>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f (server+ namespace). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e List \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435, \u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u0441\u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u043c \u0438\u0445 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Matrix \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430. <\/p>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1 kind: ApplicationSet metadata:   name: module1-appset # \u041d\u0430\u0448 ApplicationSet \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c   namespace: argocd spec:   generators:     # \u041a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439     - matrix:         generators:           # \u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438           - git:               repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'               revision: implementation2               files:                 - path: cluster-config\/module1\/*.json           # \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0438 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432           - list:               elements:               - app-name: app1                 app-repoURL: https:\/\/github.com\/argoproj\/argo-cd.git                 app-path: applicationset\/examples\/git-generator-files-discovery\/apps\/guestbook                 app-targetRevision: HEAD               - app-name: app2                 app-repoURL: https:\/\/github.com\/argoproj\/argocd-example-apps\/                 app-path: guestbook                 app-targetRevision: HEAD   template:     metadata:       name: '{{app-name}}-{{destination.namespace}}'     spec:       project: default       source: # \u0411\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 list generator         repoURL: '{{app-repoURL}}'         targetRevision: '{{app-targetRevision}}'         path: '{{app-path}}'       destination: # \u0411\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 git generator         server: '{{destination.server}}'         namespace: '{{destination.namespace}}'       syncPolicy:         automated:           prune: true           selfHeal: true         syncOptions:           - CreateNamespace=true <\/code><\/pre>\n<p>\u041a\u0430\u043a \u0436\u0435 \u043f\u043e\u0445\u0443\u0434\u0435\u043b \u043d\u0430\u0448 JSON \u0444\u0430\u0439\u043b!<\/p>\n<pre><code class=\"json\">{     \"destination\":     {         \"server\" : \"https:\/\/kubernetes.default.svc\",         \"namespace\" : \"user1\"     } }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u21162 \u0441 \u043e\u0434\u043d\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c (app3) \u0438 \u043f\u043e\u0441\u0435\u043b\u044e \u0435\u0433\u043e \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0435\u0441\u0442\u044c \u043e\u0431\u0430 \u043c\u043e\u0434\u0443\u043b\u044f, \u0430 \u0443 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d. <\/p>\n<p>\u0415\u0441\u043b\u0438 \u044f \u0437\u0430\u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u043c\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u0437\u0430\u043f\u0443\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0433\u0438\u0442.<\/p>\n<p>\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u043d\u0438 \u0444\u0430\u0439\u043b.<\/p>\n<\/li>\n<li>\n<p>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0442\u0434\u0435\u043b\u0435\u043d\u0430 \u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 ApplicationSet.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 ApplicationSet.<\/p>\n<\/li>\n<\/ul>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u21163<\/h3>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e List \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 git \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440.<\/p>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1 kind: ApplicationSet metadata:   name: module1-appset # \u041d\u0430\u0448 ApplicationSet \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u043c\u043e\u0434\u0443\u043b\u044c   namespace: argocd spec:   generators:     # \u0421\u043e\u0435\u0434\u043d\u0438\u044f\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439     - matrix:         generators:           # \u0424\u0430\u0439\u043b\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438           - git:               repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'               revision: implementation3               files:                 - path: cluster-config\/module1\/*.json           # \u0421\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u0435 \u0438 \u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432           - git:               repoURL: 'https:\/\/github.com\/1kvin\/argocd-module-saas.git'               revision: implementation3               files:                 - path: apps\/module1\/*.json   goTemplate: true   template:     metadata:       name: '{{.appName}}-{{.destination.namespace}}'     spec:       project: default       source:         repoURL: '{{.appRepoURL}}'         targetRevision: '{{.appTargetRevision}}'         path: '{{.appPath}}'       destination:         server: '{{.destination.server}}'         namespace: '{{.destination.namespace}}'       syncPolicy:         automated:           prune: true           selfHeal: true         syncOptions:           - CreateNamespace=true <\/code><\/pre>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0441\u0442\u0440\u043e\u0447\u043a\u0443<strong> goTemplate: true<\/strong> \u0438 \u0442\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0430\u0441\u044c \u0442\u043e\u0447\u043a\u0430. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u044e, \u0438 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0442 \u043d\u0435\u0451 \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f, \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <a href=\"https:\/\/argo-cd.readthedocs.io\/en\/stable\/operator-manual\/applicationset\/GoTemplate\/\" rel=\"noopener noreferrer nofollow\">Go \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432<\/a>. <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0435\u0445\u0430\u043b\u0430 \u0432 git:<\/p>\n<pre><code class=\"json\">{     \"appName\" : \"app1\",     \"appRepoURL\" : \"https:\/\/github.com\/argoproj\/argo-cd.git\",     \"appPath\" : \"applicationset\/examples\/git-generator-files-discovery\/apps\/guestbook\",     \"appTargetRevision\" : \"HEAD\" }<\/code><\/pre>\n<p>\u041a\u0440\u0430\u0441\u043e\u0442\u0430! \u041c\u044b \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c \u043e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0432 \u043d\u0430\u0448\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435! \u0418\u043b\u0438 \u043d\u0435\u0442? \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0435\u0449\u0451 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f \u2639<\/p>\n<p>\u041d\u043e \u043d\u0435 \u0431\u0435\u0434\u0430, \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438 \u043e\u0442 \u043d\u0435\u0433\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u043c\u0441\u044f!<\/p>\n<p>\u041a\u0430\u043a?<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d Matrix \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440!<\/p>\n<h3>\u0418\u0442\u0435\u0440\u0430\u0446\u0438\u044f \u21164<\/h3>\n<pre><code class=\"yaml\">apiVersion: argoproj.io\/v1alpha1 kind: ApplicationSet # \u041d\u0430\u0448 ApplicationSet \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 metadata:   name: modules-appset   namespace: argocd spec:   goTemplate: true   generators:     - matrix:  <\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-345851","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345851","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=345851"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345851\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}