DocsResource KindsGitlabDefaults

GitlabDefaults

Specifies a resource used internally in Frigg to allow for templating GitlabGroups and GitlabProjects.

Schema

GitlabDefaults

propertytypedescription
versionstring, requiredVersion of Frigg to use. Should be 1.
kindGitlabDefaults, requiredKind of resource you want to specify
metadataobject, requiredData used by Frigg internally
metadata.namestring, requiredName used to reference this resource from other resources
specobject, requiredState you want the resource to have
spec.groupConfigGitlabGroupConfig, requiredShould include all properties.
spec.projectConfigGitlabProjectConfig, requiredShould include all properties.
spec.approvalsConfigGitlabApprovalsConfig, requiredShould include all properties.
spec.approvalRulesGitlabApprovalRule array, requiredShould include all properties.
spec.protectedBranchesGitlabProtectedBranch array, requiredShould include all properties.

Example

version: '1'
kind: GitlabDefaults
metadata:
    name: GitlabDefaults
spec:
    groupConfig:
        autoDevopsEnabled: false
        defaultBranchProtection: 2
        description: ''
        emailsDisabled: false
        lfsEnabled: true
        membershipLock: false
        mentionsDisabled: false
        projectCreationLevel: maintainer
        requestAccessEnabled: true
        requireTwoFactorAuthentication: true
        shareWithGroupLock: false
        subgroupCreationLevel: owner
        twoFactorGracePeriod: 48
        visibility: private
    projectConfig:
        allowMergeOnSkippedPipeline: false
        allowPipelineTriggerApproveDeployment: false
        analyticsAccessLevel: enabled
        autoCancelPendingPipelines: enabled
        autoDevopsDeployStrategy: continuous
        autoDevopsEnabled: false
        autocloseReferencedIssues: true
        buildGitStrategy: fetch
        buildTimeout: 3600
        buildsAccessLevel: enabled
        ciAllowForkPipelinesToRunInParentProject: true
        ciConfigPath: ''
        ciDefaultGitDepth: 20
        ciForwardDeploymentEnabled: true
        ciSeparatedCaches: true
        containerExpirationPolicyAttributes:
            cadence: 1d
            enabled: false
            keepN: 10
            nameRegex: .*
            nameRegexKeep: ''
            olderThan: 90d
        containerRegistryAccessLevel: enabled
        defaultBranch: main
        description: ''
        emailsDisabled: false
        enforceAuthChecksOnUploads: true
        externalAuthorizationClassificationLabel: ''
        featureFlagsAccessLevel: enabled
        forkingAccessLevel: enabled
        groupRunnersEnabled: true
        infrastructureAccessLevel: enabled
        issueBranchTemplate: ''
        issuesAccessLevel: enabled
        issuesTemplate: ''
        keepLatestArtifact: true
        lfsEnabled: true
        mergeCommitTemplate: ''
        mergeMethod: ff
        mergePipelinesEnabled: true
        mergeRequestsAccessLevel: private
        mergeRequestsTemplate: ''
        mergeTrainsEnabled: false
        mirror: false
        monitorAccessLevel: enabled
        onlyAllowMergeIfAllDiscussionsAreResolved: true
        onlyAllowMergeIfPipelineSucceeds: true
        packagesEnabled: true
        pagesAccessLevel: private
        printingMergeRequestLinkEnabled: true
        releasesAccessLevel: enabled
        removeSourceBranchAfterMerge: true
        repositoryAccessLevel: enabled
        requestAccessEnabled: false
        requirementsAccessLevel: enabled
        resolveOutdatedDiffDiscussions: false
        restrictUserDefinedVariables: false
        securityAndComplianceAccessLevel: private
        serviceDeskEnabled: true
        sharedRunnersEnabled: true
        snippetsAccessLevel: disabled
        squashCommitTemplate: ''
        squashOption: default_off
        suggestionCommitMessage: ''
        topics: []
        visibility: private
        wikiAccessLevel: disabled
    approvalsConfig:
        disableOverridingApproversPerMergeRequest: false
        mergeRequestsAuthorApproval: false
        mergeRequestsDisableCommittersApproval: false
        requirePasswordToApprove: false
        resetApprovalsOnPush: true
    approvalRules:
        - name: Approval rule
          appliesToAllProtectedBranches: false
          approvalsRequired: 1
          groupIds: []
          protectedBranchIds: []
          ruleType: any_approver
          usernames: []
    protectedBranches:
        - name: main
          allowForcePush: false
          codeOwnerApprovalRequired: false
          mergeAccessLevels:
              - maintainer
          pushAccessLevels:
              - maintainer
          unprotectedAccessLevels: []