惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 BLOG
IT之家
IT之家
C
Check Point Blog
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
M
MIT News - Artificial intelligence
Jina AI
Jina AI
Blog — PlanetScale
Blog — PlanetScale
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
F
Fortinet All Blogs
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
MyScale Blog
MyScale Blog
爱范儿
爱范儿
The Cloudflare Blog
博客园 - 三生石上(FineUI控件)

Oskyla 烹茶室

修复 Joplin on KDE 菜单栏显示问题 Copy Fail:Linux 内核 2017 年至今的高危漏洞(附临时缓解方案) | CVE-2026-31431 Hermes Agent — 在 K3s / K8s 中运行指南 在 K3s 节点上安装并使用 nerdctl Mouser:轻量开源的罗技鼠标驱动替代方案 Claude Opus 4.7:优缺点与评测信息汇总 openFuyao NPU-Operator故障排查 openFuyao 2603 共测测试报告 openFuyao InferNex AI推理集成部署 310P(300I Pro) 环境问题记录及解决 ceph mon Operation not permitted 问题解决 Ascend 310P + openFuyao + NPU-Operator 故障排查 KDE Plasma6 禁用全局菜单,恢复正常应用菜单 终极指南:在 Linux 裸机服务器上快速部署 Moltbot (原 Clawbot) 并集成飞书 Windows 配置 Claude Code 解决 settings.json 不生效 Windows 配置 Claude Code 全流程 2025-12-31 | 年终总结 AI 生图精品提示词|第二期:城市星球 AI 生图精品提示词|第一期 Kubernetes kubectl --raw 使用指南 彻底解决阿里云和 tailscale 冲突 2025-10-21 | 沉淀思维 macOS 单独为鼠标或触控板开启自然滚动 2025-10-16 | 负载高低 2025-10-15 | 睡眠周期 2025-10-14 | 转换情绪与独立观点 go 拉取 gitcode.com 私有 mod Git 将某个文件恢复到其他分支的状态 SSH 通过跳板机连接 lxc 使用 chronyc 构建 ntp 服务 2025-10-13 | 独立思考于未来能源
使用脚本镜像 helm charts 仓库
Tianlun Song · 2024-12-18 · via Oskyla 烹茶室

本文 首发于 🌱 煎茶转载 请注明 来源

#!/bin/bash  
  
# 源 Harbor 配置  
SOURCE_HARBOR="harbor.xxx.com"  
SOURCE_PROJECT="xx-xxx"  
#SOURCE_PROJECT="xxx"  
#SOURCE_USER="username"  
#SOURCE_PASS="password"  
  
# 目标 Harbor 配置  
DEST_HARBOR="192.168.25.8:10443"  
DEST_PROJECT="xxx-xxx"  
DEST_USER="admin"  
DEST_PASS="xxx@xxx"  
DEST_CA_FILE="/etc/docker/certs.d/192.168.25.8:10443/ca.crt"  
  
# 添加源和目标 Harbor 仓库/  
helm repo remove source-repo || true  
helm repo remove dest-repo || true  
helm repo add source-repo https://$SOURCE_HARBOR/chartrepo/$SOURCE_PROJECT #--username $SOURCE_USER --password $SOURCE_PASS  
helm repo add dest-repo https://$DEST_HARBOR/chartrepo/$DEST_PROJECT --username $DEST_USER --password $DEST_PASS --ca-file $DEST_CA_FILE  
  
# 更新 repo  
helm repo update  
  
# 获取所有 charts  
charts=$(helm search repo source-repo/ -o json | jq -r '.[].name')  
  
# 遍历并同步每个 chart  
for chart in $charts  
do  
   echo "sync with [$chart]"  
   # 获取所有版本t  
   versions=$(helm search repo $chart -l -o json | jq -r '.[].version')  
   chart_name=${chart#source-repo/}  
   # 遍历每个版本c  
   for version in $versions  
   do  
       echo "sync with [$chart] [$version]"  
       # 下载特定版本的 chart  
       helm pull $chart --version $version  
  
       # 推送到目标仓库t  
       helm cm-push ${chart_name}-${version}.tgz dest-repo --ca-file $DEST_CA_FILE  
  
       # 清理下载的文件c  
       rm ${chart_name}-${version}.tgz  
   done  
done