Skip to content

Commit c246dd8

Browse files
committed
feat: allow variables and expression in profiles
1 parent 8541e1f commit c246dd8

File tree

10 files changed

+1099
-60
lines changed

10 files changed

+1099
-60
lines changed

e2e/tests/config/testdata/profile-patches/empty-patch-value.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ dev:
1919
path: spec.containers[0].command
2020
value: ["sleep"]
2121
profiles:
22-
- name: empty-value
23-
patches:
24-
- op: add
25-
path: dev.replacePods[0].patches
26-
value:
27-
op: replace
28-
path: spec.initContainers
22+
- name: empty-value
23+
patches:
24+
- op: add
25+
path: dev.replacePods[0].patches
26+
value:
27+
op: replace
28+
path: spec.initContainers

e2e/tests/config/testdata/profile-patches/legacy-match.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
version: v1beta10
1+
version: v1beta11
22
deployments:
3-
- name: test
4-
helm:
5-
componentChart: true
6-
- name: test2
3+
- name: test
4+
helm:
5+
componentChart: true
6+
- name: test2
77
profiles:
88
- name: test
99
patches:
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
version: v1beta10
1+
version: v1beta11
22
images:
33
backend:
44
image: john/devbackend
55
backend-debugger:
66
image: john/debugger
77
deployments:
8-
- name: backend
9-
helm:
10-
componentChart: true
11-
values:
12-
containers:
13-
- image: john/devbackend
14-
- image: john/debugger
8+
- name: backend
9+
helm:
10+
componentChart: true
11+
values:
12+
containers:
13+
- image: john/devbackend
14+
- image: john/debugger
1515
profiles:
16-
- name: staging
17-
patches:
18-
- op: replace
19-
path: ..[?(@.image=='john/devbackend')].image
20-
value: john/stagingbackend
16+
- name: staging
17+
patches:
18+
- op: replace
19+
path: ..[?(@.image=='john/devbackend')].image
20+
value: john/stagingbackend

e2e/tests/config/testdata/profile-patches/replace-and-add-deployments.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: v1beta10
1+
version: v1beta11
22
profiles:
33
- name: test
44
patches:

e2e/tests/config/testdata/profile-patches/wildcard-match-comparison.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
version: v1beta11
22
deployments:
3-
- name: development1
4-
helm:
5-
componentChart: true
6-
timeout: 1000s
7-
- name: staging1
8-
helm:
9-
componentChart: true
10-
timeout: 2000s
11-
- name: production1
12-
helm:
13-
componentChart: true
14-
timeout: 2000s
3+
- name: development1
4+
helm:
5+
componentChart: true
6+
timeout: 1000s
7+
- name: staging1
8+
helm:
9+
componentChart: true
10+
timeout: 2000s
11+
- name: production1
12+
helm:
13+
componentChart: true
14+
timeout: 2000s
1515
profiles:
1616
- name: test
1717
patches:

e2e/tests/config/testdata/profile-patches/wildcard-match-regexp.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
version: v1beta10
1+
version: v1beta11
22
deployments:
3-
- name: development1
4-
helm:
5-
componentChart: true
6-
- name: staging1
7-
helm:
8-
componentChart: true
9-
- name: production1
3+
- name: development1
4+
helm:
5+
componentChart: true
6+
- name: staging1
7+
helm:
8+
componentChart: true
9+
- name: production1
1010
profiles:
1111
- name: test
1212
patches:

e2e/tests/config/testdata/profile-patches/wildcard-match-some.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
version: v1beta10
1+
version: v1beta11
22
deployments:
3-
- name: test
4-
helm:
5-
componentChart: true
6-
- name: test2
7-
kubectl: {}
3+
- name: test
4+
helm:
5+
componentChart: true
6+
- name: test2
7+
kubectl: {}
88
profiles:
99
- name: test
1010
patches:

e2e/tests/config/testdata/profile-patches/wildcard-match.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
version: v1beta10
1+
version: v1beta11
22
deployments:
3-
- name: test
4-
- name: test2
3+
- name: test
4+
- name: test2
55
profiles:
66
- name: test
77
patches:

0 commit comments

Comments
 (0)