Skip to content

Commit

Permalink
Add EtcdCluster resource examples (#114)
Browse files Browse the repository at this point in the history
following up
#109 (comment)

Here are examples for:


- Simple cluster with few replicas
- Cluster with custom image
- Cluster with persistent storage
- Cluster with resources
- Cluster with all field specified

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
  • Loading branch information
kvaps authored Apr 3, 2024
1 parent ebee713 commit 659291d
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/manifests/etcdcluster-custom-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
apiVersion: etcd.aenix.io/v1alpha1
kind: EtcdCluster
metadata:
name: test
namespace: default
spec:
replicas: 3
podTemplate:
spec:
imagePullSecrets:
- name: myregistrykey
containers:
- name: etcd
image: "quay.io/coreos/etcd:v3.5.12"
78 changes: 78 additions & 0 deletions examples/manifests/etcdcluster-full.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
apiVersion: etcd.aenix.io/v1alpha1
kind: EtcdCluster
metadata:
name: test
namespace: default
spec:
replicas: 3
options:
election-timeout: "1000"
max-wals: "5"
max-snapshots: "5"

storage:
emptyDir: {}
volumeClaimTemplate:
metadata:
labels:
env: prod
annotations:
example.com/annotation: "true"
spec:
storageClassName: gp3
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi

podTemplate:
metadata:
labels:
env: prod
annotations:
example.com/annotation: "true"
spec:
imagePullSecrets:
- name: myregistrykey
serviceAccountName: default
affinity: {}
nodeSelector: {}
tolerations: []
securityContext: {}
priorityClassName: "low"
topologySpreadConstraints: []
terminationGracePeriodSeconds: 30
schedulerName: "default-scheduler"
runtimeClassName: "legacy"
readinessGates: []
containers:
- name: etcd
image: "quay.io/coreos/etcd:v3.5.12"
imagePullPolicy: Always
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 200m
memory: 200Mi
volumes: []

serviceTemplate:
metadata:
labels:
env: prod
annotations:
example.com/annotation: "true"
spec:

podDisruptionBudgetTemplate:
metadata:
labels:
env: prod
annotations:
example.com/annotation: "true"
spec:
maxUnavailable: 1
minAvailable: 2
16 changes: 16 additions & 0 deletions examples/manifests/etcdcluster-persistent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: etcd.aenix.io/v1alpha1
kind: EtcdCluster
metadata:
name: test
namespace: default
spec:
replicas: 3
storage:
volumeClaimTemplate:
spec:
storageClassName: gp3
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
19 changes: 19 additions & 0 deletions examples/manifests/etcdcluster-resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
apiVersion: etcd.aenix.io/v1alpha1
kind: EtcdCluster
metadata:
name: test
namespace: default
spec:
replicas: 3
podTemplate:
spec:
containers:
- name: etcd
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 200m
memory: 200Mi
8 changes: 8 additions & 0 deletions examples/manifests/etcdcluster-simple.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: etcd.aenix.io/v1alpha1
kind: EtcdCluster
metadata:
name: test
namespace: default
spec:
replicas: 3
9 changes: 9 additions & 0 deletions examples/manifests/etcdcluster-with-default-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: etcd.aenix.io/v1alpha1
kind: EtcdCluster
metadata:
name: test
namespace: default
spec:
replicas: 3
podDisruptionBudgetTemplate: {}

0 comments on commit 659291d

Please sign in to comment.