PageSourceSearch

https://flanksource.com/assets/js/dcbc70a5.2d026c16.js

js flanksource.com collected 2026-09-25 15:26:25 UTC 18,472 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkmission_control=globalThis.webpackChunkmission_control||[]).push([[3390],{28211(e,n,s){s.d(n,{U_:()=>o,tb:()=>l,v0:()=>a});s(96540);var i=s(97486),t=s(74848);const r={scraper:{icon:i.pUm,label:"Scraper",anchor:"catalog",color:"#2563eb",bg:"#dbeafe",border:"#93c5fd"},healthcheck:{icon:i.XkQ,label:"Health Check",anchor:"health-checks",color:"#d97706",bg:"#fef3c7",border:"#fcd34d"},playbook:{icon:i.WxB,label:"Playbook",anchor:"playbooks",color:"#7c3aed",bg:"#ede9fe",border:"#c4b5fd"},notifications:{icon:i.IrQ,label:"Notifications",anchor:"notifications",color:"#16a34a",bg:"#dcfce7",border:"#86efac"},actions:{icon:i.KD0,label:"Actions",anchor:"actions",color:"#4f46e5",bg:"#e0e7ff",border:"#a5b4fc"},relationship:{icon:i.pUm,label:"Relationship",anchor:"relationship",color:"#d97706",bg:"#fef3c7",border:"#fcd34d"}};function o({type:e,label:n}){const s=r[e];if(!s)return null;const i=s.icon;return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-sm font-medium",style:{backgroundColor:s.bg,color:s.color,border:`1px solid ${s.border}`},children:[(0,t.jsx)(i,{className:"w-4 h-4"}),n||s.label]})}function a({children:e}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mb-6 not-prose",children:e})}function l({type:e}){const n=r[e];if(!n)return null;const s=n.icon;return(0,t.jsx)("h2",{id:n.anchor,className:"flex items-center gap-2 mt-8 mb-4 not-prose",children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-base font-medium",style:{backgroundColor:n.bg,color:n.color,border:`1px solid ${n.border}`},children:[(0,t.jsx)(s,{className:"w-5 h-5"}),n.label]})})}},34351(e,n,s){s(96540);var i=s(21733),t=s(92224),r=s(34164),o=s(74848);s.d(n,["C",0,({columns:e=3,gap:n="gap-x-4 gap-y-4",children:s})=>(0,o.jsx)("div",{className:(0,r.A)("text-slate-900 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",n),children:s}),"Z",0,({title:e,icon:n,size:s="md",height:a="min-h-20 md:min-h-32",link:l,href:c,variant:d="primary",bordered:h=!0,padded:p=!0,sidebar:m,children:x})=>{l=l||c,m&&(l=m.href,m.customProps?.icon&&(n=(0,o.jsx)(t.A,{name:m.customProps?.icon})),e=m.label),n&&"string"==typeof n&&(n=(0,o.jsx)(t.A,{name:n}));const g=(0,o.jsx)("div",{className:(0,r.A)(a,"flex rounded-lg",h&&"border border-slate-200 border-solid hover:border-slate-300 hover:shadow-lg",p&&"md"==s&&"p-2 sm:p-5",p&&"sm"==s&&"p-1 sm:p-2",s),children:(0,o.jsxs)("div",{className:"items-start flex-col flex-grow justify-around flex",children:[(0,o.jsxs)("span",{className:"flex flex-row items-center space-x-1 ",children:[n&&n,(0,o.jsx)("span",{className:(0,r.A)("md"==s&&"text-2xl","sm"==s&&"text-xl"),children:e})]}),x]})});return l?(0,o.jsx)(i.A,{to:l,className:"unstyled  ",children:g}):g}])},92224(e,n,s){s.d(n,{A:()=>l});s(96540);var i=s(97486),t=s(37399),r=s(91406),o=s(34164),a=s(74848);function l({name:e,height:n=22,className:s,url:l,children:c,...d}){if("config-db"==(e=e.replaceAll("--","-").replaceAll("::","-").toLowerCase().replaceAll("k8-","k8s-").replaceAll("kubernetes-","k8s-")))return(0,a.jsx)(r.ntS,{...d});if("canary-checker"==e&&(e="heart"),"getting-started"==e&&(e="lsicon:path-outline"),"concepts"==e&&(e="fluent:brain-circuit-24-regular"),"events"==e&&(e="carbon:lightning"),"tutorial"==e&&(e="learning"),"dedupe"==e)return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"20",height:"20",viewBox:"0 0 50 50",children:(0,a.jsx)("path",{d:"M 17 4 L 17 6 L 44 6 L 44 40 L 36 40 L 36 42 L 46 42 L 46 4 L 17 4 z M 4 8 L 4 46 L 34 46 L 34 45 L 34 8 L 4 8 z M 6 10 L 32 10 L 32 44 L 6 44 L 6 10 z M 18 20 L 18 26 L 12 26 L 12 28 L 18 28 L 18 34 L 20 34 L 20 28 L 26 28 L 26 26 L 20 26 L 20 20 L 18 20 z"})});if("rate-limit"==e)return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...d,width:"20",height:"20",viewBox:"0 0 50 50",children:(0,a.jsx)("path",{d:"M 25 2 C 12.316406 2 2 12.316406 2 25 C 2 37.683594 12.316406 48 25 48 C 37.683594 48 48 37.683594 48 25 C 48 12.316406 37.683594 2 25 2 Z M 32.5 16.1875 C 37.601563 16.1875 38.09375 21.007813 38.09375 22.90625 C 38.09375 23.605469 38.09375 24.210938 38.09375 24.8125 C 38.09375 30.3125 36.90625 33.40625 32.40625 33.40625 C 28.90625 33.40625 26.6875 31.511719 26.6875 24.8125 C 26.789063 18.914063 28.398438 16.187
15 32.5 16.1875 Z M 14.3125 16.5 L 22.6875 16.5 L 22.6875 18.3125 L 15.90625 18.3125 L 15 23.1875 C 15.699219 22.488281 16.789063 22 18.1875 22 C 22.585938 22 23.6875 25.511719 23.6875 27.8125 C 23.6875 31.511719 20.886719 33.40625 17.6875 33.40625 C 13.789063 33.40625 12.3125 30.59375 12.3125 28.59375 L 14.3125 28.59375 C 14.3125 29.695313 15.207031 31.6875 17.90625 31.6875 C 20.605469 31.6875 21.5 29.289063 21.5 27.6875 C 21.5 25.1875 19.6875 23.8125 17.6875 23.8125 C 15.988281 23.8125 14.898438 24.90625 14.5 25.40625 L 12.6875 25.3125 Z M 32.5 17.90625 C 29.898438 17.90625 29 20.507813 29 23.40625 L 29 24.8125 C 29 29.8125 30 31.6875 32.5 31.6875 C 34.699219 31.6875 36 30.210938 36 24.8125 L 36 23.40625 C 36 21.707031 35.601563 17.90625 32.5 17.90625 Z"})});if("scraper"==e)return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",...d,viewBox:"0 0 50 50",children:(0,a.jsx)("path",{d:"M 28.992188 7 C 23.983187 7 19.408891 9.4429063 17.212891 13.878906 C 16.077891 13.127906 14.747469 12.722656 13.355469 12.722656 C 9.6514687 12.722656 6.6102812 15.610953 6.3632812 19.251953 C 2.5812812 20.629953 1.1842379e-15 24.258078 0 28.330078 C 0 33.662078 4.3379219 38 9.6699219 38 L 24.179688 38 C 24.069688 37.348 24 36.683 24 36 C 24 29.373 29.373 24 36 24 C 42.218 24 47.330453 28.728156 47.939453 34.785156 C 49.224453 33.242156 50 31.260609 50 29.099609 C 50 24.538609 46.554906 20.767859 42.128906 20.255859 C 42.138906 20.064859 42.142578 19.878312 42.142578 19.695312 C 42.142578 12.444312 36.243188 7 28.992188 7 z M 36 26 C 30.488997 26 26 30.488997 26 36 C 26 41.511003 30.488997 46 36 46 C 38.396508 46 40.597385 45.148986 42.322266 43.736328 L 48.292969 49.707031 L 49.707031 48.292969 L 43.736328 42.322266 C 45.148986 40.597385 46 38.396508 46 36 C 46 30.488997 41.511003 26 36 26 z M 36 28 C 40.430123 28 44 31.569877 44 36 C 44 40.430123 40.430123 44 36 44 C 31.569877 44 28 40.430123 28 36 C 28 31.569877 31.569877 28 36 28 z"})});let h=i.GtP[e];if(!h)return(0,a.jsx)(t.In,{icon:e,...d,height:20,width:20});let p=(0,a.jsxs)("div",{className:"inline-block spacing-x-2",children:[(0,a.jsx)(h,{className:(0,o.A)("align-middle",s),name:e,size:n,...d}),(0,a.jsx)("span",{children:c})]});return null!=l?(0,a.jsx)("a",{href:l,children:p}):p}},21733(e,n,s){s.d(n,{A:()=>r});s(96540);var i=s(68957),t=s(74848);function r(e){return(0,t.jsx)(i.A,{...e})}},2327(e,n,s){s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>m,frontMatter:()=>l,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"integrations/gitlab","title":"GitLab","description":"Mission Control integrates with GitLab for GitOps workflows and repository operations.","source":"@site/docs/integrations/gitlab.mdx","sourceDirName":"integrations","slug":"/integrations/gitlab","permalink":"/docs/integrations/gitlab","draft":false,"unlisted":false,"editUrl":"https://github.com/flanksource/docs/tree/main/docs/integrations/gitlab.mdx","tags":[],"version":"current","frontMatter":{"title":"GitLab","sidebar_custom_props":{"icon":"gitlab"}},"sidebar":"integrations","previous":{"title":"GitHub","permalink":"/docs/integrations/github"},"next":{"title":"Grafana","permalink":"/docs/integrations/grafana"}}');var t=s(74848),r=s(28453),o=s(34351),a=s(28211);const l={title:"GitLab",sidebar_custom_props:{icon:"gitlab"}},c=void 0,d={},h=[{value:"Push Changes to Repository",id:"push-changes-to-repository",level:3},{value:"Configuration Options",id:"configuration-options",level:2},{value:"Repository Configuration",id:"repository-configuration",level:3},{value:"Commit Configuration",id:"commit-configuration",level:3},{value:"Merge Request Configuration",id:"merge-request-configuration",level:3},{value:"GitLab Access Token Scopes",id:"gitlab-access-token-scopes",level:2},{value:"Next Steps",id:"next-steps",level:2}];function p(e){const n={code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.v0,{children:(0,t.jsx)(a.U_,{type:"playbook"})}),"\n",(0,t.jsx)(n.p,{children:"Mission Control integrates with GitLab for GitOps workflows and repository operations."}),"\n",(0,t.jsx)(n.hr,{}),"\n",(0,t.jsx)(a.tb,{type:"playbook"}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.strong,{children:"Use cases:"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Clone repositories and push changes from playbooks"}),"\n",(0,t.jsx)(n.li,{children:"Create merge requests with reviewers and assignees"}),"\n",(0,t.jsx)(n.li,{children:"Commit configuration changes back to Git repositories"}),"\n",(0,t.jsx)(n.li,{children:"Integrate with GitLab CI/CD pipelines through GitOps"}),"\n",(0,t.jsx)(n.li,{children:"Support both GitLab.com and self-hosted GitLab instances"}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Perform Git operations against GitLab repositories in playbooks."}
1),"\n",(0,t.jsx)(n.h3,{id:"push-changes-to-repository",children:"Push Changes to Repository"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",metastring:'title="gitlab-push-playbook.yaml"',children:'apiVersion: mission-control.flanksource.com/v1\nkind: Playbook\nmetadata:\n  name: update-config\nspec:\n  actions:\n    - name: push-config-change\n      gitops:\n        repo:\n          url: https://gitlab.com/org/config-repo.git\n          service: gitlab\n          accessToken:\n            valueFrom:\n              secretKeyRef:\n                name: gitlab-credentials\n                key: token\n          branch: main\n        commit:\n          author: Mission Control\n          email: [email protected]\n          message: "Update configuration from playbook"\n        files:\n          - path: configs/app.yaml\n            content: |\n              replicas: {{.params.replicas}}\n              image: {{.params.image}}\n'})}),"\n",(0,t.jsx)(s,{summary:"Create Merge Request",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",metastring:'title="gitlab-mr-playbook.yaml"',children:'apiVersion: mission-control.flanksource.com/v1\nkind: Playbook\nmetadata:\n  name: create-merge-request\nspec:\n  parameters:\n    - name: change_description\n      label: Change Description\n      type: text\n  actions:\n    - name: create-mr\n      gitops:\n        repo:\n          url: https://gitlab.com/org/infrastructure.git\n          service: gitlab\n          accessToken:\n            valueFrom:\n              secretKeyRef:\n                name: gitlab-credentials\n                key: token\n          base: main\n          branch: "auto/{{.run.id}}"\n        commit:\n          author: Mission Control\n          email: [email protected]\n          message: "{{.params.change_description}}"\n        pullRequest:\n          title: "Automated Change: {{.params.change_description}}"\n          body: |\n            This merge request was created automatically by Mission Control.\n\n            **Change:** {{.params.change_description}}\n            **Triggered by:** {{.user.name}}\n          reviewers:\n            - platform-team\n          assignees:\n            - infrastructure-lead\n'})})}),"\n",(0,t.jsx)(s,{summary:"Self-Hosted GitLab",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",metastring:'title="gitlab-selfhosted-playbook.yaml"',children:'apiVersion: mission-control.flanksource.com/v1\nkind: Playbook\nmetadata:\n  name: self-hosted-gitlab\nspec:\n  actions:\n    - name: push-to-gitlab\n      gitops:\n        repo:\n          url: https://gitlab.internal.example.com/team/repo.git\n          service: gitlab\n          accessToken:\n            valueFrom:\n              secretKeyRef:\n                name: gitlab-internal-credentials\n                key: token\n          branch: main\n        commit:\n          author: Automation\n          email: [email protected]\n          message: "Automated update"\n'})})}),"\n",(0,t.jsx)(s,{summary:"SSH Authentication",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",metastring:'title="gitlab-ssh-playbook.yaml"',children:'apiVersion: mission-control.flanksource.com/v1\nkind: Playbook\nmetadata:\n  name: gitlab-ssh\nspec:\n  actions:\n    - name: push-via-ssh\n      gitops:\n        repo:\n          url: [email protected]:org/repo.git\n          service: gitlab\n          sshPrivateKey:\n            valueFrom:\n              secretKeyRef:\n                name: gitlab-ssh\n                key: private-key\n          sshPrivateKeyPassword:\n            valueFrom:\n              secretKeyRef:\n                name: gitlab-ssh\n                key: passphrase\n          branch: main\n        commit:\n          author: Mission Control\n          email: [email protected]\n          message: "Update via SSH"\n'})})}),"\n",(0,t.jsx)(n.h2,{id:"configuration-options",children:"Configuration Options"}),"\n",(0,t.jsx)(n.h3,{id:"repository-configuration",children:"Repository Configuration"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"url"})}),(0,t.jsx)(n.td,{children:"Repository URL (HTTPS or SSH)"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"service"})}),(0,t.jsxs)(n.td,{children:["Git service type: ",(0,t.jsx)(n.code,{children:"gitlab"}),", ",(0,t.jsx)(n.code,{children:"github"}),", or ",(0,t.jsx)(n.code,{children:"azure"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"accessToken"})}),(0,t.jsx)(n.td,{children:"GitLab personal access token"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"sshPrivateKey"})}),(0,t.jsx)(n.td,{children:"SSH private key for authentication"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"sshPrivateKeyPassword"})}),(0,t.jsx)(n.td,{children:"Passphrase for encrypted SSH key"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"base"})}),(0,t.jsx)(n.td,{children:"Base branch for merge requests"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"branch"})}),(0,t.jsx)(n.td,{children:"Target branch for commits"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"commit-configuration",children:"Commit Configuration"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"author"})}),(0,t.jsx)(n.td,{children:"Commit author name"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"email"})}),(0,t.jsx)(n.td,{children:"Commit author email"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"message"})}),(0,t.jsx)(n.td,{children:"Commit message"})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"merge-request-configuration",children:"Merge Request Configuration"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"title"})}),(0,t.jsx)(n.td,{children:"Merge request title"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"body"})}),(0,t.jsx)(n.td,{children:"Merge request description"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"reviewers"})}),(0,t.jsx)(n.td,{children:"List of reviewer usernames"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"assignees"})}),(0,t.jsx)(n.td,{children:"List of assignee usernames"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"tags"})}),(0,t.jsx)(n.td,{children:"Labels to apply"})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"gitlab-access-token-scopes",children:"GitLab Access Token Scopes"}),"\n",(0,t.jsx)(n.p,{children:"Create a Personal Access Token or Project Access Token with these scopes:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"read_repository"})," - Clone repositories"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"write_repository"})," - Push commits"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"api"})," - Create merge requests (if using MR feature)"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,t.jsxs)(o.C,{children:[(0,t.jsx)(o.Z,{icon:"github",title:"GitHub Integration",href:"/docs/integrations/github",children:(0,t.jsx)(n.p,{children:"Similar integration for GitHub repositories"})}),(0,t.jsx)(o.Z,{icon:"playbook",title:"GitOps Actions",href:"/docs/guide/playbooks/actions/gitops",children:(0,t.jsx)(n.p,{children:"GitOps action reference for playbooks"})}),(0,t.jsx)(o.Z,{icon:"flux",title:"Flux Integration",href:"/docs/integrations/flux",children:(0,t.jsx)(n.p,{children:"GitOps with Flux CD"})})]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},28453(e,n,s){s.d(n,{R:()=>o,x:()=>a});var i=s(96540);const t={},r=i.createContext(t);function o(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.