Skip to content

Commit 0074015

Browse files
FillZppjian-he
authored andcommitted
update yamls and add helm chart (openkruise#10)
* update yamls and add helm chart * fix make manifests * skip execute helm template in Makefile
1 parent 6f7bdb1 commit 0074015

16 files changed

+1534
-6
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ deploy: manifests
2828
# Generate manifests e.g. CRD, RBAC etc.
2929
manifests:
3030
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go all
31+
cp config/crds/*.yaml ./install/kruise/templates/
32+
cp config/rbac/rbac_role.yaml ./install/kruise/templates/
3133

3234
# Run go fmt against code
3335
fmt:

config/default/manager_auth_proxy_patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This patch inject a sidecar container which is a HTTP proxy for the controller manager,
22
# it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
33
apiVersion: apps/v1
4-
kind: StatefulSet
4+
kind: Deployment
55
metadata:
66
name: controller-manager
77
namespace: system

config/default/manager_image_patch.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: apps/v1
2-
kind: StatefulSet
2+
kind: Deployment
33
metadata:
44
name: controller-manager
55
namespace: system
@@ -10,3 +10,7 @@ spec:
1010
# Change the value of image field below to your controller image URL
1111
- image: openkruise/kruise-manager:v0.1.0
1212
name: manager
13+
args:
14+
- "--metrics-addr=127.0.0.1:8080"
15+
- "--logtostderr=true"
16+
- "--v=4"

config/default/manager_image_patch.yaml-e

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: apps/v1
2-
kind: StatefulSet
2+
kind: Deployment
33
metadata:
44
name: controller-manager
55
namespace: system

config/default/manager_prometheus_metrics_patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This patch enables Prometheus scraping for the manager pod.
22
apiVersion: apps/v1
3-
kind: StatefulSet
3+
kind: Deployment
44
metadata:
55
name: controller-manager
66
namespace: system

config/manager/manager.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,24 @@ spec:
2222
- port: 443
2323
---
2424
apiVersion: apps/v1
25-
kind: StatefulSet
25+
kind: Deployment
2626
metadata:
2727
name: controller-manager
2828
namespace: system
2929
labels:
3030
control-plane: controller-manager
3131
controller-tools.k8s.io: "1.0"
3232
spec:
33+
replicas: 3
3334
selector:
3435
matchLabels:
3536
control-plane: controller-manager
3637
controller-tools.k8s.io: "1.0"
37-
serviceName: controller-manager-service
38+
strategy:
39+
rollingUpdate:
40+
maxSurge: 1
41+
maxUnavailable: 3
42+
type: RollingUpdate
3843
template:
3944
metadata:
4045
labels:
@@ -61,6 +66,9 @@ spec:
6166
requests:
6267
cpu: 100m
6368
memory: 20Mi
69+
readinessProbe:
70+
tcpSocket:
71+
port: 9876
6472
ports:
6573
- containerPort: 9876
6674
name: webhook-server

install/kruise/Chart.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v1
2+
name: kruise
3+
description: Helm chart for all kruise components
4+
version: 0.1.0
5+
#kubeVersion: ">=1.10.0"
6+
keywords:
7+
- kruise
8+
- workload
9+
- statefulset
10+
- sidecar
11+
home: https://openkruise.io
12+
sources:
13+
- https://github.com/openkruise/kruise

install/kruise/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Kruise
2+
[Kruise](https://openkruise.io) is a set of controllers which extends and complements
3+
[Kubernetes core controllers](https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/)
4+
on application workload management.
5+
6+
## Introduction
7+
This chart bootstraps kruise-manager and its CRDs into your cluster.
8+
9+
## Official Documentation
10+
Official project documentation found [here](https://github.com/openkruise/kruise).
11+
12+
## Prerequisites
13+
- With Kubernetes 1.10+ you can install Kruise and enjoy it.
14+
- What's more, some features like **StatefulSet in-place update** require 1.12+.
Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,172 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
creationTimestamp: null
5+
labels:
6+
controller-tools.k8s.io: "1.0"
7+
name: broadcastjobs.apps.kruise.io
8+
spec:
9+
group: apps.kruise.io
10+
names:
11+
kind: BroadcastJob
12+
plural: broadcastjobs
13+
shortNames:
14+
- bj
15+
scope: Namespaced
16+
additionalPrinterColumns:
17+
- name: Desired
18+
type: integer
19+
description: The desired number of pods, this is typically equal to the number of nodes satisfied to run pods.
20+
JSONPath: .status.desired
21+
- name: Active
22+
type: integer
23+
description: The number of actively running pods.
24+
JSONPath: .status.active
25+
- name: Succeeded
26+
type: integer
27+
description: The number of pods which reached phase Succeeded.
28+
JSONPath: .status.succeeded
29+
- name: Failed
30+
type: integer
31+
description: The number of pods which reached phase Failed.
32+
JSONPath: .status.failed
33+
subresources:
34+
status: {}
35+
validation:
36+
openAPIV3Schema:
37+
properties:
38+
apiVersion:
39+
description: 'APIVersion defines the versioned schema of this representation
40+
of an object. Servers should convert recognized schemas to the latest
41+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
42+
type: string
43+
kind:
44+
description: 'Kind is a string value representing the REST resource this
45+
object represents. Servers may infer this from the endpoint the client
46+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
47+
type: string
48+
metadata:
49+
type: object
50+
spec:
51+
properties:
52+
completionPolicy:
53+
description: CompletionPolicy indicates the completion policy of the
54+
job. Default is Always CompletionPolicyType
55+
properties:
56+
activeDeadlineSeconds:
57+
description: Specifies the duration in seconds relative to the startTime
58+
that the job may be active before the system tries to terminate
59+
it; value must be positive integer. Only works for Always type
60+
format: int64
61+
type: integer
62+
backoffLimit:
63+
description: Specifies the number of retries before marking this
64+
job failed. Not setting value means no limit. Only works for Always
65+
type
66+
format: int32
67+
type: integer
68+
ttlSecondsAfterFinished:
69+
description: ttlSecondsAfterFinished limits the lifetime of a Job
70+
that has finished execution (either Complete or Failed). If this
71+
field is set, ttlSecondsAfterFinished after the Job finishes,
72+
it is eligible to be automatically deleted. When the Job is being
73+
deleted, its lifecycle guarantees (e.g. finalizers) will be honored.
74+
If this field is unset, the Job won't be automatically deleted.
75+
If this field is set to zero, the Job becomes eligible to be deleted
76+
immediately after it finishes. This field is alpha-level and is
77+
only honored by servers that enable the TTLAfterFinished feature.
78+
Only works for Always type
79+
format: int32
80+
type: integer
81+
type:
82+
description: Type indicates the type of the CompletionPolicy Default
83+
is Always
84+
type: string
85+
type: object
86+
parallelism:
87+
description: Specifies the maximum desired number of pods the job should
88+
run at any given time. The actual number of pods running in steady
89+
state will be less than this number when the work left to do is less
90+
than max parallelism. Not setting this value means no limit.
91+
format: int32
92+
type: integer
93+
template:
94+
description: Describes the pod that will be created when executing a
95+
job.
96+
type: object
97+
required:
98+
- template
99+
- completionPolicy
100+
type: object
101+
status:
102+
properties:
103+
active:
104+
description: The number of actively running pods.
105+
format: int32
106+
type: integer
107+
completionTime:
108+
description: Represents time when the job was completed. It is not guaranteed
109+
to be set in happens-before order across separate operations. It is
110+
represented in RFC3339 form and is in UTC.
111+
format: date-time
112+
type: string
113+
conditions:
114+
description: The latest available observations of an object's current
115+
state. +patchMergeKey=type +patchStrategy=merge
116+
items:
117+
properties:
118+
lastProbeTime:
119+
description: Last time the condition was checked.
120+
format: date-time
121+
type: string
122+
lastTransitionTime:
123+
description: Last time the condition transit from one status to
124+
another.
125+
format: date-time
126+
type: string
127+
message:
128+
description: Human readable message indicating details about last
129+
transition.
130+
type: string
131+
reason:
132+
description: (brief) reason for the condition's last transition.
133+
type: string
134+
status:
135+
description: Status of the condition, one of True, False, Unknown.
136+
type: string
137+
type:
138+
description: Type of job condition, Complete or Failed.
139+
type: string
140+
required:
141+
- type
142+
- status
143+
type: object
144+
type: array
145+
desired:
146+
description: The desired number of pods, this is typically equal to
147+
the number of nodes satisfied to run pods.
148+
format: int32
149+
type: integer
150+
failed:
151+
description: The number of pods which reached phase Failed.
152+
format: int32
153+
type: integer
154+
startTime:
155+
description: Represents time when the job was acknowledged by the job
156+
controller. It is not guaranteed to be set in happens-before order
157+
across separate operations. It is represented in RFC3339 form and
158+
is in UTC.
159+
format: date-time
160+
type: string
161+
succeeded:
162+
description: The number of pods which reached phase Succeeded.
163+
format: int32
164+
type: integer
165+
type: object
166+
version: v1alpha1
167+
status:
168+
acceptedNames:
169+
kind: ""
170+
plural: ""
171+
conditions: []
172+
storedVersions: []
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
creationTimestamp: null
5+
labels:
6+
controller-tools.k8s.io: "1.0"
7+
name: sidecarsets.apps.kruise.io
8+
spec:
9+
group: apps.kruise.io
10+
names:
11+
kind: SidecarSet
12+
plural: sidecarsets
13+
scope: Cluster
14+
subresources:
15+
status: {}
16+
validation:
17+
openAPIV3Schema:
18+
properties:
19+
apiVersion:
20+
description: 'APIVersion defines the versioned schema of this representation
21+
of an object. Servers should convert recognized schemas to the latest
22+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
23+
type: string
24+
kind:
25+
description: 'Kind is a string value representing the REST resource this
26+
object represents. Servers may infer this from the endpoint the client
27+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
28+
type: string
29+
metadata:
30+
type: object
31+
spec:
32+
properties:
33+
containers:
34+
description: 'containers contains two pieces of information: 1. normal
35+
container info that should be injected into pod 2. custom fields to
36+
control insert behavior(currently empty)'
37+
items:
38+
type: object
39+
type: array
40+
selector:
41+
description: selector is a label query over pods that should be injected
42+
type: object
43+
type: object
44+
status:
45+
properties:
46+
matchedPods:
47+
description: matchedPods is the number of Pods whose labels are matched
48+
with this SidecarSet's selector
49+
format: int32
50+
type: integer
51+
observedGeneration:
52+
description: observedGeneration is the most recent generation observed
53+
for this SidecarSet. It corresponds to the SidecarSet's generation,
54+
which is updated on mutation by the API Server.
55+
format: int64
56+
type: integer
57+
readyPods:
58+
description: readyPods is the number of matched Pods that have a ready
59+
condition
60+
format: int32
61+
type: integer
62+
updatedPods:
63+
description: updatedPods is the number of matched Pods that are injected
64+
with the latest SidecarSet's containers
65+
format: int32
66+
type: integer
67+
type: object
68+
version: v1alpha1
69+
status:
70+
acceptedNames:
71+
kind: ""
72+
plural: ""
73+
conditions: []
74+
storedVersions: []

0 commit comments

Comments
 (0)