Skip to content

Commit

Permalink
update statefulset mutating (#26)
Browse files Browse the repository at this point in the history
fix role name
  • Loading branch information
FillZpp authored and jian-he committed Jun 20, 2019
1 parent 811ab30 commit db2a323
Show file tree
Hide file tree
Showing 11 changed files with 478 additions and 359 deletions.
3 changes: 3 additions & 0 deletions config/crds/apps_v1alpha1_statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ spec:
type: integer
required:
- replicas
- readyReplicas
- currentReplicas
- updatedReplicas
type: object
version: v1alpha1
status:
Expand Down
12 changes: 12 additions & 0 deletions config/rbac/rbac_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ rules:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
Expand Down
26 changes: 21 additions & 5 deletions config/samples/apps_v1alpha1_statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
apiVersion: apps.kruise.io/v1alpha1
kind: StatefulSet
metadata:
labels:
controller-tools.k8s.io: "1.0"
name: statefulset-sample
name: sample
spec:
# Add fields here
foo: bar
replicas: 10
serviceName: fake-service
selector:
matchLabels:
app: sample
template:
metadata:
labels:
app: sample
spec:
readinessGates:
- conditionType: InPlaceUpdateReady
containers:
- name: main
image: nginx:alpine
updateStrategy:
type: RollingUpdate
rollingUpdate:
podUpdatePolicy: InPlaceIfPossible
maxUnavailable: 2
3 changes: 3 additions & 0 deletions install/kruise/templates/apps_v1alpha1_statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ spec:
type: integer
required:
- replicas
- readyReplicas
- currentReplicas
- updatedReplicas
type: object
version: v1alpha1
status:
Expand Down
Loading

0 comments on commit db2a323

Please sign in to comment.