Skip to content

Commit e1d4dc3

Browse files
committed
feat: Add OPA backed by identity.diamond.ac.uk
1 parent acf0da2 commit e1d4dc3

File tree

4 files changed

+99
-9
lines changed

4 files changed

+99
-9
lines changed

charts/apps/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ apiVersion: v2
22
name: authz
33
description: ArgoCD Apps used to deploy Authorization infrastructure
44
type: application
5-
version: 0.3.0
5+
version: 0.4.0
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{ if .Values.opa-authn.enabled }}
2+
apiVersion: argoproj.io/v1alpha1
3+
kind: Application
4+
metadata:
5+
name: opa-authn
6+
namespace: {{ .Release.Namespace }}
7+
finalizers:
8+
- resources-finalizer.argocd.arogproj.io
9+
spec:
10+
project: {{ default .Release.Namespace .Values.project }}
11+
source:
12+
repoURL: {{ .Values.opa-authn.repoUrl }}
13+
targetRevision: {{ .Values.opa-authn.targetRevision }}
14+
path: {{ .Values.opa-authn.path }}
15+
{{- if .Values.opa-authn.valuesObject }}
16+
helm:
17+
valuesObject:
18+
{{ .Values.opa-authn.valuesObject | toYaml | nindent 10 }}
19+
{{- end }}
20+
destination:
21+
name: {{ .Values.destination.name }}
22+
server: {{ .Values.destination.server }}
23+
namespace: {{ default .Release.Namespace .Values.destination.namespace }}
24+
syncPolicy:
25+
automated:
26+
prune: true
27+
selfHeal: true
28+
{{- end }}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
{{ if .Values.opa.enabled }}
1+
{{ if .Values.opa-id.enabled }}
22
apiVersion: argoproj.io/v1alpha1
33
kind: Application
44
metadata:
5-
name: opa
5+
name: opa-id
66
namespace: {{ .Release.Namespace }}
77
finalizers:
88
- resources-finalizer.argocd.arogproj.io
99
spec:
1010
project: {{ default .Release.Namespace .Values.project }}
1111
source:
12-
repoURL: {{ .Values.opa.repoUrl }}
13-
targetRevision: {{ .Values.opa.targetRevision }}
14-
path: {{ .Values.opa.path }}
15-
{{- if .Values.opa.valuesObject }}
12+
repoURL: {{ .Values.opa-id.repoUrl }}
13+
targetRevision: {{ .Values.opa-id.targetRevision }}
14+
path: {{ .Values.opa-id.path }}
15+
{{- if .Values.opa-id.valuesObject }}
1616
helm:
1717
valuesObject:
18-
{{ .Values.opa.valuesObject | toYaml | nindent 10 }}
18+
{{ .Values.opa-id.valuesObject | toYaml | nindent 10 }}
1919
{{- end }}
2020
destination:
2121
name: {{ .Values.destination.name }}

charts/apps/values.yaml

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ bundler:
5050
- path: /bundle.tar.gz
5151
pathType: Prefix
5252

53-
opa:
53+
opa-authn:
5454
enabled: true
5555
repoUrl: https://github.com/DiamondLightSource/authz.git
5656
targetRevision: HEAD
@@ -111,3 +111,65 @@ opa:
111111
limits:
112112
cpu: 1000m
113113
memory: 2Gi
114+
115+
opa-id:
116+
enabled: true
117+
repoUrl: https://github.com/DiamondLightSource/authz.git
118+
targetRevision: HEAD
119+
path: charts/opa
120+
valuesObject:
121+
122+
env:
123+
- name: BUNDLER_BEARER_TOKEN
124+
valueFrom:
125+
secretKeyRef:
126+
name: token-authorization
127+
key: bearer
128+
- name: ISSUER
129+
value: https://identity.diamond.ac.uk/realms/dls
130+
131+
autoscaling:
132+
enabled: true
133+
minReplicas: 2
134+
maxReplicas: 10
135+
targetMemoryUtilizationPercentage: 80
136+
137+
ingress:
138+
enabled: true
139+
hosts:
140+
- host: authz.diamond.ac.uk
141+
paths:
142+
- path: /id
143+
pathType: Prefix
144+
145+
config:
146+
services:
147+
diamond-bundler:
148+
url: https://authz.diamond.ac.uk
149+
credentials:
150+
bearer:
151+
token: ${BUNDLER_BEARER_TOKEN}
152+
ghcr:
153+
url: https://ghcr.io
154+
type: oci
155+
bundles:
156+
diamond-permissionables:
157+
service: diamond-bundler
158+
resource: bundle.tar.gz
159+
polling:
160+
min_delay_seconds: 10
161+
max_delay_seconds: 60
162+
diamond-policies:
163+
service: ghcr
164+
resource: ghcr.io/diamondlightsource/authz-policy:0.0.16
165+
polling:
166+
min_delay_seconds: 30
167+
max_delay_seconds: 120
168+
169+
resources:
170+
requests:
171+
cpu: 1000m
172+
memory: 2Gi
173+
limits:
174+
cpu: 1000m
175+
memory: 2Gi

0 commit comments

Comments
 (0)