GitlabServiceAccount

The GitlabServiceAccount resource allows you to manage GitLab service accounts declaratively using Frigg. Service accounts are bot users that can be used for CI/CD automation and other programmatic access.

Schema Reference

GitlabServiceAccountResource

PropertyTypeRequiredDescription
versionstringYesVersion of Frigg to use. Should be 1.
kindGitlabServiceAccountYesKind of resource you want to specify
metadataobjectYesData used by Frigg internally
metadata.namestringYesName used to reference this resource from other resources
metadata.idnumberNoNumeric ID of the service account. Specify this to manage an existing service account.
specobjectYesState you want the resource to have

GitlabServiceAccountSpec

PropertyTypeRequiredDescription
displayNamestringYesDisplay name of the service account (1-255 characters)
usernamestringNoUsername for the service account. Can only contain lowercase letters, digits, underscores, and hyphens.

As a Project Sub-Resource

Service accounts can also be defined inline on a GitlabProject resource via spec.serviceAccounts:

PropertyTypeRequiredDescription
namestringYesName of the service account
accessLevelno_access | minimal_access | guest | planner | reporter | developer | maintainer | owner | adminYesThe access level of the service account. admin is only available on self-managed instances.

Example

Standalone Resource

version: '1'
kind: GitlabServiceAccount
metadata:
    name: ci-bot
spec:
    displayName: CI Bot
    username: ci-bot

As Project Sub-Resource

spec:
    serviceAccounts:
        - name: ci-bot
          accessLevel: developer
  • GitlabProject - Projects can include service accounts via spec.serviceAccounts

External Documentation