Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] kruise-rollout helm template add a switch. #1934

Open
dashapan opened this issue Feb 21, 2025 · 0 comments
Open

[feature request] kruise-rollout helm template add a switch. #1934

dashapan opened this issue Feb 21, 2025 · 0 comments
Assignees

Comments

@dashapan
Copy link

What would you like to be added:
kruise helm template add turn off/on

example:
deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: workload-demo
namespace: default
spec:
replicas: 10
selector:
matchLabels:
app: demo
template:
metadata:
labels:
app: demo
spec:
containers:
- name: busybox
image: busybox:latest
command: [ "/bin/sh", "-c", "sleep 100d" ]
env:
- name: VERSION
value: "version-1"
rollout helm config

将如下内容存储到文件rollout.yaml。

{{ $grayEnable := .Values.grayEnable | default "" }}
{{ if $grayEnable }}
apiVersion: rollouts.kruise.io/v1beta1
kind: Rollout
metadata:
name: {{ .Values.appname }}
namespace: {{ .Values.namespace}}
spec:
workloadRef:
apiVersion: apps/v1
kind: Deployment
# Deployment Name
name: {{ .Values.appname }}
strategy:
canary:
enableExtraWorkloadForCanary: false
steps:
- replicas: 1
- replicas: 50%
- replicas: 100%
{{end}}

helm upgrade cmd:

helm upgrade -i $Service server -f server/values-$HelmPath/$Service.yaml -n $NameSpace --set image.tag=$DeployTag,grayEnable=True

Why is this needed:
If there is a switch, it would be very convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants