mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Fix broken statefulset e2e test
This was broken back in #43637 when the logic in `(*StatefulSetTester).CreateStatefulSet` switched from using `generated.ReadOrDie` to read the entire service.yaml file and pass it to kubectl to using `manifest.SvcFromManifest`, which assumes that the file contains only a single service. Fixes #52750
This commit is contained in:
parent
a514443091
commit
284a7c6165
@ -1,27 +1,5 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
|
||||||
# This service is meant to be used by clients of the database. It exposes a ClusterIP that will
|
|
||||||
# automatically load balance connections to the different database pods.
|
|
||||||
name: cockroachdb-public
|
|
||||||
labels:
|
|
||||||
app: cockroachdb
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
# The main port, served by gRPC, serves Postgres-flavor SQL, internode
|
|
||||||
# traffic and the cli.
|
|
||||||
- port: 26257
|
|
||||||
targetPort: 26257
|
|
||||||
name: grpc
|
|
||||||
# The secondary port serves the UI as well as health and debug endpoints.
|
|
||||||
- port: 8080
|
|
||||||
targetPort: 8080
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
app: cockroachdb
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
metadata:
|
||||||
# This service only exists to create DNS entries for each pod in the stateful
|
# This service only exists to create DNS entries for each pod in the stateful
|
||||||
# set such that they can resolve each other's IP addresses. It does not
|
# set such that they can resolve each other's IP addresses. It does not
|
||||||
|
@ -79,7 +79,7 @@ spec:
|
|||||||
# We don't join cockroachdb in order to avoid a node attempting
|
# We don't join cockroachdb in order to avoid a node attempting
|
||||||
# to join itself, which currently doesn't work
|
# to join itself, which currently doesn't work
|
||||||
# (https://github.com/cockroachdb/cockroach/issues/9625).
|
# (https://github.com/cockroachdb/cockroach/issues/9625).
|
||||||
CRARGS+=("--join" "cockroachdb-public")
|
CRARGS+=("--join" "cockroachdb-0.cockroachdb,cockroachdb-1.cockroachdb,cockroachdb-2.cockroachdb")
|
||||||
fi
|
fi
|
||||||
exec /cockroach/cockroach ${CRARGS[*]}
|
exec /cockroach/cockroach ${CRARGS[*]}
|
||||||
# No pre-stop hook is required, a SIGTERM plus some time is all that's
|
# No pre-stop hook is required, a SIGTERM plus some time is all that's
|
||||||
|
Loading…
Reference in New Issue
Block a user