Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
91c5a0f
Initial plan
Copilot Feb 15, 2026
b8d1f65
feat(common): add dependencies.valkey support with backward compatibl…
Copilot Feb 15, 2026
df74c85
docs(common): add valkey dependency documentation and schema
Copilot Feb 15, 2026
3c77841
test(common): add valkey CI values test file
Copilot Feb 15, 2026
a263662
fix(common): remove unnecessary blank line in valkeyInjector template
Copilot Feb 15, 2026
2bf8468
refactor(common): remove redis backward compatibility, use full depen…
Copilot Feb 15, 2026
4bfd1a8
fix(common): ensure dependency resources have enabled flags and fix t…
Copilot Feb 15, 2026
43172d5
docs(common): update dependencies documentation and tests
Copilot Feb 15, 2026
ee93a34
fix(common): address code review feedback
Copilot Feb 15, 2026
1939106
refactor(common): consolidate dependency loading in values/_init.tpl
Copilot Feb 15, 2026
93f9e54
test(common): update valkey unit tests to include common values
Copilot Feb 15, 2026
e7dddb8
fix(common): chain omit operations for efficiency
Copilot Feb 15, 2026
f93d681
Merge branch 'common2026' into copilot/sub-pr-41017-one-more-time
Crow-Control Feb 15, 2026
6b8a86d
feat(common): prefix targetSelectors in dependency resources
Copilot Feb 15, 2026
b594d65
test(common): add targetSelector prefix tests for dependencies
Copilot Feb 15, 2026
a167aa6
chore(common): plan to refactor universal dependency prefixing
Copilot Feb 15, 2026
ead800f
feat(common): add valkey credential injector and refactor universal p…
Copilot Feb 15, 2026
6335f08
refactor(common): move dependency config to depconfig subdict
Copilot Feb 15, 2026
70bff9a
docs(common): update dependencies documentation for depconfig structure
Copilot Feb 15, 2026
0ecac13
Merge branch 'common2026' into copilot/sub-pr-41017-one-more-time
Crow-Control Feb 15, 2026
b44a678
refactor(common): prefix all dependency objects except exclusion list
Copilot Feb 15, 2026
9faf554
docs(common): update dependencies docs for universal prefixing
Copilot Feb 15, 2026
97c01b3
Clean up main container configuration
Crow-Control Feb 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions charts/library/common-test/ci/valkey-values.yaml
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
Copy link

Copilot AI Feb 15, 2026

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) as primary: true. The service primary validation will fail in this configuration; add primary: true to one enabled service in the test values.

Suggested change
enabled: true
enabled: true
primary: true

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These assertions assume the Service is documentIndex: 0, but workloads are rendered before services by the loader. Update the expected documentIndex (or restructure the asserts) so the test actually validates the prefixed selector rather than failing on manifest ordering.

Copilot uses AI. Check for mistakes.
- 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
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These assertions assume the PodDisruptionBudget is the first rendered document, but workloads/services/etc. are rendered earlier. Update the documentIndex (or use a more robust selection strategy) so the test reliably targets the PDB manifest.

Suggested change
- 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

Copilot uses AI. Check for mistakes.
equal:
path: spec.selector.matchLabels["pod.name"]
value: db-worker
105 changes: 105 additions & 0 deletions charts/library/common-test/tests/dependencies/valkey_basic_test.yaml
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
Copy link

Copilot AI Feb 15, 2026

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.valkey.service.main.enabled: true) but does not mark any enabled Service as primary: true. The common chart enforces that at least one enabled service must be primary, so this test values set will fail validation unless a primary service is defined.

Copilot uses AI. Check for mistakes.
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
Copy link

Copilot AI Feb 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These documentIndex assertions assume the Service is the first rendered manifest. The loader renders secrets and workloads before services, and this test also generates a valkey creds Secret + a root Deployment, so the Service will not be at documentIndex: 0. Update indices (or make the asserts resilient to ordering) so the test is stable.

Suggested change
- 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

Copilot uses AI. Check for mistakes.
equal:
path: metadata.name
value: test-release-name-common-test-valkey-main

- it: should create init container for valkey wait
set:
common:
workload: {}
service: {}
dependencies:
valkey:
enabled: true
workload:
main:
enabled: true
type: StatefulSet
podSpec:
containers:
main:
enabled: true
primary: true
service:
main:
enabled: true
ports:
main:
enabled: true
port: 6379
workload:
main:
enabled: true
primary: true
type: Deployment
podSpec:
containers:
main:
enabled: true
primary: true
asserts:
- documentIndex: 1
isKind:
of: Deployment
- documentIndex: 1
isNotEmpty:
path: spec.template.spec.initContainers
- documentIndex: 1
contains:
path: spec.template.spec.initContainers
content:
name: test-release-name-common-test-system-valkey-wait

Loading
Loading