एक पॉलिसी जो ऐसे Features अटैच करती है जिन्हें किसी ने नहीं लिखा: `annotation-transform` पर इंजेक्ट किए गए एनोटेशन
एक गवर्नेंस पॉलिसी किसी संगठन के हर घटक को प्लेटफ़ॉर्म की मॉनिटरिंग और एक AWS IAM रोल देती है। यह ऐसा एनोटेशन जोड़कर करती है। Manifest दो एनोटेशन कुंजियों को दो Features से बाइंड करता है, और बाइंड की गई कुंजी के अंतर्गत कोई एनोटेशन एक Feature अटैचमेंट में विस्तारित होता है। इसलिए पॉलिसी द्वारा जोड़े गए एनोटेशन हर घटक के लिए एक Prometheus ServiceMonitor और एक Kubernetes ServiceAccount लाते हैं, और Aggregate और Release इनमें से कुछ भी नहीं लिखते।
पॉलिसी annotation-transform भूमिका पर अटैच की जाती है, CLI में कंपाइल किए गए हर पॉलिसी इंजन के लिए एक बार: Rego और CEL। केंद्रीय प्रमाण एक नियंत्रण Release है जो वही एनोटेशन हाथ से लिखता है। बिना किसी पॉलिसी के बिल्ड करने पर, वह बाइट-दर-बाइट वही फ़ाइलें रेंडर करता है जो वह Release रेंडर करता है जिसे पॉलिसी एनोटेट करती है।
यह क्या बिल्ड करता है
| इंस्टेंस | कैटलॉग Component | release.yaml में यह क्या वहन करता है |
|---|---|---|
api | example/compute/service | कुछ नहीं |
worker | example/compute/service | कुछ नहीं |
gateway | example/compute/service | इसका अपना मॉनिटरिंग एनोटेशन, 10-सेकंड के अंतराल के साथ |
तीनों Helm के ज़रिए Kubernetes में, dist/shop/helm/ में, कंपाइल किए जाते हैं। example/compute/service स्टैंडर्ड-लाइब्रेरी कैटलॉग में एक प्रदर्शन Component है। इसके हर इंस्टेंस को एक core/prometheus-exporter अटैचमेंट वहन करना होगा, एक ऐसी आवश्यकता जिसे Component बताता है और बिल्ड जाँचता है।
दो एनोटेशन बाइंडिंग
manifest.yaml दो एनोटेशन कुंजियों को एक अर्थ देता है:
features: type: core/prometheus-exporter: helm/prometheus-exporter:1.0.0 core/aws-irsa: helm/aws-irsa:1.0.0 annotations: feature.aggrega.ai/monitoring: feature: core/prometheus-exporter maps: infra: - interval - port - path aws-role: feature: core/aws-irsa maps: infra: - role_arnकई उप-कुंजियों को रूट करने वाली बाइंडिंग अपने मान के रूप में ऐसा ऑब्जेक्ट लेती है जो उनमें से हर एक का नाम लेता है, इसलिए feature.aggrega.ai/monitoring {interval: …, port: …, path: …} लेती है। एक उप-कुंजी को रूट करने वाली बाइंडिंग एक स्ट्रिंग लेती है, इसलिए aws-role रोल का ARN लेती है। कोई एनोटेशन जिस अटैचमेंट में विस्तारित होता है, उसका नाम उसकी कुंजी के नाम पर रखा जाता है। core/aws-irsa अपने ServiceAccount का नाम अटैचमेंट के नाम पर रखता है, इसीलिए उस कुंजी में कोई बिंदु या स्लैश नहीं है।
पॉलिसी अटैच करना
.aggrega-config.yaml हब को अपनी रजिस्ट्री के रूप में नामित करती है, और कोई कैटलॉग डायरेक्टरी नहीं, और कोई गवर्नेंस अटैचमेंट नहीं। पॉलिसी उस फ़ाइल द्वारा अटैच की जाती है जिसका नाम कोई बिल्ड --config से देता है: Rego इंजन के लिए governance-rego.yaml, CEL इंजन के लिए governance-cel.yaml। Rego वाली फ़ाइल यह है:
plugins: governance: - uri: governance/rego:0.9.0 role: annotation-transform with: sources: - policies/platform-defaults.rego--config उस रन के लिए ग्लोबल कॉन्फ़िगरेशन फ़ाइल का नाम देता है, उस फ़ाइल के स्थान पर जिसे मशीन अन्यथा पढ़ती, और इस वर्कस्पेस की .aggrega-config.yaml फिर भी उसके ऊपर एक परत के रूप में लागू होती है।
0.9.0 एक ऐसा संस्करण है जिस पर हब हर इंजन की Plugin एंटिटी प्रकाशित करता है, इसलिए अटैचमेंट उस रजिस्ट्री से रिज़ॉल्व होता है जिसे वर्कस्पेस पढ़ता है, या उस रिलीज़ की aggrega बाइनरी से, जो उसे वहन करती है। जो इंजन चलता है, वह बिल्ड चलाने वाली aggrega बाइनरी में कंपाइल किया गया इंजन होता है, अटैचमेंट चाहे जिस संस्करण का नाम ले। मॉनिटरिंग एनोटेशन जो ऑब्जेक्ट लेता है, उसके लिए ऐसा इंजन चाहिए जो उप-कुंजियों का ऑब्जेक्ट इंजेक्ट करे, और 0.8.7 से पहले की रिलीज़ के इंजन ऐसा नहीं करते।
एनोटेशन-ट्रांसफ़ॉर्म पॉलिसी क्या पढ़ती है
annotation-transform पर कोई पॉलिसी दो चीज़ें पढ़ती है:
input.targetsहर उस घटक को सूचीबद्ध करता है जिसे पॉलिसी एनोटेट कर सकती है। हर लक्ष्य में एकboundary_path, एकcomponent_name, और वेannotationsहोते हैं जिन्हें Release उस घटक पर लिखता है, हर मान वैसा ही जैसा लिखा गया है।input.binding_keysउन एनोटेशन कुंजियों को सूचीबद्ध करता है जिन्हें Manifest बाइंड करता है।
aggrega build --release <release> --dry-run --policy-input <dir> हर भूमिका को मिलने वाला पेलोड <dir> में लिखता है और कुछ और नहीं लिखता। जब release.yaml का कोई बिल्ड उसकी लॉकफ़ाइल भर चुका हो, तब:
aggrega build --release release.yaml --config governance-rego.yaml --dry-run --policy-input payloadsjq -c '.binding_keys' payloads/annotation-transform.json# ["feature.aggrega.ai/monitoring","aws-role"]jq -c '.targets[]' payloads/annotation-transform.json# {"boundary_path":"shop","component_name":"api","annotations":{}}# {"boundary_path":"shop","component_name":"worker","annotations":{}}# {"boundary_path":"shop","component_name":"gateway","annotations":{"feature.aggrega.ai/monitoring":{"interval":"10s","port":"metrics","path":"/metrics"}}}किसी लक्ष्य के annotations वह रखते हैं जो Release स्वयं घटक पर लिखता है। बाउंड्री का aggrega.ai/namespace इनमें शामिल नहीं है।
पॉलिसी
policies/platform-defaults.rego annotations के अंतर्गत प्रति एनोटेशन एक निर्णय एकत्र करती है। हर निर्णय लक्ष्य का नाम उन दो फ़ील्ड से लेता है जिनके अंतर्गत उसे पढ़ा गया था, फिर कुंजी और मान का:
annotations contains { "boundary_path": t.boundary_path, "component_name": t.component_name, "annotation_key": monitoring, "annotation_value": {"interval": "30s", "port": "metrics", "path": "/metrics"},} if { monitoring in input.binding_keys some t in input.targets not monitoring in object.keys(t.annotations)}
annotations contains { "boundary_path": t.boundary_path, "component_name": t.component_name, "annotation_key": role, "annotation_value": sprintf("arn:aws:iam::123456789012:role/shop-%v", [t.component_name]),} if { role in input.binding_keys some t in input.targets not role in object.keys(t.annotations)}हर नियम केवल input.binding_keys में मौजूद कुंजी के लिए लागू होता है, इसलिए पॉलिसी ऐसा कुछ नहीं जोड़ती जिसे किसी Manifest ने अर्थ न दिया हो। हर नियम उस लक्ष्य को भी छोड़ देता है जो पहले से वह कुंजी वहन करता है। जिस कुंजी को घटक पहले से वहन करता है, उसके अंतर्गत कोई निर्णय Release द्वारा लिखे गए मान को प्रतिस्थापित कर देता है। उस जाँच के बिना, gateway अपना 10-सेकंड का अंतराल खोकर पॉलिसी के 30 सेकंड पा लेता।
policies/platform-defaults.cel वही दो निर्णय एक एक्सप्रेशन के रूप में बताती है, दो सूचियों को + से जोड़कर। मैप कुंजी की जाँच object.keys के बजाय in से की जाती है, और रोल का ARN + से जोड़ा जाता है, क्योंकि एक्सप्रेशन भाषा में sprintf नहीं है। एक्सप्रेशन का रोल वाला भाग यह है:
+ input.targets .filter(t, "aws-role" in input.binding_keys && !("aws-role" in t.annotations)) .map(t, { "boundary_path": t.boundary_path, "component_name": t.component_name, "annotation_key": "aws-role", "annotation_value": "arn:aws:iam::123456789012:role/shop-" + t.component_name, }),बिल्ड क्या रेंडर करता है
aggrega build --release release.yaml --config governance-rego.yaml --auto-pulldist/shop/helm/ के अंतर्गत बारह फ़ाइलें लिखता है: हर घटक के लिए एक Deployment और एक Service, वह ServiceMonitor जिसमें उसका मॉनिटरिंग एनोटेशन विस्तारित होता है, और वह ServiceAccount जिसमें उसका aws-role एनोटेशन विस्तारित होता है। पॉलिसी द्वारा इंजेक्ट किए गए एनोटेशन से, api के ServiceMonitor का spec:
spec: selector: matchLabels: app.kubernetes.io/name: api endpoints: - port: metrics interval: 30s path: /metricsgateway का ServiceMonitor interval: 10s वहन करता है, वह मान जिसे उसकी Release प्रविष्टि लिखती है। वह ServiceAccount जिसके अंतर्गत api चलता है, इंजेक्ट किए गए aws-role से:
apiVersion: v1kind: ServiceAccountmetadata: name: api-aws-role namespace: shop annotations: eks.amazonaws.com/role-arn: "arn:aws:iam::123456789012:role/shop-api" aggrega.ai/boundary-path: shop aggrega.ai/recipe-uri: "aws-irsa:1.0.0" [… omitted: the labels, which carry the version of the aggrega binary that built the file]इंजेक्ट किए गए हों या हाथ से लिखे गए: वही फ़ाइलें
release-by-hand.yaml वही release.yaml है, जिसमें पॉलिसी द्वारा इंजेक्ट किए जाने वाले एनोटेशन हर घटक पर हाथ से लिखे गए हैं। बिना किसी अटैच की गई पॉलिसी के बिल्ड करने पर,
aggrega build --release release-by-hand.yaml --auto-pullयह बाइट-दर-बाइट वही बारह फ़ाइलें लिखता है जो किसी भी इंजन पर अटैच की गई पॉलिसी के साथ release.yaml लिखता है। उस तुलना से कुछ भी बाहर नहीं रखा जाता: कोई एनोटेशन इंजेक्ट किया गया था या नहीं, यह किसी भी रेंडर की गई फ़ाइल में दर्ज नहीं होता। check.sh हर रन में ट्री की तुलना करता है।
बिल्ड इंजेक्ट किए गए मान को ठीक वैसे ही पढ़ता है जैसे Release में लिखे गए उसी मान को पढ़ता है, इसलिए मान उसी अटैचमेंट में विस्तारित होता है।
इंजेक्शन कहाँ दर्ज होता है
बिल्ड ग्राफ़ इसे दर्ज करता है, और --ir-graph ग्राफ़ प्रिंट करता है। जिस भी घटक को इंजेक्ट किया गया एनोटेशन मिला, वह अपने Release एनोटेशन के बीच प्लगइन का नाम लेने वाला aggrega.ai/injected-by वहन करता है। aggrega build --release release.yaml --config governance-rego.yaml --auto-pull --ir-graph के बाद, api यह दिखाता है:
"release_annotations": { "aggrega.ai/namespace": "shop", "aws-role": "arn:aws:iam::123456789012:role/shop-api", "aggrega.ai/injected-by": "governance/rego"},रिकॉर्ड प्रति घटक है, प्रति कुंजी नहीं: gateway भी इसे वहन करता है, अपने aws-role के लिए। एनोटेशन जिन अटैचमेंट में विस्तारित हुए, उनमें से हर एक के लिए ग्राफ़ में "origin": "annotation" है, जैसा हाथ से लिखे गए एनोटेशन के लिए होता।
Helm लक्ष्य कोई aggrega.ai/injected-by एनोटेशन रेंडर नहीं करता, और यह बात बताता है। इस बिल्ड में, जिस भी घटक को इंजेक्शन मिला, वह आउटपुट में तीन चेतावनियाँ जोड़ता है। api की पहली चेतावनी यह है:
warning: node "api" (provider "helm"): target "helm" does not support annotation aggrega.ai/injected-by on synthesized input and ignored it--no-unsupported-field-warnings उस श्रेणी की चेतावनी को शांत करता है, और बिल्ड जो लिखता है उसमें कुछ नहीं बदलता।
भूमिका एनोटेशन जोड़ती है, और कुछ नहीं
एक निर्णय एक घटक, एक एनोटेशन कुंजी और उसके मान का नाम लेता है। किसी निर्णय में कुछ भी न कोई घटक जोड़ता है, न कोई लेबल बदलता है, न सीधे कोई Feature अटैच करता है। पॉलिसी किसी Feature तक केवल उस कुंजी के ज़रिए पहुँचती है जिसे Manifest बाइंड करता है, और वह Feature कौन-सा है, यह Manifest तय करता है।
कोई निर्णय किसी एनोटेशन को हटा भी नहीं सकता। उसका मान एक स्ट्रिंग या उप-कुंजियों का ऑब्जेक्ट होता है, और null को इंजेक्शन का नाम लेते हुए अस्वीकार कर दिया जाता है, क्योंकि null वह तरीका है जिससे कोई लेखक किसी घटक को उस एनोटेशन से ऑप्ट आउट करता है जिसे वह अन्यथा इनहेरिट करता।
जहाँ बाइंडिंग तीन उप-कुंजियाँ रूट करती है, वहाँ एक स्ट्रिंग
governance-monitoring-as-string.yaml policies/monitoring-as-string.rego को अटैच करती है, जो मॉनिटरिंग कुंजी के अंतर्गत स्ट्रिंग "30s" इंजेक्ट करती है। वह बाइंडिंग तीन उप-कुंजियाँ रूट करती है, और कोई स्ट्रिंग उनमें से किसी का नाम नहीं लेती, इसलिए
aggrega build --release release.yaml --config governance-monitoring-as-string.yaml --auto-pullरुक जाता है, 1 के साथ बाहर निकलता है और कोई dist/ नहीं लिखता। पॉलिसी ने स्ट्रिंग api पर और worker पर इंजेक्ट की, और हर एक अस्वीकार की जाती है। हर अस्वीकृति उस प्लगइन का नाम लेती है जिसने मान इंजेक्ट किया, और उस भूमिका का भी जिस पर वह अटैच है, ताकि मान का पता उस पॉलिसी तक लगाया जा सके जिसने उसे तय किया, न कि Release की ऐसी पंक्ति तक जिसे किसी ने नहीं लिखा:
[… omitted: a warning that the attachment is in the global configuration named with --config][OPS_ERROR E0367] .spec.boundaries.shop.components.api.annotations a scalar annotation value does not route to exactly one path of its binding (Release shop-production, at .spec.boundaries.shop.components.api.annotations, "feature.aggrega.ai/monitoring", carrying the bare value "30s", whose binding routes "interval, port, path", whose value plugin "governance/rego" injected at governance role "annotation-transform")---[OPS_ERROR E0367] .spec.boundaries.shop.components.worker.annotations a scalar annotation value does not route to exactly one path of its binding (Release shop-production, at .spec.boundaries.shop.components.worker.annotations, "feature.aggrega.ai/monitoring", carrying the bare value "30s", whose binding routes "interval, port, path", whose value plugin "governance/rego" injected at governance role "annotation-transform")पॉलिसी के बिना
बिना किसी गवर्नेंस अटैचमेंट के बिल्ड किया गया release.yaml,
aggrega build --release release.yaml --auto-pullरुक जाता है। इसका Component एक core/prometheus-exporter अटैचमेंट की माँग करता है, और कुछ भी api या worker को ऐसा अटैचमेंट नहीं देता:
[DEVELOPER_ERROR E0162] aggregate.yaml at .spec.components.api missing required feature: attach a Feature of the required type to the component ("core/prometheus-exporter", required by component type "example/compute/service", under the requirement label "monitoring")---[DEVELOPER_ERROR E0162] aggregate.yaml at .spec.components.worker missing required feature: attach a Feature of the required type to the component ("core/prometheus-exporter", required by component type "example/compute/service", under the requirement label "monitoring")gateway का नाम नहीं लिया जाता, क्योंकि उसकी Release प्रविष्टि अपनी मॉनिटरिंग स्वयं लिखती है। पॉलिसी अटैच होने पर, वही Release बिल्ड होता है: इंजेक्ट किए गए एनोटेशन से विस्तारित होने वाला अटैचमेंट आवश्यकता पूरी करता है, ठीक वैसे ही जैसे हाथ से लिखा गया अटैचमेंट करता है।
लॉकफ़ाइल क्या दर्ज करती है
एक annotation-transform अटैचमेंट बदलता है कि बिल्ड क्या रेंडर करता है, इसलिए लॉकफ़ाइल उसे पिन करती है। Rego बिल्ड के बाद, release.lock अटैचमेंट को mutators: के अंतर्गत वहन करती है, उसके प्लगइन, उसकी भूमिका, और उसकी पॉलिसी फ़ाइल के कंटेंट और डाइजेस्ट के साथ:
mutators: - plugin: governance/rego role: annotation-transform sources: - content: | [… omitted: the policy file, as written] digest: sha256:9779faf366fc131b1a56ea68ccbae811173e3642943909f8d4ca63c00df8781b path: platform-defaults.regoयह प्लगइन को भी plugins: के अंतर्गत पिन करती है:
plugins: - uri: governance/rego [… omitted: the artifact digest, which depends on the aggrega binary that built it, recorded twice] referenced_from: - governance/rego:0.9.0अटैचमेंट ऐसे संस्करण का नाम लेता है जिसे हब प्रकाशित करता है, इसलिए पिन उस रजिस्ट्री के ज़रिए रिज़ॉल्व होता है जिसे वर्कस्पेस पढ़ता है, या उस रिलीज़ की aggrega बाइनरी से।
उदाहरण ड्राफ़्ट करें
आप यह उदाहरण नीचे दिए कमांड से बिल्ड कर सकते हैं, या अपने AI असिस्टेंट से इसे अपने लिए बिल्ड करवा सकते हैं।
उदाहरण को उसी के नाम वाले एक नए फ़ोल्डर में लिखें:
aggrega draft --example policy-annotation-transformफिर यह आगे चलाने के लिए कमांड प्रिंट करता है। पहला कमांड नए फ़ोल्डर में ले जाता है:
cd policy-annotation-transformबिल्ड करें
aggrega build --release release.yaml --config governance-rego.yaml --auto-pullaggrega build --release release.yaml --config governance-cel.yaml --auto-pullaggrega build --release release-by-hand.yaml --auto-pullस्टैंडर्ड-लाइब्रेरी कैटलॉग यहाँ हर Component, Feature, Recipe और FeatureRecipe, और दोनों इंजनों की Plugin एंटिटी प्रदान करता है। वे hub.aggrega.ai से रिज़ॉल्व होती हैं, जो वह डिफ़ॉल्ट रजिस्ट्री है जिसका नाम .aggrega-config.yaml देती है। --catalog से नामित कैटलॉग के चेकआउट (उसे कहाँ से प्राप्त करें) के साथ, किसी रजिस्ट्री से कुछ भी फ़ेच नहीं किया जाता, इसलिए बिल्ड ऑफ़लाइन चलते हैं। --auto-pull बिल्ड के दौरान हर Release की लॉकफ़ाइल भरता है। लॉकफ़ाइलें और रेंडर किया गया आउटपुट जनरेट किए जाते हैं, शिप नहीं किए जाते।
AI असिस्टेंट के साथ
Aggrega के टूल के साथ सेट अप किया गया AI असिस्टेंट भी यही कर सकता है: यह प्रॉम्प्ट उसमें पेस्ट करें।
केवल Aggrega टूल का उपयोग करें, और स्वयं कोई फ़ोल्डर न बनाएं। यदि Workspace फ़ोल्डर में अभी कोई `policy-annotation-transform` फ़ोल्डर नहीं है, तो `draft` टूल को एक बार कॉल करें, `example` को `policy-annotation-transform` पर सेट करके और बिना `dir` के: यह उदाहरण को एक नए `policy-annotation-transform` फ़ोल्डर में लिखता है। फिर `cli-build` टूल को कॉल करें, जो `aggrega build` चलाता है और उसका `--config` फ़्लैग लेता है, `workspace_root` को `policy-annotation-transform` पर, `release` को `release.yaml` पर, `auto_pull` को true पर और `config` को `governance-rego.yaml` पर सेट करके; फिर इसे उसी तरह दोबारा कॉल करें, `config` को `governance-cel.yaml` पर सेट करके। अंत में, `build` टूल को कॉल करें, `workspace_root` को `policy-annotation-transform` पर, `release` को `release-by-hand.yaml` पर, `auto_pull` को true पर और `write` को true पर सेट करके। मुझे बताएं कि हर बिल्ड ने कौन-सी फ़ाइलें लिखीं; वे `policy-annotation-transform/dist/` के अंतर्गत हैं।हर बिल्ड की जाँच
यह स्व-जाँच दस्तावेज़ीकरण रिपॉज़िटरी के किसी चेकआउट में चलती है, जिसमें वह साझा बिल्ड हेल्पर है जिसका यह उपयोग करती है; aggrega draft --example द्वारा लिखी गई प्रति में वह हेल्पर नहीं होता।
./check.shcheck.sh build-release हेल्पर के ज़रिए पाँच बिल्ड करता है और हर परिणाम की जाँच उस परिणाम के विरुद्ध करता है जिसका यह पेज वर्णन करता है:
- बिना पॉलिसी वाला
release-by-hand.yamlसंदर्भ है। इसे वे छह फ़ाइलें रेंडर करनी होंगी जिनमें एनोटेशन विस्तारित होते हैं। - बिना पॉलिसी वाले
release.yamlकोapiऔरworkerके लिएE0162के साथ रुकना होगा, और किसी अन्य घटक के लिए नहीं। - पॉलिसी वाला
release.yamlहर इंजन पर एक बार बिल्ड किया जाता है। हर बिल्ड को संदर्भ की फ़ाइलें बाइट-दर-बाइट लिखनी होंगी, अपनी लॉकफ़ाइल में प्लगइन पिन करना होगा, और तीनों घटकों को उस प्लगइन द्वारा इंजेक्ट किए गए के रूप में दर्ज करना होगा। - जान-बूझकर रखी गई स्ट्रिंग वाले
release.yamlको ऊपर वाली अस्वीकृति के साथ रुकना होगा।
यह प्रति बिल्ड एक पंक्ति प्रिंट करता है, फिर वे फ़ाइलें जिन्हें दोनों बाइंडिंग ने रेंडर किया, और यदि कोई परिणाम अलग होता है तो उस बिल्ड का आउटपुट प्रिंट करते हुए 1 के साथ बाहर निकलता है:
POLICY RELEASE EXIT EXPECTED VERDICT----------------------------------------------------------------------------------------------------none release-by-hand.yaml 0 reference OK: the six attachments' filesnone release.yaml 1 halt OK: E0162 for api and workerrego release.yaml 0 pass OK: byte-identical to the build by hand; pinned; injectedcel release.yaml 0 pass OK: byte-identical to the build by hand; pinned; injectedstring release.yaml 1 halt OK: refused, naming the plugin and its role
files the two annotation bindings rendered, release.yaml with governance-rego.yaml: shop/helm/api--aws-role--api-serviceaccount-shop-api-aws-role.yaml shop/helm/api--feature-zdaggrega-zdai-zsmonitoring--api-servicemonitor-shop-api-scrape.yaml shop/helm/gateway--aws-role--gateway-serviceaccount-shop-gateway-aws-role.yaml shop/helm/gateway--feature-zdaggrega-zdai-zsmonitoring--gateway-servicemonitor-shop-gateway-scrape.yaml shop/helm/worker--aws-role--worker-serviceaccount-shop-worker-aws-role.yaml shop/helm/worker--feature-zdaggrega-zdai-zsmonitoring--worker-servicemonitor-shop-worker-scrape.yaml
check: every build ended as expected.हर बिल्ड इस वर्कस्पेस की अपनी अलग प्रति में चलता है, जो एक अस्थायी डायरेक्टरी में बनाई जाती है, और उसकी .aggrega-config.yaml में कैटलॉग पाथ को निरपेक्ष बना दिया जाता है ताकि वह वहाँ से भी रिज़ॉल्व हो। इस डायरेक्टरी में कुछ भी नहीं लिखा जाता। यह वही बाइनरी उपयोग करता है जिसे build-release हेल्पर रिज़ॉल्व करता है, इसलिए AGGREGA_BIN उसे चुनता है, और -- के बाद के आर्ग्युमेंट हर बिल्ड तक पहुँचते हैं। इसकी एग्ज़िट स्थिति ही पूरा निर्णय है।
जहाँ कंपाइलर व्याख्या नहीं करता
कंपाइलर पॉलिसी को घटक और बाइंड की गई कुंजियाँ सौंपता है। यह वे एनोटेशन जोड़ता है जिन्हें पॉलिसी तय करती है, और उन्हें Manifest की बाइंडिंग के ज़रिए वैसे ही विस्तारित करता है जैसे किसी भी एनोटेशन को करता है। यह नहीं जानता कि किसी सेवा की मॉनिटरिंग होनी चाहिए, स्क्रेप अंतराल क्या है, या किसी घटक को किस IAM रोल के अंतर्गत चलना चाहिए: ये अर्थ पॉलिसी और Manifest के हैं। भूमिकाओं, पेलोड और निर्णय कुंजियों के लिए, गवर्नेंस सॉकेट देखें। बिना पॉलिसी के एनोटेशन विस्तार के लिए, annotation-driven-monitoring देखें।
फ़ाइलें
aggregate.yaml— तीनों सेवाएँ, बिना किसी एनोटेशन के।manifest.yaml— घटक टाइप और दोनों Features को उनके Helm Recipes से, और दोनों एनोटेशन कुंजियों को दोनों Features से बाइंड करता है।release.yaml— वह Release जिसे पॉलिसी एनोटेट करती है; केवलgatewayएक एनोटेशन लिखता है।release-by-hand.yaml— नियंत्रण: हर एनोटेशन हाथ से लिखा गया।.aggrega-config.yaml— डिफ़ॉल्ट रजिस्ट्री; कोई गवर्नेंस अटैचमेंट नहीं।governance-rego.yaml,governance-cel.yaml— हर इंजन के ज़रिएannotation-transformपर अटैच की गई पॉलिसी, हर एक--configसे नामित।governance-monitoring-as-string.yaml— जान-बूझकर रखी गई गलती,--configसे नामित।policies/platform-defaults.rego,policies/platform-defaults.cel— पॉलिसी, प्रति इंजन एक बार।policies/monitoring-as-string.rego— जान-बूझकर रखी गई गलती।build-release.sh— एक Release बिल्ड करता है, समतुल्यaggrega buildकमांड को दिखाते हुए।check.sh— पाँचों बिल्ड करता है और हर परिणाम की जाँच करता है।