chart ที่เก็บไว้ในที่เก็บ git
Helm chart ไม่hello-world ของ
Aggregate ของcore/compute/server หนึ่ง
บล็อกซอร์ส
source: kind: git-repository url: https://github.com/helm/examples.git ref: hello-world-0.1.0 module_subdir: charts/hello-worldพิกัด
url— ที่เก็บ ที่ จะ โคลน รองรับ https://,ssh://และgit://ทั้งหมด เข้าถึงที่ เก็บ ส่วน ตัว ผ่าน SSH ด้วย SSH agent หรือ ผ่าน HTTPS โดย มี รายการ ของ โฮสต์ นั้น ใน ไฟล์ netrc ของ คุณ — machine github.com login <user> password <token>ข้อมูลรับรอง การที่ เขียน ไว้ ใน ตัว URL เอง จะ ถูก ปฏิเสธ ตาม ที่ ยืนยัน อธิบายตัว ตน ref— การอ้างอิง ที่ ใช้ อ่าน ที่ เก็บ ได้แก่ แท็ก แบ รนช์ หรือ คอมมิต ซึ่ง เป็น ชื่อ ใด ก็ตาม ที่ ผู้ เขียน ของ ที่ เก็บ นั้น ตั้ง ไว้ และ ไม่ ได้ เป็น เวอร์ชัน เปล่า เสมอ ไป ใน ที่ นี้ แท็ก มีชื่อ ของ chart ด้วย module_subdir— ไดเรกทอรีภายใน ที่ เก็บ ที่ เป็น chart ที่ เก็บ มี chart อยู่ ใต้ เส้น ทาง นี้ ไม่ ได้ เป็น chart เอง และ ไดเรกทอรี เป็น ส่วน หนึ่ง ของ สิ่ง ที่ ทำให้ อาร์ติแฟกต์ แตก ต่าง ไดเรกทอรี สอง รายการ ของ ที่ เก็บ เดียวกัน ที่ คอมมิต เดียวกัน เป็น อาร์ติแฟกต์ สอง รายการ ไม่ใช่ หนึ่ง รายการ
ประเภท
สิ่งที่ไฟล์ล็อกบันทึก
มีaggrega pull จึง
# release-chart.locksource_artifacts: - kind: git-repository url: https://github.com/helm/examples.git module_subdir: charts/hello-world pinned_version: f3dc419e558e6ccebce2ed447384e5d2e11de2f9 digest: sha256:2bee62cfc2efccc61d8e17efeb72f9f77ad7bd87f3ea4e50b1e4219c8d5a2c78 mediatype: application/gzip referenced_by: - entity: recipe uri: helm/hello-world-git:1.0.0 field: spec.source requested_ref: hello-world-0.1.0ทั้งref: hello-world-0.1.0 ใน Recipe ต่อ
ร่างตัวอย่าง
คุณ
เขียน
aggrega draft --example chart-from-git-repositoryจาก
cd chart-from-git-repositoryบิลด์
aggrega build --release release-chart.yaml --auto-pullตัวอย่าง--auto-pull ที่aggrega pull --release release-chart.yaml หนึ่ง
Deployment ที่
apiVersion: apps/v1kind: Deploymentmetadata: name: web-hello-world [… omitted: the chart's own labels, and the labels and annotations every rendered document carries]spec: replicas: 2 [… omitted: the selector and the pod template's own labels] spec: serviceAccountName: web-hello-world securityContext: {} containers: - name: hello-world securityContext: {} image: "nginx:1.27.3" imagePullPolicy: IfNotPresent [… omitted: the container port and the two probes]การ
warning: node "web": .infra key "compute" is read by no template in recipe "hello-world-git" — correct the spelling, or remove the keyคำcore/compute/server มี
กับผู้ช่วย AI
ผู้
ใช้เครื่องมือของ Aggrega เท่านั้น และอย่าสร้างโฟลเดอร์เอง หากโฟลเดอร์พื้นที่ทำงานยังไม่มีโฟลเดอร์ `chart-from-git-repository` เรียกเครื่องมือ `draft` หนึ่งครั้งโดยตั้ง `example` เป็น `chart-from-git-repository` และไม่ระบุ `dir` เครื่องมือจะเขียนตัวอย่างลงในโฟลเดอร์ `chart-from-git-repository` ใหม่ จากนั้นเรียกเครื่องมือ `build` โดยตั้ง `workspace_root` เป็น `chart-from-git-repository` ตั้ง `release` เป็น `release-chart.yaml` ตั้ง `auto_pull` เป็น true และตั้ง `write` เป็น true บอกฉันว่าการบิลด์เขียนไฟล์ใดบ้าง ไฟล์เหล่านั้นอยู่ใต้ `chart-from-git-repository/dist/`เมื่อการอ้างอิงย้าย
แท็กaggrega pull ตาม
# aggrega pull --release release-chart.yaml## [E0130]# lockfile: out of date; it no longer matches what its Release resolves to# ---# source-artifact kind=git-repository url=https://github.com/helm/examples.git# module_subdir=charts/hello-world: reference "hello-world-0.1.0" moved — the# lockfile pins 03f4a18d3c2b77b7ecd91d0324a95910d4f04152, and it now resolves to# f3dc419e558e6ccebce2ed447384e5d2e11de2f9; adopt where it now points with# `aggrega pull --upgrade --release <release>`การ
aggrega pull --upgrade --pin-sources --release release-chart.yamlการ--upgrade มี--upgrade เปล่าๆ ทิ้ง--pin-sources ด้วย เพราะ Recipe นี้entity.lock ที่aggrega pin คอมมิต entity.lock ที่
การaggrega pull --release release-chart.yaml ตาม
การref: แทน
Release ราวกั้น
release-negative.yaml คาดmanifest-negative.yaml ซึ่ง
aggrega build --release release-negative.yaml --auto-pull# exits non-zero# [E0137]# auto-pull: resolving the source of each Recipe and FeatureRecipe the Release# uses: resolve: resolve source for recipe# "helm/hello-world-git-missing-ref:1.0.0": sourceresolver: kind=git-repository# url=https://github.com/helm/examples.git version=: oci: artifact not found at# remote source (cause: reference not found)[… omitted: the rest of that line, a remediation naming the URL and version to check]ที่
สิ่งที่ตัวอย่างนี้ต้องการจากเครือข่าย
ต่างurl เมื่อaggrega build --release release-chart.yaml --offline บิลด์