#
#  Author: Hari Sekhon
#  Date: 2021-02-22 10:47:12 +0000 (Mon, 22 Feb 2021)
#
#  vim:ts=2:sts=2:sw=2:et
#
#  https://github.com/HariSekhon/Kubernetes-configs
#
#  License: see accompanying Hari Sekhon LICENSE file
#
#  If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
#  https://www.linkedin.com/in/HariSekhon
#

# ServiceAccount to use for jenkins-server - jenkins-server-role.yaml grants this service account permissions in jenkins namespace to allow Kubernetes Cloud Configuration to auto-launch agent instances within the kubernetes cluster

---
apiVersion: v1
kind: ServiceAccount
metadata:
  # GKE Workload Identity integration - map your k8s serviceaccount to a GCP serviceaccount with permissions to access GCP resources
  annotations:
    # XXX: Edit PROJECT_ID if using GKE Workload Identity
    iam.gke.io/gcp-service-account: jenkins@PROJECT_ID.iam.gserviceaccount.com
  name: jenkins-server
  namespace: jenkins
