Skip to content

Commit 0c82f58

Browse files
committed
wildduck-operator: migrate to new Passmower OIDCUser CRDs
1 parent faf3c28 commit 0c82f58

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

samples/wildduck-operator/templates/wildduck-operator-rbac.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ metadata:
55
name: codemowers-io-wildduck-operator
66
rules:
77
- apiGroups:
8-
- codemowers.io
8+
- codemowers.cloud
99
resources:
10-
- oidcgatewayusers
10+
- oidcusers
1111
verbs:
1212
- get
1313
- list
1414
- watch
1515
- apiGroups:
16-
- codemowers.io
16+
- codemowers.cloud
1717
resources:
18-
- oidcgatewayusers/status
18+
- oidcusers/status
1919
verbs:
2020
- patch
2121
- update

samples/wildduck-operator/wildduck_operator.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def get_operator_namespace(cls):
1515

1616
@classmethod
1717
def get_claim_singular(cls):
18-
return "OIDCGatewayUser"
18+
return "OIDCUser"
1919

2020
@classmethod
2121
def get_claim_plural(cls):
22-
return "OIDCGatewayUsers"
22+
return "OIDCUsers"
2323

2424
@classmethod
2525
async def reconcile_claim(cls, api_client, co, body):
@@ -48,13 +48,13 @@ async def reconcile_claim(cls, api_client, co, body):
4848

4949
# Determine forwarding address outside organization
5050
# TODO: Have this in status subresource
51-
if "email" in body["spec"]:
51+
if "primaryEmail" in body["status"]:
5252
forwarding = {"targets": [body["spec"]["email"]]}
53-
elif "githubEmails" in body["spec"]:
54-
for j in body["spec"]["githubEmails"]:
53+
elif "emails" in body["github"]:
54+
for j in body["emails"]["github"]:
5555
forwarding = {"targets": [j["email"]]}
5656
break
57-
for j in body["spec"]["githubEmails"]:
57+
for j in body["emails"]["github"]:
5858
if j["primary"]:
5959
forwarding = {"targets": [j["email"]]}
6060
break

0 commit comments

Comments
 (0)