Documentation
¶
Overview ¶
Package provisioning 은 스택 정보를 보고 프로비저닝 도구 묶음을 조립한다.
GitLab 주소·토큰·레지스트리 종류가 모두 스택마다 다르므로 기동 시점에 하나로 만들 수 없다. 요청 시점에 스택을 읽어 조립한다.
Index ¶
- type BundleFactory
- func (f *BundleFactory) For(ctx context.Context, stackID string) (*port.SCMBundle, error)
- func (f *BundleFactory) WithGitHub(tokens port.SCMTokenIssuer, connections port.SCMConnectionReader) *BundleFactory
- func (f *BundleFactory) WithGitea(tokens port.SCMTokenIssuer, secrets gitea.SecretWriter) *BundleFactory
- func (f *BundleFactory) WithJenkins(creds port.CICredentialResolver) *BundleFactory
- func (f *BundleFactory) WithRegistrySecrets(store registrycreds.SecretStore) *BundleFactory
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BundleFactory ¶
type BundleFactory struct {
// contains filtered or unexported fields
}
BundleFactory 는 port.SCMBundleFactory 구현체다.
func NewBundleFactory ¶
func NewBundleFactory(stacks port.StackReader, tokens port.SCMTokenIssuer, opts Options) *BundleFactory
NewBundleFactory 는 팩토리를 만든다.
func (*BundleFactory) WithGitHub ¶
func (f *BundleFactory) WithGitHub( tokens port.SCMTokenIssuer, connections port.SCMConnectionReader, ) *BundleFactory
WithGitHub 는 GitHub 스택을 프로비저닝할 수 있게 한다.
func (*BundleFactory) WithGitea ¶
func (f *BundleFactory) WithGitea(tokens port.SCMTokenIssuer, secrets gitea.SecretWriter) *BundleFactory
WithGitea 는 Gitea 스택을 프로비저닝할 수 있게 한다.
func (*BundleFactory) WithJenkins ¶
func (f *BundleFactory) WithJenkins(creds port.CICredentialResolver) *BundleFactory
WithJenkins 는 Gitea 스택의 CI job 을 만들 수 있게 한다.
배선되지 않으면 CIJobs 가 nil 로 남고, 호출부는 job 생성을 건너뛴다 — 리포와 스캐폴딩은 만들어지되 빌드는 돌지 않는다.
func (*BundleFactory) WithRegistrySecrets ¶
func (f *BundleFactory) WithRegistrySecrets(store registrycreds.SecretStore) *BundleFactory
WithRegistrySecrets 는 스택이 설치한 레지스트리의 자격증명 저장소를 배선한다.
배선하지 않으면 CI 레지스트리 변수는 사용자가 준 값만 쓴다 — 화면이 그 값을 묻지 않으므로, 그 경우 변수가 비어 CI 의 docker login 이 죽는다.
type Options ¶
type Options struct {
// Env 는 시크릿 경로에 쓰는 환경 이름이다 (dev/staging/prod).
Env string
// GroupPath 는 프로젝트가 만들어질 조직 그룹 경로다.
GroupPath string
// ExternalRegistryPrefix 는 알 수 없는 레지스트리 도구의 폴백이다.
ExternalRegistryPrefix string
// GitLabBaseURLOverride 는 클러스터 내부 서비스 DNS 대신 쓸 주소다.
//
// 기본 경로는 gitlab-webservice-default.{ns}.svc 인데, 이는 API 서버가
// 클러스터 안에서 돌 때만 해석된다. 로컬 실행이나 외부 GitLab 을 붙일 때
// 이 값으로 대체한다.
GitLabBaseURLOverride string
// GiteaBaseURLOverride 는 Gitea 의 클러스터 내부 서비스 DNS 대신 쓸 주소다.
//
// 기본 경로는 gitea-http.{ns}.svc 인데, 이는 API 서버가 클러스터 안에서 돌
// 때만 해석된다. 로컬 실행에서는 이 값이 없으면 인증 확인(Ping)이 DNS 오류로
// 실패하고, 그러면 토큰을 강제 재발급하는 경로로 잘못 흘러간다.
GiteaBaseURLOverride string
// JenkinsBaseURLOverride 는 Jenkins 의 클러스터 내부 서비스 DNS 대신 쓸
// 주소다. Gitea 와 같은 이유로 필요하다 — 기본 경로는 API 서버가 클러스터
// 안에서 돌 때만 해석된다.
JenkinsBaseURLOverride string
}
Options 는 팩토리 기동 설정이다.
Click to show internal directories.
Click to hide internal directories.