Skip to content

Commit 0456fc5

Browse files
authored
Merge pull request #35 from alauda/build-error
Update finalizer and add back build error
2 parents 169cccd + 7628549 commit 0456fc5

File tree

9 files changed

+10
-12
lines changed

9 files changed

+10
-12
lines changed

go.mod

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ replace k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-
1818

1919
replace github.com/deislabs/oras => github.com/deislabs/oras v0.7.0
2020

21-
replace github.com/alauda/helm-crds => github.com/alauda/helm-crds v0.0.0-20190915014518-6c1be05f7d6e
22-
2321
replace github.com/docker/docker => github.com/moby/moby v0.7.3-0.20190826074503-38ab9da00309
2422

2523
replace gomodules.xyz/jsonpatch/v2 => gomodules.xyz/jsonpatch/v2 v2.0.1
@@ -31,7 +29,7 @@ require (
3129
github.com/Masterminds/sprig v2.18.0+incompatible // indirect
3230
github.com/PuerkitoBio/purell v1.1.1 // indirect
3331
github.com/alauda/component-base v0.0.0-20190628064654-a4dafcfd3446
34-
github.com/alauda/helm-crds v0.0.0-20190904040405-5d13ef317cd8
32+
github.com/alauda/helm-crds v0.0.0-20191213075648-06c92685470a
3533
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
3634
github.com/bugsnag/bugsnag-go v1.5.2 // indirect
3735
github.com/coreos/bbolt v1.3.3 // indirect

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ github.com/alauda/component-base v0.0.0-20190628064654-a4dafcfd3446 h1:gtzuHCPUR
3434
github.com/alauda/component-base v0.0.0-20190628064654-a4dafcfd3446/go.mod h1:tbaXeIWDl6zX1b7O53FSXClDS1YmEDRnVJszgcLXzpk=
3535
github.com/alauda/helm v3.0.0-beta.3.0.20191204063239-30241b826b03+incompatible h1:9QZ2vElgHP7ZBDim2kJKfl6cGsDaTwsz9swaQrgHTlA=
3636
github.com/alauda/helm v3.0.0-beta.3.0.20191204063239-30241b826b03+incompatible/go.mod h1:puN71hQ/dtLbcyDOPyhZw19FrLSYCak3EvJBT2OaRvQ=
37-
github.com/alauda/helm-crds v0.0.0-20190915014518-6c1be05f7d6e h1:qjAHTkXagriFjAlOwQyQc6t7Up13BpWT2e2gyUncU8U=
38-
github.com/alauda/helm-crds v0.0.0-20190915014518-6c1be05f7d6e/go.mod h1:QzPKCROcmAchx7bBj6NrNM34bmMQCrJCb+GrXtYi72o=
37+
github.com/alauda/helm-crds v0.0.0-20191213075648-06c92685470a h1:HPmq/9C6Y2dceR9ZxWCvo4SXuzLl1Mn5kThqStjH0Ew=
38+
github.com/alauda/helm-crds v0.0.0-20191213075648-06c92685470a/go.mod h1:QzPKCROcmAchx7bBj6NrNM34bmMQCrJCb+GrXtYi72o=
3939
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
4040
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
4141
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=

pkg/cluster/info.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func RestConfigToCluster(config *rest.Config, generatedName string) *Info {
5858
func GetClusters(client versioned.Interface, ns string, opts metav1.ListOptions) (*v1alpha1.ClusterList, error) {
5959
origin, err := client.ClusterregistryV1alpha1().Clusters(ns).List(opts)
6060
if err != nil {
61-
if apierrors.IsNotFound(err){
61+
if apierrors.IsNotFound(err) {
6262
klog.Warning("no cluster found:", err)
6363
return origin, nil
6464
}

pkg/kube/client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package kube
22

33
import (
44
"io"
5+
56
"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
67
"k8s.io/client-go/kubernetes/scheme"
78

@@ -33,12 +34,12 @@ func New(getter genericclioptions.RESTClientGetter) *Client {
3334
}
3435
}
3536

36-
3737
// Build validates for Kubernetes objects and returns resource Infos from a io.Reader.
3838
func (c *Client) Build(reader io.Reader) (kube.ResourceList, error) {
3939
result, err := c.Client.Build(reader)
4040
if err != nil {
4141
klog.Warning("build resources error: ", err)
42+
return result, err
4243

4344
// if strings.Contains(err.Error(), "apiVersion") && strings.Contains(err.Error(), "is not available") {
4445
// klog.Warning("encountered apiVersion not found it, ignore it: ", err)
@@ -48,7 +49,6 @@ func (c *Client) Build(reader io.Reader) (kube.ResourceList, error) {
4849
return result, nil
4950
}
5051

51-
5252
// Create plan to support replace.... hold on...
5353
func (c *Client) Create(resources kube.ResourceList) (*kube.Result, error) {
5454

pkg/util/kubernetes.go

-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,3 @@ func NewOwnerRef(owner metav1.Object, gvk schema.GroupVersionKind) *metav1.Owner
1818
Controller: &isController,
1919
}
2020
}
21-

pkg/util/vars.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const (
88
LeaderLockName = "captain-controller-lock"
99

1010
// FinalizerName is the finalizer name we append to each HelmRequest resource
11-
FinalizerName = "captain.alauda.io"
11+
FinalizerName = "captain.cpaas.io"
1212

1313
// ProjectKey is the annotation key for project
1414
ProjectKey = "alauda.io/project"

tests.sh

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env bash
12
#/usr/bin/env bash
23

34
NORMAL=$(tput sgr0)

vendor/github.com/alauda/helm-crds/pkg/apis/app/v1alpha1/types.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ github.com/alauda/component-base/crd
4141
github.com/alauda/component-base/hash
4242
github.com/alauda/component-base/regex
4343
github.com/alauda/component-base/system
44-
# github.com/alauda/helm-crds v0.0.0-20190904040405-5d13ef317cd8 => github.com/alauda/helm-crds v0.0.0-20190915014518-6c1be05f7d6e
44+
# github.com/alauda/helm-crds v0.0.0-20191213075648-06c92685470a
4545
github.com/alauda/helm-crds/pkg/apis/app/v1alpha1
4646
github.com/alauda/helm-crds/pkg/client/clientset/versioned
4747
github.com/alauda/helm-crds/pkg/client/clientset/versioned/scheme

0 commit comments

Comments
 (0)