Skip to content

Commit

Permalink
Refactor with provided flux api
Browse files Browse the repository at this point in the history
Signed-off-by: chengleqi <leqicheng@stu.xidian.edu.cn>
  • Loading branch information
chengleqi committed Aug 23, 2022
1 parent 0de3b98 commit 10ae430
Show file tree
Hide file tree
Showing 10 changed files with 762 additions and 1,405 deletions.
6 changes: 6 additions & 0 deletions cmd/controller/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ package app
import (
"context"
"fmt"
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
kusv1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
sourcev1 "github.com/fluxcd/source-controller/api/v1beta1"
"github.com/jenkins-zh/jenkins-client/pkg/core"
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
Expand Down Expand Up @@ -176,6 +179,9 @@ func Run(s *options.DevOpsControllerManagerOptions, ctx context.Context) error {
}
apis.AddToScheme(mgr.GetScheme())
_ = apiextensions.AddToScheme(mgr.GetScheme())
_ = sourcev1.AddToScheme(mgr.GetScheme())
_ = kusv1.AddToScheme(mgr.GetScheme())
_ = helmv2.AddToScheme(mgr.GetScheme())

// register common meta types into schemas.
metav1.AddToGroupVersion(mgr.GetScheme(), metav1.SchemeGroupVersion)
Expand Down
222 changes: 193 additions & 29 deletions config/crd/bases/gitops.kubesphere.io_applications.yaml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ rules:
- get
- list
- update
- watch
- apiGroups:
- kustomize.toolkit.fluxcd.io
resources:
Expand All @@ -316,6 +317,7 @@ rules:
- get
- list
- update
- watch
- apiGroups:
- source.toolkit.fluxcd.io
resources:
Expand All @@ -334,3 +336,4 @@ rules:
- create
- get
- list
- watch
2 changes: 1 addition & 1 deletion config/samples/gitops/fluxcd-application-helmtemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
config:
helmRelease:
chart:
template: my-devops-projecthmhx2-chengleqi-test-helm
template: chengleqi-test-helm
deploy:
- destination:
kubeConfig:
Expand Down
Loading

0 comments on commit 10ae430

Please sign in to comment.