-
-
Notifications
You must be signed in to change notification settings - Fork 610
feat(common): add universal dependency system replacing helm-dependencies #45011
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
91c5a0f
b8d1f65
df74c85
3c77841
a263662
2bf8468
4bfd1a8
43172d5
ee93a34
1939106
93f9e54
e7dddb8
f93d681
6b8a86d
b594d65
a167aa6
ead800f
6335f08
70bff9a
0ecac13
b44a678
9faf554
97c01b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| service: | ||
| main: | ||
| enabled: true | ||
| ports: | ||
| main: | ||
| enabled: true | ||
| port: 8080 | ||
|
|
||
| workload: | ||
| main: | ||
| enabled: true | ||
| podSpec: | ||
| containers: | ||
| main: | ||
| enabled: true | ||
| args: | ||
| - --port | ||
| - "8080" | ||
| probes: | ||
| liveness: | ||
| enabled: true | ||
| readiness: | ||
| enabled: true | ||
| startup: | ||
| enabled: true | ||
|
|
||
| dependencies: | ||
| valkey: | ||
| enabled: true | ||
| depconfig: | ||
| password: "testpassword" | ||
| image: | ||
| repository: docker.io/bitnamisecure/valkey | ||
| pullPolicy: IfNotPresent | ||
| tag: latest@sha256:14dc12c4cc5912747b63d41e237512989d958fa6020dbcb1170cc0fe91f48644 | ||
| workload: | ||
| main: | ||
| enabled: true | ||
| replicas: 1 | ||
| type: StatefulSet | ||
| strategy: RollingUpdate | ||
| podSpec: | ||
| containers: | ||
| main: | ||
| env: | ||
| REDIS_PASSWORD: "testpassword" | ||
|
|
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,127 @@ | ||||||||||||||||||||||||||||||||||
| suite: dependencies targetSelector prefix test | ||||||||||||||||||||||||||||||||||
| templates: | ||||||||||||||||||||||||||||||||||
| - common.yaml | ||||||||||||||||||||||||||||||||||
| release: | ||||||||||||||||||||||||||||||||||
| name: test-release-name | ||||||||||||||||||||||||||||||||||
| namespace: test-release-namespace | ||||||||||||||||||||||||||||||||||
| tests: | ||||||||||||||||||||||||||||||||||
| - it: should prefix string targetSelector in service | ||||||||||||||||||||||||||||||||||
| set: | ||||||||||||||||||||||||||||||||||
| common: | ||||||||||||||||||||||||||||||||||
| workload: {} | ||||||||||||||||||||||||||||||||||
| service: {} | ||||||||||||||||||||||||||||||||||
| workload: | ||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||
| type: Deployment | ||||||||||||||||||||||||||||||||||
| podSpec: | ||||||||||||||||||||||||||||||||||
| containers: | ||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||
| probes: | ||||||||||||||||||||||||||||||||||
| liveness: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| readiness: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| startup: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| dependencies: | ||||||||||||||||||||||||||||||||||
| db: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| workload: | ||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| type: StatefulSet | ||||||||||||||||||||||||||||||||||
| podSpec: | ||||||||||||||||||||||||||||||||||
| containers: | ||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||
| probes: | ||||||||||||||||||||||||||||||||||
| liveness: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| readiness: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| startup: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| service: | ||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| targetSelector: main | ||||||||||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| port: 5432 | ||||||||||||||||||||||||||||||||||
| asserts: | ||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | ||||||||||||||||||||||||||||||||||
| isKind: | ||||||||||||||||||||||||||||||||||
| of: Service | ||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | ||||||||||||||||||||||||||||||||||
| equal: | ||||||||||||||||||||||||||||||||||
| path: metadata.name | ||||||||||||||||||||||||||||||||||
| value: test-release-name-common-test-db-main | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+58
to
+64
|
||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | ||||||||||||||||||||||||||||||||||
| matchRegex: | ||||||||||||||||||||||||||||||||||
| path: spec.selector["pod.name"] | ||||||||||||||||||||||||||||||||||
| pattern: ^db-main$ | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| - it: should prefix targetSelector in podDisruptionBudget | ||||||||||||||||||||||||||||||||||
| set: | ||||||||||||||||||||||||||||||||||
| common: | ||||||||||||||||||||||||||||||||||
| workload: {} | ||||||||||||||||||||||||||||||||||
| podDisruptionBudget: {} | ||||||||||||||||||||||||||||||||||
| workload: | ||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||
| type: Deployment | ||||||||||||||||||||||||||||||||||
| podSpec: | ||||||||||||||||||||||||||||||||||
| containers: | ||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||
| probes: | ||||||||||||||||||||||||||||||||||
| liveness: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| readiness: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| startup: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| dependencies: | ||||||||||||||||||||||||||||||||||
| db: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| workload: | ||||||||||||||||||||||||||||||||||
| worker: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| type: StatefulSet | ||||||||||||||||||||||||||||||||||
| podSpec: | ||||||||||||||||||||||||||||||||||
| containers: | ||||||||||||||||||||||||||||||||||
| worker: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||
| probes: | ||||||||||||||||||||||||||||||||||
| liveness: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| readiness: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| startup: | ||||||||||||||||||||||||||||||||||
| enabled: false | ||||||||||||||||||||||||||||||||||
| podDisruptionBudget: | ||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||
| targetSelector: worker | ||||||||||||||||||||||||||||||||||
| minAvailable: 1 | ||||||||||||||||||||||||||||||||||
| asserts: | ||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | ||||||||||||||||||||||||||||||||||
| isKind: | ||||||||||||||||||||||||||||||||||
| of: PodDisruptionBudget | ||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | ||||||||||||||||||||||||||||||||||
| equal: | ||||||||||||||||||||||||||||||||||
| path: metadata.name | ||||||||||||||||||||||||||||||||||
| value: test-release-name-common-test-db-main | ||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+117
to
+124
|
||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | |
| isKind: | |
| of: PodDisruptionBudget | |
| - documentIndex: 0 | |
| equal: | |
| path: metadata.name | |
| value: test-release-name-common-test-db-main | |
| - documentIndex: 0 | |
| - documentIndex: 1 | |
| isKind: | |
| of: PodDisruptionBudget | |
| - documentIndex: 1 | |
| equal: | |
| path: metadata.name | |
| value: test-release-name-common-test-db-main | |
| - documentIndex: 1 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,105 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
| suite: dependencies valkey full structure test | ||||||||||||||||||||||||||||||||||||||||||||||
| templates: | ||||||||||||||||||||||||||||||||||||||||||||||
| - common.yaml | ||||||||||||||||||||||||||||||||||||||||||||||
| release: | ||||||||||||||||||||||||||||||||||||||||||||||
| name: test-release-name | ||||||||||||||||||||||||||||||||||||||||||||||
| namespace: test-release-namespace | ||||||||||||||||||||||||||||||||||||||||||||||
| tests: | ||||||||||||||||||||||||||||||||||||||||||||||
| - it: should create service and workload for valkey dependency | ||||||||||||||||||||||||||||||||||||||||||||||
| set: | ||||||||||||||||||||||||||||||||||||||||||||||
| common: | ||||||||||||||||||||||||||||||||||||||||||||||
| workload: {} | ||||||||||||||||||||||||||||||||||||||||||||||
| service: {} | ||||||||||||||||||||||||||||||||||||||||||||||
| dependencies: | ||||||||||||||||||||||||||||||||||||||||||||||
| valkey: | ||||||||||||||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||||||||||||||
| workload: | ||||||||||||||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||||||||||||||
| type: StatefulSet | ||||||||||||||||||||||||||||||||||||||||||||||
| podSpec: | ||||||||||||||||||||||||||||||||||||||||||||||
| containers: | ||||||||||||||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||||||||||||||
| service: | ||||||||||||||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||||||||||||||
| ports: | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+26
to
+29
|
||||||||||||||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||||||||||||||
| port: 6379 | ||||||||||||||||||||||||||||||||||||||||||||||
| workload: | ||||||||||||||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||||||||||||||
| type: Deployment | ||||||||||||||||||||||||||||||||||||||||||||||
| podSpec: | ||||||||||||||||||||||||||||||||||||||||||||||
| containers: | ||||||||||||||||||||||||||||||||||||||||||||||
| main: | ||||||||||||||||||||||||||||||||||||||||||||||
| enabled: true | ||||||||||||||||||||||||||||||||||||||||||||||
| primary: true | ||||||||||||||||||||||||||||||||||||||||||||||
| asserts: | ||||||||||||||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| isKind: | ||||||||||||||||||||||||||||||||||||||||||||||
| of: Service | ||||||||||||||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | ||||||||||||||||||||||||||||||||||||||||||||||
| equal: | ||||||||||||||||||||||||||||||||||||||||||||||
| path: metadata.name | ||||||||||||||||||||||||||||||||||||||||||||||
| value: test-release-name-common-test-valkey-main | ||||||||||||||||||||||||||||||||||||||||||||||
| - documentIndex: 2 | ||||||||||||||||||||||||||||||||||||||||||||||
| isKind: | ||||||||||||||||||||||||||||||||||||||||||||||
| of: StatefulSet | ||||||||||||||||||||||||||||||||||||||||||||||
| - documentIndex: 2 | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+44
to
+54
|
||||||||||||||||||||||||||||||||||||||||||||||
| - documentIndex: 0 | |
| isKind: | |
| of: Service | |
| - documentIndex: 0 | |
| equal: | |
| path: metadata.name | |
| value: test-release-name-common-test-valkey-main | |
| - documentIndex: 2 | |
| isKind: | |
| of: StatefulSet | |
| - documentIndex: 2 | |
| - documentIndex: 2 | |
| isKind: | |
| of: Service | |
| - documentIndex: 2 | |
| equal: | |
| path: metadata.name | |
| value: test-release-name-common-test-valkey-main | |
| - documentIndex: 3 | |
| isKind: | |
| of: StatefulSet | |
| - documentIndex: 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test enables a dependency Service (
dependencies.db.service.main.enabled: true) but does not mark it (or any other enabled service) asprimary: true. The service primary validation will fail in this configuration; addprimary: trueto one enabled service in the test values.