{"id":88990,"date":"2020-07-17T07:41:56","date_gmt":"2020-07-17T05:41:56","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/validacziya-kubernetes-yaml-na-sootvetstvie-luchshim-praktikam-i-politikam"},"modified":"2020-07-17T07:41:56","modified_gmt":"2020-07-17T05:41:56","slug":"validacziya-kubernetes-yaml-na-sootvetstvie-luchshim-praktikam-i-politikam","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/validacziya-kubernetes-yaml-na-sootvetstvie-luchshim-praktikam-i-politikam","title":{"rendered":"Validimi i YAML t\u00eb Kubernetes p\u00ebr t'u p\u00ebrputhur me praktikat m\u00eb t\u00eb mira dhe politikat","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><em><strong>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.<\/strong>: \u0421 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 YAML-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f K8s-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435. \u0410\u0432\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u043e \u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Deployment&#8217;\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430.<\/em><\/p>\n<p>\n<img decoding=\"async\" alt=\"\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f Kubernetes YAML \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c \u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430\u043c\" src=\"\/wp-content\/uploads\/2020\/07\/d8abcc539a4af71c685a724cfea74240.png\" style=\"display:block;margin: 0 auto;\" \/><\/p>\n<p><em><strong>TL;DR<\/strong>: \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0448\u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 YAML-\u0444\u0430\u0439\u043b\u043e\u0432 Kubernetes \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c.<\/em><\/p>\n<p><\/p>\n<p>\u0420\u0430\u0431\u043e\u0447\u0438\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 Kubernetes, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 YAML-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 YAML&#8217;\u043e\u043c \u2014 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432.<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p><\/p>\n<p><strong>\u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u0431\u0440\u0430\u0437\u044b, \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435, \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0435\u0441\u0442\u0440\u0430?<\/strong><\/p>\n<p><\/p>\n<p><strong>\u041a\u0430\u043a \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Deployment&#8217;\u043e\u0432, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u044b PodDisruptionBudgets?<\/strong><\/p>\n<p><\/p>\n<p>\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0435\u0449\u0435 \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043f\u043e\u0432\u044b\u0448\u0430\u044e\u0442\u0441\u044f \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e production-\u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c.<\/p>\n<p><\/p>\n<p>\u042d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 YAML-\u0444\u0430\u0439\u043b\u043e\u0432 Kubernetes \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438:<\/p>\n<p><\/p>\n<ul>\n<li><strong>API-\u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u044b<\/strong>. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u044d\u0442\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 YAML-\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c API-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 Kubernetes.<\/li>\n<li><strong>\u0413\u043e\u0442\u043e\u0432\u044b\u0435 \u0442\u0435\u0441\u0442\u0435\u0440\u044b<\/strong>. \u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0438\u0434\u0443\u0442 \u0441 \u0433\u043e\u0442\u043e\u0432\u044b\u043c\u0438 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u043d\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c \u0438 \u0442.\u043f.<\/li>\n<li><strong>\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u044b<\/strong>. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u0438 \u044d\u0442\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 Rego \u0438 Javascript.<\/li>\n<\/ul>\n<p><\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0448\u0435\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p><\/p>\n<ol>\n<li>kubeval;<\/li>\n<li>kube-score;<\/li>\n<li>config-lint;<\/li>\n<li>copper;<\/li>\n<li>conftest;<\/li>\n<li>Polaris.<\/li>\n<\/ol>\n<p><\/p>\n<p>\u0427\u0442\u043e \u0436, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c!<\/p>\n<p><\/p>\n<h2 id=\"proverka-deploymentov\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 Deployment&#8217;\u043e\u0432<\/h2>\n<p><\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0441\u043d\u043e\u0432\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u0438\u0445 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p><\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0440\u044f\u0434 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c: \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0438\u0445 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438?<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  name: http-echo\nspec:\n  replicas: 2\n  selector:\n    matchLabels:\n      app: http-echo\n  template:\n    metadata:\n      labels:\n        app: http-echo\n    spec:\n      containers:\n      - name: http-echo\n        image: hashicorp\/http-echo\n        args: [&quot;-text&quot;, &quot;hello-world&quot;]\n        ports:\n        - containerPort: 5678\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: http-echo\nspec:\n  ports:\n  - port: 5678\n    protocol: TCP\n    targetPort: 5678\n  selector:\n    app: http-echo<\/code><\/pre>\n<p><\/p>\n<p><em>(<code>base-valid.yaml<\/code>)<\/em><\/p>\n<p><\/p>\n<p>\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 YAML \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<p><\/p>\n<blockquote><p>\u0412\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 <code>base-valid.yaml<\/code> \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u044b \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/amitsaha\/kubernetes-static-checkers-demo\">Git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a><\/noindex>.<\/p><\/blockquote>\n<p>\u041c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u2014 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c \u00abHello World\u00bb \u043d\u0430 \u043f\u043e\u0440\u0442 5678. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">kubectl apply -f hello-world.yaml<\/code><\/pre>\n<p><\/p>\n<p>\u0410 \u0442\u0430\u043a \u2014 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">kubectl port-forward svc\/http-echo 8080:5678<\/code><\/pre>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"http:\/\/localhost:8080\">http:\/\/localhost:8080<\/a><\/noindex> \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u041d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u043e\u043d\u043e \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c? <strong>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c.<\/strong><\/p>\n<p><\/p>\n<h3 id=\"1-kubeval\">1. Kubeval<\/h3>\n<p><\/p>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u0435 <noindex><a rel=\"nofollow\" href=\"https:\/\/www.kubeval.com\/\">kubeval<\/a><\/noindex> \u043b\u0435\u0436\u0438\u0442 \u0438\u0434\u0435\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043b\u044e\u0431\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 Kubernetes \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0435\u0433\u043e REST API. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 API \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u043e\u0433\u043e, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0439 YAML. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/www.kubeval.com\/installation\/\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435<\/a><\/noindex> kubeval \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><\/p>\n<blockquote><p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f 0.15.0.<\/p><\/blockquote>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u00ab\u0441\u043a\u043e\u0440\u043c\u0438\u043c\u00bb \u0435\u043c\u0443 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ kubeval base-valid.yaml\nPASS - base-valid.yaml contains a valid Deployment (http-echo)\nPASS - base-valid.yaml contains a valid Service (http-echo)<\/code><\/pre>\n<p><\/p>\n<p>\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 kubeval \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 exit-\u043a\u043e\u0434\u043e\u043c 0. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ echo $?\n0<\/code><\/pre>\n<p><\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c kubeval \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  name: http-echo\nspec:\n  replicas: 2\n  template:\n    metadata:\n      labels:\n        app: http-echo\n    spec:\n      containers:\n      - name: http-echo\n        image: hashicorp\/http-echo\n        args: [&quot;-text&quot;, &quot;hello-world&quot;]\n        ports:\n        - containerPort: 5678\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: http-echo\nspec:\n  ports:\n  - port: 5678\n    protocol: TCP\n    targetPort: 5678\n  selector:\n    app: http-echo<\/code><\/pre>\n<p><\/p>\n<p><em>(<code>kubeval-invalid.yaml<\/code>)<\/em><\/p>\n<p><\/p>\n<p>\u041c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430 \u0433\u043b\u0430\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443? \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ kubeval kubeval-invalid.yaml\nWARN - kubeval-invalid.yaml contains an invalid Deployment (http-echo) - selector: selector is required\nPASS - kubeval-invalid.yaml contains a valid Service (http-echo)\n\n# \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043a\u043e\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430\n$ echo $?\n1<\/code><\/pre>\n<p><\/p>\n<p>\u0420\u0435\u0441\u0443\u0440\u0441 \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443.<\/p>\n<p><\/p>\n<p>Deployment&#8217;\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u044e API <code>apps\/v1<\/code>, \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043a\u0435 pod&#8217;\u0430. \u041c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0432\u044b\u0448\u0435 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 kubeval \u0441\u043e\u043e\u0431\u0449\u0438\u043b \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u0438 \u0432\u044b\u0448\u0435\u043b \u0441 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u043c \u043a\u043e\u0434\u043e\u043c.<\/p>\n<p><\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c <code>kubectl apply -f<\/code> \u0441 \u044d\u0442\u0438\u043c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c?<\/p>\n<p><\/p>\n<p>\u0427\u0442\u043e \u0436, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ kubectl apply -f kubeval-invalid.yaml\nerror: error validating &quot;kubeval-invalid.yaml&quot;: error validating data: ValidationError(Deployment.spec):\nmissing required field &quot;selector&quot; in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors,\nturn validation off with --validate=false<\/code><\/pre>\n<p><\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u043b kubeval. \u0418\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0435 \u043c\u043e\u0436\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  name: http-echo\nspec:\n  replicas: 2\n  selector:          # !!!\n    matchLabels:     # !!!\n      app: http-echo # !!!\n  template:\n    metadata:\n      labels:\n        app: http-echo\n    spec:\n      containers:\n      - name: http-echo\n        image: hashicorp\/http-echo\n        args: [&quot;-text&quot;, &quot;hello-world&quot;]\n        ports:\n        - containerPort: 5678\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: http-echo\nspec:\n  ports:\n  - port: 5678\n    protocol: TCP\n    targetPort: 5678\n  selector:\n    app: http-echo<\/code><\/pre>\n<p><\/p>\n<p><em>(<code>base-valid.yaml<\/code>)<\/em><\/p>\n<p><\/p>\n<p><strong>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u0440\u043e\u0434\u0435 kubeval \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0430 \u0440\u0430\u043d\u043d\u0438\u0445 \u0441\u0442\u0430\u0434\u0438\u044f\u0445 \u0446\u0438\u043a\u043b\u0430 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f.<\/strong><\/p>\n<p><\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440: \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043e\u0444\u0444\u043b\u0430\u0439\u043d.<\/p>\n<p><\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e kubeval \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0445\u0435\u043c\u0435 Kubernetes API. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0440\u0435\u043b\u0438\u0437\u0443 Kubernetes. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u043b\u0430\u0433\u0430 <code>--kubernetes-version<\/code>:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ kubeval --kubernetes-version 1.16.1 base-valid.yaml<\/code><\/pre>\n<p><\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <code>Major.Minor.Patch<\/code>.<\/p>\n<p><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0435\u0440\u0441\u0438\u0439, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043a <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/instrumenta\/kubernetes-json-schema\">JSON-\u0441\u0445\u0435\u043c\u0435 \u043d\u0430 GitHub<\/a><\/noindex>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e kubeval \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c kubeval \u043e\u0444\u0444\u043b\u0430\u0439\u043d, \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0441\u0445\u0435\u043c\u044b \u0438 \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u043b\u0430\u0433\u0430 <code>--schema-location<\/code>.<\/p>\n<p><\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 YAML-\u0444\u0430\u0439\u043b\u043e\u0432, kubeval \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c\u0438 \u0438 stdin.<\/p>\n<p><\/p>\n<p><strong>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, Kubeval \u043b\u0435\u0433\u043a\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d CI.<\/strong> \u0416\u0435\u043b\u0430\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0434\u044b \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e kubeval \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0442\u0440\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 \u0432\u044b\u0432\u043e\u0434\u0430:<\/p>\n<p><\/p>\n<ol>\n<li>\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442;<\/li>\n<li>JSON;<\/li>\n<li>Test Anything Protocol (TAP).<\/li>\n<\/ol>\n<p><\/p>\n<p>\u0418 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0432\u044b\u0432\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0434\u043a\u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0433\u043e \u0432\u0438\u0434\u0430.<\/p>\n<p><\/p>\n<p><strong>\u041e\u0434\u0438\u043d \u0438\u0437 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432 kubeval \u2014 \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u043d \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 Custom Resource Definitions (CRDs).<\/strong> \u041e\u0434\u043d\u0430\u043a\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c kubeval <noindex><a rel=\"nofollow\" href=\"https:\/\/kubeval.instrumenta.dev\/#crds\">\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>Kubeval \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432; \u043f\u0440\u0430\u0432\u0434\u0430, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c, \u0447\u0442\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u0430 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0440\u0435\u0441\u0443\u0440\u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c. <\/p>\n<p><\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0435\u0433\u0430 <code>latest<\/code> \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c. \u041e\u0434\u043d\u0430\u043a\u043e kubeval \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u044d\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u043e\u0439 \u0438 \u043d\u0435 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u043d\u0435\u0439. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0442\u0430\u043a\u043e\u0433\u043e YAML \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0431\u0435\u0437 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439.<\/p>\n<p><\/p>\n<p>\u041d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c YAML \u0438 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0432\u0440\u043e\u0434\u0435 \u0442\u0435\u0433\u0430 <code>latest<\/code>? \u041a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c YAML-\u0444\u0430\u0439\u043b \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c?<\/p>\n<p><\/p>\n<h3 id=\"2-kube-score\">2. Kube-score<\/h3>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zegl\/kube-score\">Kube-score<\/a><\/noindex> \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u044b YAML \u0438 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0438\u0445 \u043f\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u0430\u043c. \u042d\u0442\u0438 \u0442\u0435\u0441\u0442\u044b \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043f\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0438 \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p><\/p>\n<ul>\n<li>\u0417\u0430\u043f\u0443\u0441\u043a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043d\u0435 \u043f\u043e\u0434 root&#8217;\u043e\u043c.<\/li>\n<li>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f pod&#8217;\u043e\u0432.<\/li>\n<li>\u0417\u0430\u0434\u0430\u043d\u0438\u0435 request&#8217;\u043e\u0432 \u0438 limit&#8217;\u043e\u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/li>\n<\/ul>\n<p><\/p>\n<p>\u041f\u043e \u0438\u0442\u043e\u0433\u0430\u043c \u0442\u0435\u0441\u0442\u0430 \u0432\u044b\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430: <em>OK<\/em>, <em>WARNING<\/em> \u0438 <em>CRITICAL<\/em>.<\/p>\n<p><\/p>\n<p>Kube-score \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043e\u043d\u043b\u0430\u0439\u043d \u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e.<\/p>\n<p><\/p>\n<blockquote><p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u0430\u043c\u043e\u0439 \u0441\u0432\u0435\u0436\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 kube-score \u0431\u044b\u043b\u0430 1.7.0.<\/p><\/blockquote>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0441\u043f\u044b\u0442\u0430\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 <code>base-valid.yaml<\/code>:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ kube-score score base-valid.yaml\n\napps\/v1\/Deployment http-echo\n[CRITICAL] Container Image Tag\n  \u00b7 http-echo -&gt; Image with latest tag\n      Using a fixed tag is recommended to avoid accidental upgrades\n[CRITICAL] Pod NetworkPolicy\n  \u00b7 The pod does not have a matching network policy\n      Create a NetworkPolicy that targets this pod\n[CRITICAL] Pod Probes\n  \u00b7 Container is missing a readinessProbe\n      A readinessProbe should be used to indicate when the service is ready to receive traffic.\n      Without it, the Pod is risking to receive traffic before it has booted. It is also used during\n      rollouts, and can prevent downtime if a new version of the application is failing.\n      More information: https:\/\/github.com\/zegl\/kube-score\/blob\/master\/README_PROBES.md\n[CRITICAL] Container Security Context\n  \u00b7 http-echo -&gt; Container has no configured security context\n      Set securityContext to run the container in a more secure context.\n[CRITICAL] Container Resources\n  \u00b7 http-echo -&gt; CPU limit is not set\n      Resource limits are recommended to avoid resource DDOS. Set resources.limits.cpu\n  \u00b7 http-echo -&gt; Memory limit is not set\n      Resource limits are recommended to avoid resource DDOS. Set resources.limits.memory\n  \u00b7 http-echo -&gt; CPU request is not set\n      Resource requests are recommended to make sure that the application can start and run without\n      crashing. Set resources.requests.cpu\n  \u00b7 http-echo -&gt; Memory request is not set\n      Resource requests are recommended to make sure that the application can start and run without crashing.\n      Set resources.requests.memory\n[CRITICAL] Deployment has PodDisruptionBudget\n  \u00b7 No matching PodDisruptionBudget was found\n      It is recommended to define a PodDisruptionBudget to avoid unexpected downtime during Kubernetes\n      maintenance operations, such as when draining a node.\n[WARNING] Deployment has host PodAntiAffinity\n  \u00b7 Deployment does not have a host podAntiAffinity set\n      It is recommended to set a podAntiAffinity that stops multiple pods from a deployment from\n      being scheduled on the same node. This increases availability in case the node becomes unavailable.<\/code><\/pre>\n<p><\/p>\n<p>YAML \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 kubeval, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a kube-score \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:<\/p>\n<p><\/p>\n<ul>\n<li>\u041d\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 request&#8217;\u044b \u0438 limit&#8217;\u044b \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b CPU \u0438 \u043f\u0430\u043c\u044f\u0442\u044c.<\/li>\n<li>\u041d\u0435 \u0437\u0430\u0434\u0430\u043d\u044b Pod disruption budgets.<\/li>\n<li>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f <em>(anti-affinity)<\/em> \u0434\u043b\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 root&#8217;\u043e\u043c.<\/li>\n<\/ul>\n<p><\/p>\n<p><strong>\u0412\u0441\u0451 \u044d\u0442\u043e \u2014 \u0440\u0435\u0437\u043e\u043d\u043d\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043e \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b Deployment \u0441\u0442\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u043c.<\/strong><\/p>\n<p><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>kube-score<\/code> \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0443\u0434\u043e\u0431\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0439 \u0444\u043e\u0440\u043c\u0435 \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0441\u0435\u0445 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0439 \u0442\u0438\u043f\u0430 <em>WARNING<\/em> \u0438 <em>CRITICAL<\/em>, \u0447\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p><\/p>\n<p>\u0416\u0435\u043b\u0430\u044e\u0449\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 CI \u043c\u043e\u0433\u0443\u0442 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u0436\u0430\u0442\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u043b\u0430\u0433\u0430 <code>--output-format ci<\/code> (\u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0442\u0435\u0441\u0442\u044b \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c <em>OK<\/em>):<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ kube-score score base-valid.yaml --output-format ci\n\n[OK] http-echo apps\/v1\/Deployment\n[OK] http-echo apps\/v1\/Deployment\n[CRITICAL] http-echo apps\/v1\/Deployment: (http-echo) CPU limit is not set\n[CRITICAL] http-echo apps\/v1\/Deployment: (http-echo) Memory limit is not set\n[CRITICAL] http-echo apps\/v1\/Deployment: (http-echo) CPU request is not set\n[CRITICAL] http-echo apps\/v1\/Deployment: (http-echo) Memory request is not set\n[CRITICAL] http-echo apps\/v1\/Deployment: (http-echo) Image with latest tag\n[OK] http-echo apps\/v1\/Deployment\n[CRITICAL] http-echo apps\/v1\/Deployment: The pod does not have a matching network policy\n[CRITICAL] http-echo apps\/v1\/Deployment: Container is missing a readinessProbe\n[CRITICAL] http-echo apps\/v1\/Deployment: (http-echo) Container has no configured security context\n[CRITICAL] http-echo apps\/v1\/Deployment: No matching PodDisruptionBudget was found\n[WARNING] http-echo apps\/v1\/Deployment: Deployment does not have a host podAntiAffinity set\n[OK] http-echo v1\/Service\n[OK] http-echo v1\/Service\n[OK] http-echo v1\/Service\n[OK] http-echo v1\/Service<\/code><\/pre>\n<p><\/p>\n<p>\u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 kubeval, kube-score \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u043a\u043e\u0434 \u0432\u044b\u0445\u043e\u0434\u0430 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0442\u0435\u0441\u0442\u0430, \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439 <em>CRITICAL<\/em>. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438 \u0434\u043b\u044f <em>WARNING<\/em>.<\/p>\n<p><\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0432\u0435\u0440\u0441\u0438\u044f\u043c API (\u043a\u0430\u043a \u0438 \u0432 kubeval). \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430&#8217;hardcode&#8217;\u043d\u0430 \u0432 \u0441\u0430\u043c\u043e\u043c kube-score: \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e Kubernetes \u043d\u0435\u043b\u044c\u0437\u044f. \u041f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u044f\u043c\u0438 K8s.<\/p>\n<p><\/p>\n<blockquote><p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zegl\/kube-score\/issues\/63\">\u0443\u0436\u0435 \u0435\u0441\u0442\u044c issue<\/a><\/noindex> \u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c.<\/p><\/blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e kube-score \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/zegl\/kube-score\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0422\u0435\u0441\u0442\u044b kube-score \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a, \u043d\u043e \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0441\u0442 \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430? \u0423\u0432\u044b, \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p><\/p>\n<p><strong>Kube-score \u043d\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c: \u0432 \u043d\u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0438\u043b\u0438 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u0445.<\/strong><\/p>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430\u043c, \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u043c \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: config-lint, copper, conftest \u0438\u043b\u0438 polaris.<\/p>\n<p><\/p>\n<h3 id=\"3-config-lint\">3. Config-lint<\/h3>\n<p><\/p>\n<p>Config-lint \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 YAML, JSON, Terraform, CSV \u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432 Kubernetes.<\/p>\n<p><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <noindex><a rel=\"nofollow\" href=\"https:\/\/stelligent.github.io\/config-lint\/#\/install\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439<\/a><\/noindex> \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><\/p>\n<blockquote><p>\u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0435\u043b\u0438\u0437 \u043f\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044e \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 1.5.0.<\/p><\/blockquote>\n<p><strong>Config-lint \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432 Kubernetes.<\/strong><\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041e\u043d\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 YAML-\u0444\u0430\u0439\u043b\u044b, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 \u00ab\u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u00bb <em>(rulesets)<\/em>, \u0438 \u0438\u043c\u0435\u044e\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">version: 1\ndescription: Rules for Kubernetes spec files\ntype: Kubernetes\nfiles:\n  - &quot;*.yaml&quot;\nrules:\n   # \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b<\/code><\/pre>\n<p><\/p>\n<p><em>(<code>rule.yaml<\/code>)<\/em><\/p>\n<p><\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0438\u0437\u0443\u0447\u0438\u043c \u0435\u0435 \u043f\u043e\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435:<\/p>\n<p><\/p>\n<ul>\n<li>\u041f\u043e\u043b\u0435 <code>type<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c config-lint. \u0414\u043b\u044f \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432 K8s \u044d\u0442\u043e <em>\u0432\u0441\u0435\u0433\u0434\u0430<\/em> <code>Kubernetes<\/code>.<\/li>\n<li>\u0412 \u043f\u043e\u043b\u0435 <code>files<\/code> \u043a\u0440\u043e\u043c\u0435 \u0441\u0430\u043c\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e.<\/li>\n<li>\u041f\u043e\u043b\u0435 <code>rules<\/code> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043e \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/li>\n<\/ul>\n<p><\/p>\n<p>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u044b \u0432 Deployment&#8217;\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f \u0432\u0440\u043e\u0434\u0435 <code>my-company.com\/myapp:1.0<\/code>. \u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u043b\u044f config-lint, \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u044e\u0449\u0435\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">- id: MY_DEPLOYMENT_IMAGE_TAG\n  severity: FAILURE\n  message: Deployment must use a valid image tag\n  resource: Deployment\n  assertions:\n    - every:\n        key: spec.template.spec.containers\n        expressions:\n          - key: image\n            op: starts-with\n            value: &quot;my-company.com\/&quot;<\/code><\/pre>\n<p><\/p>\n<p><em>(<code>rule-trusted-repo.yaml<\/code>)<\/em><\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b:<\/p>\n<p><\/p>\n<ul>\n<li><code>id<\/code> \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b\u0430;<\/li>\n<li><code>severity<\/code> \u2014 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c <em>FAILURE<\/em>, <em>WARNING<\/em> \u0438 <em>NON_COMPLIANT<\/em>;<\/li>\n<li><code>message<\/code> \u2014 \u043f\u0440\u0438 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438;<\/li>\n<li><code>resource<\/code> \u2014 \u0442\u0438\u043f \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e;<\/li>\n<li><code>assertions<\/code> \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430.<\/li>\n<\/ul>\n<p><\/p>\n<p>\u0412 \u043f\u0440\u0430\u0432\u0438\u043b\u0435 \u0432\u044b\u0448\u0435 <code>assertion<\/code> \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <noindex><a rel=\"nofollow\" href=\"https:\/\/stelligent.github.io\/config-lint\/#\/operations?id=every\"><code>every<\/code><\/a><\/noindex> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0432 Deployment&#8217;\u0435 (<code>key: spec.templates.spec.containers<\/code>) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b (\u0442.\u0435., \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0441 <code>my-company.com\/<\/code>).<\/p>\n<p><\/p>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 ruleset \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<p><\/p>\n<pre><code class=\"plaintext\">version: 1\ndescription: Rules for Kubernetes spec files\ntype: Kubernetes\nfiles:\n  - &quot;*.yaml&quot;\nrules:\n\n - id: DEPLOYMENT_IMAGE_REPOSITORY # !!!\n    severity: FAILURE\n    message: Deployment must use a valid image repository\n    resource: Deployment\n    assertions:\n      - every:\n          key: spec.template.spec.containers\n          expressions:\n            - key: image\n              op: starts-with\n              value: &quot;my-company.com\/&quot;<\/code><\/pre>\n<p><\/p>\n<p><em>(<code>ruleset.yaml<\/code>)<\/em><\/p>\n<p><\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u044b\u0442\u0430\u0442\u044c \u0442\u0435\u0441\u0442, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0435\u0433\u043e \u043a\u0430\u043a <code>check_image_repo.yaml<\/code>. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043d\u0430\u0434 \u0444\u0430\u0439\u043b\u043e\u043c <code>base-valid.yaml<\/code>:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ config-lint -rules check_image_repo.yaml base-valid.yaml\n\n[\n  {\n  &quot;AssertionMessage&quot;: &quot;Every expression fails: And expression fails: image does not start with my-company.com\/&quot;,\n  &quot;Category&quot;: &quot;&quot;,\n  &quot;CreatedAt&quot;: &quot;2020-06-04T01:29:25Z&quot;,\n  &quot;Filename&quot;: &quot;test-data\/base-valid.yaml&quot;,\n  &quot;LineNumber&quot;: 0,\n  &quot;ResourceID&quot;: &quot;http-echo&quot;,\n  &quot;ResourceType&quot;: &quot;Deployment&quot;,\n  &quot;RuleID&quot;: &quot;DEPLOYMENT_IMAGE_REPOSITORY&quot;,\n  &quot;RuleMessage&quot;: &quot;Deployment must use a valid image repository&quot;,\n  &quot;Status&quot;: &quot;FAILURE&quot;\n  }\n]<\/code><\/pre>\n<p><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u0432:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">apiVersion: apps\/v1\nkind: Deployment\nmetadata:\n  name: http-echo\nspec:\n  replicas: 2\n  selector:\n    matchLabels:\n      app: http-echo\n  template:\n    metadata:\n      labels:\n        app: http-echo\n    spec:\n      containers:\n      - name: http-echo\n         image: my-company.com\/http-echo:1.0 # !!!\n         args: [&quot;-text&quot;, &quot;hello-world&quot;]\n         ports:\n         - containerPort: 5678<\/code><\/pre>\n<p><\/p>\n<p><em>(<code>image-valid-mycompany.yaml<\/code>)<\/em><\/p>\n<p><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u043e\u0442 \u0436\u0435 \u0441\u0430\u043c\u044b\u0439 \u0442\u0435\u0441\u0442 \u0441 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u043c \u0432\u044b\u0448\u0435 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c. \u041f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ config-lint -rules check_image_repo.yaml image-valid-mycompany.yaml\n[]<\/code><\/pre>\n<p><\/p>\n<p>Config-lint \u2014 \u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 YAML-\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432 Kubernetes \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e YAML DSL.<\/p>\n<p><\/p>\n<p>\u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0438 \u0442\u0435\u0441\u0442\u044b? \u0420\u0430\u0437\u0432\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 YAML \u043d\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0430\u043b\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e? \u0427\u0442\u043e, \u0435\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f?<\/p>\n<p><\/p>\n<h3 id=\"4-copper\">4. Copper<\/h3>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/cloud66-oss\/copper\">Copper V2<\/a><\/noindex> \u2014 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 (\u0430\u043d\u0430\u043b\u043e\u0433 config-lint).<\/p>\n<p><\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u043e\u043d \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 YAML \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432. <strong>\u0412\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430 JavaScript. Copper \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438<\/strong>, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u043c\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u0445 Kubernetes \u0438 \u0441\u043e\u043e\u0431\u0449\u0430\u0442\u044c \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445.<\/p>\n<p><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0448\u0430\u0433\u043e\u0432 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Copper \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/cloud66-oss\/copper#installation\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a><\/noindex>.<\/p>\n<p><\/p>\n<blockquote><p>2.0.1 \u2014 \u0441\u0430\u043c\u044b\u0439 \u0441\u0432\u0435\u0436\u0438\u0439 \u0440\u0435\u043b\u0438\u0437 \u044d\u0442\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p><\/blockquote>\n<p>\u041a\u0430\u043a \u0438 config-lint, Copper \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043e\u0434\u0438\u043d. \u041f\u0443\u0441\u0442\u044c \u043e\u043d \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e deployment&#8217;\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0437\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0432\u0440\u043e\u0434\u0435 <code>my-company.com<\/code>.<\/p>\n<p><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>check_image_repo.js<\/code> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p><\/p>\n<pre><code class=\"javascript\">$$.forEach(function($){\n    if ($.kind === 'Deployment') {\n        $.spec.template.spec.containers.forEach(function(container) {\n            var image = new DockerImage(container.image);\n            if (image.registry.lastIndexOf('my-company.com\/') != 0) {\n                errors.add_error('no_company_repo',&quot;Image &quot; + $.metadata.name + &quot; is not from my-company.com repo&quot;, 1)\n            }\n        });\n    }\n});<\/code><\/pre>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0430\u0448 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 <code>base-valid.yaml<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>copper validate<\/code>:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ copper validate --in=base-valid.yaml --validator=check_image_tag.js\n\nCheck no_company_repo failed with severity 1 due to Image http-echo is not from my-company.com repo\nValidation failed<\/code><\/pre>\n<p><\/p>\n<p>\u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e copper \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0430\u0445 Ingress \u0438\u043b\u0438 \u043e\u0442\u0432\u0435\u0440\u0433\u0430\u0442\u044c pod&#8217;\u044b, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u0432 \u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<p><\/p>\n<p>\u0412 Copper \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<p><\/p>\n<ul>\n<li><code>DockerImage<\/code> \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0430\u0439\u043b \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438:\n<ul>\n<li><code>name<\/code> \u2014 \u0438\u043c\u044f \u043e\u0431\u0440\u0430\u0437\u0430,<\/li>\n<li><code>tag<\/code> \u2014 \u0442\u0435\u0433 \u043e\u0431\u0440\u0430\u0437\u0430,<\/li>\n<li><code>registry<\/code> \u2014 \u0440\u0435\u0435\u0441\u0442\u0440 \u043e\u0431\u0440\u0430\u0437\u043e\u0432,<\/li>\n<li><code>registry_url<\/code> \u2014 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b (<code>https:\/\/<\/code>) \u0438 \u0440\u0435\u0435\u0441\u0442\u0440 \u043e\u0431\u0440\u0430\u0437\u043e\u0432,<\/li>\n<li><code>fqin<\/code> \u2014 \u043f\u043e\u043b\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0437\u0430.<\/li>\n<\/ul>\n<\/li>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>findByName<\/code> \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441 \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 (<code>kind<\/code>) \u0438 \u0438\u043c\u0435\u043d\u0438 (<code>name<\/code>) \u0438\u0437 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430.<\/li>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>findByLabels<\/code> \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 (<code>kind<\/code>) \u0438 \u043c\u0435\u0442\u043a\u0430\u043c (<code>labels<\/code>).<\/li>\n<\/ul>\n<p><\/p>\n<p>\u0421\u043e \u0432\u0441\u0435\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/cloud66-oss\/copper\/tree\/master\/libjs\">\u0437\u0434\u0435\u0441\u044c<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u043d \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0432\u0435\u0441\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 YAML-\u0444\u0430\u0439\u043b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>$$<\/code> \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0434\u043b\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 (\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u043e\u043f\u044b\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 jQuery).<\/p>\n<p><\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043f\u043b\u044e\u0441 Copper \u043e\u0447\u0435\u0432\u0438\u0434\u0435\u043d: \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044f\u0437\u044b\u043a \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 JavaScript \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u043a, \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0442.\u0434.<\/p>\n<p><\/p>\n<blockquote><p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Copper \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 ES5 \u0434\u0432\u0438\u0436\u043a\u0430 JavaScript, \u0430 \u043d\u0435 \u0441 ES6.<\/p><\/blockquote>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/cloud66-oss\/copper\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043b\u044e\u0431\u0438\u0442\u0435 JavaScript \u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u044f\u0437\u044b\u043a, \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a, \u0432\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 conftest.<\/p>\n<p><\/p>\n<h3 id=\"5-conftest\">5. Conftest<\/h3>\n<p><\/p>\n<p>Conftest \u2014 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0438 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\/\u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432 Kubernetes. \u0422\u0435\u0441\u0442\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 <noindex><a rel=\"nofollow\" href=\"https:\/\/www.openpolicyagent.org\/docs\/latest\/policy-language\/\">Rego<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c conftest \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <noindex><a rel=\"nofollow\" href=\"https:\/\/www.conftest.dev\/install\/\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439<\/a><\/noindex>, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p><\/p>\n<blockquote><p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441\u0430\u043c\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0431\u044b\u043b\u0430 0.18.2.<\/p><\/blockquote>\n<p>\u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 config-lint \u0438 copper, conftest \u0438\u0434\u0435\u0442 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0433\u043e \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443. \u041a\u0430\u043a \u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445, \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c, \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u043b\u0438 \u043e\u0431\u0440\u0430\u0437\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0438\u0437 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.<\/p>\n<p><\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>conftest-checks<\/code>, \u0430 \u0432 \u043d\u0435\u0439 \u2014 \u0444\u0430\u0439\u043b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <code>check_image_registry.rego<\/code> \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<p><\/p>\n<pre><code class=\"go\">package main\n\ndeny[msg] {\n\n  input.kind == &quot;Deployment&quot;\n  image := input.spec.template.spec.containers[_].image\n  not startswith(image, &quot;my-company.com\/&quot;)\n  msg := sprintf(&quot;image '%v' doesn't come from my-company.com repository&quot;, [image])\n}<\/code><\/pre>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c <code>base-valid.yaml<\/code> \u0447\u0435\u0440\u0435\u0437 <code>conftest<\/code>:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ conftest test --policy .\/conftest-checks base-valid.yaml\n\nFAIL - base-valid.yaml - image 'hashicorp\/http-echo' doesn't come from my-company.com repository\n1 tests, 1 passed, 0 warnings, 1 failure<\/code><\/pre>\n<p><\/p>\n<p>\u0422\u0435\u0441\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u043b\u0441\u044f, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u0431\u0440\u0430\u0437\u044b \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0438\u0437 \u043d\u0435\u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430.<\/p>\n<p><\/p>\n<p>\u0412 \u0444\u0430\u0439\u043b\u0435 Rego \u043c\u044b \u0437\u0430\u0434\u0430\u0435\u043c \u0431\u043b\u043e\u043a <code>deny<\/code>. \u0415\u0433\u043e \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435. \u0415\u0441\u043b\u0438 \u0431\u043b\u043e\u043a\u043e\u0432 <code>deny<\/code> \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, conftest \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0438\u0445 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u0434\u0440\u0443\u0433 \u043e\u0442 \u0434\u0440\u0443\u0433\u0430, \u0438 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u044c \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u0431\u043b\u043e\u043a\u043e\u0432 \u0442\u0440\u0430\u043a\u0442\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u0435.<\/p>\n<p><\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e conftest \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 JSON, TAP \u0438 \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u2014 \u043a\u0440\u0430\u0439\u043d\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u0447\u0435\u0442\u044b \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d CI. \u0417\u0430\u0434\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u043b\u0430\u0433\u0430 <code>--output<\/code>.<\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0432 conftest \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0444\u043b\u0430\u0433 <code>--trace<\/code>. \u041e\u043d \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0443 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a conftest \u043f\u0430\u0440\u0441\u0438\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u043e\u043b\u0438\u0442\u0438\u043a.<\/p>\n<p><\/p>\n<p>\u041f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 conftest \u043c\u043e\u0436\u043d\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438\u043c\u0438 \u0432 OCI-\u0440\u0435\u0435\u0441\u0442\u0440\u0430\u0445 (Open Container Initiative) \u0432 \u0432\u0438\u0434\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432.<\/p>\n<p><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u044b <code>push<\/code> \u0438 <code>pull<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442 \u0438\u043b\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442 \u0438\u0437 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0435\u0441\u0442\u0440\u0430. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u043d\u0430\u043c\u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0435\u0441\u0442\u0440 Docker \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>conftest push<\/code>.<\/p>\n<p><\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0435\u0441\u0442\u0440 Docker:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ docker run -it --rm -p 5000:5000 registry<\/code><\/pre>\n<p><\/p>\n<p>\u0412 \u0434\u0440\u0443\u0433\u043e\u043c \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0440\u0430\u043d\u0435\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>conftest-checks<\/code> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ conftest push 127.0.0.1:5000\/amitsaha\/opa-bundle-example:latest<\/code><\/pre>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0438\u043f\u0430:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">2020\/06\/10 14:25:43 pushed bundle with digest: sha256:e9765f201364c1a8a182ca637bc88201db3417bacc091e7ef8211f6c2fd2609c<\/code><\/pre>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0432 \u043d\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>conftest pull<\/code>. \u041e\u043d\u0430 \u0441\u043a\u0430\u0447\u0430\u0435\u0442 \u0432 \u043d\u0435\u0435 \u043f\u0430\u043a\u0435\u0442, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ cd $(mktemp -d)\n$ conftest pull 127.0.0.1:5000\/amitsaha\/opa-bundle-example:latest<\/code><\/pre>\n<p><\/p>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433 <code>policy<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043d\u0430\u0448 \u0444\u0430\u0439\u043b \u0441 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u043e\u0439:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ tree\n.\n\u2514\u2500\u2500 policy\n  \u2514\u2500\u2500 check_image_registry.rego<\/code><\/pre>\n<p><\/p>\n<p>\u0422\u0435\u0441\u0442\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ conftest test --update 127.0.0.1:5000\/amitsaha\/opa-bundle-example:latest base-valid.yaml\n..\nFAIL - base-valid.yaml - image 'hashicorp\/http-echo' doesn't come from my-company.com repository\n2 tests, 1 passed, 0 warnings, 1 failure<\/code><\/pre>\n<p><\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, DockerHub \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0447\u0438\u0442\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043f\u043e\u0432\u0435\u0437\u043b\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <noindex><a rel=\"nofollow\" href=\"https:\/\/azure.microsoft.com\/en-us\/services\/container-registry\/\">Azure Container Registry<\/a><\/noindex> (ACR) \u0438\u043b\u0438 \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0435\u0441\u0442\u0440.<\/p>\n<p><\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432 \u2014 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435, \u043a\u0430\u043a \u0443 <noindex><a rel=\"nofollow\" href=\"https:\/\/www.openpolicyagent.org\/docs\/latest\/bundles\">\u043f\u0430\u043a\u0435\u0442\u043e\u0432 Open Policy Agent<\/a><\/noindex> (OPA), \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c conftest \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438\u0437 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 OPA.<\/p>\n<p><\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 conftest \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/www.conftest.dev\/\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex>.<\/p>\n<p><\/p>\n<h3 id=\"6-polaris\">6. Polaris<\/h3>\n<p><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u2014 \u044d\u0442\u043e <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/FairwindsOps\/polaris\">Polaris<\/a><\/noindex>. <em>(\u0415\u0433\u043e \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e\u0434\u043d\u0438\u0439 \u0430\u043d\u043e\u043d\u0441 \u043c\u044b <noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/454706\/\">\u0443\u0436\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043b\u0438<\/a><\/noindex> \u2014 <strong>\u043f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.<\/strong>)<\/em><\/p>\n<p><\/p>\n<p><strong>Polaris \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u044b Kubernetes.<\/strong><\/p>\n<p><\/p>\n<p>\u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043e\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0442\u0430\u043a\u0438\u0435 \u043e\u0431\u043b\u0430\u0441\u0442\u0438, \u043a\u0430\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u0438 \u043b\u0443\u0447\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438 (\u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 kube-score). \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b (\u043a\u0430\u043a \u0432 config-lint, copper \u0438 conftest).<\/p>\n<p><\/p>\n<p>\u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, Polaris \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043f\u043b\u044e\u0441\u044b \u043e\u0431\u0435\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432: \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c\u0438 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438 \u0442\u0435\u0441\u0442\u0430\u043c\u0438.<\/p>\n<p><\/p>\n<p>\u0414\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 Polaris \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/FairwindsOps\/polaris\/blob\/master\/docs\/usage.md#cli\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex>.<\/p>\n<p><\/p>\n<blockquote><p>\u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u044f 1.0.3.<\/p><\/blockquote>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c polaris \u043d\u0430 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 <code>base-valid.yaml<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ polaris audit --audit-path base-valid.yaml<\/code><\/pre>\n<p><\/p>\n<p>\u041e\u043d\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON \u0441 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0438 \u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438. \u0412\u044b\u0432\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:<\/p>\n<p><\/p>\n<pre><code class=\"json\">{\n  &quot;PolarisOutputVersion&quot;: &quot;1.0&quot;,\n  &quot;AuditTime&quot;: &quot;0001-01-01T00:00:00Z&quot;,\n  &quot;SourceType&quot;: &quot;Path&quot;,\n  &quot;SourceName&quot;: &quot;test-data\/base-valid.yaml&quot;,\n  &quot;DisplayName&quot;: &quot;test-data\/base-valid.yaml&quot;,\n  &quot;ClusterInfo&quot;: {\n    &quot;Version&quot;: &quot;unknown&quot;,\n    &quot;Nodes&quot;: 0,\n    &quot;Pods&quot;: 2,\n    &quot;Namespaces&quot;: 0,\n    &quot;Controllers&quot;: 2\n  },\n  &quot;Results&quot;: [\n    \/* \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a *\/\n  ]\n}<\/code><\/pre>\n<p><\/p>\n<p><em>\u041f\u043e\u043b\u043d\u044b\u0439 \u0432\u044b\u0432\u043e\u0434 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/amitsaha\/kubernetes-static-checkers-demo\/blob\/master\/base-valid-polaris-result.json\">\u0437\u0434\u0435\u0441\u044c<\/a><\/noindex>.<\/em><\/p>\n<p><\/p>\n<p>\u041a\u0430\u043a \u0438 kube-score, Polaris \u0432\u044b\u044f\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432 \u0442\u0435\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c:<\/p>\n<p><\/p>\n<ul>\n<li>\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f pod&#8217;\u043e\u0432.<\/li>\n<li>\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0442\u0435\u0433\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u043e\u0432.<\/li>\n<li>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 root&#8217;\u043e\u043c.<\/li>\n<li>\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b request&#8217;\u044b \u0438 limit&#8217;\u044b \u0434\u043b\u044f \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 CPU.<\/li>\n<\/ul>\n<p><\/p>\n<p>\u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u0442\u0435\u0441\u0442\u0443 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438: <em>warning<\/em> \u0438\u043b\u0438 <em>danger<\/em>. \u0427\u0442\u043e\u0431\u044b \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0431 \u0438\u043c\u0435\u044e\u0449\u0438\u0445\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u0430\u0445, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435\u0441\u044c \u043a <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/FairwindsOps\/polaris\/blob\/master\/docs\/usage.md#checks\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0444\u043b\u0430\u0433 <code>--format score<\/code>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 Polaris \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 1 \u0434\u043e 100 \u2014 <em>score<\/em> (\u0442.\u0435. \u043e\u0446\u0435\u043d\u043a\u0443):<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ polaris audit --audit-path test-data\/base-valid.yaml --format score\n68<\/code><\/pre>\n<p><\/p>\n<p>\u0427\u0435\u043c \u043e\u0446\u0435\u043d\u043a\u0430 \u0431\u043b\u0438\u0436\u0435 \u043a 100, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c exit-\u043a\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>polaris audit<\/code>, \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u043d \u0440\u0430\u0432\u0435\u043d 0.<\/p>\n<p><\/p>\n<p>\u0417\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c <code>polaris audit<\/code> \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043d\u0435\u043d\u0443\u043b\u0435\u0432\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0432\u0443\u0445 \u0444\u043b\u0430\u0433\u043e\u0432:<\/p>\n<p><\/p>\n<ul>\n<li>\u0424\u043b\u0430\u0433 <code>--set-exit-code-below-score<\/code> \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 1-100. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0441 exit-\u043a\u043e\u0434\u043e\u043c 4, \u0435\u0441\u043b\u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043d\u0438\u0436\u0435 \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0439. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0435 \u043f\u043e\u0440\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0441\u043a\u0430\u0436\u0435\u043c, 75), \u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c alert, \u0435\u0441\u043b\u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f \u043d\u0438\u0436\u0435.<\/li>\n<li>\u0424\u043b\u0430\u0433 <code>--set-exit-code-on-danger<\/code> \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0441 \u043a\u043e\u0434\u043e\u043c 3, \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 danger-\u0442\u0435\u0441\u0442\u043e\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e.<\/li>\n<\/ul>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0442\u0435\u0441\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0449\u0438\u0439, \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043b\u0438 \u043e\u0431\u0440\u0430\u0437 \u0438\u0437 \u0434\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 YAML, \u0430 \u0441\u0430\u043c \u0442\u0435\u0441\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JSON Schema.<\/p>\n<p><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 YAML-\u043a\u043e\u0434\u0430 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0442\u0435\u0441\u0442, \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 <code>checkImageRepo<\/code>:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">checkImageRepo:\n  successMessage: Image registry is valid\n  failureMessage: Image registry is not valid\n  category: Images\n  target: Container\n  schema:\n    '$schema': http:\/\/json-schema.org\/draft-07\/schema\n    type: object\n    properties:\n      image:\n        type: string\n        pattern: ^my-company.com\/.+$<\/code><\/pre>\n<p><\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043d\u0435\u0433\u043e \u043f\u043e\u0431\u043b\u0438\u0436\u0435:<\/p>\n<p><\/p>\n<ul>\n<li><code>successMessage<\/code> \u2014 \u044d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u0430, \u0435\u0441\u043b\u0438 \u0442\u0435\u0441\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e;<\/li>\n<li><code>failureMessage<\/code> \u2014 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u0438;<\/li>\n<li><code>category<\/code> \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430 \u043e\u0434\u043d\u0443 \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439: <code>Images<\/code>, <code>Health Checks<\/code>, <code>Security<\/code>, <code>Networking<\/code> \u0438 <code>Resources<\/code>;<\/li>\n<li><code>target<\/code>\u2014- \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a \u043a\u0430\u043a\u043e\u043c\u0443 \u0442\u0438\u043f\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 (<code>spec<\/code>) \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0441\u0442. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: <code>Container<\/code>, <code>Pod<\/code> \u0438\u043b\u0438 <code>Controller<\/code>;<\/li>\n<li>\u0421\u0430\u043c \u0442\u0435\u0441\u0442 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 <code>schema<\/code> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JSON schema. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0435\u0441\u0442\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <code>pattern<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u043e\u0431\u0440\u0430\u0437\u0430 \u0441 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u043c.<\/li>\n<\/ul>\n<p><\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Polaris:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">checks:\n  checkImageRepo: danger\ncustomChecks:\n  checkImageRepo:\n    successMessage: Image registry is valid\n    failureMessage: Image registry is not valid\n    category: Images\n    target: Container\n    schema:\n      '$schema': http:\/\/json-schema.org\/draft-07\/schema\n      type: object\n      properties:\n        image:\n          type: string\n          pattern: ^my-company.com\/.+$<\/code><\/pre>\n<p><\/p>\n<p><em>(<code>polaris-conf.yaml<\/code>)<\/em><\/p>\n<p><\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0444\u0430\u0439\u043b:<\/p>\n<p><\/p>\n<ul>\n<li>\u0412 \u043f\u043e\u043b\u0435 <code>checks<\/code> \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u044b \u0438 \u0438\u0445 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u0438. \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u043a\u043e\u0433\u0434\u0430 \u043e\u0431\u0440\u0430\u0437 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u043d\u0435\u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430, \u0441\u0442\u0430\u0432\u0438\u043c \u0437\u0434\u0435\u0441\u044c \u0443\u0440\u043e\u0432\u0435\u043d\u044c <code>danger<\/code>.<\/li>\n<li>\u0421\u0430\u043c \u0442\u0435\u0441\u0442 <code>checkImageRepo<\/code> \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0435 <code>customChecks<\/code>.<\/li>\n<\/ul>\n<p><\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0444\u0430\u0439\u043b \u043a\u0430\u043a <code>custom_check.yaml<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>polaris audit<\/code> \u0441 YAML-\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c, \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p><\/p>\n<p>\u041f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 <code>base-valid.yaml<\/code>:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ polaris audit --config custom_check.yaml --audit-path base-valid.yaml<\/code><\/pre>\n<p><\/p>\n<p>\u041a\u043e\u043c\u0430\u043d\u0434\u0430 <code>polaris audit<\/code> \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0442\u0435\u0441\u0442, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435, \u0438 \u043e\u043d \u043d\u0435 \u0443\u0432\u0435\u043d\u0447\u0430\u043b\u0441\u044f \u0443\u0441\u043f\u0435\u0445\u043e\u043c.<\/p>\n<p><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0437 \u043d\u0430 <code>my-company.com\/http-echo:1.0<\/code>, Polaris \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e. <em>\u041c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 \u0441 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/amitsaha\/kubernetes-static-checkers-demo\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a><\/noindex>, \u0442\u0430\u043a \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435 <code>image-valid-mycompany.yaml<\/code>.<\/em><\/p>\n<p><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u043a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438? \u041b\u0435\u0433\u043a\u043e! \u041f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u044b \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u0432 \u0444\u0430\u0439\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u043d \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">checks:\n  cpuRequestsMissing: warning\n  cpuLimitsMissing: warning\n  # Other inbuilt checks..\n  # ..\n  # custom checks\n  checkImageRepo: danger # !!!\ncustomChecks:\n  checkImageRepo:        # !!!\n    successMessage: Image registry is valid\n    failureMessage: Image registry is not valid\n    category: Images\n    target: Container\n    schema:\n      '$schema': http:\/\/json-schema.org\/draft-07\/schema\n      type: object\n      properties:\n        image:\n          type: string\n          pattern: ^my-company.com\/.+$<\/code><\/pre>\n<p><\/p>\n<p><em>(<code>config_with_custom_check.yaml<\/code>)<\/em><\/p>\n<p><\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/amitsaha\/kubernetes-static-checkers-demo\/blob\/master\/polaris-configs\/config_with_custom_check.yaml\">\u0437\u0434\u0435\u0441\u044c<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442 <code>base-valid.yaml<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b, \u043c\u043e\u0436\u043d\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<p><\/p>\n<pre><code class=\"bash\">$ polaris audit --config config_with_custom_check.yaml --audit-path base-valid.yaml<\/code><\/pre>\n<p><\/p>\n<p>Polaris \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c\u0438, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0441\u043e\u0447\u0435\u0442\u0430\u044f \u043b\u0443\u0447\u0448\u0435\u0435 \u0438\u0437 \u0434\u0432\u0443\u0445 \u043c\u0438\u0440\u043e\u0432.<\/p>\n<p><\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043c\u043e\u0449\u043d\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a Rego \u0438\u043b\u0438 JavaScript, \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u043c \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u043c, \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u043e\u0449\u0440\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<p><\/p>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e Polaris \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043d\u0430 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/FairwindsOps\/polaris\">\u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex>.<\/p>\n<p><\/p>\n<h2 id=\"rezyume\">\u0420\u0435\u0437\u044e\u043c\u0435<\/h2>\n<p><\/p>\n<p>\u0425\u043e\u0442\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 YAML-\u0444\u0430\u0439\u043b\u043e\u0432 Kubernetes, <strong>\u0432\u0430\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0447\u0435\u0442\u043a\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0442\u0435\u0441\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f<\/strong>.<\/p>\n<p><\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>\u0435\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u044b Kubernetes, \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d, kubeval \u043c\u043e\u0433 \u0431\u044b \u0441\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0432 \u0442\u0430\u043a\u043e\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435<\/strong>. \u041e\u043d \u0431\u044b \u0441\u043b\u0435\u0434\u0438\u043b \u0437\u0430 \u0442\u0435\u043c, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441\u0445\u0435\u043c\u0435 API Kubernetes.<\/p>\n<p><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u043e\u0449\u0440\u0435\u043d\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u0430\u043c, \u0442\u0430\u043a\u0438\u043c \u043a\u0430\u043a \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c \u0438 \u043e\u0441\u043e\u0431\u044b\u043c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430\u043c. \u0418 \u0437\u0434\u0435\u0441\u044c \u0431\u044b \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u043b\u0438\u0441\u044c kube-score \u0438 Polaris.<\/p>\n<p><\/p>\n<p><strong>\u0422\u0435\u043c, \u0443 \u043a\u043e\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b, \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u0431\u044b copper, config-lint \u0438 conftest<\/strong>.<\/p>\n<p><\/p>\n<p>Conftest \u0438 config-lint \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 YAML \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432, \u0430 copper \u0434\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u043c\u0443 \u044f\u0437\u044b\u043a\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c.<\/p>\n<p><\/p>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u044d\u0442\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0435\u0441\u0442\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0438\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0435\u0441\u0442\u044c Polaris, \u0438 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e? <strong>\u041e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043d\u0435\u0442<\/strong>.<\/p>\n<p><\/p>\n<p>\u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043d\u0438\u0436\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430:<\/p>\n<p><\/p>\n<p>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442<br \/>\n\u041f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<br \/>\n\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438<br \/>\n\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b<\/p>\n<p>kubeval<br \/>\n\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 YAML-\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u044b \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0445\u0435\u043c\u044b API<br \/>\n\u041d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 CRD<br \/>\n\u041d\u0435\u0442<\/p>\n<p>kube-score<br \/>\n\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u044b YAML \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c<br \/>\n\u041d\u0435\u043b\u044c\u0437\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0432\u0435\u0440\u0441\u0438\u044e API Kubernetes \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<br \/>\n\u041d\u0435\u0442<\/p>\n<p>copper<br \/>\n\u041e\u0431\u0449\u0438\u0439 \u0444\u0440\u0435\u0439\u043c\u0444\u043e\u0440\u043a \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 JavaScript-\u0442\u0435\u0441\u0442\u043e\u0432 \u0434\u043b\u044f YAML-\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u0432<br \/>\n\u041d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u0421\u043a\u0443\u0434\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<br \/>\n\u0414\u0430<\/p>\n<p>config-lint<br \/>\n\u041e\u0431\u0449\u0438\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u043c \u0432 YAML. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Terraform)<br \/>\n\u041d\u0435\u0442 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 assertions \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e<br \/>\n\u0414\u0430<\/p>\n<p>conftest<br \/>\n\u0424\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 Rego (\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432). \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 OCI bundles<br \/>\n\u041d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0442\u0435\u0441\u0442\u043e\u0432. \u041f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0437\u0443\u0447\u0430\u0442\u044c Rego. Docker Hub \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a<br \/>\n\u0414\u0430<\/p>\n<p>Polaris<br \/>\n\u0410\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 YAML-\u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u044b \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e JSON Schema<br \/>\n\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0442\u0435\u0441\u0442\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 JSON Schema, \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442\u044c<br \/>\n\u0414\u0430<\/p>\n<p><\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u043e\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0432 \u043a\u043b\u0430\u0441\u0442\u0435\u0440 Kubernetes, \u0438\u0445 \u043b\u0435\u0433\u043a\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c. \u041e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0431\u044b\u0441\u0442\u0440\u0443\u044e \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u0430\u0432\u0442\u043e\u0440\u0430\u043c pull request&#8217;\u043e\u0432 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p><\/p>\n<h2 id=\"ps-ot-perevodchika\">P.S. \u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/h2>\n<p><\/p>\n<p>\u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u043b\u043e\u0433\u0435:<\/p>\n<p><\/p>\n<ul>\n<li>\u00ab<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/454706\/\">\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d Polaris \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432 Kubernetes \u0432 \u0437\u0434\u043e\u0440\u043e\u0432\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438<\/a><\/noindex>\u00bb;<\/li>\n<li>\u00ab<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/498808\/\">Vim \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 YAML \u0434\u043b\u044f Kubernetes<\/a><\/noindex>\u00bb;<\/li>\n<li>\u00ab<noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/425085\/\">7 \u043b\u0443\u0447\u0448\u0438\u0445 \u043f\u0440\u0430\u043a\u0442\u0438\u043a \u043f\u043e \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043f\u043e \u0432\u0435\u0440\u0441\u0438\u0438 Google<\/a><\/noindex>\u00bb.<\/li>\n<\/ul>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/flant\/blog\/511018\/\">habr.com<\/a> <\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.: \u0421 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 YAML-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f K8s-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435. \u0410\u0432\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u043e \u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Deployment&#8217;\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430. TL;DR: \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0448\u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":88991,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-88990","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.: \u0421 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 YAML-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f K8s-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435. \u0410\u0432\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u043e \u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Deployment&#039;\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430. TL;DR: \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0448\u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/validacziya-kubernetes-yaml-na-sootvetstvie-luchshim-praktikam-i-politikam\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f Kubernetes YAML \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c \u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430\u043c | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.: \u0421 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 YAML-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f K8s-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435. \u0410\u0432\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u043e \u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Deployment&#039;\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430. TL;DR: \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0448\u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/validacziya-kubernetes-yaml-na-sootvetstvie-luchshim-praktikam-i-politikam\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-07-17T05:41:56+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-17T05:41:56+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Validimi i Kubernetes YAML p\u00ebr p\u00ebrputhshm\u00ebri me praktikat dhe politik\u00ebn m\u00eb t\u00eb mira | ProHoster","description":"Sh\u00ebnim: Me rritjen e numrit t\u00eb konfigurimeve YAML p\u00ebr mjediset K8s, po b\u00ebhet gjithnj\u00eb e m\u00eb e r\u00ebnd\u00ebsishme nevoja p\u00ebr verifikimin e tyre automatizuar. Autori i k\u00ebtij p\u00ebrmbledhje nuk ka p\u00ebrzgjedhur thjesht zgjidhjet ekzistuese p\u00ebr k\u00ebt\u00eb detyr\u00eb, por gjithashtu ka shqyrtuar se si funksionojn\u00eb ato me shembujt e Deployment-it. Doli shum\u00eb informues p\u00ebr ata q\u00eb e kan\u00eb interes k\u00ebt\u00eb tem\u00eb. TL;DR: Artikulli krahasohet gjasht\u00eb mjete statike t\u00eb verifikimit dhe","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/validacziya-kubernetes-yaml-na-sootvetstvie-luchshim-praktikam-i-politikam","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f Kubernetes YAML \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043b\u0443\u0447\u0448\u0438\u043c \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0430\u043c \u0438 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430\u043c | ProHoster","og:description":"\u041f\u0440\u0438\u043c. \u043f\u0435\u0440\u0435\u0432.: \u0421 \u0440\u043e\u0441\u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0430 YAML-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 \u0434\u043b\u044f K8s-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044c \u0432 \u0438\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435. \u0410\u0432\u0442\u043e\u0440 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0437\u043e\u0440\u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u043e \u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 Deployment'\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043b, \u043a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442. \u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430. TL;DR: \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0448\u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/validacziya-kubernetes-yaml-na-sootvetstvie-luchshim-praktikam-i-politikam","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-07-17T05:41:56+00:00","article:modified_time":"2020-07-17T05:41:56+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"88990","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 13:18:26","updated":"2022-09-28 22:59:02"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/88990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=88990"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/88990\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/88991"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=88990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=88990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=88990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}