{
 "ConfigMap:把設定從映像分離#1": {
  "type": "cards",
  "reveal": [
   0,
   0,
   1,
   1,
   2
  ],
  "cards": [
   {
    "title": "ConfigMap",
    "points": [
     "非機密設定",
     "鍵值對",
     "大小上限約 1 MiB"
    ]
   },
   {
    "title": "Secret",
    "points": [
     "密碼、金鑰、token",
     "機密資料用這個"
    ]
   }
  ]
 },
 "ConfigMap:把設定從映像分離#2": {
  "type": "table",
  "head": [
   "旗標",
   "來源"
  ],
  "rows": [
   [
    "--from-literal",
    "在指令裡直接寫鍵和值"
   ],
   [
    "--from-file",
    "檔名當鍵,內容當值"
   ],
   [
    "--from-env-file",
    "一行一個鍵值,每行變成一個鍵"
   ]
  ],
  "reveal": [
   0,
   3
  ],
  "widths": [
   1,
   2
  ]
 },
 "ConfigMap:把設定從映像分離#6": {
  "type": "table",
  "head": [
   "寫法",
   "效果"
  ],
  "rows": [
   [
    "env",
    "挑選 ConfigMap 的單一個鍵"
   ],
   [
    "envFrom",
    "所有鍵都變成環境變數"
   ]
  ],
  "reveal": [
   0,
   0,
   1,
   2,
   2
  ],
  "widths": [
   1,
   2
  ]
 },
 "ConfigMap:把設定從映像分離#7": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   0,
   1,
   3,
   4,
   4
  ],
  "nodes": [
   {
    "label": "volumeMounts",
    "sub": "/etc/app 唯讀"
   },
   {
    "label": "volumes",
    "sub": "名稱 cfg"
   },
   {
    "label": "ConfigMap",
    "sub": "app-config"
   },
   {
    "label": "每個鍵",
    "sub": "變成一個檔案"
   }
  ]
 },
 "Secret:機密資料與它的限制#2": {
  "type": "table",
  "head": [
   "注意事項",
   "做法"
  ],
  "rows": [
   [
    "不提交 Git",
    "base64 也等於明文"
   ],
   [
    "限制 get 與 list",
    "靠 RBAC 控管"
   ],
   [
    "etcd 靜態加密",
    "正式環境應啟用"
   ]
  ],
  "reveal": [
   0,
   0,
   1,
   2,
   3
  ],
  "widths": [
   1,
   1
  ]
 },
 "Secret:機密資料與它的限制#3": {
  "type": "cards",
  "reveal": [
   1,
   2
  ],
  "cards": [
   {
    "title": "外部機密管理",
    "points": [
     "Vault",
     "雲端機密服務",
     "搭配 External Secrets"
    ]
   },
   {
    "title": "Sealed Secrets",
    "points": [
     "加密後的內容",
     "可安全放進 Git"
    ]
   }
  ]
 },
 "Secret:機密資料與它的限制#4": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   3
  ],
  "nodes": [
   {
    "label": "base64 字串"
   },
   {
    "label": "base64 -d",
    "sub": "echo 後經管線解碼"
   },
   {
    "label": "原文還原",
    "sub": "不是加密",
    "kind": "end"
   }
  ]
 },
 "環境變數、檔案掛載與設定更新策略#1": {
  "type": "table",
  "head": [
   "情境",
   "做法"
  ],
  "rows": [
   [
    "單一值",
    "環境變數"
   ],
   [
    "一整份設定檔",
    "掛載成檔案"
   ],
   [
    "機密資料",
    "優先檔案掛載並限制權限"
   ],
   [
    "不重啟更新",
    "掛載檔案,程式需重新讀取"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ],
  "widths": [
   1,
   2
  ]
 },
 "環境變數、檔案掛載與設定更新策略#2": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   3,
   3
  ],
  "nodes": [
   {
    "label": "projected",
    "sub": "all-in-one"
   },
   {
    "label": "ConfigMap",
    "sub": "app-config"
   },
   {
    "label": "Secret",
    "sub": "db-secret"
   }
  ],
  "edges": [
   [
    0,
    1
   ],
   [
    0,
    2
   ]
  ]
 },
 "環境變數、檔案掛載與設定更新策略#5": {
  "type": "flow",
  "layout": "row",
  "reveal": [
   0,
   2,
   3,
   3,
   3
  ],
  "nodes": [
   {
    "label": "改 ConfigMap"
   },
   {
    "label": "rollout restart",
    "sub": "滾動換 Pod"
   },
   {
    "label": "套用新設定",
    "sub": "服務不中斷"
   }
  ]
 },
 "環境變數、檔案掛載與設定更新策略#6": {
  "type": "table",
  "head": [
   "步驟",
   "指令"
  ],
  "rows": [
   [
    "1",
    "kubectl apply -f configmap.yaml"
   ],
   [
    "2",
    "kubectl rollout restart deployment/web"
   ],
   [
    "3",
    "kubectl rollout status deployment/web"
   ]
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ],
  "widths": [
   1,
   5
  ]
 }
}