Commit fc8191c 1 parent 8193786 commit fc8191c Copy full SHA for fc8191c
File tree 3 files changed +58
-0
lines changed
3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
6
6
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
7
7
8
+ ## Unreleased
9
+
10
+ ### Fixed
11
+
12
+ - Fix helm env variable validation logic when specifying Twilio auth related values by @njohnstone2 ([ #2674 ] ( https://github.com/grafana/oncall/pull/2674 ) )
13
+
8
14
## v1.3.19 (2023-07-28)
9
15
10
16
### Fixed
Original file line number Diff line number Diff line change 121
121
secretKeyRef:
122
122
name: { { .existingSecret } }
123
123
key: { { required " oncall.twilio.accountSid is required if oncall.twilio.existingSecret is not empty" .accountSid | quote } }
124
+ { {- if .authTokenKey } }
124
125
- name: TWILIO_AUTH_TOKEN
125
126
valueFrom:
126
127
secretKeyRef:
127
128
name: { { .existingSecret } }
128
129
key: { { required " oncall.twilio.authTokenKey is required if oncall.twilio.existingSecret is not empty" .authTokenKey | quote } }
130
+ { {- end } }
129
131
- name: TWILIO_NUMBER
130
132
valueFrom:
131
133
secretKeyRef:
136
138
secretKeyRef:
137
139
name: { { .existingSecret } }
138
140
key: { { required " oncall.twilio.verifySidKey is required if oncall.twilio.existingSecret is not empty" .verifySidKey | quote } }
141
+ { {- if and .apiKeySidKey .apiKeySecretKey } }
139
142
- name: TWILIO_API_KEY_SID
140
143
valueFrom:
141
144
secretKeyRef:
146
149
secretKeyRef:
147
150
name: { { .existingSecret } }
148
151
key: { { required " oncall.twilio.apiKeySecretKey is required if oncall.twilio.existingSecret is not empty" .apiKeySecretKey | quote } }
152
+ { {- end } }
149
153
{ {- else } }
150
154
{ {- if .accountSid } }
151
155
- name: TWILIO_ACCOUNT_SID
Original file line number Diff line number Diff line change
1
+ suite : test Twilio auth envs for deployments
2
+ release :
3
+ name : oncall
4
+ templates :
5
+ - engine/deployment.yaml
6
+ tests :
7
+ - it : snippet.oncall.twilio.env -> should succeed if only apiKeySid and apiKeySecret are set
8
+ set :
9
+ oncall.twilio.existingSecret : unittest-secret
10
+ oncall.twilio.accountSid : " acc-sid"
11
+ oncall.twilio.phoneNumberKey : " phone-key"
12
+ oncall.twilio.verifySidKey : " verify-sid-key"
13
+ oncall.twilio.apiKeySidKey : " api-sid-key"
14
+ oncall.twilio.apiKeySecretKey : " api-secret-key"
15
+ asserts :
16
+ - contains :
17
+ path : spec.template.spec.containers[0].env
18
+ content :
19
+ name : TWILIO_API_KEY_SID
20
+ valueFrom :
21
+ secretKeyRef :
22
+ key : api-sid-key
23
+ name : unittest-secret
24
+ - contains :
25
+ path : spec.template.spec.containers[0].env
26
+ content :
27
+ name : TWILIO_API_KEY_SECRET
28
+ valueFrom :
29
+ secretKeyRef :
30
+ key : api-secret-key
31
+ name : unittest-secret
32
+
33
+ - it : snippet.oncall.twilio.env -> should succeed if only authToken is set
34
+ set :
35
+ oncall.twilio.existingSecret : unittest-secret
36
+ oncall.twilio.accountSid : " acc-sid"
37
+ oncall.twilio.verifySidKey : " verify-sid-key"
38
+ oncall.twilio.phoneNumberKey : " phone-key"
39
+ oncall.twilio.authTokenKey : " auth-token-key"
40
+ asserts :
41
+ - contains :
42
+ path : spec.template.spec.containers[0].env
43
+ content :
44
+ name : TWILIO_AUTH_TOKEN
45
+ valueFrom :
46
+ secretKeyRef :
47
+ key : auth-token-key
48
+ name : unittest-secret
You can’t perform that action at this time.
0 commit comments