-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
210 additions
and
23 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
charts/tidb-operator/templates/advanced-statefulset-deployment.yaml
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,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: advanced-statefulset-controller | ||
namespace: pingcap | ||
labels: | ||
app: advanced-statefulset-controller | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: advanced-statefulset-controller | ||
template: | ||
metadata: | ||
labels: | ||
app: advanced-statefulset-controller | ||
spec: | ||
containers: | ||
- name: advanced-statefulset-controller | ||
image: quay.io/cofyc/advanced-statefulset:latest | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- -v=4 | ||
serviceAccountName: advanced-statefulset-controller |
71 changes: 71 additions & 0 deletions
71
charts/tidb-operator/templates/advanced-statefulset-rbac.yaml
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,71 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: advanced-statefulset-controller | ||
namespace: pingcap | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: advanced-statefulset-controller | ||
rules: | ||
- apiGroups: | ||
- apps.pingcap.com | ||
resources: | ||
- '*' | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- 'apps' | ||
resources: | ||
- 'controllerrevisions' | ||
verbs: | ||
- '*' | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- 'pods' | ||
- 'persistentvolumeclaims' | ||
- 'persistentvolumes' | ||
verbs: | ||
- '*' | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: advanced-statefulset-controller | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: advanced-statefulset-controller | ||
subjects: | ||
- kind: ServiceAccount | ||
name: advanced-statefulset-controller | ||
namespace: pingcap | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: advanced-statefulset-controller | ||
namespace: kube-system | ||
rules: | ||
- apiGroups: | ||
- '' | ||
resources: | ||
- 'endpoints' | ||
verbs: | ||
- '*' | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: advanced-statefulset-controller | ||
namespace: kube-system | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: advanced-statefulset-controller | ||
subjects: | ||
- kind: ServiceAccount | ||
name: advanced-statefulset-controller | ||
namespace: pingcap |
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
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,51 @@ | ||
# For Kubernetes before 1.16. | ||
# TODO more validations, etc. | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: statefulsets.apps.pingcap.com | ||
spec: | ||
group: apps.pingcap.com | ||
version: v1alpha1 | ||
scope: Namespaced | ||
names: | ||
plural: statefulsets | ||
singular: statefulset | ||
kind: StatefulSet | ||
shortNames: | ||
- asts | ||
validation: | ||
openAPIV3Schema: | ||
type: object | ||
properties: | ||
spec: | ||
type: object | ||
properties: | ||
replicas: | ||
type: integer | ||
minimum: 0 | ||
selector: | ||
type: object | ||
serviceName: | ||
type: string | ||
template: | ||
type: object | ||
revisionHistoryLimit: | ||
type: integer | ||
minimum: 1 | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true | ||
# subresources describes the subresources for custom resources. | ||
subresources: | ||
# status enables the status subresource. | ||
status: {} | ||
# scale enables the scale subresource. | ||
scale: | ||
# specReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Spec.Replicas. | ||
specReplicasPath: .spec.replicas | ||
# statusReplicasPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Replicas. | ||
statusReplicasPath: .status.replicas | ||
# labelSelectorPath defines the JSONPath inside of a custom resource that corresponds to Scale.Status.Selector. | ||
labelSelectorPath: .status.labelSelector |
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
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
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
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
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
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
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