การผูกเวิร์กโหลดกับสิ่งที่การแนบเผยแพร่
แอป
จุด
ร่างตัวอย่าง
คุณ
เขียน
aggrega draft --example workload-identity-bindingจาก
cd workload-identity-bindingบิลด์
aggrega build --release release.yaml --auto-pullแค็ตตาล็อก.aggrega-config.yaml: ./catalog ของlocal/compute/identity-app และ Recipe สังเคราะห์ helm/identity-app ของ Component นั้น) และcore/gcp-workload-identity และ FeatureRecipe ของ Feature นั้น) --auto-pull เขียนdist/helm/helm/
กับผู้ช่วย AI
ผู้
ใช้เฉพาะเครื่องมือ Aggrega และอย่าสร้างโฟลเดอร์เอง ถ้าโฟลเดอร์พื้นที่ทำงานยังไม่มีโฟลเดอร์ `workload-identity-binding` เรียกเครื่องมือ `draft` หนึ่งครั้ง โดยตั้ง `example` เป็น `workload-identity-binding` และไม่ระบุ `dir`: เครื่องมือจะเขียนตัวอย่างลงในโฟลเดอร์ `workload-identity-binding` ใหม่ จากนั้นเรียกเครื่องมือ `build` โดยตั้ง `workspace_root` เป็น `workload-identity-binding` ตั้ง `release` เป็น `release.yaml` ตั้ง `auto_pull` เป็น true และตั้ง `write` เป็น true แล้วบอกฉันว่าบิลด์เขียนไฟล์ใดบ้าง ไฟล์เหล่านั้นอยู่ใต้ `workload-identity-binding/dist/`Component ประกาศความต้องการ Release เป็นผู้เติม
แอปidentity ที่
featuresSchema: identity: required: true selector: "feature.aggrega.ai/kind!=secret" inject: []Aggregate ไม่
features: identity: type: core/gcp-workload-identity infra: service_account_name: app-workload-identity gcp_service_account: app-dev@example-project.iam.gserviceaccount.comRelease ที่core/aws-irsa และ role_arn แทน และ Manifest ของ Release นั้น
การแนบเผยแพร่
Feature ประกาศschema.provides ว่าname และ FeatureRecipe ของ Feature นั้นservice_account_name ที่
# FeatureRecipe gcp-workload-identitylocals: sa_name: '{{ default (printf "%s-%s" .context.rendered_name (.attachment_name | replace "_" "-")) .infra.service_account_name }}'provides: name: "{{ .locals.sa_name }}"Recipe อ่านค่า
Recipe ผู้.features.<instance-name>.provides.<key>:
# helm/identity-app recipe workloadserviceAccount: "{{ .features.identity.provides.name }}"containers: main: variables: IDENTITY_SERVICE_ACCOUNT: {{ .features.identity.provides.name }}การ
[… omitted: the apiVersion]kind: ServiceAccountmetadata: name: app-workload-identity annotations: iam.gke.io/gcp-service-account: "app-dev@example-project.iam.gserviceaccount.com" [… omitted: the boundary and recipe annotations, and the labels, that every rendered document carries][… omitted: the Deployment's metadata, selector and pod template up to the containers] containers: - name: main [… omitted: the image and the port] env: [… omitted: the GREETING variable] - name: IDENTITY_SERVICE_ACCOUNT value: app-workload-identity serviceAccountName: app-workload-identityเหตุใดจึงอ่านแทนการเขียนซ้ำ
ทางapp-workload-identity เป็นservice_account_name ของ
การ.features.identity.provides.name ทำให้.features.<slot>.provides.name sidecar เผย
การกำหนดขนาดโดยผู้ดำเนินการ
release.yaml จัดหาinfra.image_tag (myapp:1.2) และ