mirror of https://github.com/openkruise/charts.git
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com> (#8)
kruise-rollout v0.1.0
This commit is contained in:
parent
f46b9f3265
commit
dd61115856
|
|
@ -1 +1 @@
|
||||||
../versions/1.1.0
|
../versions/kruise/1.1.0
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
../versions/kruise-rollout/0.1.0
|
||||||
|
|
@ -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/
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
apiVersion: v1
|
||||||
|
name: kruise-rollout
|
||||||
|
description: Helm chart for kruise-rollout components
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: 0.1.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
|
||||||
|
|
@ -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 }}
|
||||||
|
|
@ -0,0 +1,89 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
control-plane: {{ .Values.rollout.fullname }}
|
||||||
|
name: {{ .Values.installation.namespace }}
|
||||||
|
---
|
||||||
|
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:
|
||||||
|
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 }}
|
||||||
|
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
|
||||||
|
|
@ -0,0 +1,298 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.rollout.fullname }}
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: kruise-rollout-leader-election-role
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- coordination.k8s.io
|
||||||
|
resources:
|
||||||
|
- leases
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- patch
|
||||||
|
- delete
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- patch
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: kruise-rollout-manager-role
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- '*'
|
||||||
|
resources:
|
||||||
|
- events
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- admissionregistration.k8s.io
|
||||||
|
resources:
|
||||||
|
- mutatingwebhookconfigurations
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- admissionregistration.k8s.io
|
||||||
|
resources:
|
||||||
|
- validatingwebhookconfigurations
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apiextensions.k8s.io
|
||||||
|
resources:
|
||||||
|
- customresourcedefinitions
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- replicasets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- replicasets/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- apps.kruise.io
|
||||||
|
resources:
|
||||||
|
- clonesets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps.kruise.io
|
||||||
|
resources:
|
||||||
|
- clonesets/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods/finalizers
|
||||||
|
verbs:
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- pods/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- services/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- networking.k8s.io
|
||||||
|
resources:
|
||||||
|
- ingresses
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- networking.k8s.io
|
||||||
|
resources:
|
||||||
|
- ingresses/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- rollouts.kruise.io
|
||||||
|
resources:
|
||||||
|
- batchreleases
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- rollouts.kruise.io
|
||||||
|
resources:
|
||||||
|
- batchreleases/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- rollouts.kruise.io
|
||||||
|
resources:
|
||||||
|
- rollouts
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- rollouts.kruise.io
|
||||||
|
resources:
|
||||||
|
- rollouts/finalizers
|
||||||
|
verbs:
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- rollouts.kruise.io
|
||||||
|
resources:
|
||||||
|
- rollouts/status
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: kruise-rollout-leader-election-rolebinding
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: kruise-rollout-leader-election-role
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ .Values.rollout.fullname }}
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: kruise-rollout-manager-rolebinding
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: kruise-rollout-manager-role
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ .Values.rollout.fullname }}
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
|
@ -0,0 +1,246 @@
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
controller-gen.kubebuilder.io/version: v0.7.0
|
||||||
|
creationTimestamp: null
|
||||||
|
name: batchreleases.rollouts.kruise.io
|
||||||
|
spec:
|
||||||
|
group: rollouts.kruise.io
|
||||||
|
names:
|
||||||
|
kind: BatchRelease
|
||||||
|
listKind: BatchReleaseList
|
||||||
|
plural: batchreleases
|
||||||
|
singular: batchrelease
|
||||||
|
scope: Namespaced
|
||||||
|
versions:
|
||||||
|
- additionalPrinterColumns:
|
||||||
|
- jsonPath: .spec.targetReference.workloadRef.kind
|
||||||
|
name: KIND
|
||||||
|
type: string
|
||||||
|
- jsonPath: .status.phase
|
||||||
|
name: PHASE
|
||||||
|
type: string
|
||||||
|
- jsonPath: .status.canaryStatus.currentBatch
|
||||||
|
name: BATCH
|
||||||
|
type: integer
|
||||||
|
- jsonPath: .status.canaryStatus.batchState
|
||||||
|
name: BATCH-STATE
|
||||||
|
type: string
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: AGE
|
||||||
|
type: date
|
||||||
|
name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: BatchReleaseSpec defines how to describe an update between
|
||||||
|
different compRevision
|
||||||
|
properties:
|
||||||
|
releasePlan:
|
||||||
|
description: ReleasePlan is the details on how to rollout the resources
|
||||||
|
properties:
|
||||||
|
batchPartition:
|
||||||
|
description: All pods in the batches up to the batchPartition
|
||||||
|
(included) will have the target resource specification while
|
||||||
|
the rest still is the stable revision. This is designed for
|
||||||
|
the operators to manually rollout Default is nil, which means
|
||||||
|
no partition and will release all batches. BatchPartition start
|
||||||
|
from 0.
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
batches:
|
||||||
|
description: 'Batches is the details on each batch of the ReleasePlan.
|
||||||
|
Users can specify their batch plan in this field, such as: batches:
|
||||||
|
- canaryReplicas: 1 # batches 0 - canaryReplicas: 2 # batches
|
||||||
|
1 - canaryReplicas: 5 # batches 2 Not that these canaryReplicas
|
||||||
|
should be a non-decreasing sequence.'
|
||||||
|
items:
|
||||||
|
description: ReleaseBatch is used to describe how each batch
|
||||||
|
release should be
|
||||||
|
properties:
|
||||||
|
canaryReplicas:
|
||||||
|
anyOf:
|
||||||
|
- type: integer
|
||||||
|
- type: string
|
||||||
|
description: 'CanaryReplicas is the number of upgraded pods
|
||||||
|
that should have in this batch. it can be an absolute
|
||||||
|
number (ex: 5) or a percentage of workload replicas. batches[i].canaryReplicas
|
||||||
|
should less than or equal to batches[j].canaryReplicas
|
||||||
|
if i < j.'
|
||||||
|
x-kubernetes-int-or-string: true
|
||||||
|
pauseSeconds:
|
||||||
|
description: The wait time, in seconds, between instances
|
||||||
|
batches, default = 0
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- canaryReplicas
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
paused:
|
||||||
|
description: Paused the rollout, the release progress will be
|
||||||
|
paused util paused is false. default is false
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
targetReference:
|
||||||
|
description: TargetRef contains the GVK and name of the workload that
|
||||||
|
we need to upgrade to.
|
||||||
|
properties:
|
||||||
|
workloadRef:
|
||||||
|
description: WorkloadRef contains enough information to let you
|
||||||
|
identify a workload for Rollout Batch release of the bypass
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: API Version of the referent
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: Kind of the referent
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
description: Name of the referent
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- apiVersion
|
||||||
|
- kind
|
||||||
|
- name
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- releasePlan
|
||||||
|
- targetReference
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: BatchReleaseStatus defines the observed state of a release
|
||||||
|
plan
|
||||||
|
properties:
|
||||||
|
canaryStatus:
|
||||||
|
description: CanaryStatus describes the state of the canary rollout.
|
||||||
|
properties:
|
||||||
|
batchReadyTime:
|
||||||
|
description: BatchReadyTime is the ready timestamp of the current
|
||||||
|
batch or the last batch. This field is updated once a batch
|
||||||
|
ready, and the batches[x].pausedSeconds relies on this field
|
||||||
|
to calculate the real-time duration.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
batchState:
|
||||||
|
description: CurrentBatchState indicates the release state of
|
||||||
|
the current batch.
|
||||||
|
type: string
|
||||||
|
currentBatch:
|
||||||
|
description: The current batch the rollout is working on/blocked,
|
||||||
|
it starts from 0
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
updatedReadyReplicas:
|
||||||
|
description: UpdatedReadyReplicas is the number upgraded Pods
|
||||||
|
that have a Ready Condition.
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
updatedReplicas:
|
||||||
|
description: UpdatedReplicas is the number of upgraded Pods.
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
required:
|
||||||
|
- currentBatch
|
||||||
|
type: object
|
||||||
|
collisionCount:
|
||||||
|
description: Count of hash collisions for creating canary Deployment.
|
||||||
|
The controller uses this field as a collision avoidance mechanism
|
||||||
|
when it needs to create the name for the newest canary Deployment.
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
conditions:
|
||||||
|
description: Conditions represents the observed process state of each
|
||||||
|
phase during executing the release plan.
|
||||||
|
items:
|
||||||
|
description: RolloutCondition describes the state of a rollout at
|
||||||
|
a certain point.
|
||||||
|
properties:
|
||||||
|
lastTransitionTime:
|
||||||
|
description: Last time the condition transitioned from one status
|
||||||
|
to another.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
lastUpdateTime:
|
||||||
|
description: The last time this condition was updated.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
description: A human readable message indicating details about
|
||||||
|
the transition.
|
||||||
|
type: string
|
||||||
|
reason:
|
||||||
|
description: The reason for the condition's last transition.
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
description: Phase of the condition, one of True, False, Unknown.
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
description: Type of rollout condition.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- message
|
||||||
|
- reason
|
||||||
|
- status
|
||||||
|
- type
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
observedGeneration:
|
||||||
|
description: ObservedGeneration is the most recent generation observed
|
||||||
|
for this BatchRelease. It corresponds to this BatchRelease's generation,
|
||||||
|
which is updated on mutation by the API Server, and only if BatchRelease
|
||||||
|
Spec was changed, its generation will increase 1.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
observedReleasePlanHash:
|
||||||
|
description: ObservedReleasePlanHash is a hash code of observed itself
|
||||||
|
releasePlan.Batches.
|
||||||
|
type: string
|
||||||
|
observedWorkloadReplicas:
|
||||||
|
description: ObservedWorkloadReplicas is observed replicas of target
|
||||||
|
referenced workload. This field is designed to deal with scaling
|
||||||
|
event during rollout, if this field changed, it means that the workload
|
||||||
|
is scaling during rollout.
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
phase:
|
||||||
|
description: Phase is the release plan phase, which indicates the
|
||||||
|
current state of release plan state machine in BatchRelease controller.
|
||||||
|
type: string
|
||||||
|
stableRevision:
|
||||||
|
description: StableRevision is the pod-template-hash of stable revision
|
||||||
|
pod template.
|
||||||
|
type: string
|
||||||
|
updateRevision:
|
||||||
|
description: UpdateRevision is the pod-template-hash of update revision
|
||||||
|
pod template.
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
status:
|
||||||
|
acceptedNames:
|
||||||
|
kind: ""
|
||||||
|
plural: ""
|
||||||
|
conditions: []
|
||||||
|
storedVersions: []
|
||||||
|
|
@ -0,0 +1,292 @@
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: apiextensions.k8s.io/v1
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
controller-gen.kubebuilder.io/version: v0.7.0
|
||||||
|
creationTimestamp: null
|
||||||
|
name: rollouts.rollouts.kruise.io
|
||||||
|
spec:
|
||||||
|
group: rollouts.kruise.io
|
||||||
|
names:
|
||||||
|
kind: Rollout
|
||||||
|
listKind: RolloutList
|
||||||
|
plural: rollouts
|
||||||
|
singular: rollout
|
||||||
|
scope: Namespaced
|
||||||
|
versions:
|
||||||
|
- additionalPrinterColumns:
|
||||||
|
- description: The rollout status phase
|
||||||
|
jsonPath: .status.phase
|
||||||
|
name: STATUS
|
||||||
|
type: string
|
||||||
|
- description: The rollout canary status step
|
||||||
|
jsonPath: .status.canaryStatus.currentStepIndex
|
||||||
|
name: CANARY_STEP
|
||||||
|
type: integer
|
||||||
|
- description: The rollout canary status step state
|
||||||
|
jsonPath: .status.canaryStatus.currentStepState
|
||||||
|
name: CANARY_STATE
|
||||||
|
type: string
|
||||||
|
- description: The rollout canary status message
|
||||||
|
jsonPath: .status.message
|
||||||
|
name: MESSAGE
|
||||||
|
type: string
|
||||||
|
- jsonPath: .metadata.creationTimestamp
|
||||||
|
name: AGE
|
||||||
|
type: date
|
||||||
|
name: v1alpha1
|
||||||
|
schema:
|
||||||
|
openAPIV3Schema:
|
||||||
|
description: Rollout is the Schema for the rollouts API
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: 'APIVersion defines the versioned schema of this representation
|
||||||
|
of an object. Servers should convert recognized schemas to the latest
|
||||||
|
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: 'Kind is a string value representing the REST resource this
|
||||||
|
object represents. Servers may infer this from the endpoint the client
|
||||||
|
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||||
|
type: string
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
spec:
|
||||||
|
description: RolloutSpec defines the desired state of Rollout
|
||||||
|
properties:
|
||||||
|
objectRef:
|
||||||
|
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
||||||
|
Important: Run "make" to regenerate code after modifying this file
|
||||||
|
ObjectRef indicates workload'
|
||||||
|
properties:
|
||||||
|
workloadRef:
|
||||||
|
description: WorkloadRef contains enough information to let you
|
||||||
|
identify a workload for Rollout Batch release of the bypass
|
||||||
|
properties:
|
||||||
|
apiVersion:
|
||||||
|
description: API Version of the referent
|
||||||
|
type: string
|
||||||
|
kind:
|
||||||
|
description: Kind of the referent
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
description: Name of the referent
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- apiVersion
|
||||||
|
- kind
|
||||||
|
- name
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
strategy:
|
||||||
|
description: rollout strategy
|
||||||
|
properties:
|
||||||
|
canary:
|
||||||
|
description: CanaryStrategy defines parameters for a Replica Based
|
||||||
|
Canary
|
||||||
|
properties:
|
||||||
|
steps:
|
||||||
|
description: Steps define the order of phases to execute release
|
||||||
|
in batches(20%, 40%, 60%, 80%, 100%)
|
||||||
|
items:
|
||||||
|
description: CanaryStep defines a step of a canary workload.
|
||||||
|
properties:
|
||||||
|
pause:
|
||||||
|
description: Pause defines a pause stage for a rollout,
|
||||||
|
manual or auto
|
||||||
|
properties:
|
||||||
|
duration:
|
||||||
|
description: Duration the amount of time to wait
|
||||||
|
before moving to the next step.
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
replicas:
|
||||||
|
anyOf:
|
||||||
|
- type: integer
|
||||||
|
- type: string
|
||||||
|
description: 'Replicas is the number of expected canary
|
||||||
|
pods in this batch it can be an absolute number (ex:
|
||||||
|
5) or a percentage of total pods.'
|
||||||
|
x-kubernetes-int-or-string: true
|
||||||
|
weight:
|
||||||
|
description: SetWeight sets what percentage of the canary
|
||||||
|
pods should receive
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
trafficRoutings:
|
||||||
|
description: TrafficRoutings hosts all the supported service
|
||||||
|
meshes supported to enable more fine-grained traffic routing
|
||||||
|
todo current only support one
|
||||||
|
items:
|
||||||
|
description: TrafficRouting hosts all the different configuration
|
||||||
|
for supported service meshes to enable more fine-grained
|
||||||
|
traffic routing
|
||||||
|
properties:
|
||||||
|
gracePeriodSeconds:
|
||||||
|
description: Optional duration in seconds the traffic
|
||||||
|
provider(e.g. nginx ingress controller) consumes the
|
||||||
|
service, ingress configuration changes gracefully.
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
ingress:
|
||||||
|
description: Ingress holds Ingress specific configuration
|
||||||
|
to route traffic, e.g. Nginx, Alb.
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
description: Name refers to the name of an `Ingress`
|
||||||
|
resource in the same namespace as the `Rollout`
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
type: object
|
||||||
|
service:
|
||||||
|
description: Service holds the name of a service which
|
||||||
|
selects pods with stable version and don't select
|
||||||
|
any pods with canary version.
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
description: nginx, alb, istio etc.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- service
|
||||||
|
- type
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
type: object
|
||||||
|
paused:
|
||||||
|
description: Paused indicates that the Rollout is paused. Default
|
||||||
|
value is false
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- objectRef
|
||||||
|
- strategy
|
||||||
|
type: object
|
||||||
|
status:
|
||||||
|
description: RolloutStatus defines the observed state of Rollout
|
||||||
|
properties:
|
||||||
|
canaryStatus:
|
||||||
|
description: Canary describes the state of the canary rollout
|
||||||
|
properties:
|
||||||
|
canaryReadyReplicas:
|
||||||
|
description: CanaryReadyReplicas the numbers of ready canary revision
|
||||||
|
pods
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
canaryReplicas:
|
||||||
|
description: CanaryReplicas the numbers of canary revision pods
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
canaryRevision:
|
||||||
|
description: CanaryRevision is calculated by rollout based on
|
||||||
|
podTemplateHash, and the internal logic flow uses It may be
|
||||||
|
different from rs podTemplateHash in different k8s versions,
|
||||||
|
so it cannot be used as service selector label
|
||||||
|
type: string
|
||||||
|
canaryService:
|
||||||
|
description: CanaryService holds the name of a service which selects
|
||||||
|
pods with canary version and don't select any pods with stable
|
||||||
|
version.
|
||||||
|
type: string
|
||||||
|
currentStepIndex:
|
||||||
|
description: CurrentStepIndex defines the current step of the
|
||||||
|
rollout is on. If the current step index is null, the controller
|
||||||
|
will execute the rollout.
|
||||||
|
format: int32
|
||||||
|
type: integer
|
||||||
|
currentStepState:
|
||||||
|
type: string
|
||||||
|
lastReadyTime:
|
||||||
|
description: The last time this step pods is ready.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
observedWorkloadGeneration:
|
||||||
|
description: observedWorkloadGeneration is the most recent generation
|
||||||
|
observed for this Rollout ref workload generation.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
podTemplateHash:
|
||||||
|
description: pod template hash is used as service selector label
|
||||||
|
type: string
|
||||||
|
rolloutHash:
|
||||||
|
description: RolloutHash from rollout.spec object
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- canaryReadyReplicas
|
||||||
|
- canaryReplicas
|
||||||
|
- canaryService
|
||||||
|
- currentStepState
|
||||||
|
- podTemplateHash
|
||||||
|
type: object
|
||||||
|
conditions:
|
||||||
|
description: Conditions a list of conditions a rollout can have.
|
||||||
|
items:
|
||||||
|
description: RolloutCondition describes the state of a rollout at
|
||||||
|
a certain point.
|
||||||
|
properties:
|
||||||
|
lastTransitionTime:
|
||||||
|
description: Last time the condition transitioned from one status
|
||||||
|
to another.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
lastUpdateTime:
|
||||||
|
description: The last time this condition was updated.
|
||||||
|
format: date-time
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
description: A human readable message indicating details about
|
||||||
|
the transition.
|
||||||
|
type: string
|
||||||
|
reason:
|
||||||
|
description: The reason for the condition's last transition.
|
||||||
|
type: string
|
||||||
|
status:
|
||||||
|
description: Phase of the condition, one of True, False, Unknown.
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
description: Type of rollout condition.
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- message
|
||||||
|
- reason
|
||||||
|
- status
|
||||||
|
- type
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
message:
|
||||||
|
description: Message provides details on why the rollout is in its
|
||||||
|
current phase
|
||||||
|
type: string
|
||||||
|
observedGeneration:
|
||||||
|
description: observedGeneration is the most recent generation observed
|
||||||
|
for this Rollout.
|
||||||
|
format: int64
|
||||||
|
type: integer
|
||||||
|
phase:
|
||||||
|
description: BlueGreenStatus *BlueGreenStatus `json:"blueGreenStatus,omitempty"`
|
||||||
|
Phase is the rollout phase.
|
||||||
|
type: string
|
||||||
|
stableRevision:
|
||||||
|
description: CanaryRevision the hash of the canary pod template CanaryRevision
|
||||||
|
string `json:"canaryRevision,omitempty"` StableRevision indicates
|
||||||
|
the revision pods that has successfully rolled out
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
served: true
|
||||||
|
storage: true
|
||||||
|
subresources:
|
||||||
|
status: {}
|
||||||
|
status:
|
||||||
|
acceptedNames:
|
||||||
|
kind: ""
|
||||||
|
plural: ""
|
||||||
|
conditions: []
|
||||||
|
storedVersions: []
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: MutatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: kruise-rollout-mutating-webhook-configuration
|
||||||
|
webhooks:
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
- v1beta1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: kruise-rollout-webhook-service
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
path: /mutate-apps-kruise-io-v1alpha1-cloneset
|
||||||
|
failurePolicy: Ignore
|
||||||
|
name: mcloneset.kb.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- apps.kruise.io
|
||||||
|
apiVersions:
|
||||||
|
- v1alpha1
|
||||||
|
operations:
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- clonesets
|
||||||
|
sideEffects: None
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
- v1beta1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: kruise-rollout-webhook-service
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
path: /mutate-apps-v1-deployment
|
||||||
|
failurePolicy: Ignore
|
||||||
|
name: mdeployment.kb.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
apiVersions:
|
||||||
|
- v1
|
||||||
|
operations:
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
sideEffects: None
|
||||||
|
---
|
||||||
|
apiVersion: admissionregistration.k8s.io/v1
|
||||||
|
kind: ValidatingWebhookConfiguration
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
name: kruise-rollout-validating-webhook-configuration
|
||||||
|
webhooks:
|
||||||
|
- admissionReviewVersions:
|
||||||
|
- v1
|
||||||
|
- v1beta1
|
||||||
|
clientConfig:
|
||||||
|
service:
|
||||||
|
name: kruise-rollout-webhook-service
|
||||||
|
namespace: {{ .Values.installation.namespace }}
|
||||||
|
path: /validate-rollouts-kruise-io-rollout
|
||||||
|
failurePolicy: Fail
|
||||||
|
name: vrollout.kb.io
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- rollouts.kruise.io
|
||||||
|
apiVersions:
|
||||||
|
- v1alpha1
|
||||||
|
operations:
|
||||||
|
- CREATE
|
||||||
|
- UPDATE
|
||||||
|
resources:
|
||||||
|
- rollouts
|
||||||
|
sideEffects: None
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
# Default values for rollout.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
# values for rollout installation
|
||||||
|
installation:
|
||||||
|
namespace: kruise-rollout
|
||||||
|
|
||||||
|
rollout:
|
||||||
|
fullname: kruise-rollout-controller-manager
|
||||||
|
healthBindPort: "8081"
|
||||||
|
metricsBindAddr: "127.0.0.1:8080"
|
||||||
|
webhook:
|
||||||
|
port: 9876
|
||||||
|
|
||||||
|
log:
|
||||||
|
level: 3
|
||||||
|
|
||||||
|
replicaCount: 2
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: openkruise/kruise-rollout
|
||||||
|
pullPolicy: Always
|
||||||
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
|
tag: v0.1.0
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
service:
|
||||||
|
port: 443
|
||||||
|
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 1Gi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue