-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
- Loading branch information
Showing
13 changed files
with
2,234 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
../versions/kruise-rollout/0.3/ | ||
../versions/kruise-rollout/0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v1 | ||
name: kruise-rollout | ||
description: Helm chart for kruise-rollout components | ||
version: 0.4.0 | ||
appVersion: 0.4.0 | ||
kubeVersion: ">= 1.19.0-0" | ||
icon: https://openkruise.io/img/openkruise-logo-bg.jpg | ||
keywords: | ||
- rollout | ||
home: https://openkruise.io | ||
sources: | ||
- https://github.com/openkruise/rollouts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Kruise Rollout v0.4.0 | ||
|
||
## Configuration | ||
|
||
The following table lists the configurable parameters of the kruise chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
|----------------------------------|-------------------------------------------------------------------|-------------------------------------| | ||
| `installation.namespace` | Namespace for kruise-rollout operation installation | `kruise-rollout` | | ||
| `installation.createNamespace` | Whether to create the installation.namespace | `true` | | ||
| `rollout.fullname` | Nick name for kruise-rollout deployment and other configurations | `kruise-rollout-controller-manager` | | ||
| `rollout.featureGates` | Feature gates for kruise-rollout, empty string means all disabled | `AdvancedDeployment=true` | | ||
| `rollout.healthBindPort` | Port for checking health of kruise-rollout container | `8081` | | ||
| `rollout.metricsBindAddr` | Port of metrics served by kruise-rollout container | `127.0.0.1:8080` | | ||
| `rollout.log.level` | Log level that kruise-rollout printed | `4` | | ||
| `rollout.webhook.port` | Port of webhook served by kruise-rollout container | `9876` | | ||
| `rollout.webhook.objectSelector` | ObjectSelector for workloads in MutatingWebhookConfigurations | ` ` | | ||
| `image.repository` | Repository for kruise-rollout image | `openkruise/kruise-rollout` | | ||
| `image.tag` | Tag for kruise-rollout image | `v0.4.0` | | ||
| `image.pullPolicy` | ImagePullPolicy for kruise-rollout container | `Always` | | ||
| `imagePullSecrets` | The list of image pull secrets for kruise-rollout image | ` ` | | ||
| `resources.limits.cpu` | CPU resource limit of kruise-rollout container | `500m` | | ||
| `resources.limits.memory` | Memory resource limit of kruise-rollout container | `1Gi` | | ||
| `resources.requests.cpu` | CPU resource request of kruise-rollout container | `100m` | | ||
| `resources.requests.memory` | Memory resource request of kruise-rollout container | `256Mi` | | ||
| `replicaCount` | Replicas of kruise-rollout deployment | `2` | | ||
| `service.port` | Port of webhook served by kruise-rollout webhook service | `443` | | ||
| `serviceAccount.annotations` | The annotations for serviceAccount of kruise-rollout | ` ` | | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, | ||
|
||
### Optional: feature-gate | ||
|
||
Feature-gate controls some influential features in Kruise: | ||
|
||
| Name | Description | Default | Effect (if closed) | | ||
|-----------------------|--------------------------------------------------------------------------------------------------------|----------|-----------------------------------------| | ||
| `AdvancedDeployment` | Whether to enable the ability to rolling update deployment in batches without extra canary deployment | `true` | advanced deployment controller disabled | | ||
|
||
### Optional: the local image for China | ||
|
||
If you are in China and have problem to pull image from official DockerHub, you can use the registry hosted on Alibaba Cloud: | ||
|
||
```bash | ||
$ helm install kruise https://... --set image.repository=openkruise-registry.cn-shanghai.cr.aliyuncs.com/openkruise/kruise-rollout | ||
... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "rollout.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "rollout.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "rollout.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "rollout.labels" -}} | ||
helm.sh/chart: {{ include "rollout.chart" . }} | ||
{{ include "rollout.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "rollout.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "rollout.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "rollout.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "rollout.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{{- if .Values.installation.createNamespace }} | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
labels: | ||
control-plane: {{ .Values.rollout.fullname }} | ||
name: {{ .Values.installation.namespace }} | ||
{{- end }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kruise-rollout-webhook-service | ||
namespace: {{ .Values.installation.namespace }} | ||
spec: | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: {{ .Values.rollout.webhook.port }} | ||
selector: | ||
control-plane: {{ .Values.rollout.fullname }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.rollout.fullname }} | ||
namespace: {{ .Values.installation.namespace }} | ||
labels: | ||
control-plane: {{ .Values.rollout.fullname }} | ||
spec: | ||
replicas: {{ .Values.replicaCount }} | ||
selector: | ||
matchLabels: | ||
control-plane: {{ .Values.rollout.fullname }} | ||
minReadySeconds: 3 | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 0 | ||
maxSurge: 100% | ||
template: | ||
metadata: | ||
labels: | ||
control-plane: {{ .Values.rollout.fullname }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ .Values.rollout.fullname }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
args: | ||
- --leader-elect | ||
- --health-probe-bind-address=:{{ .Values.rollout.healthBindPort }} | ||
- --metrics-bind-address={{ .Values.rollout.metricsBindAddr }} | ||
- --v={{ .Values.rollout.log.level }} | ||
{{- if .Values.rollout.featureGates }} | ||
- --feature-gates={{ .Values.rollout.featureGates }} | ||
{{- end }} | ||
command: | ||
- /manager | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
ports: | ||
- containerPort: {{ .Values.rollout.webhook.port }} | ||
name: webhook-server | ||
protocol: TCP | ||
livenessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: {{ .Values.rollout.healthBindPort }} | ||
initialDelaySeconds: 15 | ||
periodSeconds: 20 | ||
readinessProbe: | ||
httpGet: | ||
path: /readyz | ||
port: {{ .Values.rollout.healthBindPort }} | ||
initialDelaySeconds: 5 | ||
periodSeconds: 10 | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
affinity: | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- podAffinityTerm: | ||
labelSelector: | ||
matchExpressions: | ||
- key: control-plane | ||
operator: In | ||
values: | ||
- {{ .Values.rollout.fullname }} | ||
topologyKey: kubernetes.io/hostname | ||
weight: 100 |
Oops, something went wrong.