forked from coreos/etcd-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
568fe11
commit 6077e0a
Showing
8 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
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,8 @@ | ||
apiVersion: v2 | ||
name: etcd-operator | ||
description: A Helm chart to deploy etcd-operator | ||
|
||
type: application | ||
version: 0.0.1 | ||
|
||
appVersion: "0.10.0-5" |
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,44 @@ | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: etcdclusters.etcd.database.coreos.com | ||
spec: | ||
scope: Namespaced | ||
group: etcd.database.coreos.com | ||
names: | ||
kind: EtcdCluster | ||
listKind: EtcdClusterList | ||
plural: etcdclusters | ||
shortNames: | ||
- etcd | ||
singular: etcdcluster | ||
conversion: | ||
strategy: None | ||
versions: | ||
- additionalPrinterColumns: | ||
- jsonPath: .status.size | ||
name: size | ||
type: number | ||
- jsonPath: .spec.version | ||
name: version | ||
type: string | ||
- jsonPath: .status.serviceName | ||
name: service | ||
type: string | ||
- jsonPath: .status.phase | ||
name: phase | ||
type: string | ||
- jsonPath: .status.conditions[-1].type | ||
name: status | ||
type: string | ||
- jsonPath: .metadata.creationTimestamp | ||
name: age | ||
type: date | ||
name: v1beta3 | ||
schema: | ||
openAPIV3Schema: | ||
type: object | ||
x-kubernetes-preserve-unknown-fields: true | ||
served: true | ||
storage: true |
Binary file not shown.
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,9 @@ | ||
{{- range .Values.clusters }} | ||
--- | ||
apiVersion: etcd.database.coreos.com/v1beta3 | ||
kind: EtcdCluster | ||
metadata: | ||
name: {{ .name | quote }} | ||
namespace: {{ $.Release.Namespace }} | ||
spec: {{ .spec | toYaml | nindent 2 }} | ||
{{- end }} |
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,37 @@ | ||
{{- if .Values.operator.enabled -}} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: etcd-operator-{{ .Release.Name }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
app: etcd-operator-{{ .Release.Name }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: etcd-operator-{{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: etcd-operator-{{ .Release.Name }} | ||
spec: | ||
serviceAccountName: etcd-operator-{{ .Release.Name }}-sa | ||
containers: | ||
- name: operator | ||
# TODO(neoaggelos): https://github.com/neoaggelos/etcd-operator/pull/1 | ||
# Update to a stable build once PR is merged upstream | ||
image: neoaggelos/etcd-operator:0.10.0-5 | ||
command: | ||
- /operator | ||
env: | ||
- name: MY_POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: MY_POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
{{ end }} |
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,58 @@ | ||
{{- if and .Values.rbac.enabled -}} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: etcd-operator-{{ .Release.Name }}-cluster-role | ||
rules: | ||
- apiGroups: | ||
- etcd.database.coreos.com | ||
resources: | ||
- etcdclusters | ||
- etcdbackups | ||
- etcdrestores | ||
verbs: | ||
- "*" | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
- services | ||
- endpoints | ||
- persistentvolumeclaims | ||
- events | ||
verbs: | ||
- "*" | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- deployments | ||
verbs: | ||
- "*" | ||
# The following permissions can be removed if not using S3 backup and TLS | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- get | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- nodes | ||
verbs: | ||
- list | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: etcd-operator-{{ .Release.Name }}-cluster-role-binding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: etcd-operator-{{ .Release.Name }}-sa | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
kind: ClusterRole | ||
apiGroup: rbac.authorization.k8s.io | ||
name: etcd-operator-{{ .Release.Name }}-cluster-role | ||
{{ end }} |
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,6 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: etcd-operator-{{ .Release.Name }}-sa |
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,22 @@ | ||
operator: | ||
enabled: true | ||
rbac: | ||
enabled: true | ||
|
||
clusters: | ||
- name: etcd | ||
spec: | ||
size: 3 | ||
limitSizeToMaxReadyNodes: true | ||
version: "3.5.2" | ||
pod: | ||
restartPolicy: Always | ||
affinity: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: etcd_cluster | ||
operator: In | ||
values: [etcd] | ||
topologyKey: kubernetes.io/hostname |