Skip to content
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

feat(test): Allow extension of test pod to allow matching local policy #182

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions charts/openfga/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["grpc_health_probe", '-addr={{ include "openfga.fullname" . }}:{{ (split ":" .Values.grpc.addr)._1 }}']
{{- with .Values.testContainerSpec }}
{{- toYaml . | nindent 6 }}
{{- end }}
restartPolicy: Never
{{- with .Values.testPodSpec }}
{{- toYaml . | nindent 2 }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/openfga/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,14 @@
}
}
},
"testPodSpec": {
"type": "object",
"description": "Extra spec for the test pod to match cluster policy"
},
"testContainerSpec": {
"type": "object",
"description": "Extra spec for the test container to match cluster policy"
},
"common": {},
"extraObjects": {
"type": "array",
Expand Down
3 changes: 3 additions & 0 deletions charts/openfga/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ migrate:
labels: {}
timeout:

testPodSpec: {}
testContainerSpec: {}

# -- Array of extra K8s manifests to deploy
## Note: Supports use of custom Helm templates
extraObjects: []
Expand Down