Skip to content

Commit 2a12d5d

Browse files
authored
Merge pull request #223 from datum-cloud/fix/activity-policy-generatename-summaries
fix: link assigned name in activity create summaries for generateName
2 parents b1eded2 + 4e43bf8 commit 2a12d5d

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

config/milo/activity/policies/backendtlspolicy-policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
# BackendTLSPolicy creation with spec available
1818
- name: create
1919
match: "!audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
20-
summary: "{{ actor }} created backend TLS policy {{ link(audit.objectRef.name, audit.objectRef) }}"
20+
summary: "{{ actor }} created backend TLS policy {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2121

2222
# BackendTLSPolicy creation fallback (no spec)
2323
- name: create-fallback

config/milo/activity/policies/connector-policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
# Connector creation with spec available
1818
- name: create
1919
match: "!audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
20-
summary: "{{ actor }} created connector {{ link(audit.objectRef.name, audit.objectRef) }}"
20+
summary: "{{ actor }} created connector {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2121

2222
# Connector creation fallback (no spec)
2323
- name: create-fallback

config/milo/activity/policies/connectoradvertisement-policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
# ConnectorAdvertisement creation with spec available
1919
- name: create
2020
match: "!audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
21-
summary: "{{ actor }} created connector advertisement {{ link(audit.objectRef.name, audit.objectRef) }}"
21+
summary: "{{ actor }} created connector advertisement {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2222

2323
# ConnectorAdvertisement creation fallback (no spec)
2424
- name: create-fallback

config/milo/activity/policies/domain-policy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
# Domain creation with spec.domainName available - use domain name as display text
1919
- name: create
2020
match: "!audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
21-
summary: "{{ actor }} created domain {{ link(audit.requestObject.spec.domainName, audit.objectRef) }}"
21+
summary: "{{ actor }} created domain {{ link(audit.responseObject.spec.domainName, audit.objectRef) }}"
2222

2323
# Domain creation fallback (no spec)
2424
- name: create-fallback
@@ -38,7 +38,7 @@ spec:
3838
# Domain update with spec available - excludes status subresource
3939
- name: update
4040
match: "!audit.user.username.startsWith('system:') && audit.verb in ['update', 'patch'] && !has(audit.objectRef.subresource) && has(audit.requestObject.spec)"
41-
summary: "{{ actor }} updated domain {{ link(audit.requestObject.spec.domainName, audit.objectRef) }}"
41+
summary: "{{ actor }} updated domain {{ link(audit.responseObject.spec.domainName, audit.objectRef) }}"
4242

4343
# Domain update fallback (no spec)
4444
- name: update-fallback

config/milo/activity/policies/gateway-policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
# Gateway creation with spec available
1818
- name: create
1919
match: "!audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
20-
summary: "{{ actor }} created gateway {{ link(audit.objectRef.name, audit.objectRef) }}"
20+
summary: "{{ actor }} created gateway {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2121

2222
# Gateway creation fallback (no spec)
2323
- name: create-fallback

config/milo/activity/policies/trafficprotectionpolicy-policy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
# TrafficProtectionPolicy creation with spec available
1818
- name: create
1919
match: "!audit.user.username.startsWith('system:') && audit.verb == 'create' && has(audit.requestObject.spec)"
20-
summary: "{{ actor }} created traffic protection policy {{ link(audit.objectRef.name, audit.objectRef) }}"
20+
summary: "{{ actor }} created traffic protection policy {{ link(audit.responseObject.metadata.name, audit.objectRef) }}"
2121

2222
# TrafficProtectionPolicy creation fallback (no spec)
2323
- name: create-fallback

0 commit comments

Comments
 (0)