def _InUse(resource):
  """All the secret names (local names & remote aliases) in use.

  Args:
    resource: Revision

  Returns:
    List of local names and remote aliases.
  """
  return ([
      source.secretName
      for source in resource.template.volumes.secrets.values()
  ] + [
      source.secretKeyRef.name
      for source in resource.template.env_vars.secrets.values()
  ])