Skip to content

Commit

Permalink
Merge pull request #35 from permitio/raz/per-4775-fix-for-opal-client…
Browse files Browse the repository at this point in the history
…-in-opal-helm-chart

add condition for opal-client null
  • Loading branch information
RazcoDev authored Mar 28, 2023
2 parents 33aeef5 + 7392619 commit 6f45f5f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions templates/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ data:
{{- .Files.Get "test/e2e/rbac.rego" | nindent 4 }}
{{- end }}
---
{{- if .Values.client }}
{{- if .Values.client.opaStartupData }}
apiVersion: v1
kind: ConfigMap
Expand All @@ -23,3 +24,4 @@ data:
{{ $value | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion templates/deployment-pgsql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
labels:
{{- include "opal.pgsqlLabels" . | nindent 4 }}
spec:
replicas: {{ .Values.client.replicas }}
replicas: {{ .Values.broadcastReplicas }}
selector:
matchLabels:
{{- include "opal.pgsqlSelectorLabels" . | nindent 6 }}
Expand Down
2 changes: 2 additions & 0 deletions templates/tests/e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.client }}
{{- $url := printf "http://%v:%v/v1/data" (include "opal.clientName" .) .Values.client.opaPort -}}
apiVersion: v1
kind: Pod
Expand All @@ -22,3 +23,4 @@ spec:
[ "$(curl -s {{ $url }} | jq '.result.users | keys | length')" -eq 3 ]
[ "$(curl -s {{ $url }} | jq '.result.role_permissions | keys | length')" -eq 3 ]
{{- end }}
3 changes: 3 additions & 0 deletions values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
"broadcastPgsql": {
"type": "boolean", "title": "install broadcast pgsql", "default": true
},
"broadcastReplicas": {
"type": "integer", "title": "replicas for broadcast pgsql", "default": 1
},
"uvicornWorkers": {
"type": "integer", "title": "num of uvicorn workers per pod", "default": 4
},
Expand Down

0 comments on commit 6f45f5f

Please sign in to comment.