MariaDB บน Kubernetes — helm แบบสังเคราะห์ (StatefulSet) ข้อมูลรับรองสองสล็อต
ฐานcore/datastore/mariadb ผูกhelm/mariadb ซึ่งform: stateful ผู้
จุด
ร่างตัวอย่าง
คุณ
เขียน
aggrega draft --example mariadb-helm-synthจาก
cd mariadb-helm-synthบิลด์
aggrega build --release release.yaml --auto-pullแค็ตตาล็อก.aggrega-config.yaml จึง--catalog และ --auto-pull เขียนdist/helm/helm/
กับผู้ช่วย AI
ผู้
ใช้เฉพาะเครื่องมือของ Aggrega และอย่าสร้างโฟลเดอร์เอง หากโฟลเดอร์พื้นที่ทำงานยังไม่มีโฟลเดอร์ `mariadb-helm-synth` เรียกเครื่องมือ `draft` หนึ่งครั้งโดยตั้ง `example` เป็น `mariadb-helm-synth` และไม่ระบุ `dir` เครื่องมือจะเขียนตัวอย่างลงในโฟลเดอร์ `mariadb-helm-synth` ใหม่ จากนั้นเรียกเครื่องมือ `build` โดยตั้ง `workspace_root` เป็น `mariadb-helm-synth` ตั้ง `release` เป็น `release.yaml` ตั้ง `auto_pull` เป็น true และตั้ง `write` เป็น true บอกฉันว่าการบิลด์เขียนไฟล์ใดบ้าง ไฟล์เหล่านั้นอยู่ใต้ `mariadb-helm-synth/dist/`root_password — กล่องดำ (Black-Box) ส่งมอบบนท่อ inject
root_password เป็นfeaturesSchema ของ Component ประกาศ inject: [] Recipe จึงcore/secret-value ซึ่ง Manifest แมปenv-secret FeatureRecipe นั้น.context.inject.env.MARIADB_ROOT_PASSWORD ส่ง
# db-statefulset.yaml (container env)- name: MARIADB_ROOT_PASSWORD value: dev-root-pw-change-meบล็อก attachments: ของ
user_password — โปร่งใส ส่งมอบเป็น Secret + secretKeyRef
user_password เป็นinject: [env, file]) Aggregate แนบ core/referenced-secret ซึ่ง Manifest แมปk8s-secret-from-parameter FeatureRecipe นั้นprovides {name, key} Recipe อ้างอิงcontainers.attachments ซึ่งsecretKeyRef ของ.features.user_password.provides.name — ไม่มีuser_password จึงdb-user-password ชื่อ
[… omitted: the apiVersion and the Secret kind]metadata: name: db-user-password [… omitted: the labels and annotations every rendered document carries]stringData: MARIADB_PASSWORD: "dev-user-pw-change-me"
# db-statefulset.yaml (container env)- name: MARIADB_PASSWORD valueFrom: secretKeyRef: name: db-user-password # == the Secret's metadata.name key: MARIADB_PASSWORD # == the Secret's data keyการuser_password ไว้MARIADB_PASSWORD: apppass) และ
การกำหนดขนาดโดยผู้ดำเนินการ
release.yaml ให้infra.engine_version (mariadb:11.4) และinfra.storage (5Gi, standard) Aggregate ของ