Skip to content

Commit ae46d0c

Browse files
committed
feat: Create examples of StatefulSets without serviceName (for Kubernetes 1.25+)
1 parent d278da8 commit ae46d0c

4 files changed

+58
-2
lines changed

statefulset.yml statefulset24_1.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
svc: example
2727
spec:
2828
containers:
29-
- name: hello-world
29+
- name: main
3030
image: ondrejsika/training-example:green
3131
ports:
3232
- containerPort: 80

statefulset2.yml statefulset24_2.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ spec:
2626
svc: example
2727
spec:
2828
containers:
29-
- name: hello-world
29+
- name: main
3030
image: ondrejsika/training-example:yellow
3131
ports:
3232
- containerPort: 80

statefulset25_1.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: hello-world
5+
spec:
6+
selector:
7+
matchLabels:
8+
app: hello-world-sts
9+
replicas: 5
10+
template:
11+
metadata:
12+
labels:
13+
app: hello-world-sts
14+
svc: example
15+
spec:
16+
containers:
17+
- name: main
18+
image: ondrejsika/training-example:green
19+
ports:
20+
- containerPort: 80
21+
resources:
22+
requests:
23+
cpu: 10m
24+
memory: 10Mi
25+
limits:
26+
memory: 20Mi
27+
cpu: 20m

statefulset25_2.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: apps/v1
2+
kind: StatefulSet
3+
metadata:
4+
name: hello-world
5+
labels:
6+
app: hello-world-sts
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: hello-world-sts
11+
replicas: 6
12+
template:
13+
metadata:
14+
labels:
15+
app: hello-world-sts
16+
svc: example
17+
spec:
18+
containers:
19+
- name: main
20+
image: ondrejsika/training-example:yellow
21+
ports:
22+
- containerPort: 80
23+
resources:
24+
requests:
25+
cpu: 10m
26+
memory: 10Mi
27+
limits:
28+
memory: 20Mi
29+
cpu: 20m

0 commit comments

Comments
 (0)