Skip to content

Commit c7dbdda

Browse files
grimlyrhamzeh
andauthored
feat(test): Allow extension of test pod to allow matching local policy (#182)
Co-authored-by: Raghd Hamzeh <[email protected]>
1 parent 0711d5b commit c7dbdda

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

charts/openfga/templates/tests/test-connection.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,10 @@ spec:
1616
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
1717
imagePullPolicy: {{ .Values.image.pullPolicy }}
1818
command: ["grpc_health_probe", '-addr={{ include "openfga.fullname" . }}:{{ (split ":" .Values.grpc.addr)._1 }}']
19+
{{- with .Values.testContainerSpec }}
20+
{{- toYaml . | nindent 6 }}
21+
{{- end }}
1922
restartPolicy: Never
23+
{{- with .Values.testPodSpec }}
24+
{{- toYaml . | nindent 2 }}
25+
{{- end }}

charts/openfga/values.schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,14 @@
10421042
}
10431043
}
10441044
},
1045+
"testPodSpec": {
1046+
"type": "object",
1047+
"description": "Extra spec for the test pod to match cluster policy"
1048+
},
1049+
"testContainerSpec": {
1050+
"type": "object",
1051+
"description": "Extra spec for the test container to match cluster policy"
1052+
},
10451053
"common": {},
10461054
"extraObjects": {
10471055
"type": "array",

charts/openfga/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ migrate:
342342
labels: {}
343343
timeout:
344344

345+
testPodSpec: {}
346+
testContainerSpec: {}
347+
345348
# -- Array of extra K8s manifests to deploy
346349
## Note: Supports use of custom Helm templates
347350
extraObjects: []

0 commit comments

Comments
 (0)