DocsResource KindsTop Level ResourcesGitlabGroup

GitlabGroup

The GitlabGroup resource allows you to manage GitLab groups declaratively using Frigg.

Schema Reference

GitlabGroupResource

PropertyTypeRequiredDescription
versionstringYesVersion of Frigg to use. Should be 1.
kindGitlabGroupYesKind of resource you want to specify
metadataobjectYesData used by Frigg internally
metadata.namestringYesName used to reference this resource from other resources
metadata.configDefaultsstringYesName of the GitlabDefaults resource to use to resolve default configuration.
metadata.idnumberNoNumeric ID of the GitLab group. Specify this when you want to start managing an already existing group using Frigg.
specobjectYesState you want the resource to have
spec.namestringYesName of the group in GitLab
spec.groupNamespacestringNo*Name of the parent group (*must have either groupNamespace or userNamespace for subgroups)
spec.userNamespacestringNo*Name of the user in whose namespace the group is in (*rarely used, mainly for top-level groups)
spec.configGitlabGroupConfigNoGroup configuration. Leave undefined to fully use configDefaults.groupConfig.
spec.manageMembersbooleanNoWhether Frigg should manage member access. When true, only members specified in spec.members will have access.
spec.membersGitlabMember arrayNoDirect members of the group. Only used when manageMembers is true.
spec.sharedWithGroupsSharedWithGroup arrayNoGroups that this group is shared with, granting all group members access.

Configuration Details

GitlabGroupConfig

Configuration for group behavior, access levels, and security settings. All properties are optional. Any undefined properties will inherit from configDefaults.groupConfig in the referenced GitlabDefaults resource.

Essential Group Properties

PropertyTypeDefaultDescription
visibilityprivate | internal | publicprivateGroup visibility level (affects all projects within)
descriptionstring""Group description

Access Control

PropertyTypeDescription
projectCreationLevelnoone | maintainer | developerWho can create projects in this group
subgroupCreationLevelnoone | maintainerWho can create subgroups within this group
shareWithGroupLockbooleanPrevent sharing projects with other groups
membershipLockbooleanLock membership to parent group members only (for subgroups)
requestAccessEnabledbooleanAllow users to request access to the group

Security Settings

PropertyTypeDescription
requireTwoFactorAuthenticationbooleanRequire 2FA for all group members
twoFactorGracePeriodnumberGrace period in hours before 2FA is enforced (default: 48)

Default Branch Protection

Controls the default protection level for branches in new projects created within this group:

PropertyTypeDescription
defaultBranchProtection0 | 1 | 2 | 3 | 4Default protection level for new project branches

Protection Levels:

  • 0 - No protection
  • 1 - Developers and maintainers can push
  • 2 - Maintainers can push (default)
  • 3 - No one can push
  • 4 - No one can push, and require code owner approval for MR

Feature Settings

PropertyTypeDescription
autoDevopsEnabledbooleanEnable Auto DevOps for projects in this group
lfsEnabledbooleanEnable Git LFS for projects in this group
emailsEnabledbooleanEnable email notifications for the group
mentionsDisabledbooleanDisable @mention notifications for the group

Example

The following example includes all possible GitlabGroupConfig properties.

version: '1'
kind: GitlabGroup
metadata:
    name: example_group
    configDefaults: GitlabDefaults
spec:
    name: Example Group
    parent: null
    config:
        autoDevopsEnabled: false
        defaultBranchProtection: 2
        description: 'Example description'
        emailsEnabled: true
        lfsEnabled: true
        membershipLock: false
        mentionsDisabled: false
        projectCreationLevel: maintainer
        requestAccessEnabled: true
        requireTwoFactorAuthentication: true
        shareWithGroupLock: false
        subgroupCreationLevel: owner
        twoFactorGracePeriod: 48
        visibility: private
    members:
        - name: john.doe
          accessLevel: owner
        - name: alice.johnson
          accessLevel: reporter
    sharedWithGroups:
        - name: another_example_group
          accessLevel: developer

Required Resources

Sub-Resources

External Documentation