argo相关项目入门文章

1. argocd指南

GitHub - devops-ws/argo-cd-guide: Argo CD Guide

2. argoworkflow指南

https://github.com/devops-ws/argo-workflows-guide

argoworkflow连接gitlab,github等仓库是需要一个认证的secret的配置,

func addWebhookAuthorization(r *http.Request, kube kubernetes.Interface) error {
	// try and exit quickly before we do anything API calls
	if r.Method != "POST" || len(r.Header["Authorization"]) > 0 || !strings.HasPrefix(r.URL.Path, pathPrefix) {
		return nil
	}
	parts := strings.SplitN(strings.TrimPrefix(r.URL.Path, pathPrefix), "/", 2)
	if len(parts) != 2 {
		return nil
	}
	namespace := parts[0]
	secretsInterface := kube.CoreV1().Secrets(namespace)
	ctx := r.Context()
    // 可以看到这个secret的名字是硬编码写死的
	webhookClients, err := secretsInterface.Get(ctx, "argo-workflows-webhook-clients", metav1.GetOptions{})

......
}

工作流模板分为WorkflowTemplate(namespace级别资源)和ClusterWorkflowTemplate(cluster级别资源)可以作为模板库,用来被引用。

3. 相关插件:

3.1 github-action-workflow

用来将github action 转变为argoworkflow的工作流模板及相关资源

GitHub - LinuxSuRen/github-action-workflow: GitHub Actions compitable workflows

3.2 gogit

用来发送工作流状态到git仓库

GitHub - LinuxSuRen/gogit: Sending build status to different git providers

3.3 argo-workflow-atomic-plugin

GitHub - LinuxSuRen/argo-workflow-atomic-plugin: An atomic plugin of Argo workflows

你可能感兴趣的:(github,git,kubernetes)