Skip to content

NCUHOME/K8sSetImageAction

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K8sSetImageAction

通过 Rancher API 更新 Kubernetes Deployment/DaemonSet 镜像的 GitHub Action

特性

  • ✅ 轻量级 Shell 脚本实现
  • ✅ 支持所有 Rancher 管理的 K8s 集群
  • ✅ 支持 Deployment、DaemonSet、StatefulSet 和 CronJob
  • ✅ 自动重试(最多 5 次)
  • ✅ 可选等待部署完成

使用方法

- name: Update Deployment
  uses: NCUHOME/K8sSetImageAction@v1.0
  with:
    server: "https://some.rancher.com" # Rancher Server Addr
    token: ${{ secrets.CATTLE_TOKEN }} # Rancher API Bearer Token
    namespace: "control"
    workload: "apicenter"
    image: "image.url:version"
    type: "daemonsets" # 可选, 默认 'deployments', 支持 deployments/daemonsets/statefulsets/cronjobs
    container: "1" # 可选, 容器索引, 默认 0
    wait: "true" # 可选, 等待部署完全可用, 默认 false
    waittimeout: "300" # 可选, 等待超时秒数, 默认 300
    cluster: "local" # 可选, 集群名称, 默认 'local'

About

用于 ci 更新 Rancher Deployment

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages