Skip to content

Commit

Permalink
update yamls and add helm chart (#10)
Browse files Browse the repository at this point in the history
* update yamls and add helm chart

* fix make manifests

* skip execute helm template in Makefile
  • Loading branch information
FillZpp authored and jian-he committed Jun 17, 2019
1 parent 6f7bdb1 commit 0074015
Show file tree
Hide file tree
Showing 16 changed files with 1,534 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ deploy: manifests
# Generate manifests e.g. CRD, RBAC etc.
manifests:
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go all
cp config/crds/*.yaml ./install/kruise/templates/
cp config/rbac/rbac_role.yaml ./install/kruise/templates/

# Run go fmt against code
fmt:
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This patch inject a sidecar container which is a HTTP proxy for the controller manager,
# it performs RBAC authorization against the Kubernetes API using SubjectAccessReviews.
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: controller-manager
namespace: system
Expand Down
6 changes: 5 additions & 1 deletion config/default/manager_image_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: controller-manager
namespace: system
Expand All @@ -10,3 +10,7 @@ spec:
# Change the value of image field below to your controller image URL
- image: openkruise/kruise-manager:v0.1.0
name: manager
args:
- "--metrics-addr=127.0.0.1:8080"
- "--logtostderr=true"
- "--v=4"
2 changes: 1 addition & 1 deletion config/default/manager_image_patch.yaml-e
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: controller-manager
namespace: system
Expand Down
2 changes: 1 addition & 1 deletion config/default/manager_prometheus_metrics_patch.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This patch enables Prometheus scraping for the manager pod.
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: controller-manager
namespace: system
Expand Down
12 changes: 10 additions & 2 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,24 @@ spec:
- port: 443
---
apiVersion: apps/v1
kind: StatefulSet
kind: Deployment
metadata:
name: controller-manager
namespace: system
labels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
spec:
replicas: 3
selector:
matchLabels:
control-plane: controller-manager
controller-tools.k8s.io: "1.0"
serviceName: controller-manager-service
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 3
type: RollingUpdate
template:
metadata:
labels:
Expand All @@ -61,6 +66,9 @@ spec:
requests:
cpu: 100m
memory: 20Mi
readinessProbe:
tcpSocket:
port: 9876
ports:
- containerPort: 9876
name: webhook-server
Expand Down
13 changes: 13 additions & 0 deletions install/kruise/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
name: kruise
description: Helm chart for all kruise components
version: 0.1.0
#kubeVersion: ">=1.10.0"
keywords:
- kruise
- workload
- statefulset
- sidecar
home: https://openkruise.io
sources:
- https://github.com/openkruise/kruise
14 changes: 14 additions & 0 deletions install/kruise/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Kruise
[Kruise](https://openkruise.io) is a set of controllers which extends and complements
[Kubernetes core controllers](https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/)
on application workload management.

## Introduction
This chart bootstraps kruise-manager and its CRDs into your cluster.

## Official Documentation
Official project documentation found [here](https://github.com/openkruise/kruise).

## Prerequisites
- With Kubernetes 1.10+ you can install Kruise and enjoy it.
- What's more, some features like **StatefulSet in-place update** require 1.12+.
172 changes: 172 additions & 0 deletions install/kruise/templates/apps_v1alpha1_broadcastjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: broadcastjobs.apps.kruise.io
spec:
group: apps.kruise.io
names:
kind: BroadcastJob
plural: broadcastjobs
shortNames:
- bj
scope: Namespaced
additionalPrinterColumns:
- name: Desired
type: integer
description: The desired number of pods, this is typically equal to the number of nodes satisfied to run pods.
JSONPath: .status.desired
- name: Active
type: integer
description: The number of actively running pods.
JSONPath: .status.active
- name: Succeeded
type: integer
description: The number of pods which reached phase Succeeded.
JSONPath: .status.succeeded
- name: Failed
type: integer
description: The number of pods which reached phase Failed.
JSONPath: .status.failed
subresources:
status: {}
validation:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
completionPolicy:
description: CompletionPolicy indicates the completion policy of the
job. Default is Always CompletionPolicyType
properties:
activeDeadlineSeconds:
description: Specifies the duration in seconds relative to the startTime
that the job may be active before the system tries to terminate
it; value must be positive integer. Only works for Always type
format: int64
type: integer
backoffLimit:
description: Specifies the number of retries before marking this
job failed. Not setting value means no limit. Only works for Always
type
format: int32
type: integer
ttlSecondsAfterFinished:
description: ttlSecondsAfterFinished limits the lifetime of a Job
that has finished execution (either Complete or Failed). If this
field is set, ttlSecondsAfterFinished after the Job finishes,
it is eligible to be automatically deleted. When the Job is being
deleted, its lifecycle guarantees (e.g. finalizers) will be honored.
If this field is unset, the Job won't be automatically deleted.
If this field is set to zero, the Job becomes eligible to be deleted
immediately after it finishes. This field is alpha-level and is
only honored by servers that enable the TTLAfterFinished feature.
Only works for Always type
format: int32
type: integer
type:
description: Type indicates the type of the CompletionPolicy Default
is Always
type: string
type: object
parallelism:
description: Specifies the maximum desired number of pods the job should
run at any given time. The actual number of pods running in steady
state will be less than this number when the work left to do is less
than max parallelism. Not setting this value means no limit.
format: int32
type: integer
template:
description: Describes the pod that will be created when executing a
job.
type: object
required:
- template
- completionPolicy
type: object
status:
properties:
active:
description: The number of actively running pods.
format: int32
type: integer
completionTime:
description: Represents time when the job was completed. It is not guaranteed
to be set in happens-before order across separate operations. It is
represented in RFC3339 form and is in UTC.
format: date-time
type: string
conditions:
description: The latest available observations of an object's current
state. +patchMergeKey=type +patchStrategy=merge
items:
properties:
lastProbeTime:
description: Last time the condition was checked.
format: date-time
type: string
lastTransitionTime:
description: Last time the condition transit from one status to
another.
format: date-time
type: string
message:
description: Human readable message indicating details about last
transition.
type: string
reason:
description: (brief) reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of job condition, Complete or Failed.
type: string
required:
- type
- status
type: object
type: array
desired:
description: The desired number of pods, this is typically equal to
the number of nodes satisfied to run pods.
format: int32
type: integer
failed:
description: The number of pods which reached phase Failed.
format: int32
type: integer
startTime:
description: Represents time when the job was acknowledged by the job
controller. It is not guaranteed to be set in happens-before order
across separate operations. It is represented in RFC3339 form and
is in UTC.
format: date-time
type: string
succeeded:
description: The number of pods which reached phase Succeeded.
format: int32
type: integer
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
74 changes: 74 additions & 0 deletions install/kruise/templates/apps_v1alpha1_sidecarset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: null
labels:
controller-tools.k8s.io: "1.0"
name: sidecarsets.apps.kruise.io
spec:
group: apps.kruise.io
names:
kind: SidecarSet
plural: sidecarsets
scope: Cluster
subresources:
status: {}
validation:
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/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/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
containers:
description: 'containers contains two pieces of information: 1. normal
container info that should be injected into pod 2. custom fields to
control insert behavior(currently empty)'
items:
type: object
type: array
selector:
description: selector is a label query over pods that should be injected
type: object
type: object
status:
properties:
matchedPods:
description: matchedPods is the number of Pods whose labels are matched
with this SidecarSet's selector
format: int32
type: integer
observedGeneration:
description: observedGeneration is the most recent generation observed
for this SidecarSet. It corresponds to the SidecarSet's generation,
which is updated on mutation by the API Server.
format: int64
type: integer
readyPods:
description: readyPods is the number of matched Pods that have a ready
condition
format: int32
type: integer
updatedPods:
description: updatedPods is the number of matched Pods that are injected
with the latest SidecarSet's containers
format: int32
type: integer
type: object
version: v1alpha1
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
Loading

0 comments on commit 0074015

Please sign in to comment.