ปลั๊กอินติดแท็กในตัว
ปลั๊กอิน
CLI มี
| Plugin | เขียน |
|---|---|
governance/label-injector | ป้าย |
governance/selector-tagger | ป้ายtag ซึ่ง |
ทั้งplugins.governance ใน0.9.0 ซึ่ง
สิ่งที่ทั้งสองมีร่วมกัน
ทั้งlabel-transform และir-verdict บิลด์
[E0085] ir-verdict: plugin "governance/label-injector:0.9.0": call "verdict_ir": wasm: plugin "label-injector" does not declare export "verdict_ir" in describe(): wasm: plugin rejected by the sandbox[E0085] ir-verdict: plugin "governance/selector-tagger:0.9.0": call "verdict_ir": wasm: plugin "selector-tagger" does not declare export "verdict_ir" in describe(): wasm: plugin rejected by the sandboxที่ render-verdict และ annotation-transform การE0085 เดียวกัน โดยverdict_render และ transform_annotations แทน
ทั้งtype: ของ Aggregate กำหนดcore/datastore/mariadb ปลั๊กอิน
ทั้ง
การsettings บิลด์rules ที่decode settings: และ
ทั้งsources เป็น YAML ตามparse source "<file>": และdecode source "<file>": และ
ไฟล์aggrega pull หรือ--auto-pull — บันทึก
แนบwith: แล้ว ทั้ง
การlabel-transform รันexamples/policy-label-transform/ แนบ
governance/label-injector
ตัว
การตั้งค่าของตัวแทรกป้ายกำกับ
| การ | ประเภท | ค่า | ผล |
|---|---|---|---|
rules | รายการ | ไม่มี | กฎ |
แต่ละ
| คีย์ | ค่า | ผล |
|---|---|---|
match | ไม่มี | โหนด |
set | ไม่มี | ทุก |
ป้ายmatch ที่"" จึง
กฎ
กฎมาจากที่ใด
ปลั๊กอินrules จากsources ตามrules ระดับ
rules: - match: {} set: ops.example.com/owner: shop-teamกฎ
ตัวแทรกป้ายกำกับที่แนบ และป้ายกำกับที่ตัวแทรกเขียน
การdatastore:
plugins: governance: - uri: governance/label-injector:0.9.0 role: label-transform with: settings: rules: - match: {} set: ops.example.com/owner: shop-team - match: component.aggrega.ai/category: datastore set: backup.example.com/schedule: nightly ops.example.com/owner: data-teamเมื่อexamples/policy-label-transform/ — db คือ core/datastore/mariadb, cache คือ core/datastore/redis และ web คือ core/devtool/adminer — aggrega build --release release-production.yaml --auto-pull --ir-graph จะ
"db": { "labels": { "component.aggrega.ai/type": "stateful-server", "component.aggrega.ai/category": "datastore", "component.aggrega.ai/upstream-licensing": "osi-approved", "backup.example.com/schedule": "nightly", "ops.example.com/owner": "data-team" }, [… omitted: the node's Component, its version and the rest of the node]},"cache": { "labels": { "component.aggrega.ai/type": "server", "component.aggrega.ai/category": "datastore", "datastore.aggrega.ai/engine": "kv", "component.aggrega.ai/hosting": "mixed", "component.aggrega.ai/upstream-licensing": "mixed", "backup.example.com/schedule": "nightly", "ops.example.com/owner": "data-team" }, [… omitted: the node's Component, its version and the rest of the node]},"web": { "labels": { "component.aggrega.ai/type": "server", "component.aggrega.ai/category": "devtool", "component.aggrega.ai/upstream-licensing": "osi-approved", "ops.example.com/owner": "shop-team" }, [… omitted: the node's Component, its version and the rest of the node]}ทุกshop-team ส่วน db และ cache ในdatastore ตรงdata-team ป้าย
governance/selector-tagger
ตัวtag บน
แมปและการตั้งค่าของตัวติดแท็กด้วยตัวคัดเลือก
ตัวtag เสมอ คีย์
แมปsources แต่ละ
core/datastore/mariadb: orderscore/datastore/redis: sessionsทุก3 จะ"3"
| การ | ประเภท | ค่า | ผล |
|---|---|---|---|
default | สตริง | ว่าง | แท็กtag |
เมื่อsources ทุกdefault
ตัวติดแท็กด้วยตัวคัดเลือกที่แนบ และป้ายกำกับที่ตัวติดแท็กเขียน
การtags.yaml ซึ่งuntagged ให้
plugins: governance: - uri: governance/selector-tagger:0.9.0 role: label-transform with: sources: - tags.yaml settings: default: untaggedเมื่อaggrega build --release release-production.yaml --auto-pull --ir-graph จะ
"db": { "labels": { "component.aggrega.ai/type": "stateful-server", "component.aggrega.ai/category": "datastore", "component.aggrega.ai/upstream-licensing": "osi-approved", "tag": "orders" }, [… omitted: the node's Component, its version and the rest of the node]},"cache": { "labels": { "component.aggrega.ai/type": "server", "component.aggrega.ai/category": "datastore", "datastore.aggrega.ai/engine": "kv", "component.aggrega.ai/hosting": "mixed", "component.aggrega.ai/upstream-licensing": "mixed", "tag": "sessions" }, [… omitted: the node's Component, its version and the rest of the node]},"web": { "labels": { "component.aggrega.ai/type": "server", "component.aggrega.ai/category": "devtool", "component.aggrega.ai/upstream-licensing": "osi-approved", "tag": "untagged" }, [… omitted: the node's Component, its version and the rest of the node]}core/devtool/adminer ไม่web จึงdefault หากdefault web จะtag และ
ตำแหน่งที่คอมไพเลอร์ไม่ตีความ
ปลั๊กอิน