{"id":467586,"date":"2025-07-18T23:04:37","date_gmt":"2025-07-18T23:04:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=467586"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=467586","title":{"rendered":"<span>Kubernetes \u043a\u0430\u043a PaaS: \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0431\u0435\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0427\u0430\u0441\u0442\u044c 2<\/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 decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ccc\/0a6\/c3f\/ccc0a6c3f77954981682afe0c26fdb91.png\" width=\"860\" height=\"574\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ccc\/0a6\/c3f\/ccc0a6c3f77954981682afe0c26fdb91.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ccc\/0a6\/c3f\/ccc0a6c3f77954981682afe0c26fdb91.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439, \u0433\u0434\u0435 \u043c\u044b \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u0441\u0442\u0440\u043e\u0438\u043c PaaS \u043d\u0430 \u0431\u0430\u0437\u0435 Kubernetes \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u041d\u0430\u0448\u0430 \u0446\u0435\u043b\u044c \u2014 \u0432\u044b\u0436\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0438\u0437 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0438 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Kubernetes, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c PaaS-\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0436\u0438\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c. \u041c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0431\u044b\u0441\u0442\u0440\u043e, \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u0431\u0435\u0437 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443.<\/p>\n<h3>\u0427\u0442\u043e \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e<\/h3>\n<p>\u0412<a href=\"https:\/\/habr.com\/ru\/companies\/vktech\/articles\/895954\/\"> \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ul>\n<li>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 Gateway<\/strong>: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 Envoy Gateway \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 Kubernetes Gateway API, \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0431\u0440\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u2014 CloudNativePG<\/strong>: \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 Cyclops UI<\/strong>: \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Cyclops, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 PaaS \u043c\u043e\u0433\u043b\u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0427\u0435\u0440\u0435\u0437 \u0444\u043e\u0440\u043c\u044b \u0432 UI \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u0435 \u0432\u043d\u0438\u043a\u0430\u044f \u0432 YAML \u0438\u043b\u0438 CLI.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 Template \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f PostgreSQL<\/strong>: \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 Cyclops UI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043e\u0434\u043d\u0438\u043c \u043a\u043b\u0438\u043a\u043e\u043c \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b PostgreSQL, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f CloudNativePG \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0437\u0430\u043b\u043e\u0436\u0438\u043b\u0438 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 PaaS. \u041f\u043e\u0440\u0430 \u0438\u0434\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043a \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e.<\/p>\n<h3>\u0415\u0434\u0438\u043d\u044b\u0439 IAM \u0434\u043b\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041d\u0430 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438 \u0440\u0443\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0448\u043c\u0430\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0434\u0438\u043d\u044b\u0439 IAM. \u041e\u043d \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0438\u0445 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u2014 \u0431\u0443\u0434\u044c \u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u043c.<\/p>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0434\u0438\u043d \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u0430\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0432\u0448\u0438\u0439 \u0441\u0435\u0431\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u2014 <strong>OIDC (OpenID Connect)<\/strong>. \u041e\u043d \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u043e\u0432\u0435\u0440\u0445 OAuth 2.0 \u0438 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0435\u0433\u043e \u043c\u0438\u043d\u0443\u0441 \u2014 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 OIDC \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u043b\u0430\u0442\u043d\u044b\u0445 Enterprise-\u0432\u0435\u0440\u0441\u0438\u044f\u0445. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0430\u043c \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043c\u0435\u0445\u0430: \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 OIDC \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0438 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0448 \u0431\u0435\u0441\u043a\u043e\u0434\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434.\u00a0<\/p>\n<p>\u0421\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0432\u044b\u0431\u043e\u0440\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (IAM) \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 PaaS-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e Keycloak, \u043d\u043e \u043e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u043c \u0434\u043b\u044f \u043c\u043e\u0438\u0445 \u0437\u0430\u0434\u0430\u0447. \u0415\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0438 \u043a\u043e\u0434 \u043d\u0430 Java \u043d\u0435 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043c\u043e\u0439 \u0441\u0442\u0435\u043a, \u0433\u0434\u0435 \u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Go, \u2014 \u043c\u043d\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u044d\u0442\u0438\u043c \u00ab\u0431\u0430\u0433\u0430\u0436\u043e\u043c\u00bb.<\/p>\n<p>\u0412\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/articles\/720490\/\">\u00ab\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c IAM \u0432 2023, \u0438\u043b\u0438 \u0427\u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0440\u043e\u043c\u0435 Keycloak\u00bb<\/a>, \u0433\u0434\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f IAM-\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 Go, \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u042f \u0441\u0442\u0430\u043b \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0437 \u0434\u0432\u0443\u0445:<\/p>\n<ul>\n<li>\n<p><strong>Casdoor<\/strong>. \u042d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043c\u0435\u043d\u044f \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0438\u043b \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u043e\u0439. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 IAM. \u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439 \u0434\u0435\u043b\u0430\u044e\u0442 \u0435\u0433\u043e \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u043c\u043e\u0435\u0439 \u0446\u0435\u043b\u0438 \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c PaaS \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Zitadel<\/strong>. \u0425\u043e\u0442\u044f Zitadel \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0438\u043b\u044c\u043d\u043e \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b as is, \u043d\u043e \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u042f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438, \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0439\u0442\u0438 \u043c\u0438\u043c\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Casdoor. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0440\u0430\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PostgreSQL \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0432\u0435\u0434\u044c \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <strong>CloudNativePG<\/strong>, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 PostgreSQL \u0434\u043b\u044f Casdoor, \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0431\u0435\u0441\u043a\u043e\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 \u0441\u0445\u0435\u043c\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4a0\/558\/8c0\/4a05588c06619099deb19fcaef88c83d.png\" alt=\"Kubernetes PaaS\" title=\"Kubernetes PaaS\" width=\"2112\" height=\"1120\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4a0\/558\/8c0\/4a05588c06619099deb19fcaef88c83d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4a0\/558\/8c0\/4a05588c06619099deb19fcaef88c83d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Kubernetes PaaS<\/figcaption><\/div>\n<\/figure>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Casdoor \u0432 PaaS<\/h3>\n<p>\u041f\u043e\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Casdoor \u0432 \u043d\u0430\u0448\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 \u0447\u0430\u0440\u0442 paas-system, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/889\/611\/fce\/889611fce5b94c3607b63cb3faea0346.png\" alt=\"\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b casdoor\" title=\"\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b casdoor\" width=\"3552\" height=\"1952\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/889\/611\/fce\/889611fce5b94c3607b63cb3faea0346.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/889\/611\/fce\/889611fce5b94c3607b63cb3faea0346.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b casdoor<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u0448\u0430\u0433\u0430:<\/p>\n<h3>\u0428\u0430\u0433 1: \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/h3>\n<ul>\n<li>\n<p>\u041e\u0434\u043d\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u0434\u0435\u043f\u043b\u043e\u0438\u043c \u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430: <\/p>\n<ul>\n<li>\n<p><strong>Gateway<\/strong>: \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c Envoy Gateway, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 Deployment \u0438 LoadBalancer \u0434\u043b\u044f Casdoor. \u0416\u0434\u0451\u043c, \u043f\u043e\u043a\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<pre><code class=\"yaml\">apiVersion: gateway.networking.k8s.io\/v1 kind: Gateway metadata:   name: \"gateway\" spec:   gatewayClassName: \"eg\"   listeners:     - name: web       protocol: HTTP       port: \"8000\"<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>HTTPRoute \u0438 Service<\/strong>. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u2014 HTTPRoute \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 Service, \u0430 Service \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043f\u043e\u0434\u0430\u043c Casdoor \u043f\u043e \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u0443\u00a0<\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Service metadata:   name: \"iam-service\" spec:   ports:     - name: http       port: 8000       targetPort: 8000   selector:     labels:       paas-system\/app: iam --- apiVersion: gateway.networking.k8s.io\/v1 kind: HTTPRoute metadata:   name: \"casdoor-route\" spec:   parentRefs:     - name: \"gateway\" # \u0418\u043c\u044f gateway   rules:     - backendRefs:         - group: \"\"           kind: Service           name: \"iam-service\"           port: 8000           weight: 1       matches:         - path:             type: PathPrefix             value: \/<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>Postgres Cluster<\/strong>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c CloudNativePG \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 PostgreSQL (master \u0438 sync replica) \u0441 Secret\u2019\u043e\u043c \u0434\u043b\u044f \u043f\u0430\u0440\u043e\u043b\u044f. CloudNativePG \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u0435\u043a\u0440\u0435\u0442 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.  <\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Secret metadata:   name: \"iam-db\" type: kubernetes.io\/basic-auth data:   username: {{ \"admin\" | b64enc }}   password: {{ \"admin\" | b64enc }} --- apiVersion: postgresql.cnpg.io\/v1 kind: Cluster metadata:   name: \"iam\" spec:   instances: 2   bootstrap:     initdb:       database: \"iam\"       owner: \"admin\"       secret:         name: \"iam-db\"   storage:     size: \"1Gi\"     storageClass: \"csi-ceph-ssd-me1\" # \u042d\u0442\u043e\u043a SC \u0434\u043b\u044f vkcloud \u0437\u043e\u043d\u044b ME1<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430<strong> <\/strong>\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f helmwave \u0438 \u043f\u043e\u0442\u043e\u043c \u0436\u0434\u0435\u043c, \u043f\u043e\u043a\u0430 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f IP-\u0430\u0434\u0440\u0435\u0441. <\/p>\n<pre><code class=\"bash\">helmwave up -t system --build --kubedog kubectl get gateway\/gateway -n paas-system -o=jsonpath='{.status.addresses[0].value}' -w<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>\u0428\u0430\u0433 2: \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c Casdoor: <\/h3>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f IP-\u0430\u0434\u0440\u0435\u0441\u0430 LoadBalancer\u2019\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c .Values.iam.address \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 values.yaml (\u043e\u043d \u043f\u043e\u0434 .gitignore). \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0447\u0430\u0440\u0442 <strong>Secret<\/strong> \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 Casdoor (OIDC, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435) \u0438 <strong>Deployment<\/strong> \u0441 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u043e\u043c paas-system\/service: iam. \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u0435\u043f\u043b\u043e\u0439 \u2014 Casdoor \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0431\u0430\u0437\u0435.  <\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Secret metadata:   name: iam-config type: Opaque stringData:   app.conf: |     appname = casdoor     httpport = 8000     runmode = dev     SessionOn = true     copyrequestbody = true     driverName = postgres     dataSourceName = user=admin password=admin host=iam-rw port=5432 sslmode=disable dbname=iam     dbName = ian     tableNamePrefix = iam     showSql = false     redisEndpoint = \"\"     defaultStorageProvider = \"\"     isCloudIntranet = false     authState = \"casdoor\"     socks5Proxy = \"\"     verificationCodeTimeout = 10     initScore = 2000     logPostOnly = true     origin = \"http:\/\/&lt;ip&gt;:8000\"     staticBaseUrl = \"http:\/\/&lt;ip&gt;:8000\"     enableGzip = true     inactiveTimeoutMinutes = \"\" --- apiVersion: apps\/v1 kind: Deployment metadata:   name: iam-casdoor   labels:     paas-system\/app: iam spec:   replicas: 1   selector:     matchLabels:       paas-system\/app: iam   template:     metadata:       labels:         paas-system\/app: iam     spec:       containers:         - name: casdoor-container           image: casbin\/casdoor:latest           imagePullPolicy: Always           ports:             - containerPort: 8000           volumeMounts:             - mountPath: \/conf\/               name: conf           env:             - name: RUNNING_IN_DOCKER               value: \"true\"       volumes:         - name: conf           secret:             secretName: iam-config<\/code><\/pre>\n<h3>\u0428\u0430\u0433 3: \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f <\/h3>\n<\/li>\n<li>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0443 LoadBalancer\u2019\u0430 \u0441 \u043f\u043e\u0440\u0442\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, http:\/\/&lt;IP&gt;:&lt;port&gt;), \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043b\u043e\u0433\u0438\u043d\u0430 Casdoor. \u0412\u0432\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (\u043e\u0431\u044b\u0447\u043d\u043e admin\/123, \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Casdoor), \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u0445\u043e\u0434\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439 \u0438 \u043c\u0435\u043d\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0440\u043e\u043b\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d08\/f12\/02c\/d08f1202c7c24bea044cf259ca8318a8.png\" alt=\"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043b\u043e\u0433\u0438\u043d\u0430 Casdoor\" title=\"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043b\u043e\u0433\u0438\u043d\u0430 Casdoor\" width=\"2940\" height=\"1614\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/d08\/f12\/02c\/d08f1202c7c24bea044cf259ca8318a8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/d08\/f12\/02c\/d08f1202c7c24bea044cf259ca8318a8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043b\u043e\u0433\u0438\u043d\u0430 Casdoor<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/259\/1f4\/cbb\/2591f4cbb6df2f25bcbd905694dda18a.png\" alt=\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Casdoor\" title=\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Casdoor\" width=\"2940\" height=\"1614\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/259\/1f4\/cbb\/2591f4cbb6df2f25bcbd905694dda18a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/259\/1f4\/cbb\/2591f4cbb6df2f25bcbd905694dda18a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Casdoor<\/figcaption><\/div>\n<\/figure>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 Casdoor \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a OIDC-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 Cyclops UI \u0437\u0430\u043a\u0440\u044b\u0442 \u0447\u0435\u0440\u0435\u0437 basic auth, \u043d\u043e \u0441 Casdoor \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>oauth2-proxy<\/strong>.  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Casdoor<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c Casdoor. \u0412 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0439, \u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f Built-in, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0438\u043c Casdoor \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043d\u0443\u0436\u0434. \u041c\u044b \u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c PaaS, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u0418\u0437-\u0437\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Casdoor \u2014 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 \u2014 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0439, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a oauth2-proxy \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0433\u0440\u0443\u043f\u043f.<\/p>\n<p>\u0412 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 PaaS \u0441\u043e\u0437\u0434\u0430\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u0433\u0440\u0443\u043f\u043f\u0443 <strong>ops<\/strong> \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 PaaS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043d\u0430\u043d\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a \u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043d\u0430\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 Casdoor \u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 client_id \u0438 client_secret. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043d\u0430\u043d\u0442\u0430, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c. \u0412\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e PaaS, \u0430 \u0438\u0445 \u0440\u043e\u043b\u0438 \u0438 \u043f\u0440\u0430\u0432\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0420\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0433\u0440\u0443\u043f\u043f \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c: \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Casdoor \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439, \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u044b \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1d9\/5b9\/ddf\/1d95b9ddf7e41bd398d563b43a20e3ac.png\" alt=\"Casdoor UI\" title=\"Casdoor UI\" width=\"3597\" height=\"1016\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/1d9\/5b9\/ddf\/1d95b9ddf7e41bd398d563b43a20e3ac.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1d9\/5b9\/ddf\/1d95b9ddf7e41bd398d563b43a20e3ac.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Casdoor UI<\/figcaption><\/div>\n<\/figure>\n<h4><\/h4>\n<h4>\u0417\u0430\u0449\u0438\u0442\u0430 Cyclops UI \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e oauth2-proxy<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 Casdoor \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d, \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c basic auth \u0432 Cyclops UI \u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 OIDC \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>oauth2-proxy<\/strong>. \u0412\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u043e\u0441\u0438\u043c \u0432 \u043d\u0430\u0448 \u0447\u0430\u0440\u0442 paas-tenant, \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u0432 namespace paas-tenant-1.<\/p>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c ConfigMap<\/strong>. \u0421\u043e\u0437\u0434\u0430\u0435\u043c ConfigMap \u0432 namespace paas-tenant-1 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0434\u043b\u044f oauth2-proxy. \u0412 \u043d\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b OIDC: client_id \u0438 client_secret \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 Casdoor (\u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 PaaS), URL \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 (IP-\u0430\u0434\u0440\u0435\u0441 Casdoor), \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0433\u0440\u0443\u043f\u043f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ops \u0438\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u0442\u0435\u043d\u0430\u043d\u0442\u0430). \u0422\u0430\u043a\u0436\u0435 \u0432 ConfigMap \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a Cyclops UI, \u0443\u043a\u0430\u0437\u0430\u0432 \u0435\u0433\u043e \u0430\u0434\u0440\u0435\u0441 \u0438 \u043f\u043e\u0440\u0442. \u0412\u0441\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 \u0447\u0430\u0440\u0442\u0430. <\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: ConfigMap metadata:   name: oauth2-proxy-config data:   oauth2-proxy.cfg: |     provider = \"oidc\"     provider_display_name = \"PaaS\"          # \u0413\u0440\u0443\u043f\u043f\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438.     # \u041f\u0435\u0440\u0432\u0430\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u044d\u0442\u043e \u0430\u0434\u043c\u0438\u043d\u044b paas, \u0432\u0442\u043e\u0440\u0430\u044f \u044d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 tenant     allowed_groups = [\"paas\/ops\", \"paas\/tenant-1\"]       # \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 address IAM     oidc_issuer_url = \"http:\/\/&lt;ip&gt;:&lt;iam public port&gt;\"      # \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f     client_id = \"&lt;app client id&gt;\"     client_secret = \"&lt;app client secret&gt;\"      # \u041f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0433\u043e oauth2-proxy     redirect_url = \"http:\/\/&lt;ip&gt;:8000\/oauth2\/callback\"          email_domains = \"*\"     cookie_secret = \"your-32-char-secret-key1\"     cookie_secure = false # \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043a\u0430 \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 HTTPs      # \u041a\u0443\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u044b.     upstreams = [\"http:\/\/cyclops-ui:3000\"]     http_address = \"0.0.0.0:3000\"     scope = \"openid profile email\"<\/code><\/pre>\n<ul>\n<li>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Deployment<\/strong>. \u0414\u0435\u043f\u043b\u043e\u0438\u043c oauth2-proxy \u0447\u0435\u0440\u0435\u0437 \u043d\u043e\u0432\u044b\u0439 <strong>Deployment<\/strong> \u0432 namespace paas-tenant-1. Deployment \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 ConfigMap \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a Cyclops UI.  <\/p>\n<pre><code class=\"yaml\">apiVersion: apps\/v1 kind: Deployment metadata:   name: oauth2-proxy   labels:     app: oauth2-proxy spec:   replicas: 1   selector:     matchLabels:       app: oauth2-proxy   template:     metadata:       labels:         app: oauth2-proxy     spec:       containers:       - name: oauth2-proxy         image: quay.io\/oauth2-proxy\/oauth2-proxy:latest         args:         - --config=\/etc\/oauth2-proxy\/oauth2-proxy.cfg         ports:         - containerPort: 3000           name: http         volumeMounts:         - name: config           mountPath: \/etc\/oauth2-proxy       volumes:       - name: config         configMap:           name: oauth2-proxy-config<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>\u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c Service<\/strong>. \u0412 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c Service (\u0432 namespace paas-tenant-1), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 Cyclops UI, \u043c\u0435\u043d\u044f\u0435\u043c \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043d\u0430 \u043f\u043e\u0434\u044b oauth2-proxy. \u041d\u043e\u0432\u044b\u0439 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 app: oauth2-proxy, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 oauth2-proxy. Gateway \u0438 HTTPRoute \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u2014 \u0442\u0440\u0430\u0444\u0438\u043a \u0438\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 Envoy Gateway.  <\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Service metadata:   name: oauth2-proxy spec:   selector:     app: oauth2-proxy   ports:   - name: http     port: 3000     targetPort: 3000     protocol: TCP   type: ClusterIP<\/code><\/pre>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c oauth2-proxy \u0432 paas-tenant-1 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 Casdoor \u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a Cyclops UI, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0438\u0434\u0438\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043b\u043e\u0433\u0438\u043d\u0430 Casdoor, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0432\u0445\u043e\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Cyclops UI.  <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f23\/e2c\/082\/f23e2c08291395171751c1f4b9088ada.png\" alt=\"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 oauth2-proxy\" title=\"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 oauth2-proxy\" width=\"3607\" height=\"1016\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f23\/e2c\/082\/f23e2c08291395171751c1f4b9088ada.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f23\/e2c\/082\/f23e2c08291395171751c1f4b9088ada.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 oauth2-proxy<\/figcaption><\/div>\n<\/figure>\n<h4>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u2014 Grafana<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 Cyclops UI \u0437\u0430\u0449\u0438\u0449\u0435\u043d \u0447\u0435\u0440\u0435\u0437 oauth2-proxy \u0438 Casdoor, \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u0431\u0449\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 PaaS \u2014 <strong>Grafana<\/strong>. \u042d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u0440\u0438\u043a, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 \u0432\u0441\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0432 namespace paas-system, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0431\u0449\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441. \u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 Grafana \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c PostgreSQL, \u0431\u043b\u0430\u0433\u043e \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c CloudNativePG. \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u0447\u0435\u0440\u0435\u0437 Casdoor.<\/p>\n<ul>\n<li>\n<p><strong>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Grafana Operator<\/strong>: \u0427\u0435\u0440\u0435\u0437 Helmwave \u0434\u0435\u043f\u043b\u043e\u0438\u043c Grafana Operator \u0432 namespace paas-operators. <\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">  - name: \"grafana\"     chart:       name: \"oci:\/\/ghcr.io\/grafana\/helm-charts\/grafana-operator\"       # \u0412\u0435\u0440\u0441\u0438\u044e \u043d\u0430\u0434\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f       version: \"v5.17.0\"     &lt;&lt;: *options-operators     tags: [grafana]<\/code><\/pre>\n<ul>\n<li>\n<p><strong>\u0421\u043e\u0437\u0434\u0430\u0435\u043c PostgreSQL \u0434\u043b\u044f Grafana<\/strong>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c CloudNativePG \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 PostgreSQL \u0432 paas-system. \u0427\u0435\u0440\u0435\u0437 Helmwave \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0441 <strong>Secret<\/strong> \u0434\u043b\u044f \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430. CloudNativePG \u0441\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0431\u0430\u0437\u0443, \u043a\u0430\u043a \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u043b\u044f Casdoor.  <\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Secret metadata:   name: \"grafana-secret\" type: kubernetes.io\/basic-auth data:   username: {{ \"grafna\" | b64enc }}   password: {{ \"password\"| b64enc }} --- apiVersion: postgresql.cnpg.io\/v1 kind: Cluster metadata:   name: \"grafana-pg\" spec:   instances: 1   bootstrap:     initdb:       database: \"grafana\"       owner: \"grafana\"       secret:         name: \"grafana-secret\"   storage:     size: \"1Gi\"     storageClass: \"csi-ceph-ssd-me1\"<\/code><\/pre>\n<ul>\n<li>\n<p><strong>\u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c Grafana<\/strong>. \u0412 \u0447\u0430\u0440\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 Helmwave \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c Custom Resource (CR) \u0434\u043b\u044f Grafana Operator \u0432 paas-system. \u0412 CR \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a PostgreSQL (\u0430\u0434\u0440\u0435\u0441 \u0438 credentials \u0438\u0437 CloudNativePG) \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b OIDC \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 Casdoor: client_id, client_secret \u0438 URL \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Casdoor (\u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 paas). \u0422\u0430\u043a\u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u0438\u0437\u0432\u043d\u0435, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c HTTPRoute (\u043f\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 Gateway, \u0447\u0442\u043e \u0438 \u0434\u043b\u044f IAM), \u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0441\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0441\u0435\u0440\u0432\u0438\u0441. \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u043e\u0434\u0435 Prometheus \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u0445 \u043f\u043e\u0437\u0436\u0435.  <\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\"># \u041e\u0431\u043d\u043e\u0432\u0438\u043c \u0433\u0440\u0430\u0444\u0430\u043d\u0430 secret apiVersion: v1 kind: Secret metadata:   name: \"grafana-secret\" type: kubernetes.io\/basic-auth data:   ...   admin_password: {{ \"admin\" | b64enc }}   client_id: {{ \"&lt;client id&gt;\" | b64enc  }}   client_secret: {{ \"&lt;client secret&gt;\"| b64enc }} --- apiVersion: grafana.integreatly.org\/v1beta1 kind: Grafana metadata:   name: paas   labels:     dashboards: \"paas\" spec:   deployment:     spec:       replicas: 1       template:         spec:           containers:             - name: grafana               env:                 - name: GF_DATABASE_USER                   valueFrom:                     secretKeyRef:                       name: \"grafana-secret\"                       key: username                 - name: GF_DATABASE_PASSWORD                   valueFrom:                     secretKeyRef:                       name: \"grafana-secret\"                       key: password                 - name: GF_SECURITY_ADMIN_PASSWORD                   valueFrom:                     secretKeyRef:                       name: \"grafana-secret\"                       key: admin_password                 - name: GF_AUTH_GENERIC_OAUTH_CLIENT_ID                   valueFrom:                     secretKeyRef:                       name: \"grafana-secret\"                       key: client_id                 - name: GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET                   valueFrom:                     secretKeyRef:                       name: \"grafana-secret\"                       key: client_secret   config:     database:       type: postgres       host: grafana-pg-rw       name: grafana     security:       admin_user: admin     server:       root_url: \"http:\/\/&lt;public gateway ip&gt;:&lt;iam public port&gt;\/grafana\"       serve_from_sub_path: \"true\"       http_port: \"3000\"     auth:       disable_login_form: \"true\"     auth.basic:       enabled: \"true\"     auth.generic_oauth:       enabled: \"true\"       auth_url: \"http:\/\/&lt;iam public ip&gt;:&lt;iam public port&gt;\/login\/oauth\/authorize\"       api_url: \"http:\/\/&lt;iam service name&gt;:&lt;iam internal port&gt;\/api\/userinfo\"       token_url: \"http:\/\/&lt;iam service name&gt;:&lt;iam internal port&gt;\/api\/login\/oauth\/access_token\"       signout_redirect_url: \"http:\/\/&lt;iam public ip&gt;:&lt;iam public port&gt;\/api\/logout\"       scopes: \"openid profile email groups offline_access\"       use_pkce: \"true\"       use_refresh_token: \"true\"       role_attribute_path: contains(groups[*], 'paas\/ops') &amp;&amp; 'GrafanaAdmin' || 'Viewer' -- apiVersion: gateway.networking.k8s.io\/v1 kind: HTTPRoute metadata:   name: \"grafana-route\" spec:   parentRefs:     - name: \"iam-gateway\"   rules:     - backendRefs:         - group: \"\"           kind: Service           name: \"paas-service\" # \u0441\u0435\u0440\u0432\u0438\u0441 \u0441 \u0442\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440           port: \"3000\"           weight: 1       matches:         - path:             type: PathPrefix             value: \/grafana<\/code><\/pre>\n<ul>\n<li>\n<p><strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441 Casdoor<\/strong>. \u0412 CR \u0434\u043b\u044f Grafana \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c oauth2, \u0443\u043a\u0430\u0437\u0430\u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Casdoor. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043b\u043e\u0433\u0438\u043d\u0430 Casdoor, \u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0445 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 paas (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ops \u0438\u043b\u0438 \u0433\u0440\u0443\u043f\u043f\u044b \u0442\u0435\u043d\u0430\u043d\u0442\u0430).<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0434\u0435\u043f\u043b\u043e\u044f Grafana \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 Envoy Gateway (\u043f\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 \u0438\u043b\u0438 \u043d\u043e\u0432\u043e\u043c\u0443 HTTPRoute). \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043b\u043e\u0433\u0438\u043d\u044f\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Casdoor \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430\u043c \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043c\u0435\u0442\u0440\u0438\u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/281\/102\/928\/2811029280fef2d89f47fb445ebd7a4f.png\" alt=\"\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b grafana\" title=\"\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b grafana\" width=\"3552\" height=\"1952\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/281\/102\/928\/2811029280fef2d89f47fb445ebd7a4f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/281\/102\/928\/2811029280fef2d89f47fb445ebd7a4f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b grafana<\/figcaption><\/div>\n<\/figure>\n<h4>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 PostgreSQL \u043a\u0430\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Grafana<\/h4>\n<p>\u0421 Grafana \u0432 namespace paas-system \u0438 PostgreSQL \u0434\u043b\u044f Casdoor \u0438 \u0441\u0430\u043c\u043e\u0439 Grafana, \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 CloudNativePG, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0431\u0430\u0437\u044b \u043a\u0430\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u0440\u0438\u043a. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u0445 \u0432 Grafana \u043a\u0430\u043a Custom Resources (CR) GrafanaDatasource.<\/p>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 GrafanaDatasource \u0434\u043b\u044f PostgreSQL<\/strong>. \u0427\u0435\u0440\u0435\u0437 Helmwave \u0432 \u0447\u0430\u0440\u0442\u0435 paas-tenant \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0432\u0430 CR GrafanaDatasource \u0432 namespace paas-system:<\/p>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u0431\u0430\u0437\u044b Casdoor: \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0430\u0434\u0440\u0435\u0441 PostgreSQL \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 Casdoor (\u0438\u0437 CloudNativePG), \u0438\u043c\u044f \u0431\u0430\u0437\u044b, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c (\u0438\u0437 <strong>Secret\u2019\u0430<\/strong>, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f Casdoor). \u0422\u0438\u043f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 PostgreSQL.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0431\u0430\u0437\u044b Grafana: \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b PostgreSQL \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0439 Grafana (\u0430\u0434\u0440\u0435\u0441, \u0438\u043c\u044f \u0431\u0430\u0437\u044b, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043f\u0430\u0440\u043e\u043b\u044c \u0438\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e <strong>Secret\u2019\u0430<\/strong>).<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"yaml\">apiVersion: grafana.integreatly.org\/v1beta1 kind: GrafanaDatasource metadata:   name: grafana-postgres spec:   valuesFrom:     - targetPath: \"secureJsonData.password\"       valueFrom:         secretKeyRef:           name: \"grafana-secret\"           key: \"password\"   instanceSelector:     matchLabels:       dashboards: \"paas\"   datasource:     name: grafana-postgres     type: postgres     url: \"grafana-pg-r:5432\"     user: grafana     access: proxy     jsonData:       database: \"grafana\"       sslmode: 'disable'       maxOpenConns: 10       maxIdleConns: 10       maxIdleConnsAuto: true       connMaxLifetime: 14400       postgresVersion: 1500       timescaledb: false     secureJsonData:       password: \"${password}\" --- apiVersion: grafana.integreatly.org\/v1beta1 kind: GrafanaDatasource metadata:   name: iam-postgres spec:   valuesFrom:     - targetPath: \"secureJsonData.password\"       valueFrom:         secretKeyRef:           name: \"iam-db\"           key: \"password\"   instanceSelector:     matchLabels:       dashboards: \"paas\"   datasource:     name: iam-postgres     type: postgres     url: \"iam-r:5432\"     user: \"admin\"     access: proxy     jsonData:       database: \"iam\"       sslmode: 'disable'       maxOpenConns: 10       maxIdleConns: 10       maxIdleConnsAuto: true       connMaxLifetime: 14400       postgresVersion: 1500       timescaledb: false     secureJsonData:       password: \"${password}\"<\/code><\/pre>\n<ul>\n<li>\n<p><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 Grafana<\/strong>. \u041f\u043e\u0441\u043b\u0435 \u0434\u0435\u043f\u043b\u043e\u044f CR \u0447\u0435\u0440\u0435\u0437 Helmwave Grafana Operator \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u044d\u0442\u0438 GrafanaDatasource \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Grafana. \u041e\u043d\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 Grafana, \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4fc\/284\/544\/4fc284544b116d88796189cd1ff8df87.png\" alt=\"Postgres grafana\" title=\"Postgres grafana\" width=\"2940\" height=\"1614\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4fc\/284\/544\/4fc284544b116d88796189cd1ff8df87.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4fc\/284\/544\/4fc284544b116d88796189cd1ff8df87.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Postgres grafana<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438, \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 Casdoor, \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432 Grafana \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u0440\u0438\u043a, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 Casdoor (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043b\u043e\u0433\u0438\u043d\u043e\u0432) \u0438\u043b\u0438 \u0441\u0430\u043c\u043e\u0439 Grafana (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043c\u0435\u0442\u0440\u0438\u043a\u0438).<\/p>\n<blockquote>\n<p>\u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/gitverse.ru\/emelianovss\/paas-kube-article\/content\/part-02\">\u043d\u0430\u0439\u0442\u0438 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438.\u00a0<\/a><\/p>\n<\/blockquote>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043d\u0430\u0448 PaaS \u043d\u0430\u0447\u043d\u0435\u0442 \u043e\u0431\u0440\u0430\u0441\u0442\u0430\u0442\u044c \u0433\u043b\u0430\u0437\u0430\u043c\u0438 \u0438 \u0443\u0448\u0430\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u0432 \u0441\u0430\u043c\u0438\u0445 \u0447\u0430\u0440\u0442\u0430\u0445. <\/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\/articles\/890386\/\"> https:\/\/habr.com\/ru\/articles\/890386\/<\/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\"><\/figure>\n<p>\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439, \u0433\u0434\u0435 \u043c\u044b \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c \u0441\u0442\u0440\u043e\u0438\u043c PaaS \u043d\u0430 \u0431\u0430\u0437\u0435 Kubernetes \u0431\u0435\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u041d\u0430\u0448\u0430 \u0446\u0435\u043b\u044c \u2014 \u0432\u044b\u0436\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0438\u0437 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0438 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b Kubernetes, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c PaaS-\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0436\u0438\u0437\u043d\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c. \u041c\u044b \u0445\u043e\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0431\u044b\u0441\u0442\u0440\u043e, \u0443\u0434\u043e\u0431\u043d\u043e \u0438 \u0431\u0435\u0437 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u0433\u043e \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0432 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443.<\/p>\n<h3>\u0427\u0442\u043e \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043d\u043e<\/h3>\n<p>\u0412<a href=\"https:\/\/habr.com\/ru\/companies\/vktech\/articles\/895954\/\"> \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/a> \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0448\u0430\u0433\u0438:<\/p>\n<ul>\n<li>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 Gateway<\/strong>: \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043b\u0438 Envoy Gateway \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0442\u0440\u0430\u0444\u0438\u043a\u043e\u043c. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 Kubernetes Gateway API, \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a.<\/p>\n<\/li>\n<li>\n<p><strong>\u0412\u044b\u0431\u0440\u0430\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u2014 CloudNativePG<\/strong>: \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 PostgreSQL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430\u043c\u0438 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 Cyclops UI<\/strong>: \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Cyclops, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 PaaS \u043c\u043e\u0433\u043b\u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0427\u0435\u0440\u0435\u0437 \u0444\u043e\u0440\u043c\u044b \u0432 UI \u043e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u0435 \u0432\u043d\u0438\u043a\u0430\u044f \u0432 YAML \u0438\u043b\u0438 CLI.<\/p>\n<\/li>\n<li>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u0438\u043b\u0438 Template \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f PostgreSQL<\/strong>: \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d \u0432 Cyclops UI, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043e\u0434\u043d\u0438\u043c \u043a\u043b\u0438\u043a\u043e\u043c \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b PostgreSQL, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f CloudNativePG \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0437\u0430\u043b\u043e\u0436\u0438\u043b\u0438 \u0444\u0443\u043d\u0434\u0430\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 PaaS. \u041f\u043e\u0440\u0430 \u0438\u0434\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u043a \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e.<\/p>\n<h3>\u0415\u0434\u0438\u043d\u044b\u0439 IAM \u0434\u043b\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/h3>\n<p>\u041d\u0430 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438 \u0440\u0443\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 \u043a\u043e\u0448\u043c\u0430\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0434\u0438\u043d\u044b\u0439 IAM. \u041e\u043d \u0440\u0435\u0448\u0430\u0435\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0438\u0445 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u2014 \u0431\u0443\u0434\u044c \u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c \u0438\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u043c.<\/p>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0434\u0438\u043d \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u0430\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0432\u0448\u0438\u0439 \u0441\u0435\u0431\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u2014 <strong>OIDC (OpenID Connect)<\/strong>. \u041e\u043d \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u043e\u0432\u0435\u0440\u0445 OAuth 2.0 \u0438 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0435\u0433\u043e \u043c\u0438\u043d\u0443\u0441 \u2014 \u043c\u043d\u043e\u0433\u0438\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 OIDC \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043f\u043b\u0430\u0442\u043d\u044b\u0445 Enterprise-\u0432\u0435\u0440\u0441\u0438\u044f\u0445. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0430\u043c \u044d\u0442\u043e \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u043c\u0435\u0445\u0430: \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 OIDC \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0438 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0448 \u0431\u0435\u0441\u043a\u043e\u0434\u043e\u0432\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434.\u00a0<\/p>\n<p>\u0421\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0432\u044b\u0431\u043e\u0440\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f. \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 (IAM) \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 PaaS-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u043e Keycloak, \u043d\u043e \u043e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0438\u043c \u0434\u043b\u044f \u043c\u043e\u0438\u0445 \u0437\u0430\u0434\u0430\u0447. \u0415\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0438 \u043a\u043e\u0434 \u043d\u0430 Java \u043d\u0435 \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043c\u043e\u0439 \u0441\u0442\u0435\u043a, \u0433\u0434\u0435 \u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Go, \u2014 \u043c\u043d\u0435 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043d\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u044d\u0442\u0438\u043c \u00ab\u0431\u0430\u0433\u0430\u0436\u043e\u043c\u00bb.<\/p>\n<p>\u0412\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u0441\u0442\u0430\u0442\u044c\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/articles\/720490\/\">\u00ab\u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c IAM \u0432 2023, \u0438\u043b\u0438 \u0427\u0442\u043e \u0435\u0441\u0442\u044c \u043a\u0440\u043e\u043c\u0435 Keycloak\u00bb<\/a>, \u0433\u0434\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f IAM-\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 Go, \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432. \u042f \u0441\u0442\u0430\u043b \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0438\u0437 \u0434\u0432\u0443\u0445:<\/p>\n<ul>\n<li>\n<p><strong>Casdoor<\/strong>. \u042d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043c\u0435\u043d\u044f \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0438\u043b \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u043e\u0439. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0445 \u0437\u043d\u0430\u043d\u0438\u0439 IAM. \u0423\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u043e\u043d\u044f\u0442\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0439 \u0434\u0435\u043b\u0430\u044e\u0442 \u0435\u0433\u043e \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u043c\u043e\u0435\u0439 \u0446\u0435\u043b\u0438 \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c PaaS \u0431\u0435\u0437 \u043b\u0438\u0448\u043d\u0435\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Zitadel<\/strong>. \u0425\u043e\u0442\u044f Zitadel \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0438\u043b\u044c\u043d\u043e \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u0412 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b as is, \u043d\u043e \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u042f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438, \u043b\u0443\u0447\u0448\u0435 \u043f\u0440\u043e\u0439\u0442\u0438 \u043c\u0438\u043c\u043e.<\/p>\n<\/li>\n<\/ul>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 Casdoor. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0440\u0430\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PostgreSQL \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0443 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0432\u0435\u0434\u044c \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c <strong>CloudNativePG<\/strong>, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 PostgreSQL \u0434\u043b\u044f Casdoor, \u043d\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043d\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u044f \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0431\u0435\u0441\u043a\u043e\u0434\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0430 \u0441\u0445\u0435\u043c\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>Kubernetes PaaS<\/figcaption><\/div>\n<\/figure>\n<h3>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 Casdoor \u0432 PaaS<\/h3>\n<p>\u041f\u043e\u0440\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c Casdoor \u0432 \u043d\u0430\u0448\u0443 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 \u0447\u0430\u0440\u0442 paas-system, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b casdoor<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u0448\u0430\u0433\u0430:<\/p>\n<h3>\u0428\u0430\u0433 1: \u0411\u0430\u0437\u043e\u0432\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/h3>\n<ul>\n<li>\n<p>\u041e\u0434\u043d\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u0434\u0435\u043f\u043b\u043e\u0438\u043c \u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430: <\/p>\n<ul>\n<li>\n<p><strong>Gateway<\/strong>: \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c Envoy Gateway, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 Deployment \u0438 LoadBalancer \u0434\u043b\u044f Casdoor. \u0416\u0434\u0451\u043c, \u043f\u043e\u043a\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0439 IP-\u0430\u0434\u0440\u0435\u0441.<\/p>\n<pre><code class=\"yaml\">apiVersion: gateway.networking.k8s.io\/v1 kind: Gateway metadata:   name: \"gateway\" spec:   gatewayClassName: \"eg\"   listeners:     - name: web       protocol: HTTP       port: \"8000\"<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>HTTPRoute \u0438 Service<\/strong>. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044e \u2014 HTTPRoute \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0430 Service, \u0430 Service \u043f\u0440\u0438\u0432\u044f\u0437\u0430\u043d \u043a \u043f\u043e\u0434\u0430\u043c Casdoor \u043f\u043e \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u0443\u00a0<\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Service metadata:   name: \"iam-service\" spec:   ports:     - name: http       port: 8000       targetPort: 8000   selector:     labels:       paas-system\/app: iam --- apiVersion: gateway.networking.k8s.io\/v1 kind: HTTPRoute metadata:   name: \"casdoor-route\" spec:   parentRefs:     - name: \"gateway\" # \u0418\u043c\u044f gateway   rules:     - backendRefs:         - group: \"\"           kind: Service           name: \"iam-service\"           port: 8000           weight: 1       matches:         - path:             type: PathPrefix             value: \/<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>Postgres Cluster<\/strong>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c CloudNativePG \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0430 PostgreSQL (master \u0438 sync replica) \u0441 Secret\u2019\u043e\u043c \u0434\u043b\u044f \u043f\u0430\u0440\u043e\u043b\u044f. CloudNativePG \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0447\u0438\u0442\u0430\u0435\u0442 \u0441\u0435\u043a\u0440\u0435\u0442 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.  <\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Secret metadata:   name: \"iam-db\" type: kubernetes.io\/basic-auth data:   username: {{ \"admin\" | b64enc }}   password: {{ \"admin\" | b64enc }} --- apiVersion: postgresql.cnpg.io\/v1 kind: Cluster metadata:   name: \"iam\" spec:   instances: 2   bootstrap:     initdb:       database: \"iam\"       owner: \"admin\"       secret:         name: \"iam-db\"   storage:     size: \"1Gi\"     storageClass: \"csi-ceph-ssd-me1\" # \u042d\u0442\u043e\u043a SC \u0434\u043b\u044f vkcloud \u0437\u043e\u043d\u044b ME1<\/code><\/pre>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430<strong> <\/strong>\u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0434\u043b\u044f helmwave \u0438 \u043f\u043e\u0442\u043e\u043c \u0436\u0434\u0435\u043c, \u043f\u043e\u043a\u0430 \u0443 \u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f IP-\u0430\u0434\u0440\u0435\u0441. <\/p>\n<pre><code class=\"bash\">helmwave up -t system --build --kubedog kubectl get gateway\/gateway -n paas-system -o=jsonpath='{.status.addresses[0].value}' -w<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3>\u0428\u0430\u0433 2: \u0420\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c Casdoor: <\/h3>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f IP-\u0430\u0434\u0440\u0435\u0441\u0430 LoadBalancer\u2019\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c .Values.iam.address \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 values.yaml (\u043e\u043d \u043f\u043e\u0434 .gitignore). \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0447\u0430\u0440\u0442 <strong>Secret<\/strong> \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 Casdoor (OIDC, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a \u0431\u0430\u0437\u0435) \u0438 <strong>Deployment<\/strong> \u0441 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u043e\u043c paas-system\/service: iam. \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u0435\u043f\u043b\u043e\u0439 \u2014 Casdoor \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a \u0431\u0430\u0437\u0435.  <\/p>\n<pre><code class=\"yaml\">apiVersion: v1 kind: Secret metadata:   name: iam-config type: Opaque stringData:   app.conf: |     appname = casdoor     httpport = 8000     runmode = dev     SessionOn = true     copyrequestbody = true     driverName = postgres     dataSourceName = user=admin password=admin host=iam-rw port=5432 sslmode=disable dbname=iam     dbName = ian     tableNamePrefix = iam     showSql = false     redisEndpoint = \"\"     defaultStorageProvider = \"\"     isCloudIntranet = false     authState = \"casdoor\"     socks5Proxy = \"\"     verificationCodeTimeout = 10     initScore = 2000     logPostOnly = true     origin = \"http:\/\/&lt;ip&gt;:8000\"     staticBaseUrl = \"http:\/\/&lt;ip&gt;:8000\"     enableGzip = true     inactiveTimeoutMinutes = \"\" --- apiVersion: apps\/v1 kind: Deployment metadata:   name: iam-casdoor   labels:     paas-system\/app: iam spec:   replicas: 1   selector:     matchLabels:       paas-system\/app: iam   template:     metadata:       labels:         paas-system\/app: iam     spec:       containers:         - name: casdoor-container           image: casbin\/casdoor:latest           imagePullPolicy: Always           ports:             - containerPort: 8000           volumeMounts:             - mountPath: \/conf\/               name: conf           env:             - name: RUNNING_IN_DOCKER               value: \"true\"       volumes:         - name: conf           secret:             secretName: iam-config<\/code><\/pre>\n<h3>\u0428\u0430\u0433 3: \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f <\/h3>\n<\/li>\n<li>\n<p>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043e IP-\u0430\u0434\u0440\u0435\u0441\u0443 LoadBalancer\u2019\u0430 \u0441 \u043f\u043e\u0440\u0442\u043e\u043c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, http:\/\/&lt;IP&gt;:&lt;port&gt;), \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043b\u043e\u0433\u0438\u043d\u0430 Casdoor. \u0412\u0432\u043e\u0434\u0438\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e (\u043e\u0431\u044b\u0447\u043d\u043e admin\/123, \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Casdoor), \u0438 \u043f\u043e\u0441\u043b\u0435 \u0432\u0445\u043e\u0434\u0430 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u043e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439 \u0438 \u043c\u0435\u043d\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0440\u043e\u043b\u044f\u043c\u0438.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043b\u043e\u0433\u0438\u043d\u0430 Casdoor<\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 Casdoor<\/figcaption><\/div>\n<\/figure>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 Casdoor \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a OIDC-\u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 \u0434\u043b\u044f \u0437\u0430\u0449\u0438\u0442\u044b \u043d\u0430\u0448\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 Cyclops UI \u0437\u0430\u043a\u0440\u044b\u0442 \u0447\u0435\u0440\u0435\u0437 basic auth, \u043d\u043e \u0441 Casdoor \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>oauth2-proxy<\/strong>.  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Casdoor<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c Casdoor. \u0412 \u043d\u0435\u043c \u0435\u0441\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0439, \u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f Built-in, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0438\u043c Casdoor \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043d\u0443\u0436\u0434. \u041c\u044b \u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c PaaS, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u0418\u0437-\u0437\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 Casdoor \u2014 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f\u043c\u0438 \u2014 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0439, \u0430 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c. \u042d\u0442\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a oauth2-proxy \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0433\u0440\u0443\u043f\u043f.<\/p>\n<p>\u0412 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 PaaS \u0441\u043e\u0437\u0434\u0430\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u0433\u0440\u0443\u043f\u043f\u0443 <strong>ops<\/strong> \u0434\u043b\u044f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 PaaS, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435;<\/p>\n<\/li>\n<li>\n<p>\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0433\u0440\u0443\u043f\u043f\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043d\u0430\u043d\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a \u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043d\u0430\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 Casdoor \u0441 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 client_id \u0438 client_secret. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0435\u043d\u0430\u043d\u0442\u0430, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c. \u0412\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044e PaaS, \u0430 \u0438\u0445 \u0440\u043e\u043b\u0438 \u0438 \u043f\u0440\u0430\u0432\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0433\u0440\u0443\u043f\u043f\u044b \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0420\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0433\u0440\u0443\u043f\u043f \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c: \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Casdoor \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0439, \u0432\u0441\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0444\u043e\u0440\u043c\u044b \u0438 \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>Casdoor UI<\/figcaption><\/div>\n<\/figure>\n<h4><\/h4>\n<h4>\u0417\u0430\u0449\u0438\u0442\u0430 Cyclops UI \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e oauth2-proxy<\/h4>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 Casdoor \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d, \u043c\u044b \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c basic auth \u0432 Cyclops UI \u043d\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 OIDC \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>oauth2-proxy<\/strong>. \u0412\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u043d\u043e\u0441\u0438\u043c \u0432 \u043d\u0430\u0448 \u0447\u0430\u0440\u0442 paas-tenant, \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u0432 namespace paas-tenant-1.<\/p>\n<p><strong>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c ConfigMap<\/strong>. \u0421\u043e\u0437\u0434\u0430\u0435\u043c ConfigMap \u0432 namespace paas-tenant-1 \u0441 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0435\u0439 \u0434\u043b\u044f oauth2-proxy. \u0412 \u043d\u0435\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b OIDC: client_id \u0438 client_secret \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 Casdoor (\u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 PaaS), URL \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0430 (IP-\u0430\u0434\u0440\u0435\u0441<\/p>\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-467586","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/467586","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=467586"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/467586\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=467586"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=467586"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=467586"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}