# A role that drives the PagerDuty integration. The connector holds the
# credentials. The role decides who gets paged, so different roles can
# page different teams. A role without these annotations opens no
# incident and logs nothing.
apiVersion: almaforge.com/v1
kind: Role
metadata:
  name: prod-oncall-access
spec:
  allow:
    request:
      # The roles a holder of this role may request. The annotations
      # below apply to requests for these roles.
      roles: ['access']
      annotations:
        # The PagerDuty service an incident is opened on. Matched
        # against the service name, not its ID, and the comparison
        # ignores case. Only the first value is used.
        pagerduty_notify_service: ['Prod Access Requests']
        # The services checked to decide whether the requester is
        # currently on call. Every value is checked, and one match is
        # enough. Read only when the connector sets
        # approveOnCall: true, and the requester is matched to a
        # PagerDuty user by email address alone.
        pagerduty_services: ['Prod On-Call']
