author
int64 658
755k
| date
stringlengths 19
19
| timezone
int64 -46,800
43.2k
| hash
stringlengths 40
40
| message
stringlengths 5
490
| mods
list | language
stringclasses 20
values | license
stringclasses 3
values | repo
stringlengths 5
68
| original_message
stringlengths 12
491
|
|---|---|---|---|---|---|---|---|---|---|
254,881
|
26.02.2021 14:07:34
| -28,800
|
ac162c64478dd801e92c6ae6dd8fec47f14622dc
|
refactor: remove redis health check
|
[
{
"change_type": "MODIFY",
"old_path": "go.mod",
"new_path": "go.mod",
"diff": "@@ -6,7 +6,6 @@ require (\ncloud.google.com/go v0.58.0 // indirect\ngithub.com/Masterminds/semver v1.5.0 // indirect\ngithub.com/Masterminds/sprig v2.22.0+incompatible\n- github.com/alicebob/miniredis/v2 v2.14.1\ngithub.com/go-kit/kit v0.10.0\ngithub.com/go-logr/logr v0.3.0\ngithub.com/go-logr/zapr v0.3.0 // indirect\n"
},
{
"change_type": "MODIFY",
"old_path": "go.sum",
"new_path": "go.sum",
"diff": "@@ -112,10 +112,6 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy\ngithub.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=\ngithub.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\ngithub.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\n-github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a h1:HbKu58rmZpUGpz5+4FfNmIU+FmZg2P3Xaj2v2bfNWmk=\n-github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=\n-github.com/alicebob/miniredis/v2 v2.14.1 h1:GjlbSeoJ24bzdLRs13HoMEeaRZx9kg5nHoRW7QV/nCs=\n-github.com/alicebob/miniredis/v2 v2.14.1/go.mod h1:uS970Sw5Gs9/iK3yBg0l9Uj9s25wXxSpQUE9EaJ/Blg=\ngithub.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190726115642-cd293c93fd97/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ=\ngithub.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=\ngithub.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=\n@@ -1088,8 +1084,6 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:\ngithub.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\n-github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb h1:ZkM6LRnq40pR1Ox0hTHlnpkcOTuFIDQpZ1IN8rKKhX0=\n-github.com/yuin/gopher-lua v0.0.0-20191220021717-ab39c6098bdb/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ=\ngithub.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=\ngithub.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=\ngithub.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=\n@@ -1290,7 +1284,6 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h\ngolang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\n-golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\n"
},
{
"change_type": "DELETE",
"old_path": "pkg/cluster/controllers/cache/healthchecker.go",
"new_path": null,
"diff": "-package cache\n-\n-import (\n- \"context\"\n- \"fmt\"\n- \"strconv\"\n-\n- rediscli \"github.com/go-redis/redis\"\n- \"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n-)\n-\n-var _ lcm.HealthChecker = &RedisHealthChecker{}\n-\n-// RedisHealthChecker check health for redis service.\n-type RedisHealthChecker struct{}\n-\n-// CheckHealth implements lcm.HealthChecker.\n-func (c *RedisHealthChecker) CheckHealth(ctx context.Context, svc *lcm.ServiceConfig, options ...lcm.Option) (*lcm.CheckResponse, error) {\n- if svc == nil || svc.Endpoint == nil {\n- return nil, fmt.Errorf(\"serviceConfig or endpoint can not be nil\")\n- }\n- // apply options\n- checkOpts := &lcm.CheckOptions{}\n-\n- for _, o := range options {\n- o(checkOpts)\n- }\n-\n- var client *rediscli.Client\n- // build redis client\n- redisConn := &RedisConnect{\n- Endpoints: []string{svc.Endpoint.Host},\n- Port: strconv.Itoa(int(svc.Endpoint.Port)),\n- }\n- // check password\n- if svc.Credentials != nil {\n- redisConn.Password = svc.Credentials.AccessSecret\n- }\n- // check mode\n- if checkOpts.Sentinel {\n- redisConn.GroupName = RedisSentinelConnGroup\n- client = redisConn.NewRedisPool()\n- } else {\n- client = redisConn.NewRedisClient()\n- }\n-\n- defer client.Close()\n-\n- resp := &lcm.CheckResponse{}\n-\n- err := client.Ping().Err()\n- if err != nil {\n- resp.Status = lcm.UnHealthy\n- resp.Message = err.Error()\n-\n- return resp, err\n- }\n-\n- resp.Status = lcm.Healthy\n-\n- return resp, nil\n-}\n"
},
{
"change_type": "DELETE",
"old_path": "pkg/cluster/controllers/cache/healtherchecker_test.go",
"new_path": null,
"diff": "-package cache_test\n-\n-import (\n- \"context\"\n- \"fmt\"\n- \"net\"\n- \"strconv\"\n- \"testing\"\n-\n- \"github.com/alicebob/miniredis/v2\"\n- \"github.com/goharbor/harbor-operator/pkg/cluster/controllers/cache\"\n- \"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n- . \"github.com/onsi/ginkgo\"\n- . \"github.com/onsi/gomega\"\n-)\n-\n-func TestRedisHealthChecker(t *testing.T) {\n- t.Parallel()\n-\n- RegisterFailHandler(Fail)\n- RunSpecs(t, \"HealthChecker\")\n-}\n-\n-var _ = Describe(\"Test HealthChecker\", func() {\n- var (\n- checker lcm.HealthChecker\n- server *miniredis.Miniredis\n- err error\n- )\n-\n- BeforeSuite(func() {\n- checker = &cache.RedisHealthChecker{}\n- server, err = miniredis.Run()\n- if err != nil {\n- Fail(fmt.Errorf(\"mock redis server error: %w\", err).Error())\n- }\n- })\n-\n- AfterSuite(func() {\n- if server != nil {\n- server.Close()\n- }\n- })\n-\n- Context(\"Test CheckHealth\", func() {\n- It(\"bad address should return error\", func() {\n- config := &lcm.ServiceConfig{\n- Endpoint: &lcm.Endpoint{\n- Host: \"127.0.0.1\",\n- Port: 6379,\n- },\n- }\n- resp, err := checker.CheckHealth(context.TODO(), config)\n- Expect(err).ShouldNot(BeNil())\n- Expect(resp).ShouldNot(BeNil())\n- Expect(resp.Status).Should(Equal(lcm.UnHealthy))\n- })\n-\n- It(\"right address should check health successfully\", func() {\n- host, port, err := net.SplitHostPort(server.Addr())\n- Expect(err).To(BeNil())\n- p, err := strconv.Atoi(port)\n- Expect(err).To(BeNil())\n- config := &lcm.ServiceConfig{\n- Endpoint: &lcm.Endpoint{\n- Host: host,\n- Port: uint(p),\n- },\n- }\n- resp, err := checker.CheckHealth(context.TODO(), config)\n- Expect(err).Should(BeNil())\n- Expect(resp).ShouldNot(BeNil())\n- Expect(resp.Status).Should(Equal(lcm.Healthy))\n- })\n- })\n-})\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/redis.go",
"new_path": "pkg/cluster/controllers/cache/redis.go",
"diff": "@@ -53,10 +53,6 @@ type RedisController struct {\nexpectCR, actualCR runtime.Object\n}\n-func (rc *RedisController) HealthChecker() lcm.HealthChecker {\n- return &RedisHealthChecker{}\n-}\n-\n// Apply creates/updates/scales the resources, like kubernetes apply operation.\nfunc (rc *RedisController) Apply(ctx context.Context, cluster *goharborv1alpha2.HarborCluster) (*lcm.CRStatus, error) {\nrc.DClient.WithContext(ctx)\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
refactor: remove redis health check
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,881
|
09.02.2021 23:19:55
| -28,800
|
f47fe2513b89f4568b43b5ca6daff3289f5f8796
|
feat: inject s3 cert to harbor components(core, jobservice, trivy)
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/core_types.go",
"new_path": "apis/goharbor.io/v1alpha2/core_types.go",
"diff": "@@ -42,6 +42,8 @@ type CoreSpec struct {\n// https://github.com/goharbor/harbor/blob/master/src/common/config/metadata/metadatalist.go#L62\nCoreConfig `json:\",inline\"`\n+ CertificateInjection `json:\",inline\"`\n+\n// +kubebuilder:validation:Optional\nHTTP CoreHTTPSpec `json:\"http,omitempty\"`\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harbor_types.go",
"new_path": "apis/goharbor.io/v1alpha2/harbor_types.go",
"diff": "@@ -2,6 +2,8 @@ package v1alpha2\nimport (\n\"fmt\"\n+ \"path\"\n+ \"strings\"\nharbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\ncmmeta \"github.com/jetstack/cert-manager/pkg/apis/meta/v1\"\n@@ -209,6 +211,8 @@ func (r *HarborComponentsSpec) RedisConnection(component harbormetav1.ComponentW\ntype CoreComponentSpec struct {\nharbormetav1.ComponentSpec `json:\",inline\"`\n+ CertificateInjection `json:\",inline\"`\n+\n// +kubebuilder:validation:Required\nTokenIssuer cmmeta.ObjectReference `json:\"tokenIssuer,omitempty\"`\n}\n@@ -216,6 +220,8 @@ type CoreComponentSpec struct {\ntype JobServiceComponentSpec struct {\nharbormetav1.ComponentSpec `json:\",inline\"`\n+ CertificateInjection `json:\",inline\"`\n+\n// +kubebuilder:validation:Optional\n// +kubebuilder:validation:Minimum=1\n// +kubebuilder:default=10\n@@ -246,6 +252,8 @@ type ChartMuseumComponentSpec struct {\ntype TrivyComponentSpec struct {\nharbormetav1.ComponentSpec `json:\",inline\"`\n+ CertificateInjection `json:\",inline\"`\n+\n// +kubebuilder:validation:Optional\n// The name of the secret containing the token to connect to GitHub API.\nGithubTokenRef string `json:\"githubTokenRef,omitempty\"`\n@@ -503,6 +511,49 @@ type HarborExposeIngressSpec struct {\nAnnotations map[string]string `json:\"annotations,omitempty\"`\n}\n+// CertificateInjection defines the certs injection.\n+type CertificateInjection struct {\n+ // +kubebuilder:validation:Optional\n+ CertificateRefs []string `json:\"certificateRefs,omitempty\"`\n+}\n+\n+// ShouldInject returns whether should inject certs.\n+func (ci CertificateInjection) ShouldInject() bool {\n+ return len(ci.CertificateRefs) > 0\n+}\n+\n+// GenerateVolumes generates volumes.\n+func (ci CertificateInjection) GenerateVolumes() []corev1.Volume {\n+ volumes := make([]corev1.Volume, 0, len(ci.CertificateRefs))\n+ for _, ref := range ci.CertificateRefs {\n+ volumes = append(volumes, corev1.Volume{\n+ Name: fmt.Sprintf(\"%s-certifacts\", ref),\n+ VolumeSource: corev1.VolumeSource{\n+ Secret: &corev1.SecretVolumeSource{\n+ SecretName: ref,\n+ },\n+ },\n+ })\n+ }\n+\n+ return volumes\n+}\n+\n+// GenerateVolumeMounts generates volumeMounts.\n+func (ci CertificateInjection) GenerateVolumeMounts() []corev1.VolumeMount {\n+ volumeMounts := make([]corev1.VolumeMount, 0, len(ci.CertificateRefs))\n+ for _, ref := range ci.CertificateRefs {\n+ volumeMounts = append(volumeMounts, corev1.VolumeMount{\n+ Name: fmt.Sprintf(\"%s-certifacts\", ref),\n+ MountPath: path.Join(\"/harbor_cust_cert\", fmt.Sprintf(\"%s.crt\", ref)),\n+ SubPath: strings.TrimLeft(corev1.ServiceAccountRootCAKey, \"/\"),\n+ ReadOnly: true,\n+ })\n+ }\n+\n+ return volumeMounts\n+}\n+\nfunc init() { // nolint:gochecknoinits\nSchemeBuilder.Register(&Harbor{}, &HarborList{})\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/jobservice_types.go",
"new_path": "apis/goharbor.io/v1alpha2/jobservice_types.go",
"diff": "@@ -42,6 +42,8 @@ type JobServiceList struct {\ntype JobServiceSpec struct {\nharbormetav1.ComponentSpec `json:\",inline\"`\n+ CertificateInjection `json:\",inline\"`\n+\n// +kubebuilder:validation:Required\n// +kubebuilder:validation:Pattern=\"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\"\nSecretRef string `json:\"secretRef\"`\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/trivy_types.go",
"new_path": "apis/goharbor.io/v1alpha2/trivy_types.go",
"diff": "@@ -45,6 +45,8 @@ type TrivySpec struct {\nharbormetav1.TrivySeverityTypes `json:\",inline\"`\n+ CertificateInjection `json:\",inline\"`\n+\n// +kubebuilder:validation:Optional\n// +kubebuilder:default={\"level\":\"info\"}\nLog TrivyLogSpec `json:\"log,omitempty\"`\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/zz_generated.deepcopy.go",
"new_path": "apis/goharbor.io/v1alpha2/zz_generated.deepcopy.go",
"diff": "@@ -31,6 +31,26 @@ func (in *Cache) DeepCopy() *Cache {\nreturn out\n}\n+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n+func (in *CertificateInjection) DeepCopyInto(out *CertificateInjection) {\n+ *out = *in\n+ if in.CertificateRefs != nil {\n+ in, out := &in.CertificateRefs, &out.CertificateRefs\n+ *out = make([]string, len(*in))\n+ copy(*out, *in)\n+ }\n+}\n+\n+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateInjection.\n+func (in *CertificateInjection) DeepCopy() *CertificateInjection {\n+ if in == nil {\n+ return nil\n+ }\n+ out := new(CertificateInjection)\n+ in.DeepCopyInto(out)\n+ return out\n+}\n+\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *ChartMuseum) DeepCopyInto(out *ChartMuseum) {\n*out = *in\n@@ -480,6 +500,7 @@ func (in *CoreComponentPortalSpec) DeepCopy() *CoreComponentPortalSpec {\nfunc (in *CoreComponentSpec) DeepCopyInto(out *CoreComponentSpec) {\n*out = *in\nin.ComponentSpec.DeepCopyInto(&out.ComponentSpec)\n+ in.CertificateInjection.DeepCopyInto(&out.CertificateInjection)\nout.TokenIssuer = in.TokenIssuer\n}\n@@ -818,6 +839,7 @@ func (in *CoreSpec) DeepCopyInto(out *CoreSpec) {\n*out = *in\nin.ComponentSpec.DeepCopyInto(&out.ComponentSpec)\nout.CoreConfig = in.CoreConfig\n+ in.CertificateInjection.DeepCopyInto(&out.CertificateInjection)\nin.HTTP.DeepCopyInto(&out.HTTP)\nin.Components.DeepCopyInto(&out.Components)\nif in.Proxy != nil {\n@@ -1447,6 +1469,7 @@ func (in *JobService) DeepCopyObject() runtime.Object {\nfunc (in *JobServiceComponentSpec) DeepCopyInto(out *JobServiceComponentSpec) {\n*out = *in\nin.ComponentSpec.DeepCopyInto(&out.ComponentSpec)\n+ in.CertificateInjection.DeepCopyInto(&out.CertificateInjection)\n}\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobServiceComponentSpec.\n@@ -1654,6 +1677,7 @@ func (in *JobServicePoolSpec) DeepCopy() *JobServicePoolSpec {\nfunc (in *JobServiceSpec) DeepCopyInto(out *JobServiceSpec) {\n*out = *in\nin.ComponentSpec.DeepCopyInto(&out.ComponentSpec)\n+ in.CertificateInjection.DeepCopyInto(&out.CertificateInjection)\nif in.TLS != nil {\nin, out := &in.TLS, &out.TLS\n*out = new(v1alpha1.ComponentsTLSSpec)\n@@ -3544,6 +3568,7 @@ func (in *Trivy) DeepCopyObject() runtime.Object {\nfunc (in *TrivyComponentSpec) DeepCopyInto(out *TrivyComponentSpec) {\n*out = *in\nin.ComponentSpec.DeepCopyInto(&out.ComponentSpec)\n+ in.CertificateInjection.DeepCopyInto(&out.CertificateInjection)\nin.Storage.DeepCopyInto(&out.Storage)\n}\n@@ -3753,6 +3778,7 @@ func (in *TrivySpec) DeepCopyInto(out *TrivySpec) {\nin.ComponentSpec.DeepCopyInto(&out.ComponentSpec)\nin.TrivyVulnerabilityTypes.DeepCopyInto(&out.TrivyVulnerabilityTypes)\nin.TrivySeverityTypes.DeepCopyInto(&out.TrivySeverityTypes)\n+ in.CertificateInjection.DeepCopyInto(&out.CertificateInjection)\nout.Log = in.Log\nin.Server.DeepCopyInto(&out.Server)\nout.Update = in.Update\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/core/deployments.go",
"new_path": "controllers/goharbor/core/deployments.go",
"diff": "@@ -123,6 +123,12 @@ func (r *Reconciler) GetDeployment(ctx context.Context, core *goharborv1alpha2.C\nSubPath: strings.TrimLeft(corev1.TLSPrivateKeyKey, \"/\"),\n}}\n+ // inject certs if need.\n+ if core.Spec.CertificateInjection.ShouldInject() {\n+ volumes = append(volumes, core.Spec.CertificateInjection.GenerateVolumes()...)\n+ volumeMounts = append(volumeMounts, core.Spec.CertificateInjection.GenerateVolumeMounts()...)\n+ }\n+\nscheme := \"http\"\nif core.Spec.Components.TLS.Enabled() {\nscheme = \"https\"\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/core.go",
"new_path": "controllers/goharbor/harbor/core.go",
"diff": "@@ -458,6 +458,7 @@ func (r *Reconciler) GetCore(ctx context.Context, harbor *goharborv1alpha2.Harbo\nRedisConnection: coreRedis,\n},\nProxy: harbor.Spec.Proxy,\n+ CertificateInjection: harbor.Spec.Core.CertificateInjection,\n},\n}, nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/jobservice.go",
"new_path": "controllers/goharbor/harbor/jobservice.go",
"diff": "@@ -190,6 +190,7 @@ func (r *Reconciler) GetJobService(ctx context.Context, harbor *goharborv1alpha2\n},\nSecretRef: secretRef,\nTLS: tls,\n+ CertificateInjection: harbor.Spec.JobService.CertificateInjection,\n},\n}, nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/trivy.go",
"new_path": "controllers/goharbor/harbor/trivy.go",
"diff": "@@ -159,6 +159,7 @@ func (r *Reconciler) GetTrivy(ctx context.Context, harbor *goharborv1alpha2.Harb\nSkip: harbor.Spec.Trivy.SkipUpdate,\nGithubTokenRef: githubTokenRef,\n},\n+ CertificateInjection: harbor.Spec.Trivy.CertificateInjection,\n},\n}, nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/jobservice/deployments.go",
"new_path": "controllers/goharbor/jobservice/deployments.go",
"diff": "@@ -127,6 +127,12 @@ func (r *Reconciler) GetDeployment(ctx context.Context, jobservice *goharborv1al\nName: LogsVolumeName,\n}}\n+ // inject s3 cert if need.\n+ if jobservice.Spec.CertificateInjection.ShouldInject() {\n+ volumes = append(volumes, jobservice.Spec.CertificateInjection.GenerateVolumes()...)\n+ volumeMounts = append(volumeMounts, jobservice.Spec.CertificateInjection.GenerateVolumeMounts()...)\n+ }\n+\nif jobservice.Spec.TLS.Enabled() {\nenvs = append(envs, corev1.EnvVar{\nName: \"INTERNAL_TLS_TRUST_CA_PATH\",\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/trivy/deployments.go",
"new_path": "controllers/goharbor/trivy/deployments.go",
"diff": "@@ -91,6 +91,12 @@ func (r *Reconciler) GetDeployment(ctx context.Context, trivy *goharborv1alpha2.\nReadOnly: false,\n}}\n+ // inject s3 cert if need.\n+ if trivy.Spec.CertificateInjection.ShouldInject() {\n+ volumes = append(volumes, trivy.Spec.CertificateInjection.GenerateVolumes()...)\n+ volumesMount = append(volumesMount, trivy.Spec.CertificateInjection.GenerateVolumeMounts()...)\n+ }\n+\nfor i, ref := range trivy.Spec.Server.TokenServiceCertificateAuthorityRefs {\nvolumeName := fmt.Sprintf(\"%s-%d\", PublicCertificatesVolumeName, i)\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/harbor/harbor.go",
"new_path": "pkg/cluster/controllers/harbor/harbor.go",
"diff": "@@ -142,6 +142,9 @@ func (harbor *Controller) getHarborCR(harborcluster *v1alpha2.HarborCluster) *v1\nharborCR.Spec.ImageChartStorage.Redirect.Disable = !harborcluster.Spec.InClusterStorage.MinIOSpec.Redirect.Enable\n}\n+ // inject cert to harbor comps\n+ injectS3CertToHarborComponents(harborCR)\n+\nreturn harborCR\n}\n@@ -226,3 +229,20 @@ func harborClusterCRStatus(harbor *v1alpha2.Harbor) *lcm.CRStatus {\nreturn harborReadyStatus\n}\n+\n+// injectS3CertToHarborComponents injects s3 cert to harbor spec.\n+func injectS3CertToHarborComponents(harbor *v1alpha2.Harbor) {\n+ if storage := harbor.Spec.ImageChartStorage; storage != nil {\n+ if storage.S3 != nil && storage.S3.CertificateRef != \"\" {\n+ certRef := storage.S3.CertificateRef\n+ // inject cert to component core\n+ harbor.Spec.Core.CertificateRefs = append(harbor.Spec.Core.CertificateRefs, certRef)\n+ // inject cert to component jobservice\n+ harbor.Spec.JobService.CertificateRefs = append(harbor.Spec.JobService.CertificateRefs, certRef)\n+ // inject cert to component trivy\n+ if harbor.Spec.Trivy != nil {\n+ harbor.Spec.Trivy.CertificateRefs = append(harbor.Spec.Trivy.CertificateRefs, certRef)\n+ }\n+ }\n+ }\n+}\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat: inject s3 cert to harbor components(core, jobservice, trivy)
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,870
|
01.03.2021 21:30:32
| -28,800
|
6be55087758c2a3fdd48cb9eee62a4e4b697c032
|
refactor: remove pg health check
|
[
{
"change_type": "DELETE",
"old_path": "pkg/cluster/controllers/database/healthchecker.go",
"new_path": null,
"diff": "-package database\n-\n-import (\n- \"context\"\n- \"fmt\"\n- \"strconv\"\n-\n- \"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n- \"github.com/jackc/pgx/v4\"\n-)\n-\n-var _ lcm.HealthChecker = &PostgreSQLHealthChecker{}\n-\n-// PostgreSQLHealthChecker check health for postgresql service.\n-type PostgreSQLHealthChecker struct{}\n-\n-// CheckHealth implements lcm.HealthChecker.\n-func (p *PostgreSQLHealthChecker) CheckHealth(ctx context.Context, svc *lcm.ServiceConfig, options ...lcm.Option) (*lcm.CheckResponse, error) {\n- if svc == nil || svc.Endpoint == nil {\n- return nil, fmt.Errorf(\"serviceConfig or endpoint can not be nil\")\n- }\n- // apply options\n- checkOpts := &lcm.CheckOptions{}\n-\n- for _, o := range options {\n- o(checkOpts)\n- }\n-\n- var (\n- client *pgx.Conn\n- err error\n- )\n-\n- conn := Connect{\n- Host: svc.Endpoint.Host,\n- Port: strconv.Itoa(int(svc.Endpoint.Port)),\n- Database: InClusterDatabaseName,\n- }\n-\n- if svc.Credentials != nil {\n- conn.Password = svc.Credentials.AccessSecret\n- conn.Username = svc.Credentials.AccessKey\n- }\n-\n- url := conn.GenDatabaseURL()\n- resp := &lcm.CheckResponse{}\n-\n- client, err = pgx.Connect(ctx, url)\n- if err != nil {\n- return nil, err\n- }\n-\n- defer client.Close(ctx)\n-\n- if err := client.Ping(ctx); err != nil {\n- resp.Status = lcm.UnHealthy\n- resp.Message = err.Error()\n-\n- return resp, err\n- }\n-\n- resp.Status = lcm.Healthy\n-\n- return resp, nil\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/postgresql.go",
"new_path": "pkg/cluster/controllers/database/postgresql.go",
"diff": "@@ -35,10 +35,6 @@ type Connect struct {\nDatabase string\n}\n-func (p *PostgreSQLController) HealthChecker() lcm.HealthChecker {\n- return &PostgreSQLHealthChecker{}\n-}\n-\nfunc (p *PostgreSQLController) Apply(ctx context.Context, harborcluster *goharborv1alpha2.HarborCluster) (*lcm.CRStatus, error) {\np.DClient.WithContext(ctx)\np.Client.WithContext(ctx)\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/readiness.go",
"new_path": "pkg/cluster/controllers/database/readiness.go",
"diff": "@@ -44,27 +44,16 @@ const (\nfunc (p *PostgreSQLController) Readiness(ctx context.Context) (*lcm.CRStatus, error) {\nvar (\nconn *Connect\n- client *pgx.Conn\nerr error\n)\nname := p.HarborCluster.Name\n- conn, client, err = p.GetInClusterDatabaseInfo(ctx)\n+ conn, _, err = p.GetInClusterDatabaseInfo(ctx)\nif err != nil {\nreturn nil, err\n}\n- defer client.Close(ctx)\n-\n- if err := client.Ping(ctx); err != nil {\n- p.Log.Error(err, \"Fail to check Database.\",\n- \"namespace\", p.HarborCluster.Namespace,\n- \"name\", p.HarborCluster.Name)\n-\n- return nil, err\n- }\n-\np.Log.Info(\"Database already ready.\",\n\"namespace\", p.HarborCluster.Namespace,\n\"name\", p.HarborCluster.Name)\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
refactor: remove pg health check
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,875
|
09.02.2021 21:22:33
| -28,800
|
b9a8143348866aedbb4beeac2ca4e0bb36228ec7
|
feat(ci) enable more golint
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -9,6 +9,7 @@ on:\n- master\n- release-*\n- develop\n+ - feature/*\njobs:\n# Dockerfile tests\n"
},
{
"change_type": "MODIFY",
"old_path": ".golangci.yml",
"new_path": ".golangci.yml",
"diff": "@@ -17,8 +17,10 @@ linters:\n- dogsled\n- dupl\n- errcheck\n+ - errorlint\n- exhaustive\n- exportloopref\n+ - funlen\n- gci\n- gochecknoinits\n- gocognit\n@@ -26,13 +28,16 @@ linters:\n- gocritic\n- gocyclo\n- godot\n+ - goerr113\n- gofmt\n- gofumpt\n- goheader\n- goimports\n- golint\n+ - gomnd\n- gomodguard\n- goprintffuncname\n+ - gosec\n- gosimple\n- govet\n- ineffassign\n@@ -40,6 +45,7 @@ linters:\n- maligned\n- misspell\n- nakedret\n+ - nestif\n- nlreturn\n- noctx\n- nolintlint\n@@ -66,12 +72,12 @@ linters:\n- godox\n- paralleltest\n- wrapcheck\n- - errorlint\n- - goerr113\n- - gomnd\n- - nestif\n- - funlen\n- - gosec\n+# - errorlint\n+# - goerr113\n+# - gomnd\n+# - nestif\n+# - funlen\n+# - gosec\nservice:\ngolangci-lint-version: 1.33.x\n"
},
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -205,7 +205,7 @@ dist/harbor-operator_linux_amd64/manager:\n# Run go linters\n.PHONY: go-lint\ngo-lint: golangci-lint vet go-generate\n- $(GOLANGCI_LINT) run --verbose --max-same-issues 0 --sort-results -D wrapcheck -D exhaustivestruct -D errorlint -D goerr113 -D gomnd -D nestif -D funlen -D gosec\n+ $(GOLANGCI_LINT) run --verbose --max-same-issues 0 --sort-results\n# Run go fmt against code\n.PHONY: fmt\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(ci) enable more golint
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,875
|
24.02.2021 10:26:12
| -28,800
|
9b54327e32fe2a220b3bd55d44069326e16acb01
|
enable errorlint
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/harborcluster.go",
"new_path": "controllers/goharbor/harborcluster/harborcluster.go",
"diff": "@@ -55,9 +55,10 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res ctrl.Result, err error) {\nr.Log.Info(\"suggest client delay\", \"seconds\", sec)\n}\n- er = fmt.Errorf(\"defer: update status error: %s\", er)\n+ er = fmt.Errorf(\"defer: update status error: %w\", er)\nif err != nil {\n+ // nolint:errorlint\nerr = fmt.Errorf(\"%s, upstreaming error: %w\", er.Error(), err)\n} else {\nerr = er\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
enable errorlint
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,875
|
24.02.2021 15:07:02
| -28,800
|
c9a15e5204980e1e6c549d108e495f5a7abe7c4c
|
enable gomnd
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/configuration/reconciler.go",
"new_path": "controllers/goharbor/configuration/reconciler.go",
"diff": "@@ -120,7 +120,7 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res ctrl.Result, err error) {\nreturn ctrl.Result{}, fmt.Errorf(\"get harbor cluster cr error: %w\", err)\n}\n- log.V(5).Info(\"Get configmap and harbor cluster cr successfully\", \"configmap\", cm, \"harborcluster\", cluster)\n+ log.Info(\"Get configmap and harbor cluster cr successfully\", \"configmap\", cm, \"harborcluster\", cluster)\ndefer func() {\nlog.Info(\"Reconcile end\", \"result\", res, \"error\", err, \"updateStatusErr\", r.UpdateStatus(ctx, err, cluster))\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/harborcluster.go",
"new_path": "controllers/goharbor/harborcluster/harborcluster.go",
"diff": "@@ -11,9 +11,14 @@ import (\nctrl \"sigs.k8s.io/controller-runtime\"\n)\n+const (\n+ DefaultWaitCycleTime = 10\n+ ErrorWaitCycle = 5\n+)\n+\nvar (\n- defaultWaitCycle = ctrl.Result{RequeueAfter: 10 * time.Second}\n- errorWaitCycle = ctrl.Result{RequeueAfter: 5 * time.Second}\n+ defaultWaitCycle = ctrl.Result{RequeueAfter: DefaultWaitCycleTime * time.Second}\n+ errorWaitCycle = ctrl.Result{RequeueAfter: ErrorWaitCycle * time.Second}\n)\n// Reconcile logic of the HarborCluster.\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/status.go",
"new_path": "controllers/goharbor/harborcluster/status.go",
"diff": "@@ -28,6 +28,9 @@ import (\n\"sigs.k8s.io/controller-runtime/pkg/client\"\n)\n+const(\n+ TotalDependencyNum = 4\n+)\n// status is designed to track the status and conditions of the deploying Harbor cluster.\ntype status struct {\nclient.Client\n@@ -198,7 +201,7 @@ func (s *status) overallStatus() goharborv1.ClusterStatus {\n}\n// Totally ready\n- if ready == 4 {\n+ if ready >= TotalDependencyNum {\nreturn goharborv1.StatusHealthy\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/redis_connect.go",
"new_path": "pkg/cluster/controllers/cache/redis_connect.go",
"diff": "@@ -47,16 +47,23 @@ func (c *RedisConnect) NewRedisClient() *rediscli.Client {\nfunc BuildRedisPool(redisSentinelIP []string, redisSentinelPort, redisSentinelPassword, redisGroupName string, redisIndex int) *rediscli.Client {\nsentinelsInfo := GenHostInfo(redisSentinelIP, redisSentinelPort)\n+ const (\n+ PoolSize = 100\n+ DialTimeout = 10\n+ ReadTimeout = 30\n+ WriteTimeout = 30\n+ PoolTimeout = 30\n+ )\noptions := &rediscli.FailoverOptions{\nMasterName: redisGroupName,\nSentinelAddrs: sentinelsInfo,\nPassword: redisSentinelPassword,\nDB: redisIndex,\n- PoolSize: 100,\n- DialTimeout: 10 * time.Second,\n- ReadTimeout: 30 * time.Second,\n- WriteTimeout: 30 * time.Second,\n- PoolTimeout: 30 * time.Second,\n+ PoolSize: PoolSize,\n+ DialTimeout: DialTimeout * time.Second,\n+ ReadTimeout: ReadTimeout * time.Second,\n+ WriteTimeout: WriteTimeout * time.Second,\n+ PoolTimeout: PoolTimeout * time.Second,\nIdleTimeout: time.Millisecond,\nIdleCheckFrequency: time.Millisecond,\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/resource_manager.go",
"new_path": "pkg/cluster/controllers/cache/resource_manager.go",
"diff": "@@ -133,7 +133,8 @@ func (rm *redisResourceManager) GetSecretName() string {\n// GetSecret gets redis secret.\nfunc (rm *redisResourceManager) GetSecret() *corev1.Secret {\nname := rm.GetSecretName()\n- passStr := common.RandomString(8, \"a\")\n+ const SecretLen = 8\n+ passStr := common.RandomString(SecretLen, \"a\")\nreturn &corev1.Secret{\nObjectMeta: metav1.ObjectMeta{\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/utils.go",
"new_path": "pkg/cluster/controllers/database/utils.go",
"diff": "@@ -158,14 +158,14 @@ func (p *PostgreSQLController) GetPosgresMaxConnections() string {\nif err != nil {\nif !config.IsNotFound(err, ConfigMaxConnectionsKey) {\n// Just logged\n- p.Log.V(5).Error(err, \"failed to get database max connections\")\n+ p.Log.Error(err, \"failed to get database max connections\")\n}\nmaxConnections = DefaultDatabaseMaxConnections\n}\nif _, err := strconv.ParseInt(maxConnections, 10, 64); err != nil {\n- p.Log.V(5).Error(err, \"%s is not a valid number for postgres max connections\", maxConnections)\n+ p.Log.Error(err, \"%s is not a valid number for postgres max connections\", maxConnections)\nmaxConnections = DefaultDatabaseMaxConnections\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/minio.go",
"new_path": "pkg/cluster/controllers/storage/minio.go",
"diff": "@@ -24,10 +24,10 @@ const (\nDefaultCredsSecret = \"creds\"\nDefaultPrefix = \"minio-\"\n-\nDefaultZone = \"zone-harbor\"\nDefaultRegion = \"us-east-1\"\nDefaultBucket = \"harbor\"\n+ DefaultServicePort = 9000\n)\ntype MinIOController struct {\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/provision.go",
"new_path": "pkg/cluster/controllers/storage/provision.go",
"diff": "@@ -246,6 +246,8 @@ func (m *MinIOController) generateMinIOCR(ctx context.Context, harborcluster *go\nreturn nil, err\n}\n+ const LivenessDelay = 120\n+ const LivenessPeriod = 60\nreturn &minio.Tenant{\nTypeMeta: metav1.TypeMeta{\nKind: minio.MinIOCRDResourceKind,\n@@ -301,8 +303,8 @@ func (m *MinIOController) generateMinIOCR(ctx context.Context, harborcluster *go\n},\n},\nLiveness: &minio.Liveness{\n- InitialDelaySeconds: 120,\n- PeriodSeconds: 60,\n+ InitialDelaySeconds: LivenessDelay,\n+ PeriodSeconds: LivenessPeriod,\n},\n},\n}, nil\n@@ -313,7 +315,7 @@ func (m *MinIOController) getServiceName() string {\n}\nfunc (m *MinIOController) getServicePort() int32 {\n- return 9000\n+ return DefaultServicePort\n}\nfunc (m *MinIOController) getResourceRequirements() *corev1.ResourceRequirements {\n@@ -386,7 +388,7 @@ func (m *MinIOController) generateService() *corev1.Service {\n{\nName: \"minio\",\nPort: m.getServicePort(),\n- TargetPort: intstr.FromInt(9000),\n+ TargetPort: intstr.FromInt(DefaultServicePort),\nProtocol: corev1.ProtocolTCP,\n},\n},\n@@ -395,8 +397,9 @@ func (m *MinIOController) generateService() *corev1.Service {\n}\nfunc (m *MinIOController) generateCredsSecret() *corev1.Secret {\n- credsAccesskey := common.RandomString(8, \"a\")\n- credsSecretkey := common.RandomString(8, \"a\")\n+ const SecretLen = 8\n+ credsAccesskey := common.RandomString(SecretLen, \"a\")\n+ credsSecretkey := common.RandomString(SecretLen, \"a\")\nreturn &corev1.Secret{\nTypeMeta: metav1.TypeMeta{\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/status/status.go",
"new_path": "pkg/status/status.go",
"diff": "@@ -56,7 +56,7 @@ func UpdateCondition(ctx context.Context, conditions []interface{}, conditionTyp\ncase 0:\ncase 1:\nreason = reasons[0]\n- case 2:\n+ case 2: // nolint:gomnd\nreason = reasons[0]\nmessage = reasons[1]\ndefault:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
enable gomnd
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,875
|
24.02.2021 15:15:03
| -28,800
|
646381091453f73c9eee500e6631715c7be60427
|
enable funlen
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/ingresses.go",
"new_path": "controllers/goharbor/harbor/ingresses.go",
"diff": "@@ -261,6 +261,7 @@ func (err ErrInvalidIngressController) Error() string {\nreturn fmt.Sprintf(\"controller %s unsupported\", err.Controller)\n}\n+// nolint:funlen\nfunc (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharborv1alpha2.Harbor, core, portal netv1.IngressBackend) (*netv1.IngressRuleValue, error) {\nswitch harbor.Spec.Expose.Core.Ingress.Controller {\ncase harbormetav1.IngressControllerDefault:\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/harborcluster.go",
"new_path": "controllers/goharbor/harborcluster/harborcluster.go",
"diff": "@@ -22,6 +22,7 @@ var (\n)\n// Reconcile logic of the HarborCluster.\n+// nolint:funlen\nfunc (r *Reconciler) Reconcile(req ctrl.Request) (res ctrl.Result, err error) {\nctx := context.TODO()\nlog := r.Log.WithValues(\"resource\", req.NamespacedName)\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/service_mgr.go",
"new_path": "controllers/goharbor/harborcluster/service_mgr.go",
"diff": "@@ -86,6 +86,7 @@ func (s *ServiceManager) WithConfig(svcCfgGetter svcConfigGetter) *ServiceManage\n}\n// Apply changes.\n+// nolint:funlen\nfunc (s *ServiceManager) Apply() error {\nif err := s.validate(); err != nil {\nreturn err\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/svc_config.go",
"new_path": "controllers/goharbor/harborcluster/svc_config.go",
"diff": "@@ -115,6 +115,7 @@ func dbConfigGetter(ctx context.Context, kubeClient k8s.Client, cluster *v1alpha\n}\n// storageConfigGetter is for getting configurations of storage service.\n+// nolint:funlen\nfunc storageConfigGetter(ctx context.Context, kubeClient k8s.Client, cluster *v1alpha2.HarborCluster) (*lcm.ServiceConfig, []lcm.Option, error) {\nswitch {\ncase cluster.Spec.ImageChartStorage.S3 != nil:\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/minio.go",
"new_path": "pkg/cluster/controllers/storage/minio.go",
"diff": "@@ -69,6 +69,7 @@ func NewMinIOController(ctx context.Context, options ...k8s.Option) lcm.Controll\n}\n// Reconciler implements the reconcile logic of minIO service.\n+// nolint:funlen\nfunc (m *MinIOController) Apply(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*lcm.CRStatus, error) {\nvar minioCR minio.Tenant\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/provision.go",
"new_path": "pkg/cluster/controllers/storage/provision.go",
"diff": "@@ -240,6 +240,7 @@ func (m *MinIOController) generateIngress() (*netv1.Ingress, error) {\n}, err\n}\n+// nolint:funlen\nfunc (m *MinIOController) generateMinIOCR(ctx context.Context, harborcluster *goharborv1alpha2.HarborCluster) (*minio.Tenant, error) {\nimage, err := m.GetImage(ctx, harborcluster)\nif err != nil {\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
enable funlen
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,875
|
24.02.2021 16:06:50
| -28,800
|
7f5bcef30f5a34e6ae525ee6bfd2851b5763df98
|
enable wsl
|
[
{
"change_type": "MODIFY",
"old_path": ".golangci.yml",
"new_path": ".golangci.yml",
"diff": "@@ -28,7 +28,7 @@ linters:\n- gocritic\n- gocyclo\n- godot\n- - goerr113\n+# - goerr113\n- gofmt\n- gofumpt\n- goheader\n@@ -73,7 +73,7 @@ linters:\n- paralleltest\n- wrapcheck\n# - errorlint\n-# - goerr113\n+ - goerr113\n# - gomnd\n# - nestif\n# - funlen\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/ingresses.go",
"new_path": "controllers/goharbor/harbor/ingresses.go",
"diff": "@@ -145,7 +145,7 @@ func (r *Reconciler) GetNotaryServerIngress(ctx context.Context, harbor *goharbo\n}, nil\n}\n-func (r *Reconciler) GetNotaryIngressRules(ctx context.Context, harbor *goharborv1alpha2.Harbor) ([]netv1.IngressRule, error) { // nolint:funlen\n+func (r *Reconciler) GetNotaryIngressRules(ctx context.Context, harbor *goharborv1alpha2.Harbor) ([]netv1.IngressRule, error) {\nvar ingressRuleValue netv1.IngressRuleValue\nbackend := netv1.IngressBackend{\n@@ -261,8 +261,7 @@ func (err ErrInvalidIngressController) Error() string {\nreturn fmt.Sprintf(\"controller %s unsupported\", err.Controller)\n}\n-// nolint:funlen\n-func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharborv1alpha2.Harbor, core, portal netv1.IngressBackend) (*netv1.IngressRuleValue, error) {\n+func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharborv1alpha2.Harbor, core, portal netv1.IngressBackend) (*netv1.IngressRuleValue, error) { // nolint:funlen\nswitch harbor.Spec.Expose.Core.Ingress.Controller {\ncase harbormetav1.IngressControllerDefault:\nreturn &netv1.IngressRuleValue{\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/harborcluster.go",
"new_path": "controllers/goharbor/harborcluster/harborcluster.go",
"diff": "@@ -22,8 +22,7 @@ var (\n)\n// Reconcile logic of the HarborCluster.\n-// nolint:funlen\n-func (r *Reconciler) Reconcile(req ctrl.Request) (res ctrl.Result, err error) {\n+func (r *Reconciler) Reconcile(req ctrl.Request) (res ctrl.Result, err error) { // nolint:funlen\nctx := context.TODO()\nlog := r.Log.WithValues(\"resource\", req.NamespacedName)\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/service_mgr.go",
"new_path": "controllers/goharbor/harborcluster/service_mgr.go",
"diff": "@@ -86,8 +86,7 @@ func (s *ServiceManager) WithConfig(svcCfgGetter svcConfigGetter) *ServiceManage\n}\n// Apply changes.\n-// nolint:funlen\n-func (s *ServiceManager) Apply() error {\n+func (s *ServiceManager) Apply() error { // nolint:funlen\nif err := s.validate(); err != nil {\nreturn err\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/status.go",
"new_path": "controllers/goharbor/harborcluster/status.go",
"diff": "@@ -28,10 +28,6 @@ import (\n\"sigs.k8s.io/controller-runtime/pkg/client\"\n)\n-const (\n- TotalDependencyNum = 4\n-)\n-\n// status is designed to track the status and conditions of the deploying Harbor cluster.\ntype status struct {\nclient.Client\n@@ -202,6 +198,7 @@ func (s *status) overallStatus() goharborv1.ClusterStatus {\n}\n// Totally ready\n+ const TotalDependencyNum = 4\nif ready >= TotalDependencyNum {\nreturn goharborv1.StatusHealthy\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/svc_config.go",
"new_path": "controllers/goharbor/harborcluster/svc_config.go",
"diff": "@@ -115,8 +115,7 @@ func dbConfigGetter(ctx context.Context, kubeClient k8s.Client, cluster *v1alpha\n}\n// storageConfigGetter is for getting configurations of storage service.\n-// nolint:funlen\n-func storageConfigGetter(ctx context.Context, kubeClient k8s.Client, cluster *v1alpha2.HarborCluster) (*lcm.ServiceConfig, []lcm.Option, error) {\n+func storageConfigGetter(ctx context.Context, kubeClient k8s.Client, cluster *v1alpha2.HarborCluster) (*lcm.ServiceConfig, []lcm.Option, error) { // nolint:funlen\nswitch {\ncase cluster.Spec.ImageChartStorage.S3 != nil:\naccessSecret, err := getAccessSecret(kubeClient, cluster.Spec.ImageChartStorage.S3.SecretKeyRef, cluster.Namespace)\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/constants.go",
"new_path": "pkg/cluster/controllers/cache/constants.go",
"diff": "@@ -5,8 +5,7 @@ const (\nErrorCheckRedisHealth = \"Check redis health error\"\nErrorGenerateRedisCr = \"Generate redis cr error\"\nErrorSetOwnerReference = \"Set owner reference error\"\n- // nolint:gosec\n- ErrorCreateRedisSecret = \"Create redis secret error\"\n+ ErrorCreateRedisSecret = \"Create redis secret error\" // nolint:gosec\nErrorCreateRedisCr = \"Create redis cr error\"\nErrorDefaultUnstructuredConverter = \"Default unstructured converter error\"\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/readiness.go",
"new_path": "pkg/cluster/controllers/cache/readiness.go",
"diff": "@@ -169,6 +169,7 @@ func (rc *RedisController) GetSentinelServiceURL(name, namespace string, pods []\nif err != nil {\npanic(err)\n}\n+\nrandomPod := pods[n.Int64()]\nurl = randomPod.Status.PodIP\n} else {\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/redis_connect.go",
"new_path": "pkg/cluster/controllers/cache/redis_connect.go",
"diff": "@@ -54,6 +54,7 @@ func BuildRedisPool(redisSentinelIP []string, redisSentinelPort, redisSentinelPa\nWriteTimeout = 30\nPoolTimeout = 30\n)\n+\noptions := &rediscli.FailoverOptions{\nMasterName: redisGroupName,\nSentinelAddrs: sentinelsInfo,\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/resource_manager.go",
"new_path": "pkg/cluster/controllers/cache/resource_manager.go",
"diff": "@@ -133,6 +133,7 @@ func (rm *redisResourceManager) GetSecretName() string {\n// GetSecret gets redis secret.\nfunc (rm *redisResourceManager) GetSecret() *corev1.Secret {\nname := rm.GetSecretName()\n+\nconst SecretLen = 8\npassStr := common.RandomString(SecretLen, \"a\")\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/common/utils.go",
"new_path": "pkg/cluster/controllers/common/utils.go",
"diff": "@@ -3,10 +3,11 @@ package common\nimport (\n\"bytes\"\n\"crypto/rand\"\n- \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n- \"github.com/goharbor/harbor-operator/controllers/goharbor/harbor\"\n\"math/big\"\n\"strings\"\n+\n+ \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n+ \"github.com/goharbor/harbor-operator/controllers/goharbor/harbor\"\n)\nfunc GetIngressPath(ingress v1alpha1.IngressController) (string, error) {\n@@ -51,6 +52,7 @@ func RandomString(randLength int, randType string) (result string) {\nif err != nil {\npanic(err)\n}\n+\nb.WriteByte(str[int32(n.Int64())])\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/minio.go",
"new_path": "pkg/cluster/controllers/storage/minio.go",
"diff": "@@ -69,8 +69,7 @@ func NewMinIOController(ctx context.Context, options ...k8s.Option) lcm.Controll\n}\n// Reconciler implements the reconcile logic of minIO service.\n-// nolint:funlen\n-func (m *MinIOController) Apply(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*lcm.CRStatus, error) {\n+func (m *MinIOController) Apply(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*lcm.CRStatus, error) { // nolint:funlen\nvar minioCR minio.Tenant\n// Use the ctx from the parameter\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/provision.go",
"new_path": "pkg/cluster/controllers/storage/provision.go",
"diff": "@@ -240,15 +240,17 @@ func (m *MinIOController) generateIngress() (*netv1.Ingress, error) {\n}, err\n}\n-// nolint:funlen\n-func (m *MinIOController) generateMinIOCR(ctx context.Context, harborcluster *goharborv1alpha2.HarborCluster) (*minio.Tenant, error) {\n+func (m *MinIOController) generateMinIOCR(ctx context.Context, harborcluster *goharborv1alpha2.HarborCluster) (*minio.Tenant, error) { // nolint:funlen\nimage, err := m.GetImage(ctx, harborcluster)\nif err != nil {\nreturn nil, err\n}\n- const LivenessDelay = 120\n- const LivenessPeriod = 60\n+ const (\n+ LivenessDelay = 120\n+ LivenessPeriod = 60\n+ )\n+\nreturn &minio.Tenant{\nTypeMeta: metav1.TypeMeta{\nKind: minio.MinIOCRDResourceKind,\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
enable wsl
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,890
|
03.03.2021 04:03:47
| 0
|
4b2d90e929094dd199ad66e1071fd2976452d8fa
|
fix: apply component spec to trvy deployment
Closes
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/trivy/deployments.go",
"new_path": "controllers/goharbor/trivy/deployments.go",
"diff": "@@ -186,7 +186,7 @@ func (r *Reconciler) GetDeployment(ctx context.Context, trivy *goharborv1alpha2.\nValue: address,\n})\n- return &appsv1.Deployment{\n+ deploy := &appsv1.Deployment{\nObjectMeta: metav1.ObjectMeta{\nName: name,\nNamespace: namespace,\n@@ -239,7 +239,11 @@ func (r *Reconciler) GetDeployment(ctx context.Context, trivy *goharborv1alpha2.\n},\n},\n},\n- }, nil\n+ }\n+\n+ trivy.Spec.ComponentSpec.ApplyToDeployment(deploy)\n+\n+ return deploy, nil\n}\nfunc (r *Reconciler) getProbe(ctx context.Context, trivy *goharborv1alpha2.Trivy, probePath string) *corev1.Probe {\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: apply component spec to trvy deployment
Closes #436
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,870
|
02.03.2021 21:47:20
| -28,800
|
7333ccf7a7dfa39e21fa4ee44047aaad862e9aaa
|
fix(pg) harbor cluster pg status unknow
harbor cluster pg status unknow
|
[
{
"change_type": "MODIFY",
"old_path": "go.mod",
"new_path": "go.mod",
"diff": "@@ -14,7 +14,6 @@ require (\ngithub.com/google/go-cmp v0.5.1\ngithub.com/huandu/xstrings v1.3.2 // indirect\ngithub.com/imdario/mergo v0.3.10 // indirect\n- github.com/jackc/pgx/v4 v4.8.1\ngithub.com/jaegertracing/jaeger-lib v2.2.0+incompatible\ngithub.com/jetstack/cert-manager v1.1.0\ngithub.com/markbates/pkger v0.15.1\n"
},
{
"change_type": "MODIFY",
"old_path": "go.sum",
"new_path": "go.sum",
"diff": "@@ -619,12 +619,6 @@ github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW\ngithub.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=\ngithub.com/jackc/pgconn v1.3.2 h1:9UIGICxEAW70RQDGilGwsCG63NCcm5amjuBQCFzrmsw=\ngithub.com/jackc/pgconn v1.3.2/go.mod h1:LvCquS3HbBKwgl7KbX9KyqEIumJAbm1UMcTvGaIf3bM=\n-github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk=\n-github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI=\n-github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI=\n-github.com/jackc/pgconn v1.6.4 h1:S7T6cx5o2OqmxdHaXLH1ZeD1SbI8jBznyYE9Ec0RCQ8=\n-github.com/jackc/pgconn v1.6.4/go.mod h1:w2pne1C2tZgP+TvjqLpOigGzNqjBgQW9dUw/4Chex78=\n-github.com/jackc/pgconn v1.6.4/go.mod h1:w2pne1C2tZgP+TvjqLpOigGzNqjBgQW9dUw/4Chex78=\ngithub.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=\ngithub.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=\ngithub.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA=\n@@ -639,35 +633,16 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW\ngithub.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=\ngithub.com/jackc/pgproto3/v2 v2.0.1 h1:Rdjp4NFjwHnEslx2b66FfCI2S0LhO4itac3hXz6WX9M=\ngithub.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\n-github.com/jackc/pgproto3/v2 v2.0.2 h1:q1Hsy66zh4vuNsajBUF2PNqfAMMfxU5mk594lPE9vjY=\n-github.com/jackc/pgproto3/v2 v2.0.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\n-github.com/jackc/pgproto3/v2 v2.0.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=\n-github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=\n-github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=\n-github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=\n-github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=\ngithub.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=\ngithub.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=\ngithub.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59 h1:xOamcCJ9MFJTxR5bvw3ZXmiP8evQMohdt2VJ57C0W8Q=\ngithub.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=\n-github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0=\n-github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po=\n-github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ=\n-github.com/jackc/pgtype v1.4.2 h1:t+6LWm5eWPLX1H5Se702JSBcirq6uWa4jiG4wV1rAWY=\n-github.com/jackc/pgtype v1.4.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig=\ngithub.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=\ngithub.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=\ngithub.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186 h1:ZQM8qLT/E/CGD6XX0E6q9FAwxJYmWpJufzmLMaFuzgQ=\ngithub.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=\n-github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA=\n-github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o=\n-github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg=\n-github.com/jackc/pgx/v4 v4.8.1 h1:SUbCLP2pXvf/Sr/25KsuI4aTxiFYIvpfk4l6aTSdyCw=\n-github.com/jackc/pgx/v4 v4.8.1/go.mod h1:4HOLxrl8wToZJReD04/yB20GDwf4KBYETvlHciCnwW0=\ngithub.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\n-github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\n-github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=\ngithub.com/jaegertracing/jaeger-lib v2.2.0+incompatible h1:jZhCknut8zLnkwPvC673qrTovILBtCuMXvLTu3Jnsh4=\ngithub.com/jaegertracing/jaeger-lib v2.2.0+incompatible/go.mod h1:VqeqQrZmZr9G4WdLw4ei9tAHU54iJRkfoFHvTTQn4jQ=\ngithub.com/jetstack/cert-manager v1.1.0 h1:gEhBV9I83m+kpQShDhNO4+J8O2qfNDjvAEL27pThGmg=\n@@ -752,17 +727,12 @@ github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO\ngithub.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=\ngithub.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=\ngithub.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\n-github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE=\n-github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\n-github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=\n-github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=\n-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=\ngithub.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=\n@@ -981,8 +951,6 @@ github.com/sethvargo/go-password v0.1.3 h1:18KkbGDkw8SuzeohAbWqBLNSfRQblVwEHOLbP\ngithub.com/sethvargo/go-password v0.1.3/go.mod h1:2tyaaoHK/AlXwh5WWQDYjqQbHcq4cjPj5qb/ciYvu/Q=\ngithub.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=\ngithub.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=\n-github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc h1:jUIKcSPO9MoMJBbEoyE/RJoE8vz7Mb8AjvifMMwSyvY=\n-github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=\ngithub.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=\ngithub.com/siddontang/go v0.0.0-20180604090527-bdc77568d726/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=\ngithub.com/siddontang/ledisdb v0.0.0-20181029004158-becf5f38d373/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg=\n@@ -1162,7 +1130,6 @@ golang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPh\ngolang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo=\ngolang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\n-golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig=\ngolang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\n@@ -1317,7 +1284,6 @@ golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7w\ngolang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\n-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/readiness.go",
"new_path": "pkg/cluster/controllers/database/readiness.go",
"diff": "@@ -7,11 +7,12 @@ import (\ngoharborv1alpha2 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha2\"\nharbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n+ \"github.com/goharbor/harbor-operator/pkg/cluster/controllers/database/api\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n- \"github.com/jackc/pgx/v4\"\ncorev1 \"k8s.io/api/core/v1\"\nkerr \"k8s.io/apimachinery/pkg/api/errors\"\nlabels1 \"k8s.io/apimachinery/pkg/labels\"\n+ \"k8s.io/apimachinery/pkg/runtime\"\n\"k8s.io/apimachinery/pkg/types\"\n\"k8s.io/client-go/rest\"\n\"sigs.k8s.io/controller-runtime/pkg/client\"\n@@ -49,11 +50,21 @@ func (p *PostgreSQLController) Readiness(ctx context.Context) (*lcm.CRStatus, er\nname := p.HarborCluster.Name\n- conn, _, err = p.GetInClusterDatabaseInfo(ctx)\n+ conn, err = p.GetInClusterDatabaseInfo()\nif err != nil {\nreturn nil, err\n}\n+ var pg api.Postgresql\n+ if err := runtime.DefaultUnstructuredConverter.\n+ FromUnstructured(p.ActualCR.UnstructuredContent(), &pg); err != nil {\n+ return nil, err\n+ }\n+\n+ if pg.Status.PostgresClusterStatus != \"Running\" {\n+ return nil, errors.New(\"database is not ready\")\n+ }\n+\np.Log.Info(\"Database already ready.\",\n\"namespace\", p.HarborCluster.Namespace,\n\"name\", p.HarborCluster.Name)\n@@ -124,32 +135,22 @@ func (p *PostgreSQLController) DeployComponentSecret(conn *Connect, secretName s\n}\n// GetInClusterDatabaseInfo returns inCluster database connection client.\n-func (p *PostgreSQLController) GetInClusterDatabaseInfo(ctx context.Context) (*Connect, *pgx.Conn, error) {\n+func (p *PostgreSQLController) GetInClusterDatabaseInfo() (*Connect, error) {\nvar (\nconnect *Connect\n- client *pgx.Conn\nerr error\n)\npw, err := p.GetInClusterDatabasePassword()\nif err != nil {\n- return connect, client, err\n+ return connect, err\n}\nif connect, err = p.GetInClusterDatabaseConn(p.resourceName(), pw); err != nil {\n- return connect, client, err\n- }\n-\n- url := connect.GenDatabaseURL()\n-\n- client, err = pgx.Connect(ctx, url)\n- if err != nil {\n- p.Log.Error(err, \"Unable to connect to database\")\n-\n- return connect, client, err\n+ return connect, err\n}\n- return connect, client, nil\n+ return connect, nil\n}\n// GetInClusterDatabaseConn returns inCluster database connection info.\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(pg) harbor cluster pg status unknow
harbor cluster pg status unknow
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,865
|
04.03.2021 12:46:57
| -28,800
|
c6bfc6c4a58ba659b50c11cb3f9b26f2eda43659
|
fix(statue): fix statue not update
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/ctrl_setup.go",
"new_path": "controllers/goharbor/harborcluster/ctrl_setup.go",
"diff": "@@ -2,20 +2,25 @@ package harborcluster\nimport (\n\"context\"\n-\n\"github.com/go-logr/logr\"\ngoharborv1alpha2 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha2\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/cache\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/database\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/harbor\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/storage\"\n+ minio \"github.com/goharbor/harbor-operator/pkg/cluster/controllers/storage/minio/api/v1\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\ncommonCtrl \"github.com/goharbor/harbor-operator/pkg/controller\"\n\"github.com/goharbor/harbor-operator/pkg/factories/application\"\n\"github.com/goharbor/harbor-operator/pkg/k8s\"\n\"github.com/ovh/configstore\"\n+ redisOp \"github.com/spotahome/redis-operator/api/redisfailover/v1\"\n+ postgresv1 \"github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1\"\n+ \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions\"\n\"k8s.io/apimachinery/pkg/api/equality\"\n+ metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\"k8s.io/apimachinery/pkg/runtime\"\n+ \"k8s.io/client-go/dynamic\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/client\"\n\"sigs.k8s.io/controller-runtime/pkg/event\"\n@@ -49,6 +54,7 @@ type Reconciler struct {\n// +kubebuilder:rbac:groups=\"\",resources=pods,verbs=get;list;watch;create;update;patch;delete\n// +kubebuilder:rbac:groups=apps,resources=statefulsets;deployments,verbs=get;list;watch;create;update;patch;delete\n// +kubebuilder:rbac:groups=goharbor.io,resources=harbors,verbs=get;list;watch;create;update;patch;delete\n+// +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list\nfunc (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error {\nr.Client = mgr.GetClient()\n@@ -86,10 +92,25 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nk8s.WithScheme(mgr.GetScheme()),\nk8s.WithClient(k8s.WrapClient(ctx, mgr.GetClient())))\n- return ctrl.NewControllerManagedBy(mgr).\n+ builder := ctrl.NewControllerManagedBy(mgr).\nFor(&goharborv1alpha2.HarborCluster{}).\n- WithEventFilter(harborClusterPredicateFuncs).\n- Complete(r)\n+ Owns(&goharborv1alpha2.Harbor{}).\n+ WithEventFilter(harborClusterPredicateFuncs)\n+\n+ if r.CRDInstalled(ctx, dClient, \"tenants.minio.min.io\") {\n+ builder.Owns(&minio.Tenant{})\n+ }\n+\n+ if r.CRDInstalled(ctx, dClient, \"postgresqls.acid.zalan.do\") {\n+ builder.Owns(&postgresv1.Postgresql{})\n+ }\n+\n+ if r.CRDInstalled(ctx, dClient, \"redisfailovers.databases.spotahome.com\") {\n+ builder.Owns(&redisOp.RedisFailover{})\n+\n+ }\n+\n+ return builder.Complete(r)\n}\n// New HarborCluster reconciler.\n@@ -123,3 +144,12 @@ var harborClusterPredicateFuncs = predicate.Funcs{\nreturn true\n},\n}\n+\n+func (r *Reconciler) CRDInstalled(ctx context.Context, client dynamic.Interface, crdName string) bool {\n+ _, err := client.Resource(apiextensions.Resource(\"customresourcedefinitions\").WithVersion(\"v1\")).Get(ctx, \"tenants.minio.min.io\", metav1.GetOptions{})\n+ if err != nil {\n+ r.Log.Error(err, \"check crd installed err\", \"crd\", crdName)\n+ return false\n+ }\n+ return true\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/status.go",
"new_path": "controllers/goharbor/harborcluster/status.go",
"diff": "@@ -204,7 +204,7 @@ func (s *status) overallStatus() goharborv1.ClusterStatus {\n}\n// Any related components are unhealthy, cluster should be marked as unhealthy\n- if unready > 1 {\n+ if unready >= 1 {\nreturn goharborv1.StatusUnHealthy\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "go.mod",
"new_path": "go.mod",
"diff": "@@ -11,7 +11,7 @@ require (\ngithub.com/go-logr/zapr v0.3.0 // indirect\ngithub.com/go-redis/redis v6.15.9+incompatible\ngithub.com/goharbor/harbor/src v0.0.0-20200728051037-1d361a89a056\n- github.com/google/go-cmp v0.5.1\n+ github.com/google/go-cmp v0.5.2\ngithub.com/huandu/xstrings v1.3.2 // indirect\ngithub.com/imdario/mergo v0.3.10 // indirect\ngithub.com/jackc/pgx/v4 v4.8.1\n@@ -29,20 +29,22 @@ require (\ngithub.com/pkg/errors v0.9.1\ngithub.com/prometheus/client_golang v1.7.1\ngithub.com/sethvargo/go-password v0.1.3\n- github.com/sirupsen/logrus v1.6.0\n+ github.com/sirupsen/logrus v1.7.0\ngithub.com/spotahome/redis-operator v1.0.0\ngithub.com/uber/jaeger-client-go v2.24.0+incompatible\ngithub.com/uber/jaeger-lib v2.2.0+incompatible\n+ github.com/zalando/postgres-operator v1.6.1\ngo.uber.org/multierr v1.6.0 // indirect\ngo.uber.org/zap v1.16.0\n- golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de\n+ golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c\ngolang.org/x/sync v0.0.0-20201020160332-67f06af15bc9\ngolang.org/x/tools v0.0.0-20201223010750-3fa0e8f87c1a // indirect\ngomodules.xyz/jsonpatch/v2 v2.1.0 // indirect\ngopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect\n- k8s.io/api v0.19.0\n- k8s.io/apimachinery v0.19.0\n- k8s.io/client-go v0.19.0\n+ k8s.io/api v0.20.2\n+ k8s.io/apiextensions-apiserver v0.19.4\n+ k8s.io/apimachinery v0.20.2\n+ k8s.io/client-go v0.20.2\nk8s.io/klog v1.0.0\nsigs.k8s.io/controller-runtime v0.6.2\nsigs.k8s.io/kustomize/kstatus v0.0.2\n"
},
{
"change_type": "MODIFY",
"old_path": "go.sum",
"new_path": "go.sum",
"diff": "@@ -46,17 +46,21 @@ github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW\ngithub.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=\ngithub.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0=\ngithub.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630=\n+github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw=\ngithub.com/Azure/go-autorest/autorest v0.11.6/go.mod h1:V6p3pKZx1KKkJubbxnDWrzNhEIfOy/pTGasLqzHIPHs=\ngithub.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=\ngithub.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=\ngithub.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q=\n+github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg=\ngithub.com/Azure/go-autorest/autorest/adal v0.9.4/go.mod h1:/3SMAM86bP6wC9Ev35peQDUeqFZBMH07vvUOmg4z/fE=\n+github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A=\ngithub.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=\ngithub.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=\ngithub.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74=\ngithub.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=\ngithub.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=\ngithub.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=\n+github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=\ngithub.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k=\ngithub.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA=\ngithub.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE=\n@@ -135,6 +139,7 @@ github.com/aws/aws-sdk-go v1.32.5 h1:Sz0C7deIoMu5lFGTVkIN92IEZrUz1AWIDDW+9p6n1Rk\ngithub.com/aws/aws-sdk-go v1.32.5/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=\ngithub.com/aws/aws-sdk-go v1.34.30 h1:izATc/E0+HcT5YHmaQVjn7GHCoqaBxn0PGo6Zq5UNFA=\ngithub.com/aws/aws-sdk-go v1.34.30/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48=\n+github.com/aws/aws-sdk-go v1.36.29/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=\ngithub.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=\ngithub.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=\ngithub.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ=\n@@ -295,6 +300,7 @@ github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwo\ngithub.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=\n+github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k=\ngithub.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=\ngithub.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=\ngithub.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=\n@@ -444,6 +450,7 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU\ngithub.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\n+github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=\ngithub.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.0.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\n@@ -461,6 +468,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq\ngithub.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=\ngithub.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=\ngithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\n+github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=\n+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\n@@ -481,8 +490,9 @@ github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=\ngithub.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.4.1 h1:/exdXoGamhu5ONeUJH0deniYLWYvQwW66yvlfiiKTu0=\ngithub.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\n-github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=\n-github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\n+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\n+github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=\n+github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=\ngithub.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=\ngithub.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=\n@@ -504,6 +514,8 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4\ngithub.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=\ngithub.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\n+github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=\n+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=\ngithub.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=\ngithub.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=\n@@ -719,6 +731,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB\ngithub.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\n+github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=\ngithub.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=\n@@ -730,6 +743,8 @@ github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU=\ngithub.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\n+github.com/lib/pq v1.9.0 h1:L8nSXQQzAYByakOFMTwpjRoHsMJklur4Gi59b6VivR8=\n+github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=\ngithub.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=\ngithub.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=\n@@ -810,6 +825,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN\ngithub.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=\ngithub.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=\n+github.com/motomux/pretty v0.0.0-20161209205251-b2aad2c9a95d h1:LznySqW8MqVeFh+pW6rOkFdld9QQ7jRydBKKM6jyPVI=\n+github.com/motomux/pretty v0.0.0-20161209205251-b2aad2c9a95d/go.mod h1:u3hJ0kqCQu/cPpsu3RbCOPZ0d7V3IjPjv1adNRleM9I=\ngithub.com/munnerz/crd-schema-fuzz v1.0.0/go.mod h1:4z/rcm37JxUkSsExFcLL6ZIT1SgDRdLiu7qq1evdVS0=\ngithub.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=\ngithub.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=\n@@ -958,6 +975,7 @@ github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4\ngithub.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8=\ngithub.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=\ngithub.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=\n+github.com/r3labs/diff v1.1.0/go.mod h1:7WjXasNzi0vJetRcB/RqNl5dlIsmXcTTLmF5IoH6Xig=\ngithub.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=\ngithub.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=\ngithub.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=\n@@ -995,6 +1013,8 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd\ngithub.com/sirupsen/logrus v1.5.0/go.mod h1:+F7Ogzej0PZc/94MaYx/nvG9jOFMD2osvC3s+Squfpo=\ngithub.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=\ngithub.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=\n+github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=\n+github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=\ngithub.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=\ngithub.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs=\n@@ -1087,6 +1107,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec\ngithub.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=\ngithub.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=\ngithub.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=\n+github.com/zalando/postgres-operator v1.6.1 h1:e6QCoi1EIzKnkdukkAEf9Y05myxBUmW+sttfy+9XsI0=\n+github.com/zalando/postgres-operator v1.6.1/go.mod h1:n4JW8ceoi21pqR+eCtWUrnpJ3oM8iWg+EImx3l0HjgM=\ngithub.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=\ngitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE=\ngo.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=\n@@ -1164,8 +1186,9 @@ golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPh\ngolang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\n-golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig=\n-golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\n+golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\n+golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c h1:9HhBz5L/UjnK9XLtiZhYAdue5BVKep3PMmS2LuPDt8k=\n+golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\n@@ -1203,6 +1226,8 @@ golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=\ngolang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=\ngolang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\n+golang.org/x/mod v0.4.0 h1:8pl+sMODzuvGJkmj2W4kZihvVb5mKm8pB/X44PIQHv8=\n+golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180112015858-5ccada7d0a7b/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\n@@ -1251,6 +1276,7 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/\ngolang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\n+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U=\ngolang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\n@@ -1310,6 +1336,7 @@ golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7w\ngolang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\n+golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA=\ngolang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\n@@ -1337,6 +1364,10 @@ golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4 h1:5/PjkGUjvEU5Gl6BxmvKRPpqo\ngolang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\n+golang.org/x/sys v0.0.0-20201112073958-5cba982894dd h1:5CtCZbICpIOFdgO940moixOPjc0178IU44m4EjOO5IY=\n+golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\n+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM=\n+golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=\ngolang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\n@@ -1347,6 +1378,8 @@ golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\n+golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc=\n+golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c h1:fqgJT0MGcGpPgpWU7VRdRjuArfcOvC4AoJmILihzhDg=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\n@@ -1418,6 +1451,7 @@ golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roY\ngolang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200606014950-c42cb6316fb6/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\n+golang.org/x/tools v0.0.0-20201207204333-a835c872fcea/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201223010750-3fa0e8f87c1a h1:2o1GKm/jlzkAEmXhvWTxNYT2nlQ1EdjLg71ga6H443E=\ngolang.org/x/tools v0.0.0-20201223010750-3fa0e8f87c1a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\n@@ -1527,6 +1561,8 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2\ngoogle.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.24.0 h1:UhZDfRO8JRQru4/+LlLE0BRKGF8L+PICnvYZmx/fEGA=\ngoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=\n+google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=\n+google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=\ngopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=\ngopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=\ngopkg.in/asn1-ber.v1 v1.0.0-20150924051756-4e86f4367175/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=\n@@ -1579,6 +1615,8 @@ gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=\ngopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=\ngopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\n+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\n+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966 h1:B0J02caTR6tpSJozBJyiAzT6CtBzjclw4pgm9gg8Ys0=\ngopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=\n@@ -1608,6 +1646,9 @@ k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8=\nk8s.io/api v0.18.6/go.mod h1:eeyxr+cwCjMdLAmr2W3RyDI0VvTawSg/3RFFBEnmZGI=\nk8s.io/api v0.19.0 h1:XyrFIJqTYZJ2DU7FBE/bSPz7b1HvbVBuBf07oeo6eTc=\nk8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw=\n+k8s.io/api v0.19.4/go.mod h1:SbtJ2aHCItirzdJ36YslycFNzWADYH3tgOhvBEFtZAk=\n+k8s.io/api v0.20.2 h1:y/HR22XDZY3pniu9hIFDLpUCPq2w5eQ6aV/VFQ7uJMw=\n+k8s.io/api v0.20.2/go.mod h1:d7n6Ehyzx+S+cE3VhTGfVNNqtGc/oL9DCdYYahlurV8=\nk8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783 h1:V6ndwCPoao1yZ52agqOKaUAl7DYWVGiXjV7ePA2i610=\nk8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783/go.mod h1:xvae1SZB3E17UpV59AWc271W/Ph25N+bjPyR63X6tPY=\nk8s.io/apiextensions-apiserver v0.17.2/go.mod h1:4KdMpjkEjjDI2pPfBA15OscyNldHWdBCfsWMDWAmSTs=\n@@ -1615,6 +1656,8 @@ k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF\nk8s.io/apiextensions-apiserver v0.18.6/go.mod h1:lv89S7fUysXjLZO7ke783xOwVTm6lKizADfvUM/SS/M=\nk8s.io/apiextensions-apiserver v0.19.0 h1:jlY13lvZp+0p9fRX2khHFdiT9PYzT7zUrANz6R1NKtY=\nk8s.io/apiextensions-apiserver v0.19.0/go.mod h1:znfQxNpjqz/ZehvbfMg5N6fvBJW5Lqu5HVLTJQdP4Fs=\n+k8s.io/apiextensions-apiserver v0.19.4 h1:D9ak9T012tb3vcGFWYmbQuj9SCC8YM4zhA4XZqsAQC4=\n+k8s.io/apiextensions-apiserver v0.19.4/go.mod h1:B9rpH/nu4JBCtuUp3zTTk8DEjZUupZTBEec7/2zNRYw=\nk8s.io/apimachinery v0.0.0-20190913080033-27d36303b655 h1:CS1tBQz3HOXiseWZu6ZicKX361CZLT97UFnnPx0aqBw=\nk8s.io/apimachinery v0.0.0-20190913080033-27d36303b655/go.mod h1:nL6pwRT8NgfF8TT68DBI8uEePRt89cSvoXUVqbkWHq4=\nk8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg=\n@@ -1624,12 +1667,16 @@ k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftc\nk8s.io/apimachinery v0.18.6/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko=\nk8s.io/apimachinery v0.19.0 h1:gjKnAda/HZp5k4xQYjL0K/Yb66IvNqjthCb03QlKpaQ=\nk8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=\n+k8s.io/apimachinery v0.19.4/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=\n+k8s.io/apimachinery v0.20.2 h1:hFx6Sbt1oG0n6DZ+g4bFt5f6BoMkOjKWsQFu077M3Vg=\n+k8s.io/apimachinery v0.20.2/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=\nk8s.io/apiserver v0.0.0-20190918160949-bfa5e2e684ad/go.mod h1:XPCXEwhjaFN29a8NldXA901ElnKeKLrLtREO9ZhFyhg=\nk8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo=\nk8s.io/apiserver v0.17.2/go.mod h1:lBmw/TtQdtxvrTk0e2cgtOxHizXI+d0mmGQURIHQZlo=\nk8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw=\nk8s.io/apiserver v0.18.6/go.mod h1:Zt2XvTHuaZjBz6EFYzpp+X4hTmgWGy8AthNVnTdm3Wg=\nk8s.io/apiserver v0.19.0/go.mod h1:XvzqavYj73931x7FLtyagh8WibHpePJ1QwWrSJs2CLk=\n+k8s.io/apiserver v0.19.4/go.mod h1:X8WRHCR1UGZDd7HpV0QDc1h/6VbbpAeAGyxSh8yzZXw=\nk8s.io/cli-runtime v0.17.2/go.mod h1:aa8t9ziyQdbkuizkNLAw3qe3srSyWh9zlSB7zTqRNPI=\nk8s.io/cli-runtime v0.19.0/go.mod h1:tun9l0eUklT8IHIM0jors17KmUjcrAxn0myoBYwuNuo=\nk8s.io/client-go v0.0.0-20190918160344-1fbdaa4c8d90 h1:mLmhKUm1X+pXu0zXMEzNsOF5E2kKFGe5o6BZBIIqA6A=\n@@ -1641,18 +1688,23 @@ k8s.io/client-go v0.18.0/go.mod h1:uQSYDYs4WhVZ9i6AIoEZuwUggLVEF64HOD37boKAtF8=\nk8s.io/client-go v0.18.6/go.mod h1:/fwtGLjYMS1MaM5oi+eXhKwG+1UHidUEXRh6cNsdO0Q=\nk8s.io/client-go v0.19.0 h1:1+0E0zfWFIWeyRhQYWzimJOyAk2UT7TiARaLNwJCf7k=\nk8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU=\n+k8s.io/client-go v0.19.4/go.mod h1:ZrEy7+wj9PjH5VMBCuu/BDlvtUAku0oVFk4MmnW9mWA=\n+k8s.io/client-go v0.20.2 h1:uuf+iIAbfnCSw8IGAv/Rg0giM+2bOzHLOsbbrwrdhNQ=\n+k8s.io/client-go v0.20.2/go.mod h1:kH5brqWqp7HDxUFKoEgiI4v8G1xzbe9giaCenUWJzgE=\nk8s.io/code-generator v0.0.0-20190912054826-cd179ad6a269/go.mod h1:V5BD6M4CyaN5m+VthcclXWsVcT1Hu+glwa1bi3MIsyE=\nk8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s=\nk8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s=\nk8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc=\nk8s.io/code-generator v0.18.6/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c=\nk8s.io/code-generator v0.19.0/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk=\n+k8s.io/code-generator v0.19.4/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk=\nk8s.io/component-base v0.0.0-20190918160511-547f6c5d7090/go.mod h1:933PBGtQFJky3TEwYx4aEPZ4IxqhWh3R6DCmzqIn1hA=\nk8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs=\nk8s.io/component-base v0.17.2/go.mod h1:zMPW3g5aH7cHJpKYQ/ZsGMcgbsA/VyhEugF3QT1awLs=\nk8s.io/component-base v0.18.0/go.mod h1:u3BCg0z1uskkzrnAKFzulmYaEpZF7XC9Pf/uFyb1v2c=\nk8s.io/component-base v0.18.6/go.mod h1:knSVsibPR5K6EW2XOjEHik6sdU5nCvKMrzMt2D4In14=\nk8s.io/component-base v0.19.0/go.mod h1:dKsY8BxkA+9dZIAh2aWJLL/UdASFDNtGYTCItL4LM7Y=\n+k8s.io/component-base v0.19.4/go.mod h1:ZzuSLlsWhajIDEkKF73j64Gz/5o0AgON08FgRbEPI70=\nk8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=\nk8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=\nk8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=\n@@ -1669,6 +1721,8 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=\nk8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=\nk8s.io/klog/v2 v2.3.0 h1:WmkrnW7fdrm0/DMClc+HIxtftvxVIPAhlVwMQo5yLco=\nk8s.io/klog/v2 v2.3.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=\n+k8s.io/klog/v2 v2.4.0 h1:7+X0fUguPyrKEC4WjH8iGDg3laWgMo5tMnRTIGTTxGQ=\n+k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=\nk8s.io/kube-aggregator v0.19.0/go.mod h1:1Ln45PQggFAG8xOqWPIYMxUq8WNtpPnYsbUJ39DpF/A=\nk8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf h1:EYm5AW/UUDbnmnI+gK0TJDVK9qPLhM+sRHYanNKw0EQ=\nk8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E=\n@@ -1679,6 +1733,8 @@ k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6 h1:Oh3Mzx5pJ+yIumsAD0MOEC\nk8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E=\nk8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL1egv36TkkJm+bA8AxicmQ=\nk8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o=\n+k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd h1:sOHNzJIkytDF6qadMNKhhDRpc6ODik8lVC6nOur7B2c=\n+k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM=\nk8s.io/kubectl v0.17.2/go.mod h1:y4rfLV0n6aPmvbRCqZQjvOp3ezxsFgpqL+zF5jH/lxk=\nk8s.io/kubectl v0.19.0/go.mod h1:gPCjjsmE6unJzgaUNXIFGZGafiUp5jh0If3F/x7/rRg=\nk8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk=\n@@ -1691,6 +1747,8 @@ k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl\nk8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=\nk8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg=\nk8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=\n+k8s.io/utils v0.0.0-20201110183641-67b214c5f920 h1:CbnUZsM497iRC5QMVkHwyl8s2tB3g7yaSHkYPkpgelw=\n+k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=\nmodernc.org/b v1.0.0/go.mod h1:uZWcZfRj1BpYzfN9JTerzlNUnnPsV9O2ZA8JsRcubNg=\nmodernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=\nmodernc.org/db v1.0.0/go.mod h1:kYD/cO29L/29RM0hXYl4i3+Q5VojL31kTUVpVJDw0s8=\n@@ -1732,6 +1790,8 @@ sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJ\nsigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=\nsigs.k8s.io/structured-merge-diff/v4 v4.0.1 h1:YXTMot5Qz/X1iBRJhAt+vI+HVttY0WkSqqhKxQ0xVbA=\nsigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=\n+sigs.k8s.io/structured-merge-diff/v4 v4.0.2 h1:YHQV7Dajm86OuqnIR6zAelnDWBRjo+YhYV9PmGrh1s8=\n+sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw=\nsigs.k8s.io/testing_frameworks v0.1.2 h1:vK0+tvjF0BZ/RYFeZ1E6BYBwHJJXhjuZ3TdsEKH+UQM=\nsigs.k8s.io/testing_frameworks v0.1.2/go.mod h1:ToQrwSC3s8Xf/lADdZp3Mktcql9CG0UAmdJG9th5i0w=\nsigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -13429,6 +13429,14 @@ rules:\n- patch\n- update\n- watch\n+- apiGroups:\n+ - apiextensions.k8s.io\n+ resources:\n+ - customresourcedefinitions\n+ verbs:\n+ - get\n+ - list\n+\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/controller/resource.go",
"new_path": "pkg/controller/resource.go",
"diff": "@@ -320,7 +320,7 @@ func (c *Controller) AddIngressToManage(ctx context.Context, resource *netv1.Ing\nres := &Resource{\nmutable: mutate,\n- checkable: statuscheck.BasicCheck,\n+ checkable: statuscheck.True,\nresource: resource,\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/scheme/scheme.go",
"new_path": "pkg/scheme/scheme.go",
"diff": "@@ -9,6 +9,8 @@ import (\ncertv1alpha2 \"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2\"\ncertv1beta1 \"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1beta1\"\n\"github.com/pkg/errors\"\n+ redisfailoverv1 \"github.com/spotahome/redis-operator/api/redisfailover/v1\"\n+ postgresv1 \"github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1\"\n\"k8s.io/apimachinery/pkg/runtime\"\nclientgoscheme \"k8s.io/client-go/kubernetes/scheme\"\n)\n@@ -41,6 +43,16 @@ func New(ctx context.Context) (*runtime.Scheme, error) {\nreturn nil, errors.Wrap(err, \"unable to configure Harbor scheme\")\n}\n+ err = redisfailoverv1.AddToScheme(scheme)\n+ if err != nil {\n+ return nil, errors.Wrap(err, \"unable to configure redis failover scheme\")\n+ }\n+\n+ err = postgresv1.AddToScheme(scheme)\n+ if err != nil {\n+ return nil, errors.Wrap(err, \"unable to configure postgres scheme\")\n+ }\n+\nerr = minio.AddToScheme(scheme)\nif err != nil {\nreturn nil, errors.Wrap(err, \"unable to configure minio scheme\")\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(statue): fix statue not update
Signed-off-by: wangcanfeng <wangcanfeng@corp.netease.com>
|
254,875
|
04.03.2021 16:33:10
| -28,800
|
5ff36c07dd0b88ec0190fdfaec88f61fc2cd98e2
|
fix const DefaultAllowedRegistryTypesForProxyCache
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/core/deployments.go",
"new_path": "controllers/goharbor/core/deployments.go",
"diff": "@@ -39,7 +39,9 @@ const (\nInternalCertificatesVolumeName = \"internal-certificates\"\nInternalCertificateAuthorityDirectory = \"/harbor_cust_cert\"\nInternalCertificatesPath = ConfigPath + \"/ssl\"\n- PermittedRegistryTypesForProxyCache = \"docker-hub,harbor\"\n+ DockerHubRegistryTypesForProxyCache = \"docker-hub\"\n+ HarborRegistryTypesForProxyCache = \"harbor\"\n+ DefaultAllowedRegistryTypesForProxyCache = DockerHubRegistryTypesForProxyCache + \",\" + HarborRegistryTypesForProxyCache\nPublicCertificateVolumeName = \"ca-download\"\nPublicCertificatePath = ConfigPath + \"/ca\"\nEncryptionKeyVolumeName = \"encryption\"\n@@ -289,7 +291,7 @@ func (r *Reconciler) GetDeployment(ctx context.Context, core *goharborv1alpha2.C\nValue: strconv.FormatBool(core.Spec.Components.TLS.Enabled()),\n}, {\nName: \"PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE\",\n- Value: PermittedRegistryTypesForProxyCache,\n+ Value: DefaultAllowedRegistryTypesForProxyCache,\n}}...)\nif core.Spec.Database.MaxIdleConnections != nil {\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix const DefaultAllowedRegistryTypesForProxyCache
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,870
|
04.03.2021 21:30:58
| -28,800
|
6e7534126ea4d24b42e6c466603f091662bf06c9
|
fix(pg) remove pg status check
remove pg status check
fix
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/readiness.go",
"new_path": "pkg/cluster/controllers/database/readiness.go",
"diff": "@@ -35,6 +35,8 @@ const (\nClairSecretName = \"clair\"\nNotaryServerSecretName = \"notary-server\"\nNotarySignerSecretName = \"notary-signer\"\n+\n+ PsqlRunningStatus = \"Running\"\n)\n// Readiness reconcile will check postgre sql cluster if that has available.\n@@ -55,31 +57,35 @@ func (p *PostgreSQLController) Readiness(ctx context.Context) (*lcm.CRStatus, er\nreturn nil, err\n}\n+ properties := &lcm.Properties{}\n+ crStatus := lcm.New(goharborv1alpha2.DatabaseReady).WithProperties(*properties)\n+\nvar pg api.Postgresql\nif err := runtime.DefaultUnstructuredConverter.\nFromUnstructured(p.ActualCR.UnstructuredContent(), &pg); err != nil {\nreturn nil, err\n}\n- if pg.Status.PostgresClusterStatus != \"Running\" {\n- return nil, errors.New(\"database is not ready\")\n+ if pg.Status.PostgresClusterStatus != PsqlRunningStatus {\n+ crStatus.WithStatus(corev1.ConditionFalse).\n+ WithReason(\"database is not ready\").\n+ WithMessage(fmt.Sprintf(\"psql is %s\", pg.Status.PostgresClusterStatus))\n+\n+ return crStatus, nil\n}\n- p.Log.Info(\"Database already ready.\",\n+ p.Log.Info(\"database is ready.\",\n\"namespace\", p.HarborCluster.Namespace,\n\"name\", p.HarborCluster.Name)\n- properties := &lcm.Properties{}\n-\nif err := p.DeployComponentSecret(conn, getDatabasePasswordRefName(name)); err != nil {\nreturn nil, err\n}\naddProperties(name, conn, properties)\n-\n- crStatus := lcm.New(goharborv1alpha2.DatabaseReady).\n+ crStatus = lcm.New(goharborv1alpha2.DatabaseReady).\nWithStatus(corev1.ConditionTrue).\n- WithReason(\"database already ready\").\n+ WithReason(\"database is ready\").\nWithMessage(\"harbor component database secrets are already create.\").\nWithProperties(*properties)\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(pg) remove pg status check
remove pg status check
fix #474
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,877
|
22.02.2021 16:17:54
| -3,600
|
3066ae5704b9b095747489990707a3fb2c0d52c9
|
fix(network policies) controller watch
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/chartmuseum/chartmuseum.go",
"new_path": "controllers/goharbor/chartmuseum/chartmuseum.go",
"diff": "@@ -14,6 +14,7 @@ import (\n\"github.com/pkg/errors\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -74,6 +75,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&appsv1.Deployment{}).\nOwns(&corev1.ConfigMap{}).\nOwns(&corev1.Service{}).\n+ Owns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n}).\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/core/core.go",
"new_path": "controllers/goharbor/core/core.go",
"diff": "@@ -14,6 +14,7 @@ import (\n\"github.com/pkg/errors\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -78,6 +79,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&corev1.ConfigMap{}).\nOwns(&corev1.Secret{}).\nOwns(&corev1.Service{}).\n+ Owns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n}).\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/harbor.go",
"new_path": "controllers/goharbor/harbor/harbor.go",
"diff": "@@ -67,6 +67,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&certv1.Issuer{}).\nOwns(&certv1.Certificate{}).\nOwns(&netv1.Ingress{}).\n+ Owns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n}).\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/jobservice/jobservice.go",
"new_path": "controllers/goharbor/jobservice/jobservice.go",
"diff": "@@ -14,6 +14,7 @@ import (\n\"github.com/pkg/errors\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -78,6 +79,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&corev1.ConfigMap{}).\nOwns(&corev1.Secret{}).\nOwns(&corev1.Service{}).\n+ Owns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n}).\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/notaryserver/notaryserver.go",
"new_path": "controllers/goharbor/notaryserver/notaryserver.go",
"diff": "@@ -14,6 +14,7 @@ import (\n\"github.com/pkg/errors\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -77,6 +78,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&appsv1.Deployment{}).\nOwns(&corev1.ConfigMap{}).\nOwns(&corev1.Service{}).\n+ Owns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n}).\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/portal/portal.go",
"new_path": "controllers/goharbor/portal/portal.go",
"diff": "@@ -13,6 +13,7 @@ import (\n\"github.com/pkg/errors\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -71,6 +72,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nFor(r.NewEmpty(ctx)).\nOwns(&appsv1.Deployment{}).\nOwns(&corev1.Service{}).\n+ Owns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n}).\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/registry/registry.go",
"new_path": "controllers/goharbor/registry/registry.go",
"diff": "@@ -14,6 +14,7 @@ import (\n\"github.com/pkg/errors\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -77,6 +78,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&appsv1.Deployment{}).\nOwns(&corev1.ConfigMap{}).\nOwns(&corev1.Service{}).\n+ Owns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n}).\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/registryctl/registryctl.go",
"new_path": "controllers/goharbor/registryctl/registryctl.go",
"diff": "@@ -15,6 +15,7 @@ import (\n\"github.com/pkg/errors\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -77,6 +78,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&appsv1.Deployment{}).\nOwns(&corev1.ConfigMap{}).\nOwns(&corev1.Service{}).\n+ Owns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n}).\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/trivy/trivy.go",
"new_path": "controllers/goharbor/trivy/trivy.go",
"diff": "@@ -13,6 +13,7 @@ import (\n\"github.com/pkg/errors\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -61,6 +62,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&corev1.ConfigMap{}).\nOwns(&corev1.Secret{}).\nOwns(&corev1.Service{}).\n+ Owns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n}).\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(network policies) controller watch
Signed-off-by: Simon Guyennet <simon.guyennet@corp.ovh.com>
|
254,877
|
08.03.2021 15:35:10
| -3,600
|
e3b17a0ba2f14f210c4644189d69424f4e0bc1c8
|
fix(Ingress) API version
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/harbor.go",
"new_path": "controllers/goharbor/harbor/harbor.go",
"diff": "@@ -14,6 +14,7 @@ import (\n\"github.com/pkg/errors\"\ncorev1 \"k8s.io/api/core/v1\"\nnetv1 \"k8s.io/api/networking/v1\"\n+ netv1beta1 \"k8s.io/api/networking/v1beta1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -66,7 +67,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&corev1.Secret{}).\nOwns(&certv1.Issuer{}).\nOwns(&certv1.Certificate{}).\n- Owns(&netv1.Ingress{}).\n+ Owns(&netv1beta1.Ingress{}).\nOwns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/ingresses.go",
"new_path": "controllers/goharbor/harbor/ingresses.go",
"diff": "@@ -10,8 +10,9 @@ import (\n\"github.com/goharbor/harbor-operator/controllers/goharbor/notaryserver\"\n\"github.com/goharbor/harbor-operator/pkg/graph\"\n\"github.com/pkg/errors\"\n- netv1 \"k8s.io/api/networking/v1\"\n+ netv1beta1 \"k8s.io/api/networking/v1beta1\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n+ \"k8s.io/apimachinery/pkg/util/intstr\"\n)\nconst (\n@@ -32,15 +33,15 @@ func (r *Reconciler) AddCoreIngress(ctx context.Context, harbor *goharborv1alpha\nreturn CoreIngress(ingressRes), errors.Wrap(err, \"cannot add core ingress\")\n}\n-func (r *Reconciler) GetCoreIngress(ctx context.Context, harbor *goharborv1alpha2.Harbor) (*netv1.Ingress, error) {\n+func (r *Reconciler) GetCoreIngress(ctx context.Context, harbor *goharborv1alpha2.Harbor) (*netv1beta1.Ingress, error) {\nif harbor.Spec.Expose.Core.Ingress == nil {\nreturn nil, nil\n}\n- var tls []netv1.IngressTLS\n+ var tls []netv1beta1.IngressTLS\nif harbor.Spec.Expose.Core.TLS.Enabled() {\n- tls = []netv1.IngressTLS{{\n+ tls = []netv1beta1.IngressTLS{{\nSecretName: harbor.Spec.Expose.Core.TLS.CertificateRef,\n}}\n}\n@@ -50,32 +51,28 @@ func (r *Reconciler) GetCoreIngress(ctx context.Context, harbor *goharborv1alpha\nreturn nil, errors.Wrap(err, \"ingress rules\")\n}\n- return &netv1.Ingress{\n+ return &netv1beta1.Ingress{\nObjectMeta: metav1.ObjectMeta{\nName: r.NormalizeName(ctx, harbor.GetName()),\nNamespace: harbor.GetNamespace(),\nAnnotations: r.GetCoreIngressAnnotations(ctx, harbor),\n},\n- Spec: netv1.IngressSpec{\n+ Spec: netv1beta1.IngressSpec{\nTLS: tls,\nRules: rules,\n},\n}, nil\n}\n-func (r *Reconciler) GetCoreIngressRules(ctx context.Context, harbor *goharborv1alpha2.Harbor) ([]netv1.IngressRule, error) {\n+func (r *Reconciler) GetCoreIngressRules(ctx context.Context, harbor *goharborv1alpha2.Harbor) ([]netv1beta1.IngressRule, error) {\ncorePort, err := harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.CoreTLS)\nif err != nil {\nreturn nil, errors.Wrapf(err, \"%s internal port\", harbormetav1.CoreTLS)\n}\n- coreBackend := netv1.IngressBackend{\n- Service: &netv1.IngressServiceBackend{\n- Name: r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String()),\n- Port: netv1.ServiceBackendPort{\n- Number: corePort,\n- },\n- },\n+ coreBackend := netv1beta1.IngressBackend{\n+ ServiceName: r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String()),\n+ ServicePort: intstr.FromInt(int(corePort)),\n}\nportalPort, err := harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.PortalTLS)\n@@ -83,13 +80,9 @@ func (r *Reconciler) GetCoreIngressRules(ctx context.Context, harbor *goharborv1\nreturn nil, errors.Wrapf(err, \"%s internal port\", harbormetav1.PortalTLS)\n}\n- portalBackend := netv1.IngressBackend{\n- Service: &netv1.IngressServiceBackend{\n- Name: r.NormalizeName(ctx, harbor.GetName(), controllers.Portal.String()),\n- Port: netv1.ServiceBackendPort{\n- Number: portalPort,\n- },\n- },\n+ portalBackend := netv1beta1.IngressBackend{\n+ ServiceName: r.NormalizeName(ctx, harbor.GetName(), \"portal\"),\n+ ServicePort: intstr.FromInt(int(portalPort)),\n}\nruleValue, err := r.GetCoreIngressRuleValue(ctx, harbor, coreBackend, portalBackend)\n@@ -97,7 +90,7 @@ func (r *Reconciler) GetCoreIngressRules(ctx context.Context, harbor *goharborv1\nreturn nil, errors.Wrap(err, \"rule value\")\n}\n- return []netv1.IngressRule{{\n+ return []netv1beta1.IngressRule{{\nHost: harbor.Spec.Expose.Core.Ingress.Host,\nIngressRuleValue: *ruleValue,\n}}, nil\n@@ -116,7 +109,7 @@ func (r *Reconciler) AddNotaryIngress(ctx context.Context, harbor *goharborv1alp\nreturn NotaryIngress(ingressRes), errors.Wrapf(err, \"cannot add notary ingress\")\n}\n-func (r *Reconciler) GetNotaryServerIngresse(ctx context.Context, harbor *goharborv1alpha2.Harbor) (*netv1.Ingress, error) {\n+func (r *Reconciler) GetNotaryServerIngresse(ctx context.Context, harbor *goharborv1alpha2.Harbor) (*netv1beta1.Ingress, error) {\nif harbor.Spec.Notary == nil {\nreturn nil, nil\n}\n@@ -125,38 +118,34 @@ func (r *Reconciler) GetNotaryServerIngresse(ctx context.Context, harbor *goharb\nreturn nil, nil\n}\n- var tls []netv1.IngressTLS\n+ var tls []netv1beta1.IngressTLS\nif harbor.Spec.Expose.Notary.TLS.Enabled() {\n- tls = []netv1.IngressTLS{{\n+ tls = []netv1beta1.IngressTLS{{\nSecretName: harbor.Spec.Expose.Notary.TLS.CertificateRef,\n}}\n}\n- pathTypeExact := netv1.PathTypeExact\n+ pathTypeExact := netv1beta1.PathTypeExact\n- return &netv1.Ingress{\n+ return &netv1beta1.Ingress{\nObjectMeta: metav1.ObjectMeta{\nName: r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String()),\nNamespace: harbor.GetNamespace(),\nAnnotations: r.GetNotaryIngressAnnotations(ctx, harbor),\n},\n- Spec: netv1.IngressSpec{\n+ Spec: netv1beta1.IngressSpec{\nTLS: tls,\n- Rules: []netv1.IngressRule{{\n+ Rules: []netv1beta1.IngressRule{{\nHost: harbor.Spec.Expose.Notary.Ingress.Host,\n- IngressRuleValue: netv1.IngressRuleValue{\n- HTTP: &netv1.HTTPIngressRuleValue{\n- Paths: []netv1.HTTPIngressPath{{\n+ IngressRuleValue: netv1beta1.IngressRuleValue{\n+ HTTP: &netv1beta1.HTTPIngressRuleValue{\n+ Paths: []netv1beta1.HTTPIngressPath{{\nPath: \"/\",\nPathType: &pathTypeExact,\n- Backend: netv1.IngressBackend{\n- Service: &netv1.IngressServiceBackend{\n- Name: r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String()),\n- Port: netv1.ServiceBackendPort{\n- Number: notaryserver.PublicPort,\n- },\n- },\n+ Backend: netv1beta1.IngressBackend{\n+ ServiceName: r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String()),\n+ ServicePort: intstr.FromInt(notaryserver.PublicPort),\n},\n}},\n},\n@@ -216,14 +205,14 @@ func (err ErrInvalidIngressController) Error() string {\nreturn fmt.Sprintf(\"controller %s unsupported\", err.Controller)\n}\n-func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharborv1alpha2.Harbor, core, portal netv1.IngressBackend) (*netv1.IngressRuleValue, error) { // nolint:funlen\n- pathTypePrefix := netv1.PathTypePrefix\n+func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharborv1alpha2.Harbor, core, portal netv1beta1.IngressBackend) (*netv1beta1.IngressRuleValue, error) { // nolint:funlen\n+ pathTypePrefix := netv1beta1.PathTypePrefix\nswitch harbor.Spec.Expose.Core.Ingress.Controller {\ncase harbormetav1.IngressControllerDefault:\n- return &netv1.IngressRuleValue{\n- HTTP: &netv1.HTTPIngressRuleValue{\n- Paths: []netv1.HTTPIngressPath{{\n+ return &netv1beta1.IngressRuleValue{\n+ HTTP: &netv1beta1.HTTPIngressRuleValue{\n+ Paths: []netv1beta1.HTTPIngressPath{{\nPath: \"/\",\nPathType: &pathTypePrefix,\nBackend: portal,\n@@ -251,11 +240,11 @@ func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharb\n},\n}, nil\ncase harbormetav1.IngressControllerGCE:\n- pathTypePrefix := netv1.PathTypePrefix\n+ pathTypePrefix := netv1beta1.PathTypePrefix\n- return &netv1.IngressRuleValue{\n- HTTP: &netv1.HTTPIngressRuleValue{\n- Paths: []netv1.HTTPIngressPath{{\n+ return &netv1beta1.IngressRuleValue{\n+ HTTP: &netv1beta1.HTTPIngressRuleValue{\n+ Paths: []netv1beta1.HTTPIngressPath{{\nPath: \"/\",\nPathType: &pathTypePrefix,\nBackend: portal,\n@@ -283,12 +272,12 @@ func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharb\n},\n}, nil\ncase harbormetav1.IngressControllerNCP:\n- pathTypeExact := netv1.PathTypeExact\n- pathTypePrefix := netv1.PathTypePrefix\n+ pathTypeExact := netv1beta1.PathTypeExact\n+ pathTypePrefix := netv1beta1.PathTypePrefix\n- return &netv1.IngressRuleValue{\n- HTTP: &netv1.HTTPIngressRuleValue{\n- Paths: []netv1.HTTPIngressPath{{\n+ return &netv1beta1.IngressRuleValue{\n+ HTTP: &netv1beta1.HTTPIngressRuleValue{\n+ Paths: []netv1beta1.HTTPIngressPath{{\nPath: \"/\",\nPathType: &pathTypeExact,\nBackend: portal,\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/controller/resource.go",
"new_path": "pkg/controller/resource.go",
"diff": "@@ -17,6 +17,7 @@ import (\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\nnetv1 \"k8s.io/api/networking/v1\"\n+ netv1beta1 \"k8s.io/api/networking/v1beta1\"\napierrors \"k8s.io/apimachinery/pkg/api/errors\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\"\n@@ -304,7 +305,7 @@ func (c *Controller) AddIssuerToManage(ctx context.Context, resource *certv1.Iss\nreturn res, g.AddResource(ctx, res, dependencies, c.ProcessFunc(ctx, resource, dependencies...))\n}\n-func (c *Controller) AddIngressToManage(ctx context.Context, resource *netv1.Ingress, dependencies ...graph.Resource) (graph.Resource, error) {\n+func (c *Controller) AddIngressToManage(ctx context.Context, resource *netv1beta1.Ingress, dependencies ...graph.Resource) (graph.Resource, error) {\nif resource == nil {\nreturn nil, nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/controller/resource_test.go",
"new_path": "pkg/controller/resource_test.go",
"diff": "@@ -16,7 +16,7 @@ import (\ncertv1 \"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1alpha2\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n- netv1 \"k8s.io/api/networking/v1\"\n+ netv1beta1 \"k8s.io/api/networking/v1beta1\"\n\"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\"\n\"k8s.io/apimachinery/pkg/types\"\ncontrollerruntime \"sigs.k8s.io/controller-runtime\"\n@@ -36,8 +36,8 @@ var _ = Context(\"Adding\", func() {\n&corev1.Secret{}: func(c *Controller, ctx context.Context, res resources.Resource, dep ...graph.Resource) (graph.Resource, error) {\nreturn c.AddSecretToManage(ctx, res.(*corev1.Secret), dep...)\n},\n- &netv1.Ingress{}: func(c *Controller, ctx context.Context, res resources.Resource, dep ...graph.Resource) (graph.Resource, error) {\n- return c.AddIngressToManage(ctx, res.(*netv1.Ingress), dep...)\n+ &netv1beta1.Ingress{}: func(c *Controller, ctx context.Context, res resources.Resource, dep ...graph.Resource) (graph.Resource, error) {\n+ return c.AddIngressToManage(ctx, res.(*netv1beta1.Ingress), dep...)\n},\n&certv1.Certificate{}: func(c *Controller, ctx context.Context, res resources.Resource, dep ...graph.Resource) (graph.Resource, error) {\nreturn c.AddCertificateToManage(ctx, res.(*certv1.Certificate), dep...)\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(Ingress) API version
Signed-off-by: Simon Guyennet <simon.guyennet@corp.ovh.com>
|
254,890
|
09.03.2021 06:08:39
| 0
|
993f4e937781eadc68300b3061e77b60a2454202
|
fix: validate notary ingress when it's enabled
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harbor_types.go",
"new_path": "apis/goharbor.io/v1alpha2/harbor_types.go",
"diff": "@@ -10,6 +10,7 @@ import (\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n+ \"k8s.io/apimachinery/pkg/util/validation/field\"\n)\n// +genclient\n@@ -90,6 +91,30 @@ type HarborSpec struct {\nVersion string `json:\"version,omitempty\"`\n}\n+func (spec *HarborSpec) ValidateNotary() *field.Error {\n+ if spec.Notary == nil {\n+ return nil\n+ }\n+\n+ if spec.Expose.Notary == nil {\n+ return required(field.NewPath(\"spec\").Child(\"expose\", \"notary\"))\n+ }\n+\n+ if spec.Expose.Notary.Ingress == nil {\n+ return required(field.NewPath(\"spec\").Child(\"expose\", \"notary\", \"ingress\"))\n+ }\n+\n+ if spec.Expose.Notary.TLS == nil {\n+ return required(field.NewPath(\"spec\").Child(\"expose\", \"notary\", \"tls\"))\n+ }\n+\n+ if spec.Expose.Notary.TLS.CertificateRef == \"\" {\n+ return required(field.NewPath(\"spec\").Child(\"expose\", \"notary\", \"tls\", \"certificateRef\"))\n+ }\n+\n+ return nil\n+}\n+\ntype HarborComponentsSpec struct {\n// +kubebuilder:validation:Required\nPortal harbormetav1.ComponentSpec `json:\"portal,omitempty\"`\n@@ -483,6 +508,7 @@ type HarborExposeSpec struct {\nCore HarborExposeComponentSpec `json:\"core\"`\n// +kubebuilder:validation:Optional\n+ // The ingress of the notary, required when notary component enabled.\nNotary *HarborExposeComponentSpec `json:\"notary,omitempty\"`\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harbor_webhook.go",
"new_path": "apis/goharbor.io/v1alpha2/harbor_webhook.go",
"diff": "@@ -88,6 +88,10 @@ func (h *Harbor) Validate(old *Harbor) error {\nallErrs = append(allErrs, required(field.NewPath(\"spec\").Child(\"redis\")))\n}\n+ if err := h.Spec.ValidateNotary(); err != nil {\n+ allErrs = append(allErrs, err)\n+ }\n+\nif old == nil { // create harbor resource\nif err := version.Validate(h.Spec.Version); err != nil {\nallErrs = append(allErrs, field.Invalid(field.NewPath(\"spec\").Child(\"version\"), h.Spec.Version, err.Error()))\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harborcluster_webhook.go",
"new_path": "apis/goharbor.io/v1alpha2/harborcluster_webhook.go",
"diff": "@@ -94,6 +94,10 @@ func (hc *HarborCluster) validate(old *HarborCluster) error {\nallErrs = append(allErrs, err)\n}\n+ if err := hc.Spec.ValidateNotary(); err != nil {\n+ allErrs = append(allErrs, err)\n+ }\n+\nif old == nil { // create harbor resource\nif err := version.Validate(hc.Spec.Version); err != nil {\nallErrs = append(allErrs, field.Invalid(field.NewPath(\"spec\").Child(\"version\"), hc.Spec.Version, err.Error()))\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -1267,8 +1267,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\nwriteTimeout:\ndescription: Socket timeout\n@@ -1550,8 +1548,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntokenService:\nproperties:\n@@ -2221,8 +2217,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntype: object\nnotary:\n@@ -2256,8 +2250,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntype: object\nrequired:\n@@ -2687,8 +2679,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntype: object\ntype: object\n@@ -3906,8 +3896,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntype: object\nnotary:\n@@ -3941,8 +3929,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntype: object\nrequired:\n@@ -6904,8 +6890,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntokenService:\nproperties:\n@@ -7267,8 +7251,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntolerations:\ndescription: If specified, the pod's tolerations.\n@@ -7780,8 +7762,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntolerations:\ndescription: If specified, the pod's tolerations.\n@@ -8140,8 +8120,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntype: object\nimage:\n@@ -9768,8 +9746,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntolerations:\ndescription: If specified, the pod's tolerations.\n@@ -10108,8 +10084,6 @@ spec:\ncertificateRef:\npattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\ntype: string\n- required:\n- - certificateRef\ntype: object\ntokenServiceCertificateAuthorityRefs:\nitems:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: validate notary ingress when it's enabled
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,875
|
05.03.2021 15:13:25
| -28,800
|
1a21a1378c9546ea9d09511381bd76d7fda50b56
|
add chart for harborcluster
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -313,6 +313,171 @@ jobs:\nkubectl get all -n \"${operatorNamespace}\" -o wide\nkubectl logs -n \"${operatorNamespace}\" -l 'control-plane=harbor-operator' --all-containers --tail=1000\n+ chart-tests:\n+ runs-on: ubuntu-latest\n+ name: chart K8S v${{ matrix.k8sVersion }} (CM v${{ matrix.certManager }})\n+ env:\n+ USE_EXISTING_CLUSTER: true\n+ operatorNamespace: harbor-operator-ns\n+ dockerImage: harbor-operator:dev_test\n+\n+ strategy:\n+ fail-fast: false\n+ matrix:\n+ # https://github.com/jetstack/cert-manager/tags\n+ certManager:\n+ - \"1.1.0\"\n+\n+ # https://snapcraft.io/microk8s\n+ k8sVersion:\n+ - \"1.19.1\"\n+\n+ ingress:\n+ - \"0.35.0\"\n+\n+ steps:\n+ - uses: actions/checkout@v2\n+\n+ - uses: actions/setup-go@v2\n+ with:\n+ go-version: 1.14\n+\n+ - name: Install Kubernetes v${{ matrix.k8sVersion }}\n+ uses: helm/kind-action@v1.1.0\n+ with:\n+ version: v0.9.0\n+ node_image: kindest/node:v${{ matrix.k8sVersion }}\n+ cluster_name: harbor\n+ config: .github/kind.yaml\n+\n+ - name: Install CertManager v${{ matrix.certManager }}\n+ run: |\n+ kubectl apply -f \"https://github.com/jetstack/cert-manager/releases/download/v${{ matrix.certManager }}/cert-manager.yaml\"\n+ sleep 5\n+ time kubectl -n cert-manager wait --for=condition=Available deployment --all --timeout 300s\n+\n+ - name: Install Ingress\n+ run: |\n+ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v${{ matrix.ingress }}/deploy/static/provider/kind/deploy.yaml\n+ time kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=300s\n+\n+ - name: build harbor-operator\n+ run: |\n+ make manifests docker-build IMG=${dockerImage}\n+ kind load docker-image ${dockerImage} --name harbor\n+\n+ - name: install harbor-operator\n+ run: |\n+ set -ex\n+ make helm-install NAMESPACE=\"${operatorNamespace}\" IMG=${dockerImage}\n+ kubectl -n \"${operatorNamespace}\" wait --for=condition=Available deployment --all --timeout 300s\n+\n+ if ! time kubectl -n ${operatorNamespace} wait --for=condition=Available deployment --all --timeout 300s; then\n+ kubectl get all -n ${operatorNamespace}\n+ exit 1\n+ fi\n+\n+ - name: install harbor\n+ run: |\n+ export GITHUB_TOKEN=xxx\n+ set -ex\n+ IP=`hostname -I | awk '{print $1}'`\n+ echo \"IP=$IP\" >> $GITHUB_ENV\n+ CORE_HOST=core.$IP.nip.io\n+ NOTARY_HOST=notary.$IP.nip.io\n+ echo \"CORE_HOST=$CORE_HOST\" >> $GITHUB_ENV\n+ echo \"NOTARY_HOST=$NOTARY_HOST\" >> $GITHUB_ENV\n+ sed -i \"s/core.harbor.domain/$CORE_HOST/g\" config/samples/harborcluster/*.yaml\n+ sed -i \"s/notary.harbor.domain/$NOTARY_HOST/g\" config/samples/harborcluster/*.yaml\n+ sed -i \"s/logLevel: info/logLevel: debug/g\" config/samples/harborcluster/goharbor_v1alpha2_harborcluster.yaml\n+\n+ make sample-harborcluster\n+\n+ for i in $(seq 1 7);do\n+ sleep 30\n+ echo $i\n+ kubectl get all\n+ done\n+ if ! time kubectl wait --for=condition=Ready pod --all --timeout 600s && ! time kubectl wait --for=condition=Ready pod --all --timeout 60s; then\n+ echo install harbor failed\n+ kubectl get all\n+\n+ for n in $(kubectl get po |grep -v Running|grep -v NAME|awk '{print $1}');do\n+ echo describe $n\n+ kubectl describe pod $n\n+ echo show log $n\n+ kubectl logs --tail 100 $n || true\n+ done\n+ kubectl logs -l control-plane=harbor-operator -n ${operatorNamespace} --tail 100\n+ exit 1\n+ else\n+ kubectl get all\n+ kubectl get harbor -o wide\n+ kubectl get harborcluster -o wide\n+ fi\n+ free -h\n+\n+ - name: test harbor\n+ run: |\n+ set -ex\n+ curl https://$CORE_HOST/api/v2.0/systeminfo -i -k -f\n+ sudo mkdir -p /etc/docker/certs.d/$CORE_HOST\n+ kubectl get secret sample-public-certificate -o jsonpath='{.data.ca\\.crt}' \\\n+ | base64 --decode \\\n+ | sudo tee /etc/docker/certs.d/$CORE_HOST/harbor_ca.crt\n+ # docker login, create image, docker push, docker pull\n+ docker login $CORE_HOST -u admin -p Harbor12345 || (kubectl get po;kubectl logs -l goharbor.io/operator-controller=core;exit 1)\n+ docker run busybox dd if=/dev/urandom of=test count=10 bs=1MB\n+ DOCKERID=`docker ps -l -q`\n+ docker commit $DOCKERID $CORE_HOST/library/busybox:test\n+ docker push $CORE_HOST/library/busybox:test\n+ docker pull $CORE_HOST/library/busybox:test\n+\n+ - name: apidb test\n+ run: |\n+ git clone https://github.com/goharbor/harbor -b v2.1.2\n+ kubectl patch deploy harborcluster-sample-harbor-harbor-core -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"core\",\"env\":[{\"name\":\"GC_TIME_WINDOW_HOURS\",\"value\":\"0\"}]}]}}}}'\n+ sleep 5\n+ kubectl wait --for=condition=Ready pod --all --timeout 600s\n+ docker run --rm -t --privileged -v `pwd`/harbor:/drone -v /etc/docker/certs.d/$CORE_HOST/:/ca -v /etc/docker/certs.d/$CORE_HOST/:/root/.docker/tls/$NOTARY_HOST/ -e NOTARY_URL=https://$NOTARY_HOST -w /drone goharbor/harbor-e2e-engine:2.6 \\\n+ python -u -m robot --exclude gc -v DOCKER_USER:${{ secrets.DOCKER_USER }} -v DOCKER_PWD:${{ secrets.DOCKER_TOKEN }} -v ip:$CORE_HOST -v ip1: -v HARBOR_PASSWORD:Harbor12345 -X \\\n+ /drone/tests/robot-cases/Group1-Nightly/Setup.robot /drone/tests/robot-cases/Group0-BAT/API_DB.robot\n+\n+ - name: fetch harbor logs\n+ if: ${{ failure() }}\n+ run: |\n+ mkdir -p /tmp/harbor\n+ for name in core jobservice registry registryctl trivy chartmuseum notaryserver notarysigner portal; do \\\n+ kubectl -n cluster-sample-ns logs -l \"goharbor.io/operator-controller=$name\" --all-containers > /tmp/harbor/$name.log ; \\\n+ done\n+ kubectl -n cluster-sample-ns logs -l \"application=spilo\" --all-containers > /tmp/harbor/db.log\n+ kubectl -n cluster-sample-ns logs -l \"app.kubernetes.io/component=redis\" > /tmp/harbor/redis.log\n+\n+ - uses: actions/upload-artifact@v2\n+ if: ${{ failure() }}\n+ with:\n+ name: harbor-chart\n+ path: /tmp/harbor\n+\n+ - name: fetch logs\n+ if: ${{ failure() }}\n+ run: |\n+ mkdir -p /tmp/logs\n+ kind export logs --name harbor /tmp/logs\n+\n+ - uses: actions/upload-artifact@v2\n+ if: ${{ failure() }}\n+ with:\n+ name: kind-chart\n+ path: /tmp/logs\n+\n+ - name: Get logs for debug\n+ if: ${{ failure() }}\n+ run: |\n+ set -x\n+ kubectl get all -n \"${operatorNamespace}\" -o wide\n+ kubectl logs -n \"${operatorNamespace}\" -l 'control-plane=harbor-operator' --all-containers --tail=1000\n+\n# Kubernetes\ncrd-kubernetes-resources:\nruns-on: ubuntu-latest\n"
},
{
"change_type": "MODIFY",
"old_path": "charts/harbor-operator/templates/mutatingwebhookconfiguration.yaml",
"new_path": "charts/harbor-operator/templates/mutatingwebhookconfiguration.yaml",
"diff": "@@ -27,12 +27,6 @@ webhooks:\nresources:\n- harbors\nsideEffects: None\n-- clientConfig:\n- service:\n- name: {{ include \"chart.fullname\" . | quote }}\n- namespace: {{ .Release.Namespace | quote }}\n- port: {{ .Values.service.port }}\n- name: mjobservice.kb.io\n- admissionReviewVersions:\n- v1beta1\nclientConfig:\n"
},
{
"change_type": "MODIFY",
"old_path": "config/helm/webhook/mutatingwebhook_endpoint_patch.yaml",
"new_path": "config/helm/webhook/mutatingwebhook_endpoint_patch.yaml",
"diff": "@@ -10,12 +10,6 @@ webhooks:\nname: '{{ include \"chart.fullname\" . | quote }}'\nnamespace: '{{ .Release.Namespace | quote }}'\nport: '{{ .Values.service.port }}'\n-- name: mjobservice.kb.io\n- clientConfig:\n- service:\n- name: '{{ include \"chart.fullname\" . | quote }}'\n- namespace: '{{ .Release.Namespace | quote }}'\n- port: '{{ .Values.service.port }}'\n- name: mharborcluster.kb.io\nclientConfig:\nservice:\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/kustomizeconfig/harborcluster.yaml",
"diff": "+# This file is for teaching kustomize how to substitute name in Core\n+nameReference:\n+- kind: Secret\n+ version: v1\n+ fieldSpecs:\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/adminInitialPasswordRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/chartmuseum/imagePullSecrets/items/name\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/core/imagePullSecrets/items/name\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/database/passwordRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/encryptionKeyRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/expose/core/tls/certificateRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/expose/notary/tls/certificateRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/harborAdminPasswordRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/imageChartStorage/s3/secretkeyRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/imageChartStorage/swift/passwordRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/imageChartStorage/swift/secretkeyRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/jobservice/imagePullSecrets/items/name\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/notary/server/imagePullSecrets/items/name\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/notary/signer/imagePullSecrets/items/name\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/portal/imagePullSecrets/items/name\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/redis/passwordRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/registry/imagePullSecrets/items/name\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/registry/storageMiddlewares/optionsRef\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/trivy/imagePullSecrets/items/name\n+\n+- kind: PersistentVolumeClaim\n+ version: v1\n+ fieldSpecs:\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/imageChartStorage/filesystem/chartPersistentVolume/claimName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/imageChartStorage/filesystem/registryPersistentVolume/claimName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/trivyStorage/cachePersistentVolume/claimName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/trivyStorage/reportsPersistentVolume/claimName\n+\n+- kind: Service\n+ version: v1\n+ fieldSpecs:\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/database/hosts/host\n+\n+- kind: ServiceAccount\n+ version: v1\n+ fieldSpecs:\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/chartmuseum/serviceAccountName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/core/serviceAccountName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/jobservice/serviceAccountName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/notary/server/serviceAccountName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/notary/signer/serviceAccountName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/portal/serviceAccountName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/registry/serviceAccountName\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/trivy/serviceAccountName\n+\n+- kind: Issuer\n+ group: cert-manager.io\n+ fieldSpecs:\n+ - kind: HarborCluster\n+ group: goharbor.io\n+ path: spec/core/tokenIssuer/name\n"
},
{
"change_type": "MODIFY",
"old_path": "config/kustomizeconfig/kustomization.yaml",
"new_path": "config/kustomizeconfig/kustomization.yaml",
"diff": "@@ -4,6 +4,7 @@ configurations:\n- chartmuseum.yaml\n- core.yaml\n- harbor.yaml\n+- harborcluster.yaml\n- jobservice.yaml\n- portal.yaml\n- registry.yaml\n"
},
{
"change_type": "MODIFY",
"old_path": "config/samples/harborcluster/goharbor_v1alpha2_harborcluster.yaml",
"new_path": "config/samples/harborcluster/goharbor_v1alpha2_harborcluster.yaml",
"diff": "@@ -2,10 +2,12 @@ apiVersion: goharbor.io/v1alpha2\nkind: HarborCluster\nmetadata:\nname: harborcluster-sample\n- namespace: cluster-sample-ns\nspec:\n+ logLevel: info\n+ imageSource:\n+ repository: quay.io/goharbor\nharborAdminPasswordRef: admin-core-secret\n- externalURL: https://sample.harbor.domain\n+ externalURL: https://core.harbor.domain\nredis:\nhost: harbor-redis-master\nport: 6379\n@@ -20,7 +22,12 @@ spec:\nexpose:\ncore:\ningress:\n- host: sample.harbor.domain\n+ host: core.harbor.domain\n+ tls:\n+ certificateRef: sample-public-certificate\n+ notary:\n+ ingress:\n+ host: notary.harbor.domain\ntls:\ncertificateRef: sample-public-certificate\nencryptionKeyRef: core-database-encryption\n@@ -32,52 +39,19 @@ spec:\ntokenIssuer:\nname: service-token\nkind: Issuer\n+ trivy:\n+ skipUpdate: false\n+ storage:\n+ reportsPersistentVolume:\n+ claimName: sample-harbor-trivy-reports\n+ cachePersistentVolume:\n+ claimName: sample-harbor-trivy-cache\n+ chartmuseum: {}\n+ notary:\n+ migrationEnabled: true\nimageChartStorage:\nfilesystem:\nregistryPersistentVolume:\nclaimName: sample-harbor-registry\n- inClusterDatabase:\n- kind: PostgresSQL\n- postgresSqlSpec:\n- storage: 1Gi\n- replicas: 2\n- version: \"12\"\n- resources:\n- limits:\n- cpu: 500m\n- memory: 500Mi\n- requests:\n- cpu: 100m\n- memory: 250Mi\n- inClusterStorage:\n- kind: MinIO\n- minIOSpec:\n- replicas: 2\n- volumesPerServer: 2\n- version: RELEASE.2020-08-13T02-39-50Z\n- volumeClaimTemplate:\n- spec:\n- accessModes:\n- - ReadWriteOnce\n- resources:\n- requests:\n- storage: 10Gi\n- resources:\n- requests:\n- memory: 1Gi\n- cpu: 500m\n- limits:\n- memory: 1Gi\n- cpu: 1000m\n- inClusterCache:\n- kind: Redis\n- redisSpec:\n- server:\n- replicas: 1\n- resources:\n- limits:\n- cpu: 500m\n- memory: 500Mi\n- requests:\n- cpu: 100m\n- memory: 250Mi\n\\ No newline at end of file\n+ chartPersistentVolume:\n+ claimName: sample-harbor-chart\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/samples/harborcluster/https.yaml",
"diff": "+apiVersion: cert-manager.io/v1alpha2\n+kind: Issuer\n+metadata:\n+ name: sample-public-certificate\n+spec:\n+ selfSigned: {}\n+---\n+apiVersion: cert-manager.io/v1alpha2\n+kind: Certificate\n+metadata:\n+ name: sample-public-certificate\n+spec:\n+ isCA: true\n+ issuerRef:\n+ name: sample-public-certificate\n+ secretName: sample-public-certificate\n+ dnsNames:\n+ - core.harbor.domain\n+ - notary.harbor.domain\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/samples/harborcluster/kustomization.yaml",
"diff": "+apiVersion: kustomize.config.k8s.io/v1beta1\n+kind: Kustomization\n+commonLabels:\n+ sample: \"true\"\n+\n+resources:\n+- https.yaml\n+- service_token_issuer.yaml\n+- storage.yaml\n+- goharbor_v1alpha2_harborcluster.yaml\n+\n+secretGenerator:\n+- name: admin-core-secret\n+ literals:\n+ - secret=Harbor12345\n+ type: \"goharbor.io/single-secret\"\n+- name: core-database-encryption\n+ literals:\n+ - secret=1234567890123456\n+ type: \"goharbor.io/single-secret\"\n+\n+bases:\n+ - ../../kustomizeconfig\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/samples/harborcluster/service_token_issuer.yaml",
"diff": "+apiVersion: cert-manager.io/v1alpha2\n+kind: Issuer\n+metadata:\n+ name: service-token\n+spec:\n+ selfSigned: {}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/samples/harborcluster/storage.yaml",
"diff": "+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-registry\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 5Gi\n+---\n+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-trivy-reports\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 5Gi\n+---\n+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-trivy-cache\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 5Gi\n+---\n+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-chart\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 5Gi\n+---\n\\ No newline at end of file\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
add chart for harborcluster
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,881
|
14.03.2021 13:49:56
| -28,800
|
e98e0e0f2ce19f0262a2f3f3fa0adb7b78e09ee0
|
feat: inject minio cert to chartmuseum component
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/chartmuseum_types.go",
"new_path": "apis/goharbor.io/v1alpha2/chartmuseum_types.go",
"diff": "@@ -40,6 +40,8 @@ type ChartMuseumList struct {\ntype ChartMuseumSpec struct {\nharbormetav1.ComponentSpec `json:\",inline\"`\n+ CertificateInjection `json:\",inline\"`\n+\n// +kubebuilder:validation:Optional\nLog ChartMuseumLogSpec `json:\"log,omitempty\"`\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harbor_types.go",
"new_path": "apis/goharbor.io/v1alpha2/harbor_types.go",
"diff": "@@ -267,6 +267,8 @@ type RegistryComponentSpec struct {\ntype ChartMuseumComponentSpec struct {\nharbormetav1.ComponentSpec `json:\",inline\"`\n+ CertificateInjection `json:\",inline\"`\n+\n// +kubebuilder:validation:Optional\n// +kubebuilder:default=false\n// Harbor defaults ChartMuseum to returning relative urls,\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/zz_generated.deepcopy.go",
"new_path": "apis/goharbor.io/v1alpha2/zz_generated.deepcopy.go",
"diff": "@@ -303,6 +303,7 @@ func (in *ChartMuseumChartStorageSpec) DeepCopy() *ChartMuseumChartStorageSpec {\nfunc (in *ChartMuseumComponentSpec) DeepCopyInto(out *ChartMuseumComponentSpec) {\n*out = *in\nin.ComponentSpec.DeepCopyInto(&out.ComponentSpec)\n+ in.CertificateInjection.DeepCopyInto(&out.CertificateInjection)\n}\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartMuseumComponentSpec.\n@@ -436,6 +437,7 @@ func (in *ChartMuseumServerSpec) DeepCopy() *ChartMuseumServerSpec {\nfunc (in *ChartMuseumSpec) DeepCopyInto(out *ChartMuseumSpec) {\n*out = *in\nin.ComponentSpec.DeepCopyInto(&out.ComponentSpec)\n+ in.CertificateInjection.DeepCopyInto(&out.CertificateInjection)\nin.Log.DeepCopyInto(&out.Log)\nin.Authentication.DeepCopyInto(&out.Authentication)\nin.Server.DeepCopyInto(&out.Server)\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/chartmuseum/deployments.go",
"new_path": "controllers/goharbor/chartmuseum/deployments.go",
"diff": "@@ -80,6 +80,12 @@ func (r *Reconciler) GetDeployment(ctx context.Context, chartMuseum *goharborv1a\nMountPath: ConfigPath,\n}}\n+ // inject s3 cert if need.\n+ if chartMuseum.Spec.CertificateInjection.ShouldInject() {\n+ volumes = append(volumes, chartMuseum.Spec.CertificateInjection.GenerateVolumes()...)\n+ volumeMounts = append(volumeMounts, chartMuseum.Spec.CertificateInjection.GenerateVolumeMounts()...)\n+ }\n+\nif chartMuseum.Spec.Authentication.BasicAuthRef != \"\" {\nenvs = append(envs, corev1.EnvVar{\nName: \"BASIC_AUTH_USER\",\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/chartmuseum.go",
"new_path": "controllers/goharbor/harbor/chartmuseum.go",
"diff": "@@ -121,6 +121,7 @@ func (r *Reconciler) GetChartMuseum(ctx context.Context, harbor *goharborv1alpha\nDebug: debug,\nJSON: true,\n},\n+ CertificateInjection: harbor.Spec.ChartMuseum.CertificateInjection,\n},\n}, nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/harbor/harbor.go",
"new_path": "pkg/cluster/controllers/harbor/harbor.go",
"diff": "@@ -232,8 +232,11 @@ func harborClusterCRStatus(harbor *v1alpha2.Harbor) *lcm.CRStatus {\n// injectS3CertToHarborComponents injects s3 cert to harbor spec.\nfunc injectS3CertToHarborComponents(harbor *v1alpha2.Harbor) {\n- if storage := harbor.Spec.ImageChartStorage; storage != nil {\n- if storage.S3 != nil && storage.S3.CertificateRef != \"\" {\n+ storage := harbor.Spec.ImageChartStorage\n+ if storage == nil || storage.S3 == nil || storage.S3.CertificateRef == \"\" {\n+ return\n+ }\n+\ncertRef := storage.S3.CertificateRef\n// inject cert to component core\nharbor.Spec.Core.CertificateRefs = append(harbor.Spec.Core.CertificateRefs, certRef)\n@@ -243,6 +246,8 @@ func injectS3CertToHarborComponents(harbor *v1alpha2.Harbor) {\nif harbor.Spec.Trivy != nil {\nharbor.Spec.Trivy.CertificateRefs = append(harbor.Spec.Trivy.CertificateRefs, certRef)\n}\n- }\n+ // inject cert to chartmuseum\n+ if harbor.Spec.ChartMuseum != nil {\n+ harbor.Spec.ChartMuseum.CertificateRefs = append(harbor.Spec.ChartMuseum.CertificateRefs, certRef)\n}\n}\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat: inject minio cert to chartmuseum component
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,890
|
14.03.2021 16:35:55
| 0
|
29be93341736e7304a674ef7b6ef79a37bb1fec2
|
fix: requeue request when optimistic lock error found
Do manual retry without error when an optimistic lock error found. For
more info, see
Closes
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/controller/errors.go",
"new_path": "pkg/controller/errors.go",
"diff": "@@ -2,6 +2,8 @@ package controller\nimport (\n\"context\"\n+ \"strings\"\n+ \"time\"\n\"github.com/goharbor/harbor-operator/pkg/factories/logger\"\n\"github.com/opentracing/opentracing-go\"\n@@ -12,15 +14,27 @@ import (\n\"sigs.k8s.io/controller-runtime/pkg/client\"\n)\n+const optimisticLockErrorMsg = \"the object has been modified; please apply your changes to the latest version and try again\"\n+\ntype causer interface {\nCause() error\n}\n+func IsOptimisticLockError(err error) bool {\n+ return strings.Contains(err.Error(), optimisticLockErrorMsg)\n+}\n+\nfunc (c *Controller) HandleError(ctx context.Context, resource runtime.Object, resultError error) (ctrl.Result, error) {\nif resultError == nil {\nreturn ctrl.Result{}, c.SetSuccessStatus(ctx, resource)\n}\n+ // Do manual retry without error when resultError is an optimistic lock error.\n+ // For more info, see https://github.com/kubernetes/kubernetes/issues/28149\n+ if IsOptimisticLockError(resultError) {\n+ return ctrl.Result{RequeueAfter: time.Second}, nil\n+ }\n+\nspan, ctx := opentracing.StartSpanFromContext(ctx, \"handleError\", opentracing.Tags{\n\"Resource\": resource,\n\"error\": resultError,\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: requeue request when optimistic lock error found
Do manual retry without error when an optimistic lock error found. For
more info, see https://github.com/kubernetes/kubernetes/issues/28149
Closes #493
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,890
|
14.03.2021 16:24:02
| 0
|
6710d3a3bbc27658259aa4e0fb846464a1fe68ef
|
fix: mark resource as unchanged when it's immutable
1. Add immutable annotation to the resource when it's immutable.
2. Mark the resource as unchanged when immutable annotation found to
skip the update action for it.
3. Add immutable annotation to the secret resource when it's immutable.
Closes
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/controller/resource.go",
"new_path": "pkg/controller/resource.go",
"diff": "@@ -42,6 +42,7 @@ func (c *Controller) Changed(ctx context.Context, depManager *checksum.Dependenc\nresult := resource.DeepCopyObject()\n+ // nolint:go-golangci-lint,nestif\nif result, ok := result.(resources.Resource); ok {\nerr = c.Client.Get(ctx, objectKey, result)\nif err != nil {\n@@ -52,6 +53,10 @@ func (c *Controller) Changed(ctx context.Context, depManager *checksum.Dependenc\nreturn true, nil\n}\n+ if isImmutableResource(result) {\n+ return false, nil\n+ }\n+\nchecksum.CopyVersion(result.(metav1.Object), resource)\nresultAnnotations := result.GetAnnotations()\n@@ -337,31 +342,7 @@ func (c *Controller) AddSecretToManage(ctx context.Context, resource *corev1.Sec\nreturn nil, nil\n}\n- mutate, err := c.GlobalMutateFn(ctx)\n- if err != nil {\n- return nil, err\n- }\n-\n- res := &Resource{\n- mutable: mutate,\n- checkable: statuscheck.True,\n- resource: resource,\n- }\n-\n- g := sgraph.Get(ctx)\n- if g == nil {\n- return nil, errors.Errorf(\"no graph in current context\")\n- }\n-\n- return res, g.AddResource(ctx, res, dependencies, c.ProcessFunc(ctx, resource, dependencies...))\n-}\n-\n-func (c *Controller) AddImmutableSecretToManage(ctx context.Context, resource *corev1.Secret, dependencies ...graph.Resource) (graph.Resource, error) {\n- if resource == nil {\n- return nil, nil\n- }\n-\n- mutate, err := c.GlobalMutateFn(ctx)\n+ mutate, err := c.SecretMutateFn(ctx, resource.Immutable)\nif err != nil {\nreturn nil, err\n}\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: mark resource as unchanged when it's immutable
1. Add immutable annotation to the resource when it's immutable.
2. Mark the resource as unchanged when immutable annotation found to
skip the update action for it.
3. Add immutable annotation to the secret resource when it's immutable.
Closes #494
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,890
|
15.03.2021 09:40:49
| 0
|
6b1c4d83329d82e7778fb18634d7da3660f0533e
|
fix: correct the image in the cluster deployment.yaml
|
[
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -122,6 +122,10 @@ spec:\n- host\ntype: object\ntype: object\n+ certificateRefs:\n+ items:\n+ type: string\n+ type: array\nchart:\nproperties:\nallowOverwrite:\n@@ -1959,6 +1963,10 @@ spec:\ndefault: false\ndescription: Harbor defaults ChartMuseum to returning relative urls, if you want using absolute url you should enable it\ntype: boolean\n+ certificateRefs:\n+ items:\n+ type: string\n+ type: array\nimage:\ndescription: Image name for the component.\ntype: string\n@@ -2220,6 +2228,7 @@ spec:\ntype: object\ntype: object\nnotary:\n+ description: The ingress of the notary, required when notary component enabled.\nproperties:\ningress:\nproperties:\n@@ -3638,6 +3647,10 @@ spec:\ndefault: false\ndescription: Harbor defaults ChartMuseum to returning relative urls, if you want using absolute url you should enable it\ntype: boolean\n+ certificateRefs:\n+ items:\n+ type: string\n+ type: array\nimage:\ndescription: Image name for the component.\ntype: string\n@@ -3899,6 +3912,7 @@ spec:\ntype: object\ntype: object\nnotary:\n+ description: The ingress of the notary, required when notary component enabled.\nproperties:\ningress:\nproperties:\n@@ -14443,7 +14457,7 @@ spec:\nvalueFrom:\nfieldRef:\nfieldPath: metadata.namespace\n- image: heww/harbor-operator:dev\n+ image: goharbor/harbor-operator:dev_develop\nlivenessProbe:\nhttpGet:\npath: /healthz\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: correct the image in the cluster deployment.yaml
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,890
|
16.03.2021 05:56:06
| 0
|
597adcdd98aa3e74013803c3df08751cf8f53a3d
|
feat: watch the crd and owns object when crd ready
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -208,10 +208,6 @@ jobs:\nexit 1\nfi\n- # HACK: restart the harbor-operator pod so that the manager of the harbor cluster can own the redis and postgres types\n- kubectl -n ${operatorNamespace} delete pod -l 'control-plane=harbor-operator'\n- kubectl -n ${operatorNamespace} wait --for=condition=ready pod -l 'control-plane=harbor-operator' --timeout 300s\n-\n- name: install harbor\nrun: |\nset -ex\n@@ -232,8 +228,11 @@ jobs:\nkubectl -n cluster-sample-ns get all\ndone\n- kubectl -n cluster-sample-ns wait --for=condition=InProgress=False --for=condition=Failed=False harborcluster harborcluster-sample --timeout 600s\n- if [ $? -ne 0 ] ; then\n+ function wait-for-condition () {\n+ time kubectl -n cluster-sample-ns wait --for=condition=$1 harborcluster harborcluster-sample --timeout $2\n+ }\n+\n+ if ! wait-for-condition InProgress=False 600s && ! wait-for-condition Failed=False 60s; then\necho install harbor failed\nkubectl get all -n cluster-sample-ns\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harborcluster_types.go",
"new_path": "apis/goharbor.io/v1alpha2/harborcluster_types.go",
"diff": "@@ -157,6 +157,8 @@ type HarborClusterStatus struct {\n// Status can be \"unknown\", \"creating\", \"healthy\" and \"unhealthy\"\nStatus ClusterStatus `json:\"status\"`\n+ ObservedGeneration int64 `json:\"observedGeneration,omitempty\"`\n+\n// Revision of the status\n// Use unix nano\nRevision int64 `json:\"revision\"`\n"
},
{
"change_type": "MODIFY",
"old_path": "charts/harbor-operator/templates/clusterrole.yaml",
"new_path": "charts/harbor-operator/templates/clusterrole.yaml",
"diff": "@@ -86,6 +86,7 @@ rules:\nverbs:\n- get\n- list\n+ - watch\n- apiGroups:\n- apps\nresources:\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/ctrl_setup.go",
"new_path": "controllers/goharbor/harborcluster/ctrl_setup.go",
"diff": "@@ -5,6 +5,7 @@ import (\n\"github.com/go-logr/logr\"\ngoharborv1alpha2 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha2\"\n+ \"github.com/goharbor/harbor-operator/pkg/builder\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/cache\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/database\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/harbor\"\n@@ -19,11 +20,8 @@ import (\n\"github.com/pkg/errors\"\nredisOp \"github.com/spotahome/redis-operator/api/redisfailover/v1\"\npostgresv1 \"github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1\"\n- \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions\"\n\"k8s.io/apimachinery/pkg/api/equality\"\n- metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\"k8s.io/apimachinery/pkg/runtime\"\n- \"k8s.io/client-go/dynamic\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/client\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n@@ -66,9 +64,9 @@ type Reconciler struct {\n// +kubebuilder:rbac:groups=\"\",resources=pods,verbs=get;list;watch;create;update;patch;delete\n// +kubebuilder:rbac:groups=apps,resources=statefulsets;deployments,verbs=get;list;watch;create;update;patch;delete\n// +kubebuilder:rbac:groups=goharbor.io,resources=harbors,verbs=get;list;watch;create;update;patch;delete\n-// +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list\n+// +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch\n-func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error { // nolint:funlen\n+func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error {\nif err := r.ctrl.SetupWithManager(ctx, mgr); err != nil {\nreturn err\n}\n@@ -113,27 +111,17 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nk8s.WithScheme(mgr.GetScheme()),\nk8s.WithClient(mgr.GetClient()))\n- builder := ctrl.NewControllerManagedBy(mgr).\n+ return builder.ControllerManagedBy(mgr).\nFor(&goharborv1alpha2.HarborCluster{}).\nOwns(&goharborv1alpha2.Harbor{}).\n+ TryOwns(&minio.Tenant{}, minioCRD).\n+ TryOwns(&postgresv1.Postgresql{}, postgresCRD).\n+ TryOwns(&redisOp.RedisFailover{}, redisCRD).\nWithEventFilter(harborClusterPredicateFuncs).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: int(concurrentReconcile),\n- })\n-\n- if r.CRDInstalled(ctx, dClient.RawClient(), minioCRD) {\n- builder.Owns(&minio.Tenant{})\n- }\n-\n- if r.CRDInstalled(ctx, dClient.RawClient(), postgresCRD) {\n- builder.Owns(&postgresv1.Postgresql{})\n- }\n-\n- if r.CRDInstalled(ctx, dClient.RawClient(), redisCRD) {\n- builder.Owns(&redisOp.RedisFailover{})\n- }\n-\n- return builder.Complete(r)\n+ }).\n+ Complete(r)\n}\n// New HarborCluster reconciler.\n@@ -168,14 +156,3 @@ var harborClusterPredicateFuncs = predicate.Funcs{\nreturn true\n},\n}\n-\n-func (r *Reconciler) CRDInstalled(ctx context.Context, client dynamic.Interface, crdName string) bool {\n- _, err := client.Resource(apiextensions.Resource(\"customresourcedefinitions\").WithVersion(\"v1\")).Get(ctx, crdName, metav1.GetOptions{})\n- if err != nil {\n- r.Log.Error(err, \"check crd installed err\", \"crd\", crdName)\n-\n- return false\n- }\n-\n- return true\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/harborcluster.go",
"new_path": "controllers/goharbor/harborcluster/harborcluster.go",
"diff": "@@ -14,12 +14,6 @@ import (\nctrl \"sigs.k8s.io/controller-runtime\"\n)\n-const (\n- DefaultWaitCycleTime = 5\n-)\n-\n-var defaultWaitCycle = ctrl.Result{RequeueAfter: DefaultWaitCycleTime * time.Second}\n-\n// Reconcile logic of the HarborCluster.\nfunc (r *Reconciler) Reconcile(req ctrl.Request) (res ctrl.Result, err error) { // nolint:funlen\nctx := r.ctrl.NewContext(req)\n@@ -117,7 +111,8 @@ func (r *Reconciler) Reconcile(req ctrl.Request) (res ctrl.Result, err error) {\nif !st.DependsReady() {\nr.Log.Info(\"not all the dependent services are ready\")\n- return defaultWaitCycle, nil\n+ // The controller owns the dependent services so just return directly.\n+ return ctrl.Result{}, nil\n}\n// Create Harbor instance now\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -3539,6 +3539,9 @@ spec:\n- type\ntype: object\ntype: array\n+ observedGeneration:\n+ format: int64\n+ type: integer\noperator:\ndescription: ControllerStatus represents the current status of the operator.\nproperties:\n@@ -13277,6 +13280,7 @@ rules:\nverbs:\n- get\n- list\n+ - watch\n- apiGroups:\n- apps\nresources:\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/scheme/scheme.go",
"new_path": "pkg/scheme/scheme.go",
"diff": "@@ -11,6 +11,7 @@ import (\n\"github.com/pkg/errors\"\nredisfailoverv1 \"github.com/spotahome/redis-operator/api/redisfailover/v1\"\npostgresv1 \"github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1\"\n+ apiextensions \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1\"\n\"k8s.io/apimachinery/pkg/runtime\"\nclientgoscheme \"k8s.io/client-go/kubernetes/scheme\"\n)\n@@ -58,6 +59,11 @@ func New(ctx context.Context) (*runtime.Scheme, error) {\nreturn nil, errors.Wrap(err, \"unable to configure minio scheme\")\n}\n+ err = apiextensions.AddToScheme(scheme)\n+ if err != nil {\n+ return nil, errors.Wrap(err, \"unable to configure apiextensions scheme\")\n+ }\n+\n// +kubebuilder:scaffold:scheme\nreturn scheme, nil\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat: watch the crd and owns object when crd ready
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,875
|
17.03.2021 14:18:51
| -28,800
|
f668ffee7381f7b73549710600bbd4cd5a703570
|
feat(certificate) Use cert-manager.io/v1
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/notaryserver_types.go",
"new_path": "apis/goharbor.io/v1alpha2/notaryserver_types.go",
"diff": "@@ -2,7 +2,6 @@ package v1alpha2\nimport (\nharbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n- certv1 \"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n@@ -80,8 +79,9 @@ type NotaryServerTrustServiceRemoteSpec struct {\nPort int64 `json:\"port,omitempty\"`\n// +kubebuilder:validation:Optional\n- // +kubebuilder:default=ECDSA\n- KeyAlgorithm certv1.PrivateKeyAlgorithm `json:\"keyAlgorithm,omitempty\"`\n+ // +kubebuilder:default=ecdsa\n+ // +kubebuilder:validation:Enum=ecdsa;rsa;ed25519\n+ KeyAlgorithm string `json:\"keyAlgorithm,omitempty\"`\n// +kubebuilder:validation:Optional\n// +kubebuilder:validation:Pattern=\"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\"\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/notaryserver.go",
"new_path": "controllers/goharbor/harbor/notaryserver.go",
"diff": "@@ -54,6 +54,7 @@ func (r *Reconciler) AddNotaryServerClientCertificate(ctx context.Context, harbo\nconst (\nNotaryServerCertificateDurationConfigKey = \"notaryserver-certificate-duration\"\n+ NotaryServerKeyAlgorithmDefaultConfig = \"ecdsa\"\nNotaryServerCertificateDurationDefaultConfig = 90 * 24 * time.Hour\n)\n@@ -167,7 +168,7 @@ const (\nNotaryServerAuthenticationService = \"harbor-notary\"\n)\n-func (r *Reconciler) GetNotaryServer(ctx context.Context, harbor *goharborv1alpha2.Harbor) (*goharborv1alpha2.NotaryServer, error) { // nolint:funlen\n+func (r *Reconciler) GetNotaryServer(ctx context.Context, harbor *goharborv1alpha2.Harbor) (*goharborv1alpha2.NotaryServer, error) {\nname := r.NormalizeName(ctx, harbor.GetName())\nnamespace := harbor.GetNamespace()\n@@ -189,11 +190,6 @@ func (r *Reconciler) GetNotaryServer(ctx context.Context, harbor *goharborv1alph\nreturn nil, errors.Wrap(err, \"cannot get storage configuration\")\n}\n- algorithm, err := r.getNotarySignerCertificateAlgorithm()\n- if err != nil {\n- return nil, errors.Wrap(err, \"algorithm configuration\")\n- }\n-\nmigrationEnabled := harbor.Spec.Notary.IsMigrationEnabled()\nreturn &goharborv1alpha2.NotaryServer{\n@@ -222,7 +218,7 @@ func (r *Reconciler) GetNotaryServer(ctx context.Context, harbor *goharborv1alph\nRemote: &goharborv1alpha2.NotaryServerTrustServiceRemoteSpec{\nHost: trustServiceHost,\nCertificateRef: authCertificateRef,\n- KeyAlgorithm: algorithm,\n+ KeyAlgorithm: NotaryServerKeyAlgorithmDefaultConfig,\nPort: goharborv1alpha2.NotarySignerAPIPort,\n},\n},\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(certificate) Use cert-manager.io/v1
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,881
|
17.03.2021 18:14:39
| -28,800
|
a40f338fc73cc6e90d6ca0d16283ffe4454f1283
|
fix: fix minio redirect enable not work and cleanup ingress resource when redirect is disable
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harborcluster_types.go",
"new_path": "apis/goharbor.io/v1alpha2/harborcluster_types.go",
"diff": "@@ -115,7 +115,7 @@ type Storage struct {\ntype StorageRedirectSpec struct {\n// Default is true\n// +kubebuilder:default:=true\n- Enable bool `json:\"enable,omitempty\"`\n+ Enable bool `json:\"enable\"`\n// +kubebuilder:validation:Optional\nExpose *HarborExposeComponentSpec `json:\"expose,omitempty\"`\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/ingress.go",
"new_path": "pkg/cluster/controllers/storage/ingress.go",
"diff": "@@ -20,7 +20,7 @@ func (m *MinIOController) applyIngress(ctx context.Context, harborcluster *gohar\nif !harborcluster.Spec.InClusterStorage.MinIOSpec.Redirect.Enable {\nm.Log.Info(\"Redirect of MinIO is not enabled\")\n- return minioUnknownStatus(), nil\n+ return m.cleanupIngress(ctx, harborcluster)\n}\n// Get current minIO ingress\n@@ -81,6 +81,32 @@ func (m *MinIOController) createIngress(ctx context.Context, harborcluster *goha\nreturn minioUnknownStatus(), nil\n}\n+// cleanupIngress cleanups ingress of minio if exist.\n+func (m *MinIOController) cleanupIngress(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*lcm.CRStatus, error) {\n+ ingress := &netv1.Ingress{}\n+\n+ err := m.KubeClient.Get(ctx, m.getMinIONamespacedName(harborcluster), ingress)\n+ if err != nil {\n+ if k8serror.IsNotFound(err) {\n+ // no need cleanup\n+ return minioUnknownStatus(), nil\n+ }\n+\n+ m.Log.Error(err, \"Get minio ingress error\")\n+\n+ return minioUnknownStatus(), err\n+ }\n+\n+ // clean ingress\n+ if err = m.KubeClient.Delete(ctx, ingress); err != nil {\n+ m.Log.Error(err, \"Delete minio ingress error\")\n+\n+ return minioUnknownStatus(), err\n+ }\n+\n+ return minioUnknownStatus(), nil\n+}\n+\nfunc (m *MinIOController) generateIngress(harborcluster *goharborv1.HarborCluster) (*netv1.Ingress, error) {\nvar tls []netv1.IngressTLS\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: fix minio redirect enable not work and cleanup ingress resource when redirect is disable
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,890
|
19.03.2021 06:50:14
| 0
|
4968acdfa07d2bc1aa953fded7524687b56669a0
|
feat: add RegistryController to components of harbor
Closes
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harbor_types.go",
"new_path": "apis/goharbor.io/v1alpha2/harbor_types.go",
"diff": "package v1alpha2\nimport (\n+ \"context\"\n\"fmt\"\n\"path\"\n\"strings\"\nharbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n+ \"github.com/goharbor/harbor-operator/pkg/image\"\ncmmeta \"github.com/jetstack/cert-manager/pkg/apis/meta/v1\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n+ \"k8s.io/apimachinery/pkg/api/equality\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\"k8s.io/apimachinery/pkg/util/validation/field\"\n)\n@@ -36,6 +39,103 @@ type Harbor struct {\nStatus harbormetav1.ComponentStatus `json:\"status,omitempty\"`\n}\n+func (h *Harbor) GetComponentSpec(ctx context.Context, component harbormetav1.Component) harbormetav1.ComponentSpec {\n+ var spec harbormetav1.ComponentSpec\n+\n+ h.deepCopyComponentSpecInto(ctx, component, &spec)\n+ h.deepCopyImageSpecInto(ctx, component, &spec)\n+\n+ return spec\n+}\n+\n+func (h *Harbor) deepCopyComponentSpecInto(_ context.Context, component harbormetav1.Component, spec *harbormetav1.ComponentSpec) {\n+ // nolint:exhaustive\n+ switch component {\n+ case harbormetav1.ChartMuseumComponent:\n+ if h.Spec.ChartMuseum != nil {\n+ h.Spec.ChartMuseum.ComponentSpec.DeepCopyInto(spec)\n+ }\n+ case harbormetav1.CoreComponent:\n+ h.Spec.Core.ComponentSpec.DeepCopyInto(spec)\n+ case harbormetav1.JobServiceComponent:\n+ h.Spec.JobService.ComponentSpec.DeepCopyInto(spec)\n+ case harbormetav1.NotaryServerComponent:\n+ if h.Spec.Notary != nil {\n+ h.Spec.Notary.Server.DeepCopyInto(spec)\n+ }\n+ case harbormetav1.NotarySignerComponent:\n+ if h.Spec.Notary != nil {\n+ h.Spec.Notary.Signer.DeepCopyInto(spec)\n+ }\n+ case harbormetav1.PortalComponent:\n+ h.Spec.Portal.DeepCopyInto(spec)\n+ case harbormetav1.RegistryComponent:\n+ h.Spec.Registry.ComponentSpec.DeepCopyInto(spec)\n+ case harbormetav1.RegistryControllerComponent:\n+ if h.Spec.RegistryController != nil {\n+ h.Spec.RegistryController.DeepCopyInto(spec)\n+ }\n+\n+ h.deepCopyNodeSelectorAndTolerationsOfRegistryInto(spec)\n+ case harbormetav1.TrivyComponent:\n+ if h.Spec.Trivy != nil {\n+ h.Spec.Trivy.ComponentSpec.DeepCopyInto(spec)\n+ }\n+ }\n+}\n+\n+func (h *Harbor) deepCopyNodeSelectorAndTolerationsOfRegistryInto(spec *harbormetav1.ComponentSpec) {\n+ if h.Spec.ImageChartStorage.FileSystem == nil {\n+ return\n+ }\n+\n+ if len(spec.NodeSelector) == 0 && len(h.Spec.Registry.NodeSelector) != 0 {\n+ in, out := &h.Spec.Registry.NodeSelector, &spec.NodeSelector\n+ *out = make(map[string]string, len(*in))\n+\n+ for key, val := range *in {\n+ (*out)[key] = val\n+ }\n+ }\n+\n+ if len(spec.Tolerations) == 0 && len(h.Spec.Registry.Tolerations) != 0 {\n+ in, out := &h.Spec.Registry.Tolerations, &spec.Tolerations\n+ *out = make([]corev1.Toleration, len(*in))\n+\n+ for i := range *in {\n+ (*in)[i].DeepCopyInto(&(*out)[i])\n+ }\n+ }\n+}\n+\n+func (h *Harbor) deepCopyImageSpecInto(ctx context.Context, component harbormetav1.Component, spec *harbormetav1.ComponentSpec) {\n+ imageSource := h.Spec.ImageSource\n+ if imageSource == nil {\n+ return\n+ }\n+\n+ if spec.Image == \"\" && (imageSource.Repository != \"\" || imageSource.TagSuffix != \"\") {\n+ getImageOptions := []image.Option{\n+ image.WithRepository(imageSource.Repository),\n+ image.WithTagSuffix(imageSource.TagSuffix),\n+ image.WithHarborVersion(h.Spec.Version),\n+ }\n+ spec.Image, _ = image.GetImage(ctx, component.String(), getImageOptions...)\n+ }\n+\n+ if spec.ImagePullPolicy == nil && imageSource.ImagePullPolicy != nil {\n+ in, out := &imageSource.ImagePullPolicy, &spec.ImagePullPolicy\n+ *out = new(corev1.PullPolicy)\n+ **out = **in\n+ }\n+\n+ if len(spec.ImagePullSecrets) == 0 && len(imageSource.ImagePullSecrets) != 0 {\n+ in, out := &imageSource.ImagePullSecrets, &spec.ImagePullSecrets\n+ *out = make([]corev1.LocalObjectReference, len(*in))\n+ copy(*out, *in)\n+ }\n+}\n+\n// +kubebuilder:object:root=true\n// +resource:path=harbors\n// HarborList contains a list of Harbor.\n@@ -115,6 +215,33 @@ func (spec *HarborSpec) ValidateNotary() *field.Error {\nreturn nil\n}\n+func (spec *HarborSpec) ValidateRegistryController() *field.Error {\n+ if spec.RegistryController == nil {\n+ return nil\n+ }\n+\n+ // nodeSelector and tolerations must equal with registry's\n+ // when the image chart storage is filesystem and the access mode of pvc is ReadWriteOnce\n+ // TODO: check the access mode of pvc is ReadWriteOnce\n+ if spec.ImageChartStorage.FileSystem != nil {\n+ if len(spec.RegistryController.NodeSelector) > 0 &&\n+ !equality.Semantic.DeepEqual(spec.RegistryController.NodeSelector, spec.Registry.NodeSelector) {\n+ p := field.NewPath(\"spec\").Child(\"registryctl\", \"nodeSelector\")\n+\n+ return field.Forbidden(p, \"must be empty or equal with spec.registry.nodeSelector\")\n+ }\n+\n+ if len(spec.RegistryController.Tolerations) > 0 &&\n+ !equality.Semantic.DeepEqual(spec.RegistryController.Tolerations, spec.Registry.Tolerations) {\n+ p := field.NewPath(\"spec\").Child(\"registryctl\", \"tolerations\")\n+\n+ return field.Forbidden(p, \"must be empty or equal with spec.registry.tolerations\")\n+ }\n+ }\n+\n+ return nil\n+}\n+\ntype HarborComponentsSpec struct {\n// +kubebuilder:validation:Required\nPortal harbormetav1.ComponentSpec `json:\"portal,omitempty\"`\n@@ -128,6 +255,9 @@ type HarborComponentsSpec struct {\n// +kubebuilder:validation:Required\nRegistry RegistryComponentSpec `json:\"registry,omitempty\"`\n+ // +kubebuilder:validation:Optional\n+ RegistryController *harbormetav1.ComponentSpec `json:\"registryctl,omitempty\"`\n+\n// +kubebuilder:validation:Optional\nChartMuseum *ChartMuseumComponentSpec `json:\"chartmuseum,omitempty\"`\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harbor_webhook.go",
"new_path": "apis/goharbor.io/v1alpha2/harbor_webhook.go",
"diff": "@@ -92,6 +92,10 @@ func (h *Harbor) Validate(old *Harbor) error {\nallErrs = append(allErrs, err)\n}\n+ if err := h.Spec.ValidateRegistryController(); err != nil {\n+ allErrs = append(allErrs, err)\n+ }\n+\nif old == nil { // create harbor resource\nif err := version.Validate(h.Spec.Version); err != nil {\nallErrs = append(allErrs, field.Invalid(field.NewPath(\"spec\").Child(\"version\"), h.Spec.Version, err.Error()))\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/harborcluster_webhook.go",
"new_path": "apis/goharbor.io/v1alpha2/harborcluster_webhook.go",
"diff": "@@ -98,6 +98,10 @@ func (hc *HarborCluster) validate(old *HarborCluster) error {\nallErrs = append(allErrs, err)\n}\n+ if err := hc.Spec.ValidateRegistryController(); err != nil {\n+ allErrs = append(allErrs, err)\n+ }\n+\nif old == nil { // create harbor resource\nif err := version.Validate(hc.Spec.Version); err != nil {\nallErrs = append(allErrs, field.Invalid(field.NewPath(\"spec\").Child(\"version\"), hc.Spec.Version, err.Error()))\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha2/zz_generated.deepcopy.go",
"new_path": "apis/goharbor.io/v1alpha2/zz_generated.deepcopy.go",
"diff": "@@ -1072,6 +1072,11 @@ func (in *HarborComponentsSpec) DeepCopyInto(out *HarborComponentsSpec) {\nin.Core.DeepCopyInto(&out.Core)\nin.JobService.DeepCopyInto(&out.JobService)\nin.Registry.DeepCopyInto(&out.Registry)\n+ if in.RegistryController != nil {\n+ in, out := &in.RegistryController, &out.RegistryController\n+ *out = new(v1alpha1.ComponentSpec)\n+ (*in).DeepCopyInto(*out)\n+ }\nif in.ChartMuseum != nil {\nin, out := &in.ChartMuseum, &out.ChartMuseum\n*out = new(ChartMuseumComponentSpec)\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/chartmuseum.go",
"new_path": "controllers/goharbor/harbor/chartmuseum.go",
"diff": "@@ -97,7 +97,7 @@ func (r *Reconciler) GetChartMuseum(ctx context.Context, harbor *goharborv1alpha\n}, harbor.Spec.Version),\n},\nSpec: goharborv1alpha2.ChartMuseumSpec{\n- ComponentSpec: r.getComponentSpec(ctx, harbor, harbormetav1.ChartMuseumComponent),\n+ ComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.ChartMuseumComponent),\nAuthentication: goharborv1alpha2.ChartMuseumAuthSpec{\nAnonymousGet: false,\nBasicAuthRef: basicAuthRef,\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/core.go",
"new_path": "controllers/goharbor/harbor/core.go",
"diff": "@@ -420,7 +420,7 @@ func (r *Reconciler) GetCore(ctx context.Context, harbor *goharborv1alpha2.Harbo\n}, harbor.Spec.Version),\n},\nSpec: goharborv1alpha2.CoreSpec{\n- ComponentSpec: r.getComponentSpec(ctx, harbor, harbormetav1.CoreComponent),\n+ ComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.CoreComponent),\nComponents: goharborv1alpha2.CoreComponentsSpec{\nRegistry: goharborv1alpha2.CoreComponentsRegistrySpec{\nRegistryControllerConnectionSpec: goharborv1alpha2.RegistryControllerConnectionSpec{\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/harbor.go",
"new_path": "controllers/goharbor/harbor/harbor.go",
"diff": "@@ -5,12 +5,10 @@ import (\n\"time\"\ngoharborv1alpha2 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha2\"\n- harbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n\"github.com/goharbor/harbor-operator/controllers\"\n\"github.com/goharbor/harbor-operator/pkg/config\"\ncommonCtrl \"github.com/goharbor/harbor-operator/pkg/controller\"\n\"github.com/goharbor/harbor-operator/pkg/event-filter/class\"\n- \"github.com/goharbor/harbor-operator/pkg/image\"\ncertv1 \"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1\"\n\"github.com/ovh/configstore\"\n\"github.com/pkg/errors\"\n@@ -84,55 +82,3 @@ func New(ctx context.Context, configStore *configstore.Store) (commonCtrl.Reconc\nreturn r, nil\n}\n-\n-func (r *Reconciler) getComponentSpec(ctx context.Context, harbor *goharborv1alpha2.Harbor, component harbormetav1.Component) harbormetav1.ComponentSpec {\n- var spec harbormetav1.ComponentSpec\n-\n- //nolint:golint,exhaustive\n- switch component {\n- case harbormetav1.ChartMuseumComponent:\n- harbor.Spec.ChartMuseum.ComponentSpec.DeepCopyInto(&spec)\n- case harbormetav1.CoreComponent:\n- harbor.Spec.Core.ComponentSpec.DeepCopyInto(&spec)\n- case harbormetav1.JobServiceComponent:\n- harbor.Spec.JobService.ComponentSpec.DeepCopyInto(&spec)\n- case harbormetav1.NotaryServerComponent:\n- harbor.Spec.Notary.Server.DeepCopyInto(&spec)\n- case harbormetav1.NotarySignerComponent:\n- harbor.Spec.Notary.Signer.DeepCopyInto(&spec)\n- case harbormetav1.PortalComponent:\n- harbor.Spec.Portal.DeepCopyInto(&spec)\n- case harbormetav1.RegistryComponent, harbormetav1.RegistryControllerComponent:\n- harbor.Spec.Registry.ComponentSpec.DeepCopyInto(&spec)\n- case harbormetav1.TrivyComponent:\n- harbor.Spec.Trivy.ComponentSpec.DeepCopyInto(&spec)\n- }\n-\n- imageSource := harbor.Spec.ImageSource\n- if imageSource == nil {\n- return spec\n- }\n-\n- if spec.Image == \"\" && (imageSource.Repository != \"\" || imageSource.TagSuffix != \"\") {\n- getImageOptions := []image.Option{\n- image.WithRepository(imageSource.Repository),\n- image.WithTagSuffix(imageSource.TagSuffix),\n- image.WithHarborVersion(harbor.Spec.Version),\n- }\n- spec.Image, _ = image.GetImage(ctx, component.String(), getImageOptions...)\n- }\n-\n- if spec.ImagePullPolicy == nil && imageSource.ImagePullPolicy != nil {\n- in, out := &imageSource.ImagePullPolicy, &spec.ImagePullPolicy\n- *out = new(corev1.PullPolicy)\n- **out = **in\n- }\n-\n- if len(spec.ImagePullSecrets) == 0 && len(imageSource.ImagePullSecrets) != 0 {\n- in, out := &imageSource.ImagePullSecrets, &spec.ImagePullSecrets\n- *out = make([]corev1.LocalObjectReference, len(*in))\n- copy(*out, *in)\n- }\n-\n- return spec\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/jobservice.go",
"new_path": "controllers/goharbor/harbor/jobservice.go",
"diff": "@@ -155,7 +155,7 @@ func (r *Reconciler) GetJobService(ctx context.Context, harbor *goharborv1alpha2\n}, harbor.Spec.Version),\n},\nSpec: goharborv1alpha2.JobServiceSpec{\n- ComponentSpec: r.getComponentSpec(ctx, harbor, harbormetav1.JobServiceComponent),\n+ ComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.JobServiceComponent),\nCore: goharborv1alpha2.JobServiceCoreSpec{\nSecretRef: coreSecretRef,\nURL: coreURL,\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/notaryserver.go",
"new_path": "controllers/goharbor/harbor/notaryserver.go",
"diff": "@@ -201,7 +201,7 @@ func (r *Reconciler) GetNotaryServer(ctx context.Context, harbor *goharborv1alph\n},\n},\nSpec: goharborv1alpha2.NotaryServerSpec{\n- ComponentSpec: r.getComponentSpec(ctx, harbor, harbormetav1.NotaryServerComponent),\n+ ComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.NotaryServerComponent),\nTLS: tls,\nAuthentication: &goharborv1alpha2.NotaryServerAuthSpec{\nToken: goharborv1alpha2.NotaryServerAuthTokenSpec{\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/notarysigner.go",
"new_path": "controllers/goharbor/harbor/notarysigner.go",
"diff": "@@ -349,7 +349,7 @@ func (r *Reconciler) GetNotarySigner(ctx context.Context, harbor *goharborv1alph\n}, harbor.Spec.Version),\n},\nSpec: goharborv1alpha2.NotarySignerSpec{\n- ComponentSpec: r.getComponentSpec(ctx, harbor, harbormetav1.NotarySignerComponent),\n+ ComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.NotarySignerComponent),\nAuthentication: goharborv1alpha2.NotarySignerAuthenticationSpec{\nCertificateRef: certificateRef,\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/portal.go",
"new_path": "controllers/goharbor/harbor/portal.go",
"diff": "@@ -60,7 +60,7 @@ func (r *Reconciler) GetPortal(ctx context.Context, harbor *goharborv1alpha2.Har\n}, harbor.Spec.Version),\n},\nSpec: goharborv1alpha2.PortalSpec{\n- ComponentSpec: r.getComponentSpec(ctx, harbor, harbormetav1.PortalComponent),\n+ ComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.PortalComponent),\nTLS: tls,\n},\n}, nil\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/registry.go",
"new_path": "controllers/goharbor/harbor/registry.go",
"diff": "@@ -214,7 +214,7 @@ func (r *Reconciler) GetRegistry(ctx context.Context, harbor *goharborv1alpha2.H\n}, harbor.Spec.Version),\n},\nSpec: goharborv1alpha2.RegistrySpec{\n- ComponentSpec: r.getComponentSpec(ctx, harbor, harbormetav1.RegistryComponent),\n+ ComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.RegistryComponent),\nRegistryConfig01: goharborv1alpha2.RegistryConfig01{\nLog: goharborv1alpha2.RegistryLogSpec{\nAccessLog: goharborv1alpha2.RegistryAccessLogSpec{\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/registryctl.go",
"new_path": "controllers/goharbor/harbor/registryctl.go",
"diff": "@@ -69,7 +69,7 @@ func (r *Reconciler) GetRegistryCtl(ctx context.Context, harbor *goharborv1alpha\n}, harbor.Spec.Version),\n},\nSpec: goharborv1alpha2.RegistryControllerSpec{\n- ComponentSpec: r.getComponentSpec(ctx, harbor, harbormetav1.RegistryControllerComponent),\n+ ComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.RegistryControllerComponent),\nRegistryRef: registryName,\nLog: goharborv1alpha2.RegistryControllerLogSpec{\nLevel: harbor.Spec.LogLevel.RegistryCtl(),\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/trivy.go",
"new_path": "controllers/goharbor/harbor/trivy.go",
"diff": "@@ -145,7 +145,7 @@ func (r *Reconciler) GetTrivy(ctx context.Context, harbor *goharborv1alpha2.Harb\n}, harbor.Spec.Version),\n},\nSpec: goharborv1alpha2.TrivySpec{\n- ComponentSpec: r.getComponentSpec(ctx, harbor, harbormetav1.TrivyComponent),\n+ ComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.TrivyComponent),\nRedis: goharborv1alpha2.TrivyRedisSpec{\nRedisConnection: redis,\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -3375,6 +3375,86 @@ spec:\ntype: object\ntype: array\ntype: object\n+ registryctl:\n+ properties:\n+ image:\n+ description: Image name for the component.\n+ type: string\n+ imagePullPolicy:\n+ description: 'Image pull policy. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'\n+ enum:\n+ - Always\n+ - Never\n+ - IfNotPresent\n+ type: string\n+ imagePullSecrets:\n+ items:\n+ description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.\n+ properties:\n+ name:\n+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'\n+ type: string\n+ type: object\n+ type: array\n+ nodeSelector:\n+ additionalProperties:\n+ type: string\n+ description: 'NodeSelector is a selector which must be true for the component to fit on a node. Selector which must match a node''s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/'\n+ type: object\n+ replicas:\n+ description: 'Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller'\n+ format: int32\n+ minimum: 0\n+ type: integer\n+ resources:\n+ description: 'Compute Resources required by this component. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'\n+ properties:\n+ limits:\n+ additionalProperties:\n+ anyOf:\n+ - type: integer\n+ - type: string\n+ pattern: ^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$\n+ x-kubernetes-int-or-string: true\n+ description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'\n+ type: object\n+ requests:\n+ additionalProperties:\n+ anyOf:\n+ - type: integer\n+ - type: string\n+ pattern: ^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$\n+ x-kubernetes-int-or-string: true\n+ description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'\n+ type: object\n+ type: object\n+ serviceAccountName:\n+ description: 'ServiceAccountName is the name of the ServiceAccount to use to run this component. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/'\n+ type: string\n+ tolerations:\n+ description: If specified, the pod's tolerations.\n+ items:\n+ description: The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.\n+ properties:\n+ effect:\n+ description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.\n+ type: string\n+ key:\n+ description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.\n+ type: string\n+ operator:\n+ description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.\n+ type: string\n+ tolerationSeconds:\n+ description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.\n+ format: int64\n+ type: integer\n+ value:\n+ description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.\n+ type: string\n+ type: object\n+ type: array\n+ type: object\ntrivy:\nproperties:\ncertificateRefs:\n@@ -4644,6 +4724,86 @@ spec:\ntype: object\ntype: array\ntype: object\n+ registryctl:\n+ properties:\n+ image:\n+ description: Image name for the component.\n+ type: string\n+ imagePullPolicy:\n+ description: 'Image pull policy. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'\n+ enum:\n+ - Always\n+ - Never\n+ - IfNotPresent\n+ type: string\n+ imagePullSecrets:\n+ items:\n+ description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.\n+ properties:\n+ name:\n+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'\n+ type: string\n+ type: object\n+ type: array\n+ nodeSelector:\n+ additionalProperties:\n+ type: string\n+ description: 'NodeSelector is a selector which must be true for the component to fit on a node. Selector which must match a node''s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/'\n+ type: object\n+ replicas:\n+ description: 'Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller'\n+ format: int32\n+ minimum: 0\n+ type: integer\n+ resources:\n+ description: 'Compute Resources required by this component. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'\n+ properties:\n+ limits:\n+ additionalProperties:\n+ anyOf:\n+ - type: integer\n+ - type: string\n+ pattern: ^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$\n+ x-kubernetes-int-or-string: true\n+ description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'\n+ type: object\n+ requests:\n+ additionalProperties:\n+ anyOf:\n+ - type: integer\n+ - type: string\n+ pattern: ^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$\n+ x-kubernetes-int-or-string: true\n+ description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'\n+ type: object\n+ type: object\n+ serviceAccountName:\n+ description: 'ServiceAccountName is the name of the ServiceAccount to use to run this component. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/'\n+ type: string\n+ tolerations:\n+ description: If specified, the pod's tolerations.\n+ items:\n+ description: The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.\n+ properties:\n+ effect:\n+ description: Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.\n+ type: string\n+ key:\n+ description: Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.\n+ type: string\n+ operator:\n+ description: Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.\n+ type: string\n+ tolerationSeconds:\n+ description: TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.\n+ format: int64\n+ type: integer\n+ value:\n+ description: Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.\n+ type: string\n+ type: object\n+ type: array\n+ type: object\ntrivy:\nproperties:\ncertificateRefs:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat: add RegistryController to components of harbor
Closes #503
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,890
|
22.03.2021 10:10:30
| 0
|
f5838094b62783bc4a4ccf19e9bd89168dc1ab9d
|
fix: correct the validate registryctl
Ensure the ImageChartStorage is not nil when validate registryctl.
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"diff": "@@ -223,7 +223,7 @@ func (spec *HarborSpec) ValidateRegistryController() *field.Error {\n// nodeSelector and tolerations must equal with registry's\n// when the image chart storage is filesystem and the access mode of pvc is ReadWriteOnce\n// TODO: check the access mode of pvc is ReadWriteOnce\n- if spec.ImageChartStorage.FileSystem != nil {\n+ if spec.ImageChartStorage != nil && spec.ImageChartStorage.FileSystem != nil {\nif len(spec.RegistryController.NodeSelector) > 0 &&\n!equality.Semantic.DeepEqual(spec.RegistryController.NodeSelector, spec.Registry.NodeSelector) {\np := field.NewPath(\"spec\").Child(\"registryctl\", \"nodeSelector\")\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: correct the validate registryctl
Ensure the ImageChartStorage is not nil when validate registryctl.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,890
|
23.03.2021 02:09:09
| 0
|
a759bd4953d20f3c3027c4188cb679af3556cb53
|
test: add tests for validate methods of HarborSpec
Add tests for ValidateNotary and ValidateRegistryController methods of
HarborSpec
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": "apis/goharbor.io/v1alpha3/v1alpha3_suite_test.go",
"diff": "+package v1alpha3_test\n+\n+import (\n+ \"testing\"\n+\n+ . \"github.com/onsi/ginkgo\"\n+ . \"github.com/onsi/gomega\"\n+)\n+\n+func TestV1alpha3(t *testing.T) {\n+ t.Parallel()\n+\n+ RegisterFailHandler(Fail)\n+ RunSpecs(t, \"V1alpha3 Suite\")\n+}\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
test: add tests for validate methods of HarborSpec
Add tests for ValidateNotary and ValidateRegistryController methods of
HarborSpec
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,881
|
24.03.2021 17:31:54
| -28,800
|
ae58766eca4f6f8ab499032393fd7e20571e66e0
|
fix: remove redis tls spec and set keepPVC as false
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"diff": "@@ -55,10 +55,6 @@ type RedisSpec struct {\n// Default is 10 connections per every CPU as reported by runtime.NumCPU.\nPoolSize int `json:\"poolSize,omitempty\"`\n- // TLS Config to use. When set TLS will be negotiated.\n- // set the secret which type of Opaque, and contains \"tls.key\",\"tls.crt\",\"ca.crt\".\n- TLSConfig string `json:\"tlsConfig,omitempty\"`\n-\nGroupName string `json:\"groupName,omitempty\"`\nHosts []RedisHosts `json:\"hosts,omitempty\"`\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -2545,9 +2545,6 @@ spec:\nstorageClassName:\ntype: string\ntype: object\n- tlsConfig:\n- description: TLS Config to use. When set TLS will be negotiated. set the secret which type of Opaque, and contains \"tls.key\",\"tls.crt\",\"ca.crt\".\n- type: string\ntype: object\nrequired:\n- kind\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/resource_manager.go",
"new_path": "pkg/cluster/controllers/cache/resource_manager.go",
"diff": "@@ -72,8 +72,6 @@ func (rm *redisResourceManager) WithCluster(cluster *goharborv1.HarborCluster) R\nfunc (rm *redisResourceManager) GetCacheCR(ctx context.Context, harborcluster *goharborv1.HarborCluster) (runtime.Object, error) {\nresource := rm.GetResourceList()\npvc, _ := GenerateStoragePVC(rm.GetStorageClass(), rm.cluster.Name, rm.GetStorageSize(), rm.GetLabels())\n- // keep pvc after cr deleted.\n- keepPVCAfterDeletion := true\nimage, err := rm.GetImage(ctx, harborcluster)\nif err != nil {\n@@ -99,7 +97,6 @@ func (rm *redisResourceManager) GetCacheCR(ctx context.Context, harborcluster *g\n},\nStorage: redisOp.RedisStorage{\nPersistentVolumeClaim: pvc,\n- KeepAfterDeletion: keepPVCAfterDeletion,\n},\nImage: image,\nImagePullPolicy: rm.getImagePullPolicy(ctx, harborcluster),\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: remove redis tls spec and set keepPVC as false
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,875
|
23.03.2021 15:09:36
| -28,800
|
c0322a30b1c5ba975d0559f17198faa8c09f6ccc
|
feat(ci) remove develop
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/build-dev.yml",
"new_path": ".github/workflows/build-dev.yml",
"diff": "@@ -4,7 +4,6 @@ on:\npush:\nbranches:\n- master\n- - develop\n- release-*\njobs:\n"
},
{
"change_type": "MODIFY",
"old_path": ".github/workflows/codeql-analysis.yml",
"new_path": ".github/workflows/codeql-analysis.yml",
"diff": "@@ -13,7 +13,7 @@ name: \"CodeQL\"\non:\npush:\n- branches: [ master, 0.5.0, 0.5.1, 0.5.2, develop, release-* ]\n+ branches: [ master, 0.5.0, 0.5.1, 0.5.2, release-* ]\npull_request:\n# The branches below must be a subset of the branches above\nbranches: [ master ]\n"
},
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -8,7 +8,6 @@ on:\nbranches:\n- master\n- release-*\n- - develop\n- feature/*\njobs:\n@@ -251,6 +250,8 @@ jobs:\nif ! wait-for-condition InProgress=False 600s && ! wait-for-condition Failed=False 60s; then\necho install harbor failed\n+ kubectl describe harborcluster -n cluster-sample-ns\n+ kubectl describe harbor -n cluster-sample-ns\nkubectl get all -n cluster-sample-ns\nfor n in $(kubectl -n cluster-sample-ns get po |grep -v Running|grep -v NAME|awk '{print $1}');do\n@@ -263,11 +264,12 @@ jobs:\nfree -h\nexit 1\nelse\n- kubectl -n cluster-sample-ns get all\n+ kubectl -n cluster-sample-ns get all -o wide\nkubectl get harbor -n cluster-sample-ns -o wide\nkubectl get harborcluster -n cluster-sample-ns -o wide\nfi\nfree -h\n+ df -h\n- name: test harbor\nrun: |\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -14628,7 +14628,7 @@ spec:\nvalueFrom:\nfieldRef:\nfieldPath: metadata.namespace\n- image: goharbor/harbor-operator:dev_develop\n+ image: goharbor/harbor-operator:dev_master\nlivenessProbe:\nhttpGet:\npath: /healthz\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/kustomization.yaml",
"new_path": "manifests/cluster/kustomization.yaml",
"diff": "@@ -42,4 +42,4 @@ images:\nnewTag: v1.0.0\n- name: goharbor/harbor-operator\nnewName: goharbor/harbor-operator\n- newTag: dev_develop\n\\ No newline at end of file\n+ newTag: dev_master\n\\ No newline at end of file\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(ci) remove develop
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,893
|
30.03.2021 12:18:27
| -28,800
|
22aef76dcf8cf8dd4f6a7182f1f6550da62a9903
|
doc(README): add status badges
CI
CODEQL
CODACY
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "# Harbor Operator\n+[](https://github.com/goharbor/harbor-operator/actions/workflows/tests.yml)\n+[](https://github.com/goharbor/harbor-operator/actions/workflows/codeql-analysis.yml)\n+[](https://www.codacy.com/gh/goharbor/harbor-operator/dashboard?utm_source=github.com&utm_medium=referral&utm_content=goharbor/harbor-operator&utm_campaign=Badge_Grade)\n+\n**ATTENTIONS: THIS PROJECT IS STILL UNDER DEVELOPMENT AND NOT STABLE YET.**\n**ATTENTIONS: WE USE THIS BRANCH TO MERGE HARBOR-CLUSTER-OPERATOR AND HARBOR-OPERATOR.**\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(README): add status badges
- CI
- CODEQL
- CODACY
|
254,881
|
30.03.2021 22:05:26
| -28,800
|
3dbad4e2ec0d58a939600c336e9ed8832de6c891
|
fix: fix incluster redis resources limit not work
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/resource_manager.go",
"new_path": "pkg/cluster/controllers/cache/resource_manager.go",
"diff": "@@ -26,7 +26,7 @@ type ResourceManager interface {\ntype ResourceGetter interface {\nGetCacheCR(ctx context.Context, harborcluster *goharborv1.HarborCluster) (runtime.Object, error)\nGetCacheCRName() string\n- GetResourceList() corev1.ResourceList\n+ GetResources() corev1.ResourceRequirements\nGetSecretName() string\nGetSecret() *corev1.Secret\nGetServerReplica() int\n@@ -70,7 +70,7 @@ func (rm *redisResourceManager) WithCluster(cluster *goharborv1.HarborCluster) R\n// GetCacheCR gets cache cr instance.\nfunc (rm *redisResourceManager) GetCacheCR(ctx context.Context, harborcluster *goharborv1.HarborCluster) (runtime.Object, error) {\n- resource := rm.GetResourceList()\n+ resources := rm.GetResources()\npvc, _ := GenerateStoragePVC(rm.GetStorageClass(), rm.cluster.Name, rm.GetStorageSize(), rm.GetLabels())\nimage, err := rm.GetImage(ctx, harborcluster)\n@@ -91,10 +91,7 @@ func (rm *redisResourceManager) GetCacheCR(ctx context.Context, harborcluster *g\nSpec: redisOp.RedisFailoverSpec{\nRedis: redisOp.RedisSettings{\nReplicas: int32(rm.GetServerReplica()),\n- Resources: corev1.ResourceRequirements{\n- Limits: resource,\n- Requests: resource,\n- },\n+ Resources: resources,\nStorage: redisOp.RedisStorage{\nPersistentVolumeClaim: pvc,\n},\n@@ -104,10 +101,7 @@ func (rm *redisResourceManager) GetCacheCR(ctx context.Context, harborcluster *g\n},\nSentinel: redisOp.SentinelSettings{\nReplicas: int32(rm.GetClusterServerReplica()),\n- Resources: corev1.ResourceRequirements{\n- Limits: resource,\n- Requests: resource,\n- },\n+ Resources: resources,\nImage: image,\nImagePullPolicy: rm.getImagePullPolicy(ctx, harborcluster),\nImagePullSecrets: rm.getImagePullSecrets(ctx, harborcluster),\n@@ -159,23 +153,16 @@ func (rm *redisResourceManager) GetLabels() map[string]string {\n}\n// GetResourceList gets redis resources.\n-func (rm *redisResourceManager) GetResourceList() corev1.ResourceList {\n- resources := corev1.ResourceList{}\n- if rm.cluster.Spec.InClusterCache.RedisSpec.Server == nil {\n- resources, _ = GenerateResourceList(defaultResourceCPU, defaultResourceMemory)\n+func (rm *redisResourceManager) GetResources() corev1.ResourceRequirements {\n+ resources := corev1.ResourceRequirements{}\n- return resources\n- }\n- // assemble cpu\n- if cpu := rm.cluster.Spec.InClusterCache.RedisSpec.Server.Resources.Requests.Cpu(); cpu != nil {\n- resources[corev1.ResourceCPU] = *cpu\n- }\n- // assemble memory\n- if mem := rm.cluster.Spec.InClusterCache.RedisSpec.Server.Resources.Requests.Memory(); mem != nil {\n- resources[corev1.ResourceMemory] = *mem\n+ if rm.cluster.Spec.InClusterCache.RedisSpec.Server == nil {\n+ resourcesList, _ := GenerateResourceList(defaultResourceCPU, defaultResourceMemory)\n+ resources.Limits = resourcesList\n+ resources.Requests = resourcesList\n}\n- return resources\n+ return rm.cluster.Spec.InClusterCache.RedisSpec.Server.Resources\n}\n// GetServerReplica gets deployment replica.\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: fix incluster redis resources limit not work
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,870
|
05.04.2021 09:23:58
| -28,800
|
9207c5436c67a180c4ce2c42523cd321d962c09f
|
fix(pg) Psql credential secret NOT FOUND error
Psql credential secret NOT FOUND error
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/readiness.go",
"new_path": "pkg/cluster/controllers/database/readiness.go",
"diff": "@@ -41,11 +41,6 @@ func (p *PostgreSQLController) Readiness(ctx context.Context, harborcluster *goh\nname := harborcluster.Name\n- conn, err = p.GetInClusterDatabaseInfo(ctx, harborcluster)\n- if err != nil {\n- return nil, err\n- }\n-\nvar pg api.Postgresql\nif err := runtime.DefaultUnstructuredConverter.\nFromUnstructured(curUnstructured.UnstructuredContent(), &pg); err != nil {\n@@ -59,6 +54,11 @@ func (p *PostgreSQLController) Readiness(ctx context.Context, harborcluster *goh\n), nil\n}\n+ conn, err = p.GetInClusterDatabaseInfo(ctx, harborcluster)\n+ if err != nil {\n+ return nil, err\n+ }\n+\nsecret, err := p.DeployComponentSecret(ctx, conn, harborcluster.Namespace, getDatabasePasswordRefName(name))\nif err != nil {\nreturn nil, err\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(pg) Psql credential secret NOT FOUND error
Psql credential secret NOT FOUND error
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,870
|
06.04.2021 21:09:35
| -28,800
|
699fb61ce1792b33e42b69de6502258c74421ffa
|
fix(database) the core and notary pods cannot start up
The core and notary pods cannot start up when reinstall the Harbor
instance
fix
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/readiness.go",
"new_path": "pkg/cluster/controllers/database/readiness.go",
"diff": "@@ -59,12 +59,7 @@ func (p *PostgreSQLController) Readiness(ctx context.Context, harborcluster *goh\nreturn nil, err\n}\n- secret, err := p.DeployComponentSecret(ctx, conn, harborcluster.Namespace, getDatabasePasswordRefName(name))\n- if err != nil {\n- return nil, err\n- }\n-\n- if err := controllerutil.SetControllerReference(harborcluster, secret, p.Scheme); err != nil {\n+ if err := p.DeployComponentSecret(ctx, conn, getDatabasePasswordRefName(name), harborcluster); err != nil {\nreturn nil, err\n}\n@@ -106,22 +101,27 @@ func getDatabasePasswordRefName(name string) string {\n}\n// DeployComponentSecret deploy harbor component database secret.\n-func (p *PostgreSQLController) DeployComponentSecret(ctx context.Context, conn *Connect, ns string, secretName string) (*corev1.Secret, error) {\n+func (p *PostgreSQLController) DeployComponentSecret(ctx context.Context, conn *Connect, secretName string, harborcluster *goharborv1.HarborCluster) error {\n+ ns := harborcluster.Namespace\nsecret := &corev1.Secret{}\nsc := p.GetDatabaseSecret(conn, ns, secretName)\n+ if err := controllerutil.SetControllerReference(harborcluster, sc, p.Scheme); err != nil {\n+ return err\n+ }\n+\nerr := p.Client.Get(ctx, types.NamespacedName{Name: secretName, Namespace: ns}, secret)\nif kerr.IsNotFound(err) {\np.Log.Info(\"Creating Harbor Component Secret\", \"namespace\", ns, \"name\", secretName)\nif err := p.Client.Create(ctx, sc); err != nil {\n- return nil, err\n+ return err\n}\n} else if err != nil {\n- return nil, err\n+ return err\n}\n- return secret, nil\n+ return nil\n}\n// GetInClusterDatabaseInfo returns inCluster database connection client.\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(database) the core and notary pods cannot start up
The core and notary pods cannot start up when reinstall the Harbor
instance
fix #528
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,875
|
08.04.2021 19:16:31
| -28,800
|
e738f78443547769de28b7984b1c1faec9c1db94
|
bump up operator 4.0.6
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -76,7 +76,7 @@ jobs:\nNOTARYSERVER_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/notary-server-photon:v2.2.1\nNOTARYSIGNER_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/notary-signer-photon:v2.2.1\nTRIVY_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/trivy-adapter-photon:v2.2.1\n- HARBORCLUSTER_MINIO_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/minio:2021-03-01T04-20-55Z\n+ HARBORCLUSTER_MINIO_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/minio:2021-04-06T23-11-00Z\nHARBORCLUSTER_REDIS_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/redis:5.0-alpine\nHARBORCLUSTER_POSTGRESQL_DOCKER_IMAGE_2_2_1: ghcr.io/goharbor/spilo-12:1.6-p3\ndockerImage: harbor-operator:dev_test\n@@ -275,6 +275,8 @@ jobs:\n- name: test harbor\nrun: |\nset -ex\n+ free -h\n+ df -h\ncurl https://$CORE_HOST/api/v2.0/systeminfo -i -k -f\nsudo mkdir -p /etc/docker/certs.d/$CORE_HOST\nkubectl -n cluster-sample-ns get secret sample-public-certificate -o jsonpath='{.data.ca\\.crt}' \\\n@@ -290,18 +292,25 @@ jobs:\n- name: apidb test\nrun: |\n- git clone https://github.com/goharbor/harbor -b v2.1.2\n+ git clone https://github.com/goharbor/harbor -b v2.2.1\n+ cd harbor\n+ sed -i '15i\\ ${dfout}= Run df -h\\n Log To Console ${dfout}' tests/resources/APITest-Util.robot\n+ cd ..\nkubectl -n cluster-sample-ns patch deploy harborcluster-sample-harbor-harbor-core -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"core\",\"env\":[{\"name\":\"GC_TIME_WINDOW_HOURS\",\"value\":\"0\"}]}]}}}}'\nsleep 5\nkubectl -n cluster-sample-ns wait --for=condition=Ready pod --all --timeout 600s\ndocker run --rm -t --privileged -v `pwd`/harbor:/drone -v /etc/docker/certs.d/$CORE_HOST/:/ca -v /etc/docker/certs.d/$CORE_HOST/:/root/.docker/tls/$NOTARY_HOST/ -e NOTARY_URL=https://$NOTARY_HOST -w /drone goharbor/harbor-e2e-engine:2.6.3 \\\npython -u -m robot -v DOCKER_USER:${{ secrets.DOCKER_USER }} -v DOCKER_PWD:${{ secrets.DOCKER_TOKEN }} -v ip:$CORE_HOST -v ip1: -v HARBOR_PASSWORD:Harbor12345 -X \\\n- --exclude gc --exclude singularity --exclude proxy_cache \\\n+ --exclude gc --exclude metrics --exclude singularity --exclude proxy_cache \\\n/drone/tests/robot-cases/Group1-Nightly/Setup.robot /drone/tests/robot-cases/Group0-BAT/API_DB.robot\n+ free -m\n+ df -h\n- name: fetch harbor logs\nif: ${{ failure() }}\nrun: |\n+ df -h\n+ free -m\nmkdir -p /tmp/harbor\nfor name in core jobservice registry registryctl trivy chartmuseum notaryserver notarysigner portal; do \\\nkubectl -n cluster-sample-ns logs -l \"goharbor.io/operator-controller=$name\" --all-containers > /tmp/harbor/$name.log ; \\\n@@ -475,13 +484,13 @@ jobs:\n- name: apidb test\nrun: |\n- git clone https://github.com/goharbor/harbor -b v2.1.2\n+ git clone https://github.com/goharbor/harbor -b v2.2.1\nkubectl patch deploy harborcluster-sample-harbor-harbor-core -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"core\",\"env\":[{\"name\":\"GC_TIME_WINDOW_HOURS\",\"value\":\"0\"}]}]}}}}'\nsleep 5\nkubectl wait --for=condition=Ready pod --all --timeout 600s\ndocker run --rm -t --privileged -v `pwd`/harbor:/drone -v /etc/docker/certs.d/$CORE_HOST/:/ca -v /etc/docker/certs.d/$CORE_HOST/:/root/.docker/tls/$NOTARY_HOST/ -e NOTARY_URL=https://$NOTARY_HOST -w /drone goharbor/harbor-e2e-engine:2.6.3 \\\npython -u -m robot -v DOCKER_USER:${{ secrets.DOCKER_USER }} -v DOCKER_PWD:${{ secrets.DOCKER_TOKEN }} -v ip:$CORE_HOST -v ip1: -v HARBOR_PASSWORD:Harbor12345 -X \\\n- --exclude gc --exclude singularity --exclude proxy_cache \\\n+ --exclude gc --exclude metrics --exclude singularity --exclude proxy_cache \\\n/drone/tests/robot-cases/Group1-Nightly/Setup.robot /drone/tests/robot-cases/Group0-BAT/API_DB.robot\n- name: fetch harbor logs\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -12120,6 +12120,8 @@ spec:\ntype: object\nsidecarimage:\ntype: string\n+ storageClassName:\n+ type: string\ntype: object\nrequestAutoCert:\ntype: boolean\n@@ -16075,6 +16077,19 @@ spec:\ntype: object\nsidecarimage:\ntype: string\n+ storageClassName:\n+ type: string\n+ type: object\n+ prometheusOperator:\n+ properties:\n+ annotations:\n+ additionalProperties:\n+ type: string\n+ type: object\n+ labels:\n+ additionalProperties:\n+ type: string\n+ type: object\ntype: object\nrequestAutoCert:\ntype: boolean\n@@ -20449,6 +20464,12 @@ rules:\n- '*'\nverbs:\n- '*'\n+- apiGroups:\n+ - monitoring.coreos.com\n+ resources:\n+ - servicemonitors\n+ verbs:\n+ - '*'\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\n@@ -21343,9 +21364,9 @@ spec:\nname: console\nports:\n- containerPort: 9090\n- name: http\n+ name: console-http\n- containerPort: 9443\n- name: https\n+ name: console-https\nserviceAccountName: console-sa\n---\napiVersion: apps/v1\n@@ -21461,7 +21482,7 @@ spec:\nname: minio-operator\nspec:\ncontainers:\n- - image: minio/operator:v4.0.3\n+ - image: minio/operator:v4.0.6\nimagePullPolicy: IfNotPresent\nname: minio-operator\nresources:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/kustomization.yaml",
"new_path": "manifests/cluster/kustomization.yaml",
"diff": "@@ -16,7 +16,7 @@ resources:\n- ../../config/default # harbor operator\n- https://raw.githubusercontent.com/spotahome/redis-operator/master/example/operator/all-redis-operator-resources.yaml?ref=v1.0.0 # redis operator\n- github.com/zalando/postgres-operator/manifests?ref=v1.5.0 # postgresql operator\n- - github.com/minio/operator?ref=v4.0.3 # minIO storage operator\n+ - github.com/minio/operator?ref=v4.0.6 # minIO storage operator\n# If you have to override the image path, uncomment this patch and also change the image paths in the patch/patches-images.yaml file.\n# Then rebuild.\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/samples/harbor_core_minio.yaml",
"new_path": "manifests/samples/harbor_core_minio.yaml",
"diff": "@@ -123,10 +123,10 @@ spec:\nresources:\nlimits:\ncpu: 500m\n- memory: 500Mi\n+ memory: 700Mi\nrequests:\n- cpu: 100m\n- memory: 250Mi\n+ cpu: 200m\n+ memory: 500Mi\ninClusterCache:\nkind: Redis\nredisSpec:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/samples/harbor_full_minio.yaml",
"new_path": "manifests/samples/harbor_full_minio.yaml",
"diff": "@@ -121,7 +121,7 @@ spec:\nreplicas: 2\nsecretRef: minio-access-secret\nredirect:\n- enable: false\n+ enable: true\nexpose:\ningress:\nhost: minio.harbor.domain\n@@ -135,14 +135,14 @@ spec:\n- ReadWriteOnce\nresources:\nrequests:\n- storage: 2Gi\n+ storage: 10Gi\nresources:\nlimits:\ncpu: 500m\n- memory: 500Mi\n+ memory: 700Mi\nrequests:\n- cpu: 100m\n- memory: 250Mi\n+ cpu: 200m\n+ memory: 500Mi\ninClusterCache:\nkind: Redis\nredisSpec:\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/ingress.go",
"new_path": "pkg/cluster/controllers/storage/ingress.go",
"diff": "@@ -151,7 +151,7 @@ func (m *MinIOController) generateIngress(harborcluster *goharborv1.HarborCluste\nPath: ingressPath,\nBackend: netv1.IngressBackend{\nServiceName: m.getTenantsServiceName(harborcluster),\n- ServicePort: intstr.FromString(m.getServicePort()),\n+ ServicePort: intstr.FromInt(m.getServicePort()),\n},\n},\n},\n@@ -163,6 +163,6 @@ func (m *MinIOController) generateIngress(harborcluster *goharborv1.HarborCluste\n}, err\n}\n-func (m *MinIOController) getServicePort() string {\n+func (m *MinIOController) getServicePort() int {\nreturn DefaultServicePort\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/minio.go",
"new_path": "pkg/cluster/controllers/storage/minio.go",
"diff": "@@ -27,7 +27,7 @@ const (\nDefaultZone = \"zone-harbor\"\nDefaultRegion = \"us-east-1\"\nDefaultBucket = \"harbor\"\n- DefaultServicePort = \"80\"\n+ DefaultServicePort = 80\ndefaultMinIOService = \"minio\"\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/tenant.go",
"new_path": "pkg/cluster/controllers/storage/tenant.go",
"diff": "@@ -85,7 +85,7 @@ func (m *MinIOController) getMinIOProperties(ctx context.Context, harborcluster\nstorageSpec.S3.CertificateRef = certificateRef\n} else {\n- endpoint = fmt.Sprintf(\"http://%s.%s.svc:%s\", m.getTenantsServiceName(harborcluster), harborcluster.Namespace, m.getServicePort())\n+ endpoint = fmt.Sprintf(\"http://%s.%s.svc:%d\", m.getTenantsServiceName(harborcluster), harborcluster.Namespace, m.getServicePort())\n}\nstorageSpec.S3.RegionEndpoint = strings.ToLower(endpoint)\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/image/image.go",
"new_path": "pkg/image/image.go",
"diff": "@@ -171,7 +171,7 @@ func init() { // nolint:gochecknoinits\nRegisterRepsitory(\"cluster-minio\", \"minio\", \"*\") // the minio repository of dockerhub\nRegisterImageName(\"cluster-minio\", \"minio\", \"*\")\n- RegisterTag(\"cluster-minio\", \"RELEASE.2021-03-01T04-20-55Z\", \"2.2.1\")\n+ RegisterTag(\"cluster-minio\", \"RELEASE.2021-04-06T23-11-00Z\", \"2.2.1\")\n}\ntype Options struct {\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
bump up operator 4.0.6
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,870
|
12.04.2021 20:40:03
| -28,800
|
187c0de13cdacd8b81d5dc073d63404fc67b7f44
|
fix(pg) remove pg default resource define
remove pg default resource define
fix
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/utils.go",
"new_path": "pkg/cluster/controllers/database/utils.go",
"diff": "@@ -82,15 +82,6 @@ func (p *PostgreSQLController) GetPostgreResource(harborcluster *goharborv1.Harb\nresources := api.Resources{}\nif harborcluster.Spec.InClusterDatabase.PostgresSQLSpec == nil {\n- resources.ResourceRequests = api.ResourceDescription{\n- CPU: \"1\",\n- Memory: \"1Gi\",\n- }\n- resources.ResourceRequests = api.ResourceDescription{\n- CPU: \"2\",\n- Memory: \"2Gi\",\n- }\n-\nreturn resources\n}\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(pg) remove pg default resource define (#545)
remove pg default resource define
fix #539
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
Co-authored-by: Steven Zou <szou@vmware.com>
|
254,890
|
13.04.2021 12:19:04
| -28,800
|
41cb38354178a0b3a2783738fe3c38747def2b04
|
fix: only expose needed ports in service of components
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/chartmuseum/services.go",
"new_path": "controllers/goharbor/chartmuseum/services.go",
"diff": "@@ -14,23 +14,31 @@ func (r *Reconciler) GetService(ctx context.Context, chartMuseum *goharborv1.Cha\nname := r.NormalizeName(ctx, chartMuseum.GetName())\nnamespace := chartMuseum.GetNamespace()\n+ var ports []corev1.ServicePort\n+\n+ if chartMuseum.Spec.Server.TLS.Enabled() {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.ChartMuseumHTTPSPortName,\n+ Port: harbormetav1.HTTPSPort,\n+ TargetPort: intstr.FromString(harbormetav1.ChartMuseumHTTPSPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ } else {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.ChartMuseumHTTPPortName,\n+ Port: harbormetav1.HTTPPort,\n+ TargetPort: intstr.FromString(harbormetav1.ChartMuseumHTTPPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ }\n+\nreturn &corev1.Service{\nObjectMeta: metav1.ObjectMeta{\nName: name,\nNamespace: namespace,\n},\nSpec: corev1.ServiceSpec{\n- Ports: []corev1.ServicePort{{\n- Name: harbormetav1.ChartMuseumHTTPPortName,\n- Port: harbormetav1.HTTPPort,\n- TargetPort: intstr.FromString(harbormetav1.ChartMuseumHTTPPortName),\n- Protocol: corev1.ProtocolTCP,\n- }, {\n- Name: harbormetav1.ChartMuseumHTTPSPortName,\n- Port: harbormetav1.HTTPSPort,\n- TargetPort: intstr.FromString(harbormetav1.ChartMuseumHTTPSPortName),\n- Protocol: corev1.ProtocolTCP,\n- }},\n+ Ports: ports,\nSelector: map[string]string{\nr.Label(\"name\"): name,\nr.Label(\"namespace\"): namespace,\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/jobservice/services.go",
"new_path": "controllers/goharbor/jobservice/services.go",
"diff": "@@ -14,23 +14,31 @@ func (r *Reconciler) GetService(ctx context.Context, jobservice *goharborv1.JobS\nname := r.NormalizeName(ctx, jobservice.GetName())\nnamespace := jobservice.GetNamespace()\n+ var ports []corev1.ServicePort\n+\n+ if jobservice.Spec.TLS.Enabled() {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.JobServiceHTTPSPortName,\n+ Port: harbormetav1.HTTPSPort,\n+ TargetPort: intstr.FromString(harbormetav1.JobServiceHTTPSPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ } else {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.JobServiceHTTPPortName,\n+ Port: harbormetav1.HTTPPort,\n+ TargetPort: intstr.FromString(harbormetav1.JobServiceHTTPPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ }\n+\nreturn &corev1.Service{\nObjectMeta: metav1.ObjectMeta{\nName: name,\nNamespace: namespace,\n},\nSpec: corev1.ServiceSpec{\n- Ports: []corev1.ServicePort{{\n- Name: harbormetav1.JobServiceHTTPPortName,\n- Port: harbormetav1.HTTPPort,\n- TargetPort: intstr.FromString(harbormetav1.JobServiceHTTPPortName),\n- Protocol: corev1.ProtocolTCP,\n- }, {\n- Name: harbormetav1.JobServiceHTTPSPortName,\n- Port: harbormetav1.HTTPSPort,\n- TargetPort: intstr.FromString(harbormetav1.JobServiceHTTPSPortName),\n- Protocol: corev1.ProtocolTCP,\n- }},\n+ Ports: ports,\nSelector: map[string]string{\nr.Label(\"name\"): name,\nr.Label(\"namespace\"): namespace,\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/portal/services.go",
"new_path": "controllers/goharbor/portal/services.go",
"diff": "@@ -14,23 +14,31 @@ func (r *Reconciler) GetService(ctx context.Context, portal *goharborv1.Portal)\nname := r.NormalizeName(ctx, portal.GetName())\nnamespace := portal.GetNamespace()\n+ var ports []corev1.ServicePort\n+\n+ if portal.Spec.TLS.Enabled() {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.PortalHTTPSPortName,\n+ Port: harbormetav1.HTTPSPort,\n+ TargetPort: intstr.FromString(harbormetav1.PortalHTTPSPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ } else {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.PortalHTTPPortName,\n+ Port: harbormetav1.HTTPPort,\n+ TargetPort: intstr.FromString(harbormetav1.PortalHTTPPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ }\n+\nreturn &corev1.Service{\nObjectMeta: metav1.ObjectMeta{\nName: name,\nNamespace: namespace,\n},\nSpec: corev1.ServiceSpec{\n- Ports: []corev1.ServicePort{{\n- Name: harbormetav1.PortalHTTPPortName,\n- Port: harbormetav1.HTTPPort,\n- TargetPort: intstr.FromString(harbormetav1.PortalHTTPPortName),\n- Protocol: corev1.ProtocolTCP,\n- }, {\n- Name: harbormetav1.PortalHTTPSPortName,\n- Port: harbormetav1.HTTPSPort,\n- TargetPort: intstr.FromString(harbormetav1.PortalHTTPSPortName),\n- Protocol: corev1.ProtocolTCP,\n- }},\n+ Ports: ports,\nSelector: map[string]string{\nr.Label(\"name\"): name,\nr.Label(\"namespace\"): namespace,\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/registryctl/services.go",
"new_path": "controllers/goharbor/registryctl/services.go",
"diff": "@@ -18,23 +18,31 @@ func (r *Reconciler) GetService(ctx context.Context, registryCtl *goharborv1.Reg\nname := r.NormalizeName(ctx, registryCtl.GetName())\nnamespace := registryCtl.GetNamespace()\n+ var ports []corev1.ServicePort\n+\n+ if registryCtl.Spec.TLS.Enabled() {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.RegistryControllerHTTPSPortName,\n+ Port: harbormetav1.HTTPSPort,\n+ TargetPort: intstr.FromString(harbormetav1.RegistryControllerHTTPSPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ } else {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.RegistryControllerHTTPPortName,\n+ Port: harbormetav1.HTTPPort,\n+ TargetPort: intstr.FromString(harbormetav1.RegistryControllerHTTPPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ }\n+\nreturn &corev1.Service{\nObjectMeta: metav1.ObjectMeta{\nName: name,\nNamespace: namespace,\n},\nSpec: corev1.ServiceSpec{\n- Ports: []corev1.ServicePort{{\n- Name: harbormetav1.RegistryControllerHTTPPortName,\n- Port: harbormetav1.HTTPPort,\n- TargetPort: intstr.FromString(harbormetav1.RegistryControllerHTTPPortName),\n- Protocol: corev1.ProtocolTCP,\n- }, {\n- Name: harbormetav1.RegistryControllerHTTPSPortName,\n- Port: harbormetav1.HTTPSPort,\n- TargetPort: intstr.FromString(harbormetav1.RegistryControllerHTTPSPortName),\n- Protocol: corev1.ProtocolTCP,\n- }},\n+ Ports: ports,\nSelector: map[string]string{\nr.Label(\"name\"): name,\nr.Label(\"namespace\"): namespace,\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/trivy/services.go",
"new_path": "controllers/goharbor/trivy/services.go",
"diff": "@@ -29,23 +29,31 @@ func (r *Reconciler) GetService(ctx context.Context, trivy *goharborv1.Trivy) (*\nname := r.NormalizeName(ctx, trivy.GetName())\nnamespace := trivy.GetNamespace()\n+ var ports []corev1.ServicePort\n+\n+ if trivy.Spec.Server.TLS.Enabled() {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.TrivyHTTPSPortName,\n+ Port: harbormetav1.HTTPSPort,\n+ TargetPort: intstr.FromString(harbormetav1.TrivyHTTPSPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ } else {\n+ ports = append(ports, corev1.ServicePort{\n+ Name: harbormetav1.TrivyHTTPPortName,\n+ Port: harbormetav1.HTTPPort,\n+ TargetPort: intstr.FromString(harbormetav1.TrivyHTTPPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ })\n+ }\n+\nreturn &corev1.Service{\nObjectMeta: metav1.ObjectMeta{\nName: name,\nNamespace: namespace,\n},\nSpec: corev1.ServiceSpec{\n- Ports: []corev1.ServicePort{{\n- Name: harbormetav1.TrivyHTTPPortName,\n- Port: harbormetav1.HTTPPort,\n- TargetPort: intstr.FromString(harbormetav1.TrivyHTTPPortName),\n- Protocol: corev1.ProtocolTCP,\n- }, {\n- Name: harbormetav1.TrivyHTTPSPortName,\n- Port: harbormetav1.HTTPSPort,\n- TargetPort: intstr.FromString(harbormetav1.TrivyHTTPSPortName),\n- Protocol: corev1.ProtocolTCP,\n- }},\n+ Ports: ports,\nSelector: map[string]string{\nr.Label(\"name\"): name,\nr.Label(\"namespace\"): namespace,\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: only expose needed ports in service of components (#551)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,865
|
13.04.2021 15:13:41
| -28,800
|
7f628105a0bfb5cd34174170d52248d5a576b37f
|
fix(harborcluster): improve the get -o printing columns
fix(harborcluster): improve the get -o printing columns
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"diff": "@@ -183,10 +183,8 @@ const (\nServiceReady HarborClusterConditionType = \"ServiceReady\"\n// ConfigurationReady means the configuration is applied to harbor.\nConfigurationReady HarborClusterConditionType = \"ConfigurationReady\"\n- // StatusUnknown is the status of unknown.\n- StatusUnknown ClusterStatus = \"unknown\"\n- // StatusCreating is the status of creating.\n- StatusCreating ClusterStatus = \"creating\"\n+ // StatusCreating is the status of provisioning.\n+ StatusProvisioning ClusterStatus = \"provisioning\"\n// StatusHealthy is the status of healthy.\nStatusHealthy ClusterStatus = \"healthy\"\n// StatusUnHealthy is the status of unhealthy.\n@@ -229,10 +227,6 @@ const (\n// +kubebuilder:subresource:status\n// +kubebuilder:printcolumn:name=\"Public URL\",type=string,JSONPath=`.spec.externalURL`,description=\"The public URL to the Harbor application\",priority=0\n// +kubebuilder:printcolumn:name=\"Status\",type=string,JSONPath=`.status.status`,description=\"The overall status of the Harbor cluster\",priority=0\n-// +kubebuilder:printcolumn:name=\"Service Ready\",type=string,JSONPath=`.status.conditions[?(@.type==\"ServiceReady\")].status`,description=\"The current status of the new Harbor spec\",priority=10\n-// +kubebuilder:printcolumn:name=\"Cache Ready\",type=string,JSONPath=`.status.conditions[?(@.type==\"CacheReady\")].status`,description=\"The current status of the new Cache spec\",priority=20\n-// +kubebuilder:printcolumn:name=\"Database Ready\",type=string,JSONPath=`.status.conditions[?(@.type==\"DatabaseReady\")].status`,description=\"The current status of the new Database spec\",priority=20\n-// +kubebuilder:printcolumn:name=\"Storage Ready\",type=string,JSONPath=`.status.conditions[?(@.type==\"StorageReady\")].status`,description=\"The current status of the new Storage spec\",priority=20\n// +kubebuilder:printcolumn:name=\"Operator Version\",type=string,JSONPath=`.status.operator.controllerVersion`,description=\"The operator version \",priority=30\n// +kubebuilder:printcolumn:name=\"Operator Git Commit\",type=string,JSONPath=`.status.operator.controllerGitCommit`,description=\"The operator git commit\",priority=30\n// HarborCluster is the Schema for the harborclusters API.\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/status.go",
"new_path": "controllers/goharbor/harborcluster/status.go",
"diff": "@@ -50,7 +50,7 @@ func newStatus(source *goharborv1.HarborCluster) *status {\ncr: source,\nlocker: &sync.Mutex{},\ndata: &goharborv1.HarborClusterStatus{\n- Status: goharborv1.StatusUnknown,\n+ Status: goharborv1.StatusProvisioning,\nRevision: time.Now().UnixNano(),\nConditions: make([]goharborv1.HarborClusterCondition, 0),\n},\n@@ -231,12 +231,7 @@ func (s *status) overallStatus() goharborv1.ClusterStatus {\nreturn goharborv1.StatusUnHealthy\n}\n- // Not all are completed yet\n- if ready == len(s.data.Conditions) {\n- return goharborv1.StatusCreating\n- }\n-\n- return goharborv1.StatusUnknown\n+ return goharborv1.StatusProvisioning\n}\nfunc (s *status) validate() error {\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -2225,26 +2225,6 @@ spec:\njsonPath: .status.status\nname: Status\ntype: string\n- - description: The current status of the new Harbor spec\n- jsonPath: .status.conditions[?(@.type==\"ServiceReady\")].status\n- name: Service Ready\n- priority: 10\n- type: string\n- - description: The current status of the new Cache spec\n- jsonPath: .status.conditions[?(@.type==\"CacheReady\")].status\n- name: Cache Ready\n- priority: 20\n- type: string\n- - description: The current status of the new Database spec\n- jsonPath: .status.conditions[?(@.type==\"DatabaseReady\")].status\n- name: Database Ready\n- priority: 20\n- type: string\n- - description: The current status of the new Storage spec\n- jsonPath: .status.conditions[?(@.type==\"StorageReady\")].status\n- name: Storage Ready\n- priority: 20\n- type: string\n- description: 'The operator version '\njsonPath: .status.operator.controllerVersion\nname: Operator Version\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(harborcluster): improve the get -o printing columns (#547)
fix(harborcluster): improve the get -o printing columns
Signed-off-by: wangcanfeng <wangcanfeng@corp.netease.com>
|
254,875
|
12.04.2021 19:54:53
| -28,800
|
3d547df4365b30d738bfa58c9791f0724d0674cc
|
fix kustomize configuration
|
[
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -373,6 +373,7 @@ deploy-rbac: go-generate kustomize\ndeployment-generate: go-generate kustomize\n$(KUSTOMIZE) build manifests/cluster > manifests/cluster/deployment.yaml\n+ $(KUSTOMIZE) build manifests/harbor > manifests/harbor/deployment.yaml\n.PHONY: sample\nsample: sample-harbor\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "config/config/config.yaml",
"diff": "+- key: controllers-config-directory\n+ priority: 100\n+ value: /etc/harbor-operator\n+\n+- key: classname\n+ priority: 100\n+ value:\n+\n+- key: network-policies\n+ priority: 100\n+ value: false\n+\n+- key: watch-children\n+ priority: 100\n+ value: true\n"
},
{
"change_type": "MODIFY",
"old_path": "config/config/kustomization.yaml",
"new_path": "config/config/kustomization.yaml",
"diff": "@@ -16,3 +16,21 @@ configMapGenerator:\n- assets/portal-config.conf.tmpl\n- assets/registry-config.yaml.tmpl\n- assets/registryctl-config.yaml.tmpl\n+\n+- name: config\n+ behavior: create\n+ files:\n+ - controllers/core-ctrl.yaml\n+ - controllers/chartmuseum-ctrl.yaml\n+ - controllers/exporter-ctrl.yaml\n+ - controllers/harbor-ctrl.yaml\n+ - controllers/harborcluster-ctrl.yaml\n+ - controllers/harborconfiguration-ctrl.yaml\n+ - controllers/jobservice-ctrl.yaml\n+ - controllers/notaryserver-ctrl.yaml\n+ - controllers/notarysigner-ctrl.yaml\n+ - controllers/portal-ctrl.yaml\n+ - controllers/registry-ctrl.yaml\n+ - controllers/registryctl-ctrl.yaml\n+ - controllers/trivy-ctrl.yaml\n+ - config.yaml\n"
},
{
"change_type": "MODIFY",
"old_path": "config/manager/manager.yaml",
"new_path": "config/manager/manager.yaml",
"diff": "@@ -48,5 +48,7 @@ spec:\nvalueFrom:\nfieldRef:\nfieldPath: metadata.namespace\n+ - name: CONFIGURATION_FROM\n+ value: env,file:/etc/harbor-operator/config.yaml\nterminationGracePeriodSeconds: 10\n"
},
{
"change_type": "MODIFY",
"old_path": "config/manager/patches-configuration.yaml",
"new_path": "config/manager/patches-configuration.yaml",
"diff": "@@ -11,7 +11,13 @@ spec:\n- mountPath: /etc/harbor-operator/templates\nname: configuration-templates\nreadOnly: true\n+ - mountPath: /etc/harbor-operator\n+ name: configuration\n+ readOnly: true\nvolumes:\n- name: configuration-templates\nconfigMap:\nname: config-template\n+ - name: configuration\n+ configMap:\n+ name: config\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -20919,6 +20919,85 @@ subjects:\nnamespace: harbor-operator-ns\n---\napiVersion: v1\n+data:\n+ chartmuseum-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ config.yaml: |\n+ - key: controllers-config-directory\n+ priority: 100\n+ value: /etc/harbor-operator\n+\n+ - key: classname\n+ priority: 100\n+ value:\n+\n+ - key: network-policies\n+ priority: 100\n+ value: false\n+\n+ - key: watch-children\n+ priority: 100\n+ value: true\n+ core-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ exporter-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ harbor-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ harborcluster-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ harborconfiguration-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ jobservice-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ notaryserver-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ notarysigner-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ portal-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ registry-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ registryctl-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ trivy-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+kind: ConfigMap\n+metadata:\n+ annotations:\n+ goharbor.io/deploy-engine: Kustomization\n+ goharbor.io/deploy-mode: cluster\n+ goharbor.io/operator-version: v1.0.0\n+ name: config\n+ namespace: harbor-operator-ns\n+---\n+apiVersion: v1\ndata:\nchartmuseum-config.yaml.tmpl: |\n{{- if .Spec.Server.TLS.Enabled }}\n@@ -21462,6 +21541,8 @@ spec:\nvalueFrom:\nfieldRef:\nfieldPath: metadata.namespace\n+ - name: CONFIGURATION_FROM\n+ value: env,file:/etc/harbor-operator/config.yaml\nimage: goharbor/harbor-operator:dev_master\nlivenessProbe:\nhttpGet:\n@@ -21498,6 +21579,9 @@ spec:\n- mountPath: /etc/harbor-operator/templates\nname: configuration-templates\nreadOnly: true\n+ - mountPath: /etc/harbor-operator\n+ name: configuration\n+ readOnly: true\nsecurityContext:\nrunAsUser: 65532\nterminationGracePeriodSeconds: 10\n@@ -21509,6 +21593,9 @@ spec:\n- configMap:\nname: config-template\nname: configuration-templates\n+ - configMap:\n+ name: config\n+ name: configuration\n---\napiVersion: apps/v1\nkind: Deployment\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -2222,26 +2222,6 @@ spec:\njsonPath: .status.status\nname: Status\ntype: string\n- - description: The current status of the new Harbor spec\n- jsonPath: .status.conditions[?(@.type==\"ServiceReady\")].status\n- name: Service Ready\n- priority: 10\n- type: string\n- - description: The current status of the new Cache spec\n- jsonPath: .status.conditions[?(@.type==\"CacheReady\")].status\n- name: Cache Ready\n- priority: 20\n- type: string\n- - description: The current status of the new Database spec\n- jsonPath: .status.conditions[?(@.type==\"DatabaseReady\")].status\n- name: Database Ready\n- priority: 20\n- type: string\n- - description: The current status of the new Storage spec\n- jsonPath: .status.conditions[?(@.type==\"StorageReady\")].status\n- name: Storage Ready\n- priority: 20\n- type: string\n- description: 'The operator version '\njsonPath: .status.operator.controllerVersion\nname: Operator Version\n@@ -13342,6 +13322,85 @@ subjects:\nnamespace: harbor-operator-ns\n---\napiVersion: v1\n+data:\n+ chartmuseum-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ config.yaml: |\n+ - key: controllers-config-directory\n+ priority: 100\n+ value: /etc/harbor-operator\n+\n+ - key: classname\n+ priority: 100\n+ value:\n+\n+ - key: network-policies\n+ priority: 100\n+ value: false\n+\n+ - key: watch-children\n+ priority: 100\n+ value: true\n+ core-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ exporter-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ harbor-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ harborcluster-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ harborconfiguration-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ jobservice-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ notaryserver-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ notarysigner-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ portal-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ registry-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ registryctl-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+ trivy-ctrl.yaml: |\n+ - key: max-reconcile\n+ priority: 200\n+ value: \"1\"\n+kind: ConfigMap\n+metadata:\n+ annotations:\n+ goharbor.io/deploy-engine: Kustomization\n+ goharbor.io/deploy-mode: harbor\n+ goharbor.io/operator-version: v1.0.0\n+ name: config\n+ namespace: harbor-operator-ns\n+---\n+apiVersion: v1\ndata:\nchartmuseum-config.yaml.tmpl: |\n{{- if .Spec.Server.TLS.Enabled }}\n@@ -13709,6 +13768,8 @@ spec:\nvalueFrom:\nfieldRef:\nfieldPath: metadata.namespace\n+ - name: CONFIGURATION_FROM\n+ value: env,file:/etc/harbor-operator/config.yaml\nimage: goharbor/harbor-operator:latest\nlivenessProbe:\nhttpGet:\n@@ -13745,6 +13806,9 @@ spec:\n- mountPath: /etc/harbor-operator/templates\nname: configuration-templates\nreadOnly: true\n+ - mountPath: /etc/harbor-operator\n+ name: configuration\n+ readOnly: true\nsecurityContext:\nrunAsUser: 65532\nterminationGracePeriodSeconds: 10\n@@ -13756,6 +13820,9 @@ spec:\n- configMap:\nname: config-template\nname: configuration-templates\n+ - configMap:\n+ name: config\n+ name: configuration\n---\napiVersion: cert-manager.io/v1\nkind: Certificate\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix kustomize configuration
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,890
|
13.04.2021 14:57:51
| 0
|
f907821486326fef7e0029489e39e0867f3c95d8
|
fix: set resources of minio from spec of harbor cluster
|
[
{
"change_type": "MODIFY",
"old_path": "manifests/samples/harbor_core_minio.yaml",
"new_path": "manifests/samples/harbor_core_minio.yaml",
"diff": "@@ -114,19 +114,11 @@ spec:\nvolumesPerServer: 2\nvolumeClaimTemplate:\nspec:\n- storageClassName: standard\naccessModes:\n- ReadWriteOnce\nresources:\nrequests:\nstorage: 10Gi\n- resources:\n- limits:\n- cpu: 500m\n- memory: 700Mi\n- requests:\n- cpu: 200m\n- memory: 500Mi\ninClusterCache:\nkind: Redis\nredisSpec:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/samples/harbor_full_minio.yaml",
"new_path": "manifests/samples/harbor_full_minio.yaml",
"diff": "@@ -130,19 +130,11 @@ spec:\nvolumesPerServer: 2\nvolumeClaimTemplate:\nspec:\n- storageClassName: standard\naccessModes:\n- ReadWriteOnce\nresources:\nrequests:\nstorage: 10Gi\n- resources:\n- limits:\n- cpu: 500m\n- memory: 700Mi\n- requests:\n- cpu: 200m\n- memory: 500Mi\ninClusterCache:\nkind: Redis\nredisSpec:\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/tenant.go",
"new_path": "pkg/cluster/controllers/storage/tenant.go",
"diff": "@@ -215,7 +215,7 @@ func (m *MinIOController) generateMinIOCR(ctx context.Context, harborcluster *go\nServers: harborcluster.Spec.InClusterStorage.MinIOSpec.Replicas,\nVolumesPerServer: harborcluster.Spec.InClusterStorage.MinIOSpec.VolumesPerServer,\nVolumeClaimTemplate: m.getVolumeClaimTemplate(harborcluster),\n- Resources: *m.getResourceRequirements(harborcluster),\n+ Resources: harborcluster.Spec.InClusterStorage.MinIOSpec.Resources,\nSecurityContext: &corev1.PodSecurityContext{\nFSGroup: &fsGroup,\nRunAsGroup: &runAsGroup,\n@@ -249,15 +249,6 @@ func (m *MinIOController) generateMinIOCR(ctx context.Context, harborcluster *go\nreturn tenant, nil\n}\n-func (m *MinIOController) getResourceRequirements(harborcluster *goharborv1.HarborCluster) *corev1.ResourceRequirements {\n- isEmpty := reflect.DeepEqual(harborcluster.Spec.InClusterStorage.MinIOSpec.Resources, corev1.ResourceRequirements{})\n- if !isEmpty {\n- return &harborcluster.Spec.InClusterStorage.MinIOSpec.Resources\n- }\n-\n- return nil\n-}\n-\nfunc (m *MinIOController) getVolumeClaimTemplate(harborcluster *goharborv1.HarborCluster) *corev1.PersistentVolumeClaim {\nisEmpty := reflect.DeepEqual(harborcluster.Spec.InClusterStorage.MinIOSpec.VolumeClaimTemplate, corev1.PersistentVolumeClaim{})\nif !isEmpty {\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: set resources of minio from spec of harbor cluster
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,875
|
19.04.2021 09:26:48
| -28,800
|
297c04fd301ca5f97293dabd7cb11217bef6df8c
|
fix golanglint goerr113
|
[
{
"change_type": "MODIFY",
"old_path": ".golangci.yml",
"new_path": ".golangci.yml",
"diff": "@@ -28,7 +28,7 @@ linters:\n- gocritic\n- gocyclo\n- godot\n-# - goerr113\n+ - goerr113\n- gofmt\n- gofumpt\n- goheader\n@@ -73,7 +73,7 @@ linters:\n- paralleltest\n- wrapcheck\n# - errorlint\n- - goerr113\n+# - goerr113\n# - gomnd\n# - nestif\n# - funlen\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harbor_webhook.go",
"new_path": "apis/goharbor.io/v1alpha3/harbor_webhook.go",
"diff": "@@ -2,10 +2,10 @@ package v1alpha3\nimport (\n\"context\"\n- \"fmt\"\n\"net/url\"\n\"github.com/goharbor/harbor-operator/pkg/version\"\n+ \"github.com/pkg/errors\"\napierrors \"k8s.io/apimachinery/pkg/api/errors\"\n\"k8s.io/apimachinery/pkg/runtime\"\n\"k8s.io/apimachinery/pkg/runtime/schema\"\n@@ -54,7 +54,7 @@ func (h *Harbor) ValidateUpdate(old runtime.Object) error {\nobj, ok := old.(*Harbor)\nif !ok {\n- return fmt.Errorf(\"failed type assertion on kind: %s\", old.GetObjectKind().GroupVersionKind().String())\n+ return errors.Errorf(\"failed type assertion on kind: %s\", old.GetObjectKind().GroupVersionKind().String())\n}\nreturn h.Validate(obj)\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harborcluster_webhook.go",
"new_path": "apis/goharbor.io/v1alpha3/harborcluster_webhook.go",
"diff": "@@ -19,6 +19,7 @@ import (\n\"fmt\"\n\"github.com/goharbor/harbor-operator/pkg/version\"\n+ \"github.com/pkg/errors\"\napierrors \"k8s.io/apimachinery/pkg/api/errors\"\n\"k8s.io/apimachinery/pkg/runtime\"\n\"k8s.io/apimachinery/pkg/runtime/schema\"\n@@ -66,7 +67,7 @@ func (hc *HarborCluster) ValidateUpdate(old runtime.Object) error {\nobj, ok := old.(*HarborCluster)\nif !ok {\n- return fmt.Errorf(\"failed type assertion on kind: %s\", old.GetObjectKind().GroupVersionKind().String())\n+ return errors.Errorf(\"failed type assertion on kind: %s\", old.GetObjectKind().GroupVersionKind().String())\n}\nreturn hc.validate(obj)\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/configuration/reconciler.go",
"new_path": "controllers/goharbor/configuration/reconciler.go",
"diff": "@@ -13,6 +13,7 @@ import (\n\"github.com/goharbor/harbor-operator/pkg/harbor\"\n\"github.com/goharbor/harbor-operator/pkg/utils/strings\"\n\"github.com/ovh/configstore\"\n+ \"github.com/pkg/errors\"\ncorev1 \"k8s.io/api/core/v1\"\napierrors \"k8s.io/apimachinery/pkg/api/errors\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n@@ -180,7 +181,7 @@ func (r *Reconciler) assembleConfig(ctx context.Context, cm *corev1.ConfigMap) (\n// itemValue is secret name.\nsecretName, ok := itemValue.(string)\nif !ok {\n- return nil, fmt.Errorf(\"config field %s's value %v, type is invalid, should be string\", itemKey, itemValue)\n+ return nil, errors.Errorf(\"config field %s's value %v, type is invalid, should be string\", itemKey, itemValue)\n}\n// get secret.\nif err = r.Client.Get(ctx, types.NamespacedName{Namespace: cm.Namespace, Name: secretName}, secret); err != nil {\n@@ -197,12 +198,12 @@ func (r *Reconciler) assembleConfig(ctx context.Context, cm *corev1.ConfigMap) (\n// getHarborClient gets harbor client.\nfunc (r *Reconciler) getHarborClient(ctx context.Context, cluster *goharborv1.HarborCluster) (harbor.Client, error) {\nif cluster == nil {\n- return nil, fmt.Errorf(\"harbor cluster can not be nil\")\n+ return nil, errors.Errorf(\"harbor cluster can not be nil\")\n}\nurl := cluster.Spec.ExternalURL\nif len(url) == 0 {\n- return nil, fmt.Errorf(\"harbor url is invalid\")\n+ return nil, errors.Errorf(\"harbor url is invalid\")\n}\nvar opts []harbor.ClientOption\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/service_mgr.go",
"new_path": "controllers/goharbor/harborcluster/service_mgr.go",
"diff": "@@ -16,12 +16,11 @@ package harborcluster\nimport (\n\"context\"\n- \"errors\"\n- \"fmt\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/harbor\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n+ \"github.com/pkg/errors\"\nv1 \"k8s.io/api/core/v1\"\n)\n@@ -119,10 +118,10 @@ func (s *ServiceManager) Apply() error { // nolint:funlen\n}\n// Only for wsl check\ncase goharborv1.ComponentHarbor:\n- return fmt.Errorf(\"%s is not supported\", s.component)\n+ return errors.Errorf(\"%s is not supported\", s.component)\ndefault:\n// Should not happen, just in case\n- return fmt.Errorf(\"unrecognized component: %s\", s.component)\n+ return errors.Errorf(\"unrecognized component: %s\", s.component)\n}\nif s.ctx == nil {\n@@ -152,7 +151,7 @@ func (s *ServiceManager) validate() error {\nif s.component != goharborv1.ComponentCache &&\ns.component != goharborv1.ComponentStorage &&\ns.component != goharborv1.ComponentDatabase {\n- return fmt.Errorf(\"invalid service component: %s\", s.component)\n+ return errors.Errorf(\"invalid service component: %s\", s.component)\n}\nif s.cluster == nil {\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/status.go",
"new_path": "controllers/goharbor/harborcluster/status.go",
"diff": "@@ -16,13 +16,13 @@ package harborcluster\nimport (\n\"context\"\n- \"errors\"\n\"sync\"\n\"time\"\n\"github.com/go-logr/logr\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n+ \"github.com/pkg/errors\"\ncorev1 \"k8s.io/api/core/v1\"\napierrors \"k8s.io/apimachinery/pkg/api/errors\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/builder/builder.go",
"new_path": "pkg/builder/builder.go",
"diff": "@@ -2,12 +2,12 @@ package builder\nimport (\n\"context\"\n- \"fmt\"\n\"log\"\n\"sync\"\n\"time\"\n\"github.com/go-logr/logr\"\n+ \"github.com/pkg/errors\"\nv1 \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1\"\napiextv1 \"k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n@@ -227,7 +227,7 @@ func isCRDReady(getter apiextv1.CustomResourceDefinitionsGetter, name string) bo\n}\ncase v1.NamesAccepted:\nif cond.Status == v1.ConditionFalse {\n- return false, fmt.Errorf(\"name conflict: %v\", cond.Reason) // conflicted, poll will return immediately\n+ return false, errors.Errorf(\"name conflict: %v\", cond.Reason) // conflicted, poll will return immediately\n}\n}\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/cache/redis.go",
"new_path": "pkg/cluster/controllers/cache/redis.go",
"diff": "@@ -2,16 +2,16 @@ package cache\nimport (\n\"context\"\n- \"fmt\"\n\"github.com/go-logr/logr\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/k8s\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n\"github.com/ovh/configstore\"\n+ \"github.com/pkg/errors\"\nredisOp \"github.com/spotahome/redis-operator/api/redisfailover/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n- \"k8s.io/apimachinery/pkg/api/errors\"\n+ apierrors \"k8s.io/apimachinery/pkg/api/errors\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\"k8s.io/apimachinery/pkg/runtime\"\n\"k8s.io/client-go/tools/record\"\n@@ -57,7 +57,7 @@ func (rc *RedisController) Apply(ctx context.Context, cluster *goharborv1.Harbor\ncrdClient := rc.DClient.DynamicClient(ctx, k8s.WithResource(redisFailoversGVR), k8s.WithNamespace(cluster.Namespace))\nactualCR, err := crdClient.Get(rc.ResourceManager.GetCacheCRName(), metav1.GetOptions{})\n- if errors.IsNotFound(err) {\n+ if apierrors.IsNotFound(err) {\nreturn rc.Deploy(ctx, cluster)\n} else if err != nil {\nreturn cacheNotReadyStatus(ErrorGetRedisClient, err.Error()), err\n@@ -82,11 +82,11 @@ func (rc *RedisController) Apply(ctx context.Context, cluster *goharborv1.Harbor\n// Delete...\nfunc (rc *RedisController) Delete(_ context.Context, _ *goharborv1.HarborCluster) (*lcm.CRStatus, error) {\n- return nil, fmt.Errorf(\"not implemented\")\n+ return nil, errors.Errorf(\"not implemented\")\n}\nfunc (rc *RedisController) Upgrade(_ context.Context, _ *goharborv1.HarborCluster) (*lcm.CRStatus, error) {\n- return nil, fmt.Errorf(\"not implemented\")\n+ return nil, errors.Errorf(\"not implemented\")\n}\nfunc cacheNotReadyStatus(reason, message string) *lcm.CRStatus {\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/readiness.go",
"new_path": "pkg/cluster/controllers/database/readiness.go",
"diff": "@@ -2,13 +2,13 @@ package database\nimport (\n\"context\"\n- \"errors\"\n\"fmt\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\nharbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/database/api\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n+ \"github.com/pkg/errors\"\ncorev1 \"k8s.io/api/core/v1\"\nkerr \"k8s.io/apimachinery/pkg/api/errors\"\n\"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\"\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/utils.go",
"new_path": "pkg/cluster/controllers/database/utils.go",
"diff": "@@ -8,6 +8,7 @@ import (\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/database/api\"\n\"github.com/goharbor/harbor-operator/pkg/config\"\n+ \"github.com/pkg/errors\"\ncorev1 \"k8s.io/api/core/v1\"\n\"k8s.io/apimachinery/pkg/types\"\n)\n@@ -136,7 +137,7 @@ func (p *PostgreSQLController) GetPostgreVersion(harborcluster *goharborv1.Harbo\n}\n}\n- return \"\", fmt.Errorf(\"postgresql version not found for harbor %s\", harborcluster.Spec.Version)\n+ return \"\", errors.Errorf(\"postgresql version not found for harbor %s\", harborcluster.Spec.Version)\n}\nfunc (p *PostgreSQLController) GetPostgreParameters() map[string]string {\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/gos/group.go",
"new_path": "pkg/cluster/gos/group.go",
"diff": "@@ -16,9 +16,10 @@ package gos\nimport (\n\"context\"\n- \"fmt\"\n\"strings\"\n\"sync\"\n+\n+ \"github.com/pkg/errors\"\n)\n// Group for running goroutines.\n@@ -77,7 +78,7 @@ func (g *Group) Wait() error {\n}\nif len(errTexts) > 0 {\n- return fmt.Errorf(\"gos.Group error: %s\", strings.Join(errTexts, \":\"))\n+ return errors.Errorf(\"gos.Group error: %s\", strings.Join(errTexts, \":\"))\n}\nreturn nil\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/config/errors_test.go",
"new_path": "pkg/config/errors_test.go",
"diff": "package config_test\nimport (\n- \"fmt\"\n+ \"github.com/pkg/errors\"\n. \"github.com/goharbor/harbor-operator/pkg/config\"\n. \"github.com/onsi/ginkgo\"\n@@ -20,7 +20,7 @@ var _ = Describe(\"IsNotFound\", func() {\nvar err error\nBeforeEach(func() {\n- err = fmt.Errorf(\"a random error\")\n+ err = errors.Errorf(\"a random error\")\n})\nIt(\"Should return false\", func() {\n@@ -34,7 +34,7 @@ var _ = Describe(\"IsNotFound\", func() {\nBeforeEach(func() {\nkey = \"test\"\n- err = fmt.Errorf(\"configstore: get '%s': no item found\", key)\n+ err = errors.Errorf(\"configstore: get '%s': no item found\", key)\n})\nIt(\"Should return false\", func() {\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/harbor/configuration.go",
"new_path": "pkg/harbor/configuration.go",
"diff": "@@ -7,6 +7,8 @@ import (\n\"io/ioutil\"\n\"net/http\"\n\"strings\"\n+\n+ \"github.com/pkg/errors\"\n)\n// ApplyConfiguration applies configuration to harbor instance.\n@@ -36,7 +38,7 @@ func (c *client) ApplyConfiguration(ctx context.Context, config []byte) error {\nreturn fmt.Errorf(\"read http response body error: %w\", err)\n}\n- return fmt.Errorf(\"response status code is %d, body is %s\", code, string(body))\n+ return errors.Errorf(\"response status code is %d, body is %s\", code, string(body))\n}\nreturn nil\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/image/image.go",
"new_path": "pkg/image/image.go",
"diff": "@@ -9,6 +9,7 @@ import (\n\"github.com/goharbor/harbor-operator/pkg/config\"\n\"github.com/goharbor/harbor-operator/pkg/version\"\n\"github.com/ovh/configstore\"\n+ \"github.com/pkg/errors\"\n)\nconst (\n@@ -261,7 +262,7 @@ func GetImage(ctx context.Context, component string, options ...Option) (string,\nimageName, ok := knowCompoents.GetImageName(component, opts.harborVersion)\nif !ok {\n- return \"\", fmt.Errorf(\"unknow component %s\", component)\n+ return \"\", errors.Errorf(\"unknow component %s\", component)\n}\nrepository := opts.repository\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/image/image_test.go",
"new_path": "pkg/image/image_test.go",
"diff": "@@ -12,6 +12,7 @@ import (\n. \"github.com/onsi/ginkgo\"\n. \"github.com/onsi/gomega\"\n\"github.com/ovh/configstore\"\n+ \"github.com/pkg/errors\"\n\"sigs.k8s.io/controller-runtime/pkg/log/zap\"\n)\n@@ -109,7 +110,7 @@ var _ = Describe(\"Get image\", func() {\nIt(\"Should pass\", func() {\nconfigStore := configstore.NewStore()\nconfigStore.RegisterProvider(\"foo\", func() (configstore.ItemList, error) {\n- return configstore.ItemList{}, fmt.Errorf(\"failed\")\n+ return configstore.ItemList{}, errors.Errorf(\"failed\")\n})\n_, err := GetImage(ctx, \"core\", WithConfigstore(configStore))\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/version/version.go",
"new_path": "pkg/version/version.go",
"diff": "package version\nimport (\n- \"fmt\"\n+ \"github.com/pkg/errors\"\n)\nconst (\n@@ -41,7 +41,7 @@ func Default() string {\n// Validate returns nil when version is the default version.\nfunc Validate(version string) error {\nif version != Default() {\n- return fmt.Errorf(\"version %s not support, please use version %s\", version, Default())\n+ return errors.Errorf(\"version %s not support, please use version %s\", version, Default())\n}\nreturn nil\n@@ -51,16 +51,16 @@ func Validate(version string) error {\nfunc UpgradeAllowed(from, to string) error {\nfromIndex, ok := knowVersionIndexes[from]\nif !ok {\n- return fmt.Errorf(\"unknow version %s\", from)\n+ return errors.Errorf(\"unknow version %s\", from)\n}\ntoIndex, ok := knowVersionIndexes[to]\nif !ok {\n- return fmt.Errorf(\"unknow version %s\", to)\n+ return errors.Errorf(\"unknow version %s\", to)\n}\nif toIndex < fromIndex {\n- return fmt.Errorf(\"downgrade from version %s to %s is not allowed\", from, to)\n+ return errors.Errorf(\"downgrade from version %s to %s is not allowed\", from, to)\n}\nreturn nil\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix golanglint goerr113 (#558)
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,881
|
19.04.2021 13:17:11
| -28,800
|
7f03b59a549e896dd000e453967bdfb76d7885b8
|
fix: add redis spec kb comments anno and comments and remove useless fields
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"diff": "@@ -41,6 +41,7 @@ type Cache struct {\n// +kubebuilder:validation:Enum=Redis\nKind string `json:\"kind\"`\n+ // RedisSpec is the specification of redis.\n// +kubebuilder:validation:Required\nRedisSpec *RedisSpec `json:\"redisSpec\"`\n}\n@@ -48,32 +49,37 @@ type Cache struct {\ntype RedisSpec struct {\nharbormetav1.ImageSpec `json:\",inline\"`\n+ // +kubebuilder:validation:Optional\n+ // Server is the configuration of the redis server.\nServer *RedisServer `json:\"server,omitempty\"`\n+ // +kubebuilder:validation:Optional\n+ // Sentinel is the configuration of the redis sentinel.\nSentinel *RedisSentinel `json:\"sentinel,omitempty\"`\n-\n- // Maximum number of socket connections.\n- // Default is 10 connections per every CPU as reported by runtime.NumCPU.\n- PoolSize int `json:\"poolSize,omitempty\"`\n-\n- GroupName string `json:\"groupName,omitempty\"`\n-\n- Hosts []RedisHosts `json:\"hosts,omitempty\"`\n-}\n-\n-type RedisHosts struct {\n- Host string `json:\"host,omitempty\"`\n- Port string `json:\"port,omitempty\"`\n}\ntype RedisSentinel struct {\n+ // +kubebuilder:validation:Optional\n+ // +kubebuilder:default=1\n+ // Replicas is the instance number of redis sentinel.\nReplicas int `json:\"replicas,omitempty\"`\n}\ntype RedisServer struct {\n+ // +kubebuilder:validation:Optional\n+ // +kubebuilder:default=1\n+ // Replicas is the instance number of redis server.\nReplicas int `json:\"replicas,omitempty\"`\n+\n+ // +kubebuilder:validation:Optional\n+ // Resources is the resources requests and limits for redis.\nResources corev1.ResourceRequirements `json:\"resources,omitempty\"`\n+\n+ // +kubebuilder:validation:Optional\n+ // StorageClassName is the storage class name of the redis storage.\nStorageClassName string `json:\"storageClassName,omitempty\"`\n- // the size of storage used in redis.\n+\n+ // +kubebuilder:validation:Optional\n+ // Storage is the size of the redis storage.\nStorage string `json:\"storage,omitempty\"`\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/zz_generated.deepcopy.go",
"new_path": "apis/goharbor.io/v1alpha3/zz_generated.deepcopy.go",
"diff": "@@ -2386,21 +2386,6 @@ func (in *PostgresSQLSpec) DeepCopy() *PostgresSQLSpec {\nreturn out\n}\n-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n-func (in *RedisHosts) DeepCopyInto(out *RedisHosts) {\n- *out = *in\n-}\n-\n-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisHosts.\n-func (in *RedisHosts) DeepCopy() *RedisHosts {\n- if in == nil {\n- return nil\n- }\n- out := new(RedisHosts)\n- in.DeepCopyInto(out)\n- return out\n-}\n-\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *RedisSentinel) DeepCopyInto(out *RedisSentinel) {\n*out = *in\n@@ -2446,11 +2431,6 @@ func (in *RedisSpec) DeepCopyInto(out *RedisSpec) {\n*out = new(RedisSentinel)\n**out = **in\n}\n- if in.Hosts != nil {\n- in, out := &in.Hosts, &out.Hosts\n- *out = make([]RedisHosts, len(*in))\n- copy(*out, *in)\n- }\n}\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisSpec.\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -2890,18 +2890,8 @@ spec:\n- Redis\ntype: string\nredisSpec:\n+ description: RedisSpec is the specification of redis.\nproperties:\n- groupName:\n- type: string\n- hosts:\n- items:\n- properties:\n- host:\n- type: string\n- port:\n- type: string\n- type: object\n- type: array\nimage:\ndescription: Image name for the component.\ntype: string\n@@ -2921,20 +2911,23 @@ spec:\ntype: string\ntype: object\ntype: array\n- poolSize:\n- description: Maximum number of socket connections. Default is 10 connections per every CPU as reported by runtime.NumCPU.\n- type: integer\nsentinel:\n+ description: Sentinel is the configuration of the redis sentinel.\nproperties:\nreplicas:\n+ default: 1\n+ description: Replicas is the instance number of redis sentinel.\ntype: integer\ntype: object\nserver:\n+ description: Server is the configuration of the redis server.\nproperties:\nreplicas:\n+ default: 1\n+ description: Replicas is the instance number of redis server.\ntype: integer\nresources:\n- description: ResourceRequirements describes the compute resource requirements.\n+ description: Resources is the resources requests and limits for redis.\nproperties:\nlimits:\nadditionalProperties:\n@@ -2956,9 +2949,10 @@ spec:\ntype: object\ntype: object\nstorage:\n- description: the size of storage used in redis.\n+ description: Storage is the size of the redis storage.\ntype: string\nstorageClassName:\n+ description: StorageClassName is the storage class name of the redis storage.\ntype: string\ntype: object\ntype: object\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -2887,18 +2887,8 @@ spec:\n- Redis\ntype: string\nredisSpec:\n+ description: RedisSpec is the specification of redis.\nproperties:\n- groupName:\n- type: string\n- hosts:\n- items:\n- properties:\n- host:\n- type: string\n- port:\n- type: string\n- type: object\n- type: array\nimage:\ndescription: Image name for the component.\ntype: string\n@@ -2918,20 +2908,23 @@ spec:\ntype: string\ntype: object\ntype: array\n- poolSize:\n- description: Maximum number of socket connections. Default is 10 connections per every CPU as reported by runtime.NumCPU.\n- type: integer\nsentinel:\n+ description: Sentinel is the configuration of the redis sentinel.\nproperties:\nreplicas:\n+ default: 1\n+ description: Replicas is the instance number of redis sentinel.\ntype: integer\ntype: object\nserver:\n+ description: Server is the configuration of the redis server.\nproperties:\nreplicas:\n+ default: 1\n+ description: Replicas is the instance number of redis server.\ntype: integer\nresources:\n- description: ResourceRequirements describes the compute resource requirements.\n+ description: Resources is the resources requests and limits for redis.\nproperties:\nlimits:\nadditionalProperties:\n@@ -2953,9 +2946,10 @@ spec:\ntype: object\ntype: object\nstorage:\n- description: the size of storage used in redis.\n+ description: Storage is the size of the redis storage.\ntype: string\nstorageClassName:\n+ description: StorageClassName is the storage class name of the redis storage.\ntype: string\ntype: object\ntype: object\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: add redis spec kb comments anno and comments and remove useless fields (#560)
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,875
|
20.04.2021 14:30:46
| -28,800
|
796c6d3acd4a8801f77b242c2797f931944656c6
|
fix(ingress) ncp portal path
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/ingresses.go",
"new_path": "controllers/goharbor/harbor/ingresses.go",
"diff": "@@ -266,7 +266,6 @@ func (err ErrInvalidIngressController) Error() string {\nfunc (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharborv1.Harbor, core, portal netv1beta1.IngressBackend) (*netv1beta1.IngressRuleValue, error) { // nolint:funlen\npathTypePrefix := netv1beta1.PathTypePrefix\n- pathTypeExact := netv1beta1.PathTypeExact\nswitch harbor.Spec.Expose.Core.Ingress.Controller {\ncase harbormetav1.IngressControllerDefault:\n@@ -334,7 +333,7 @@ func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharb\nHTTP: &netv1beta1.HTTPIngressRuleValue{\nPaths: []netv1beta1.HTTPIngressPath{{\nPath: \"/\",\n- PathType: &pathTypeExact,\n+ PathType: &pathTypePrefix,\nBackend: portal,\n}, {\nPath: \"/api\",\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(ingress) ncp portal path (#571)
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,875
|
21.04.2021 08:42:44
| -28,800
|
ffc42e936c79c11adc66d015a80effc8f9d71ab3
|
feat(ci) change image registry
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/build-dev.yml",
"new_path": ".github/workflows/build-dev.yml",
"diff": "@@ -30,6 +30,18 @@ jobs:\nPASSWORD: '${{ secrets.DOCKER_TOKEN }}'\nIMAGE_NAME: goharbor/harbor-operator\nLATEST: 'false'\n+ - name: Docker Build & Push to GHCR\n+ uses: opspresso/action-docker@master\n+ with:\n+ args: --docker\n+ env:\n+ BUILD_PATH: dist/harbor-operator_linux_amd64\n+ DOCKERFILE: Dockerfile\n+ USERNAME: harbor\n+ PASSWORD: '${{ secrets.GHCR_TOKEN }}'\n+ REGISTRY: ghcr.io\n+ IMAGE_NAME: goharbor/harbor-operator\n+ LATEST: 'false'\ncharts:\nruns-on: ubuntu-latest\n"
},
{
"change_type": "MODIFY",
"old_path": ".github/workflows/release.yml",
"new_path": ".github/workflows/release.yml",
"diff": "@@ -59,4 +59,16 @@ jobs:\nUSERNAME: '${{ secrets.DOCKER_USER }}'\nPASSWORD: '${{ secrets.DOCKER_TOKEN }}'\nIMAGE_NAME: goharbor/harbor-operator\n- LATEST: 'false'\n+ LATEST: true\n+ - name: Docker Build & Push to GHCR\n+ uses: opspresso/action-docker@master\n+ with:\n+ args: --docker\n+ env:\n+ BUILD_PATH: dist/harbor-operator_linux_amd64\n+ DOCKERFILE: Dockerfile\n+ USERNAME: harbor\n+ PASSWORD: '${{ secrets.GHCR_TOKEN }}'\n+ REGISTRY: ghcr.io\n+ IMAGE_NAME: goharbor/harbor-operator\n+ LATEST: true\n"
},
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -410,7 +410,7 @@ install-dependencies: certmanager postgresql redis ingress\n.PHONY: redis\nredis: helm sample-redis\n$(HELM) repo add bitnami https://charts.bitnami.com/bitnami\n- $(HELM) upgrade --install harbor-redis bitnami/redis \\\n+ $(HELM) upgrade --install harbor-redis bitnami/redis --version 12.10.0 \\\n--set-string existingSecret=harbor-redis \\\n--set-string existingSecretPasswordKey=redis-password \\\n--set usePassword=true\n@@ -418,7 +418,7 @@ redis: helm sample-redis\n.PHONY: postgresql\npostgresql: helm sample-database\n$(HELM) repo add bitnami https://charts.bitnami.com/bitnami\n- $(HELM) upgrade --install harbor-database bitnami/postgresql \\\n+ $(HELM) upgrade --install harbor-database bitnami/postgresql --version 10.3.17 \\\n--set-string initdbScriptsConfigMap=harbor-init-db \\\n--set-string existingSecret=harbor-database-password\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -21490,7 +21490,7 @@ spec:\nenv:\n- name: CONSOLE_OPERATOR_MODE\nvalue: \"on\"\n- image: minio/console:v0.6.3\n+ image: ghcr.io/goharbor/minio-console:v0.6.3\nimagePullPolicy: IfNotPresent\nname: console\nports:\n@@ -21537,7 +21537,7 @@ spec:\nfieldPath: metadata.namespace\n- name: CONFIGURATION_FROM\nvalue: env,file:/etc/harbor-operator/config.yaml\n- image: goharbor/harbor-operator:dev_master\n+ image: ghcr.io/goharbor/harbor-operator:dev_master\nlivenessProbe:\nhttpGet:\npath: /healthz\n@@ -21621,7 +21621,7 @@ spec:\nname: minio-operator\nspec:\ncontainers:\n- - image: minio/operator:v4.0.6\n+ - image: ghcr.io/goharbor/minio-operator:v4.0.6\nimagePullPolicy: IfNotPresent\nname: minio-operator\nresources:\n@@ -21662,7 +21662,7 @@ spec:\n- env:\n- name: CONFIG_MAP_NAME\nvalue: postgres-operator\n- image: registry.opensource.zalan.do/acid/postgres-operator:v1.5.0\n+ image: ghcr.io/goharbor/postgres-operator:v1.5.0\nimagePullPolicy: IfNotPresent\nname: postgres-operator\nresources:\n@@ -21706,7 +21706,7 @@ spec:\napp: redisoperator\nspec:\ncontainers:\n- - image: quay.io/spotahome/redis-operator:v1.0.0\n+ - image: ghcr.io/goharbor/redis-operator:v1.0.0\nimagePullPolicy: IfNotPresent\nname: app\nresources:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/kustomization.yaml",
"new_path": "manifests/cluster/kustomization.yaml",
"diff": "@@ -38,8 +38,16 @@ patchesJson6902:\nimages:\n- name: quay.io/spotahome/redis-operator\n- newName: quay.io/spotahome/redis-operator\n+ newName: ghcr.io/goharbor/redis-operator\nnewTag: v1.0.0\n+ - name: minio/operator\n+ newName: ghcr.io/goharbor/minio-operator\n+ - name: minio/console\n+ newName: ghcr.io/goharbor/minio-console\n+ - name: registry.opensource.zalan.do/acid/postgres-operator\n+ newName: ghcr.io/goharbor/postgres-operator\n+ - name: quay.io/spotahome/redis-operator\n+ newName: ghcr.io/goharbor/redis-operator\n- name: goharbor/harbor-operator\n- newName: goharbor/harbor-operator\n+ newName: ghcr.io/goharbor/harbor-operator\nnewTag: dev_master\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -13764,7 +13764,7 @@ spec:\nfieldPath: metadata.namespace\n- name: CONFIGURATION_FROM\nvalue: env,file:/etc/harbor-operator/config.yaml\n- image: goharbor/harbor-operator:dev_master\n+ image: ghcr.io/goharbor/harbor-operator:dev_master\nlivenessProbe:\nhttpGet:\npath: /healthz\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/kustomization.yaml",
"new_path": "manifests/harbor/kustomization.yaml",
"diff": "@@ -22,5 +22,5 @@ resources:\nimages:\n- name: goharbor/harbor-operator\n- newName: goharbor/harbor-operator\n+ newName: ghcr.io/goharbor/harbor-operator\nnewTag: dev_master\n\\ No newline at end of file\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(ci) change image registry (#574)
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,890
|
21.04.2021 08:45:11
| -28,800
|
cac18f3eeca704cda4b88d311819378e44bac0e2
|
fix: correct the resource limits for the postgres
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/utils.go",
"new_path": "pkg/cluster/controllers/database/utils.go",
"diff": "@@ -86,20 +86,10 @@ func (p *PostgreSQLController) GetPostgreResource(harborcluster *goharborv1.Harb\nreturn resources\n}\n- cpu := harborcluster.Spec.InClusterDatabase.PostgresSQLSpec.Resources.Requests.Cpu()\n- mem := harborcluster.Spec.InClusterDatabase.PostgresSQLSpec.Resources.Requests.Memory()\n+ spec := harborcluster.Spec.InClusterDatabase.PostgresSQLSpec\n- request := api.ResourceDescription{}\n- if cpu != nil {\n- request.CPU = cpu.String()\n- }\n-\n- if mem != nil {\n- request.Memory = mem.String()\n- }\n-\n- resources.ResourceRequests = request\n- resources.ResourceLimits = request\n+ resources.ResourceRequests = getResourceDescription(spec.Resources.Requests)\n+ resources.ResourceLimits = getResourceDescription(spec.Resources.Limits)\nreturn resources\n}\n@@ -172,3 +162,17 @@ func (c *Connect) GenDatabaseURL() string {\nreturn databaseURL\n}\n+\n+func getResourceDescription(res corev1.ResourceList) api.ResourceDescription {\n+ var rd api.ResourceDescription\n+\n+ if cpu := res.Cpu(); cpu != nil {\n+ rd.CPU = cpu.String()\n+ }\n+\n+ if mem := res.Memory(); mem != nil {\n+ rd.Memory = mem.String()\n+ }\n+\n+ return rd\n+}\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: correct the resource limits for the postgres (#577)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,881
|
21.04.2021 08:48:05
| -28,800
|
163dcfd68c5b8ab5d7856ff10d53ed8a6f82b777
|
fix: set http header when put harbor configuration
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/harbor/configuration.go",
"new_path": "pkg/harbor/configuration.go",
"diff": "@@ -19,6 +19,9 @@ func (c *client) ApplyConfiguration(ctx context.Context, config []byte) error {\nif err != nil {\nreturn fmt.Errorf(\"new request error: %w\", err)\n}\n+ // with header\n+ req.Header.Set(\"Accept\", \"application/json\")\n+ req.Header.Set(\"Content-Type\", \"application/json\")\n// with auth\nif c.opts.credential != nil {\nreq.SetBasicAuth(c.opts.credential.username, c.opts.credential.password)\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: set http header when put harbor configuration (#578)
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,893
|
21.04.2021 13:54:24
| -28,800
|
958030579a23760dc214ea0600005e1fdabc440a
|
remove confusing files
|
[
{
"change_type": "DELETE",
"old_path": ".github/CODEOWNERS",
"new_path": null,
"diff": "-@goharbor/harbor-operator-dev\n-\n-README.md @goharbor/harbor-operator-dev @mhurtrel\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
remove confusing files (#582)
Signed-off-by: Steven Zou <szou@vmware.com>
|
254,893
|
21.04.2021 19:35:10
| -28,800
|
e531143f9763066f5314b7fbadfa82277cd3c543
|
fix(kustomization):rm minio console deployment
|
[
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -5,9 +5,6 @@ metadata:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\ngoharbor.io/operator-version: v1.0.0\n- operator.min.io/authors: MinIO, Inc.\n- operator.min.io/license: AGPLv3\n- operator.min.io/support: https://subnet.min.io\nname: harbor-operator-ns\n---\napiVersion: apiextensions.k8s.io/v1\n@@ -19816,19 +19813,6 @@ status:\n---\napiVersion: v1\nkind: ServiceAccount\n-metadata:\n- annotations:\n- goharbor.io/deploy-engine: Kustomization\n- goharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n- operator.min.io/authors: MinIO, Inc.\n- operator.min.io/license: AGPLv3\n- operator.min.io/support: https://subnet.min.io\n- name: console-sa\n- namespace: harbor-operator-ns\n----\n-apiVersion: v1\n-kind: ServiceAccount\nmetadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\n@@ -19899,111 +19883,6 @@ rules:\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRole\n-metadata:\n- annotations:\n- goharbor.io/deploy-engine: Kustomization\n- goharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n- operator.min.io/authors: MinIO, Inc.\n- operator.min.io/license: AGPLv3\n- operator.min.io/support: https://subnet.min.io\n- name: console-sa-role\n-rules:\n-- apiGroups:\n- - \"\"\n- resources:\n- - secrets\n- verbs:\n- - get\n- - watch\n- - create\n- - list\n- - patch\n- - update\n- - deletecollection\n-- apiGroups:\n- - \"\"\n- resources:\n- - namespaces\n- - pods\n- - services\n- - events\n- - resourcequotas\n- - nodes\n- verbs:\n- - get\n- - watch\n- - create\n- - list\n- - patch\n-- apiGroups:\n- - \"\"\n- resources:\n- - persistentvolumeclaims\n- verbs:\n- - deletecollection\n- - list\n- - get\n-- apiGroups:\n- - storage.k8s.io\n- resources:\n- - storageclasses\n- verbs:\n- - get\n- - watch\n- - create\n- - list\n- - patch\n-- apiGroups:\n- - apps\n- resources:\n- - statefulsets\n- - deployments\n- verbs:\n- - get\n- - create\n- - list\n- - patch\n- - watch\n- - update\n- - delete\n-- apiGroups:\n- - batch\n- resources:\n- - jobs\n- verbs:\n- - get\n- - create\n- - list\n- - patch\n- - watch\n- - update\n- - delete\n-- apiGroups:\n- - certificates.k8s.io\n- resources:\n- - certificatesigningrequests\n- - certificatesigningrequests/approval\n- - certificatesigningrequests/status\n- verbs:\n- - update\n- - create\n- - get\n-- apiGroups:\n- - minio.min.io\n- resources:\n- - '*'\n- verbs:\n- - '*'\n-- apiGroups:\n- - min.io\n- resources:\n- - '*'\n- verbs:\n- - '*'\n----\n-apiVersion: rbac.authorization.k8s.io/v1\n-kind: ClusterRole\nmetadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\n@@ -20823,26 +20702,6 @@ subjects:\n---\napiVersion: rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\n-metadata:\n- annotations:\n- goharbor.io/deploy-engine: Kustomization\n- goharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n- operator.min.io/authors: MinIO, Inc.\n- operator.min.io/license: AGPLv3\n- operator.min.io/support: https://subnet.min.io\n- name: console-sa-binding\n-roleRef:\n- apiGroup: rbac.authorization.k8s.io\n- kind: ClusterRole\n- name: console-sa-role\n-subjects:\n-- kind: ServiceAccount\n- name: console-sa\n- namespace: harbor-operator-ns\n----\n-apiVersion: rbac.authorization.k8s.io/v1\n-kind: ClusterRoleBinding\nmetadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\n@@ -21309,22 +21168,6 @@ metadata:\nnamespace: harbor-operator-ns\n---\napiVersion: v1\n-data:\n- CONSOLE_PORT: \"9090\"\n- CONSOLE_TLS_PORT: \"9443\"\n-kind: ConfigMap\n-metadata:\n- annotations:\n- goharbor.io/deploy-engine: Kustomization\n- goharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n- operator.min.io/authors: MinIO, Inc.\n- operator.min.io/license: AGPLv3\n- operator.min.io/support: https://subnet.min.io\n- name: console-env\n- namespace: harbor-operator-ns\n----\n-apiVersion: v1\ndata:\napi_port: \"8080\"\naws_region: eu-central-1\n@@ -21376,29 +21219,6 @@ metadata:\n---\napiVersion: v1\nkind: Service\n-metadata:\n- annotations:\n- goharbor.io/deploy-engine: Kustomization\n- goharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n- operator.min.io/authors: MinIO, Inc.\n- operator.min.io/license: AGPLv3\n- operator.min.io/support: https://subnet.min.io\n- labels:\n- name: console\n- name: console\n- namespace: harbor-operator-ns\n-spec:\n- ports:\n- - name: http\n- port: 9090\n- - name: https\n- port: 9443\n- selector:\n- app: console\n----\n-apiVersion: v1\n-kind: Service\nmetadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\n@@ -21457,56 +21277,11 @@ spec:\n---\napiVersion: apps/v1\nkind: Deployment\n-metadata:\n- annotations:\n- goharbor.io/deploy-engine: Kustomization\n- goharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n- operator.min.io/authors: MinIO, Inc.\n- operator.min.io/license: AGPLv3\n- operator.min.io/support: https://subnet.min.io\n- name: console\n- namespace: harbor-operator-ns\n-spec:\n- replicas: 1\n- selector:\n- matchLabels:\n- app: console\n- template:\n- metadata:\n- annotations:\n- goharbor.io/deploy-engine: Kustomization\n- goharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n- operator.min.io/authors: MinIO, Inc.\n- operator.min.io/license: AGPLv3\n- operator.min.io/support: https://subnet.min.io\n- labels:\n- app: console\n- spec:\n- containers:\n- - args:\n- - server\n- env:\n- - name: CONSOLE_OPERATOR_MODE\n- value: \"on\"\n- image: ghcr.io/goharbor/minio-console:v0.6.3\n- imagePullPolicy: IfNotPresent\n- name: console\n- ports:\n- - containerPort: 9090\n- name: console-http\n- - containerPort: 9443\n- name: console-https\n- serviceAccountName: console-sa\n----\n-apiVersion: apps/v1\n-kind: Deployment\nmetadata:\nannotations:\ncache.goharbor.io/version: v1.0.0\ndatabase.goharbor.io/version: v1.5.0\n- storage.goharbor.io/version: v3.0.13\n+ storage.goharbor.io/version: v4.0.6\nlabels:\ncontrol-plane: harbor-operator\nname: harbor-operator\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/kustomization.yaml",
"new_path": "manifests/cluster/kustomization.yaml",
"diff": "@@ -14,21 +14,19 @@ commonAnnotations:\n# NOTES: when doing changes to the ref versions, please also do same changes in the patch/annotation.yaml file\nresources:\n- ../../config/default # harbor operator\n+ - patch/namespace.yaml\n- https://raw.githubusercontent.com/spotahome/redis-operator/master/example/operator/all-redis-operator-resources.yaml?ref=v1.0.0 # redis operator\n- github.com/zalando/postgres-operator/manifests?ref=v1.5.0 # postgresql operator\n- github.com/minio/operator?ref=v4.0.6 # minIO storage operator\n# If you have to override the image path, uncomment this patch and also change the image paths in the patch/patches-images.yaml file.\n# Then rebuild.\n-# patchesStrategicMerge:\n+patchesStrategicMerge:\n# - patch/images.yaml\n+ - patch/delete-minio-console.yaml\n+ - patch/delete-duplicated-ns.yaml\npatchesJson6902:\n- - target:\n- kind: Namespace\n- name: minio-operator\n- version: v1\n- path: patch/namespace.yaml\n- target:\nkind: Deployment\nname: harbor-operator\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/patch/annotations.yaml",
"new_path": "manifests/cluster/patch/annotations.yaml",
"diff": "value:\ncache.goharbor.io/version: v1.0.0\ndatabase.goharbor.io/version: v1.5.0\n- storage.goharbor.io/version: v3.0.13\n\\ No newline at end of file\n+ storage.goharbor.io/version: v4.0.6\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "manifests/cluster/patch/delete-duplicated-ns.yaml",
"diff": "+apiVersion: v1\n+kind: Namespace\n+metadata:\n+ name: minio-operator\n+$patch: delete\n\\ No newline at end of file\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "manifests/cluster/patch/delete-minio-console.yaml",
"diff": "+apiVersion: apps/v1\n+kind: Deployment\n+metadata:\n+ name: console\n+$patch: delete\n+---\n+apiVersion: v1\n+kind: Service\n+metadata:\n+ name: console\n+$patch: delete\n+---\n+apiVersion: v1\n+kind: ConfigMap\n+metadata:\n+ name: console-env\n+$patch: delete\n+---\n+apiVersion: rbac.authorization.k8s.io/v1\n+kind: ClusterRoleBinding\n+metadata:\n+ name: console-sa-binding\n+$patch: delete\n+---\n+apiVersion: rbac.authorization.k8s.io/v1\n+kind: ClusterRole\n+metadata:\n+ name: console-sa-role\n+$patch: delete\n+---\n+apiVersion: v1\n+kind: ServiceAccount\n+metadata:\n+ name: console-sa\n+$patch: delete\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/patch/namespace.yaml",
"new_path": "manifests/cluster/patch/namespace.yaml",
"diff": "-- op: replace\n- path: /metadata/name\n- value: harbor-operator-ns\n\\ No newline at end of file\n+apiVersion: v1\n+kind: Namespace\n+metadata:\n+ name: harbor-operator-ns\n\\ No newline at end of file\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(kustomization):rm minio console deployment (#585)
Signed-off-by: Steven Zou <szou@vmware.com>
|
254,875
|
22.04.2021 10:15:13
| -28,800
|
d35040d6b3113eb0c6f5b5f4bddc52bda531aa26
|
feat(ci) fix sample
|
[
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -390,7 +390,7 @@ sample-redis: kustomize\n.PHONY: sample-github-secret\nsample-github-secret:\n- ! test -z $(GITHUB_TOKEN)\n+ test -z \"$(GITHUB_TOKEN)\" || \\\nkubectl create secret generic \\\ngithub-credentials \\\n--type=goharbor.io/github \\\n"
},
{
"change_type": "MODIFY",
"old_path": "config/samples/harbor/https.yaml",
"new_path": "config/samples/harbor/https.yaml",
"diff": "+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: harbor-test-ca\n+data:\n+ tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZpekNDQTNPZ0F3SUJBZ0lVU2Fva1FldWczaGJHQVF3U1BqaklsMmV1akl3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlZCQWdNQTFCRlN6RVJNQThHQTFVRUJ3d0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HBSamFwTGJqOGlTdFVyZVNmL2xIcFQrb1dYdUt3CnJnS2d6bm8vVjNxeEdKaFBWaFJJUW1Kb3U2M01LY1hxWXVwSlkxRTdjMmVhbU84SkpPZlpNTFFrWlN1MWlxSmIKZ3JITCt6YVAvTjRqVmkrWTJqbG81OEloYzBLNzVtak9rYjVBZ2ExOFhySnBlYlRHbFdnWFlxY05xUmZzbWhVago3VmMxQk9vVGwwb3pPU21JRmpyQUp3R0pNZjFuQzBuODI5Mks2WERyN0tDbDJXazN2OC9oVzNpRzJ6cW55aFBHCkl3czY0L0NLYU03OTdIc0R1ZXlBTU5vUVJXUHk5d2I3YXZqZlI2TDNGOWczS2l6c1pVbjFtUWcwc0JsQVRTU2QKVEN6SGxtdjZqQVFqY0RxVzdxQ3I0SHRFTXJBNjJGWT0KLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo=\n+---\napiVersion: cert-manager.io/v1\nkind: Issuer\nmetadata:\nname: sample-public-certificate\nspec:\n- selfSigned: {}\n+ ca:\n+ secretName: harbor-test-ca\n---\napiVersion: cert-manager.io/v1\nkind: Certificate\nmetadata:\nname: sample-public-certificate\nspec:\n- isCA: true\nissuerRef:\nname: sample-public-certificate\nsecretName: sample-public-certificate\n"
},
{
"change_type": "MODIFY",
"old_path": "config/samples/harborcluster/https.yaml",
"new_path": "config/samples/harborcluster/https.yaml",
"diff": "+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: harbor-test-ca\n+data:\n+ tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZpekNDQTNPZ0F3SUJBZ0lVU2Fva1FldWczaGJHQVF3U1BqaklsMmV1akl3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlZCQWdNQTFCRlN6RVJNQThHQTFVRUJ3d0lRbVZwSUVwcApibWN4RVRBUEJnTlZCQW9NQ0dkdmFHRnlZbTl5TVJFd0R3WURWUVFEREF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UW1Kb3U2M01LY1hxWXVwSlkxRTdjMmVhbU84SkpPZlpNTFFrWlN1MWlxSmIKZ3JITCt6YVAvTjRqVmkrWTJqbG81OEloYzBLNzVtak9rYjVBZ2ExOFhySnBlYlRHbFdnWFlxY05xUmZzbWhVago3VmMxQk9vVGwwb3pPU21JRmpyQUp3R0pNZjFuQzBuODI5Mks2WERyN0tDbDJXazN2OC9oVzNpRzJ6cW55aFBHCkl3czY0L0NLYU03OTdIc0R1ZXlBTU5vUVJXUHk5d2I3YXZqZlI2TDNGOWczS2l6c1pVbjFtUWcwc0JsQVRTU2QKVEN6SGxtdjZqQVFqY0RxVzdxQ3I0SHRFTXJBNjJGWT0KLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo=\n+---\napiVersion: cert-manager.io/v1\nkind: Issuer\nmetadata:\nname: sample-public-certificate\nspec:\n- selfSigned: {}\n+ ca:\n+ secretName: harbor-test-ca\n---\napiVersion: cert-manager.io/v1\nkind: Certificate\nmetadata:\nname: sample-public-certificate\nspec:\n- isCA: true\nissuerRef:\nname: sample-public-certificate\nsecretName: sample-public-certificate\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(ci) fix sample (#587)
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,881
|
21.04.2021 09:38:01
| -28,800
|
d7b55338b244218ce19c780790ba19a944b4b5db
|
docs: add in-cluster redis backup document
|
[
{
"change_type": "MODIFY",
"old_path": "docs/LCM/backup-redis-data.md",
"new_path": "docs/LCM/backup-redis-data.md",
"diff": "Documentation shown here guides you how to backup the Redis data.\n-TBD\n+## Step 1\n+\n+Get redis password from harborcluster namespace.\n+\n+```bash\n+$ kubectl get secret harborcluster-sample-redis -n cluster-sample-ns -o jsonpath='{.data.password}' | base64 --decode\n+tfliijxj\n+```\n+\n+After above operation, we get the redis password `tfliijxj`.\n+\n+## Step 2\n+\n+Execute `SAVE` command and with `-a` specify the password obtained from `step 1` in redis pod to backup redis data to dump.rdb.\n+\n+```bash\n+$ kubectl get po -n cluster-sample-ns |grep redis\n+rfr-harborcluster-sample-redis-0 1/1 Running 0 3h10m\n+rfs-harborcluster-sample-redis-896dd458d-s6klm 1/1 Running 0 3h10m\n+\n+$ kubectl exec rfr-harborcluster-sample-redis-0 -n cluster-sample-ns -- redis-cli SAVE -a tfliijxj\n+Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.\n+OK\n+```\n+\n+## Step 3\n+\n+Copy redis dump.rdb from redis pod to local path.\n+\n+```bash\n+$ kubectl cp cluster-sample-ns/rfr-harborcluster-sample-redis-0:dump.rdb dump.rdb\n+$ ls\n+dump.rdb\n+```\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
docs: add in-cluster redis backup document
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,881
|
22.04.2021 17:18:56
| -28,800
|
a71263b1a5c067f7b536aa4f1b21d2fc80c0a025
|
docs: add day2 configuration document
|
[
{
"change_type": "MODIFY",
"old_path": "docs/configurations/day2-config.md",
"new_path": "docs/configurations/day2-config.md",
"diff": "# Day2 configurations\n-TBD\n+## Step 1\n+\n+First you need to prepare a config map to provide your harbor configurations, apply the config map in the same namespace as harborcluster. In particular, you need to add an annotation to your config map to mark which harborcluster it is acting on.\n+\n+In addition, in order to protect the password from being displayed directly in the config map, you need to define the password inside the secret, and then specify the name of the secret in the configuration. We currently offer these type of secret configurations fields: `\"email_password\", \"ldap_search_password\", \"uaa_client_secret\", \"oidc_client_secret\"`.\n+\n+The configuration items can be found in [harbor swagger](https://github.com/goharbor/harbor/blob/c701ce09fa2a34b7ea26addb431154f9812de8af/api/v2.0/legacy_swagger.yaml#L516).\n+\n+### Example\n+\n+```yaml\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: secret-sample\n+ namespace: cluster-sample-ns\n+type: Opaque\n+data:\n+ # the key is same with fields name.\n+ email_password: YmFyCg==\n+```\n+\n+```yaml\n+apiVersion: v1\n+kind: ConfigMap\n+metadata:\n+ name: test-config\n+ # namespace same with harborcluster cr namespace.\n+ namespace: cluster-sample-ns\n+ annotations:\n+ # required.\n+ # if not define the anno, the config map will not work.\n+ # the key is `goharbor.io/configuration`, and the value is your harborcluster cr name.\n+ goharbor.io/configuration: harborcluster-sample\n+data:\n+ # provide your harbor configuration by yaml format.\n+ config.yaml: |\n+ email_ssl: true\n+ email_password: secret-sample # the value is the name of secret which store the email_password.\n+```\n+\n+## Step 2\n+\n+Just apply the config map to your kubernetes cluster, if you have related secrets, please apply secrets before config map. The result of configurate harbor will store in the harborcluster status (with `ConfigurationReady` condition).\n+\n+```yaml\n+status:\n+ conditions:\n+ - lastTransitionTime: \"2021-04-20T10:49:12Z\"\n+ status: \"True\"\n+ type: StorageReady\n+ - lastTransitionTime: \"2021-04-20T10:50:23Z\"\n+ message: Harbor component database secrets are already create\n+ reason: Database is ready\n+ status: \"True\"\n+ type: DatabaseReady\n+ - lastTransitionTime: \"2021-04-20T10:49:13Z\"\n+ message: harbor component redis secrets are already create.\n+ reason: redis already ready\n+ status: \"True\"\n+ type: CacheReady\n+ - message: New generation detected\n+ reason: newGeneration\n+ status: \"True\"\n+ type: InProgress\n+ - lastTransitionTime: \"2021-04-20T10:51:40Z\"\n+ message: JobService.goharbor.io cluster-sample-ns/harborcluster-sample-harbor-harbor\n+ reason: dependencyStatus\n+ status: \"False\"\n+ type: ServiceReady\n+ - lastTransitionTime: \"2021-04-20T12:54:36Z\"\n+ message: harbor configuraion has been applied successfully.\n+ reason: ConfigurationApplySuccess\n+ status: \"True\"\n+ type: ConfigurationReady\n+```\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
docs: add day2 configuration document (#590)
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,875
|
22.04.2021 22:28:42
| -28,800
|
ea8fe8a159bc2b32411ea7473352670714d4e6f8
|
doc(config) add resource-configurations.md
|
[
{
"change_type": "MODIFY",
"old_path": "docs/configurations/resource-configurations.md",
"new_path": "docs/configurations/resource-configurations.md",
"diff": "# Resource configurations\n-TBD\n+## common config\n+\n+- for install by kustomize build, change file config/config/config.yaml\n+- for install by helm chart, change values.yaml or change configure map in charts/harbor-operator/templates/configmap.yaml\n+\n+### config.yaml\n+\n+| key | description | default |\n+|----------------|-----------------------|---------|\n+| controllers-config-directory | the directory of controllers config files. | /etc/harbor-operator |\n+| classname | Harbor class handled by the operator. | \"\" |\n+| network-policies | Whether the operator should manage network policies. | false |\n+| watch-children | Whether the operator should watch children. | false |\n+| jaeger | jaeger configure | \"\" |\n+| operator | harbor operator pod configure. include Webhook.Port, Metrics.Address, Probe.Address, LeaderElection.Enabled, LeaderElection.Namespace, LeaderElection.ID | |\n+\n+## controller config files\n+\n+- for install by kustomize build, change file config/config/*-ctrl.yaml\n+- for install by helm chart, change values.yaml or change configure map in charts/harbor-operator/templates/configmap.yaml\n+\n+### chartmuseum-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### core-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### exporter-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### harbor-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### harborcluster-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### harborconfiguration-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### jobservice-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### notaryserver-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### notarysigner-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### portal-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### registry-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### registryctl-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n+\n+### trivy-ctrl.yaml\n+\n+| key | description |\n+|----------------|-----------------------|\n+| max-reconcile | max parallel reconciliation. |\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(config) add resource-configurations.md (#583)
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,893
|
22.04.2021 22:35:28
| -28,800
|
68c1e7a69136ffe1d0a68dacd0adc797f623db14
|
fix(webhook):revise in-cluster storage webhook
fix
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harborcluster_webhook.go",
"new_path": "apis/goharbor.io/v1alpha3/harborcluster_webhook.go",
"diff": "@@ -29,11 +29,16 @@ import (\n\"sigs.k8s.io/controller-runtime/pkg/webhook\"\n)\n+const (\n+ // The minimal number of volumes created by minio.\n+ minimalVolumeCount = 4\n+)\n+\n// Log used this webhook.\nvar clog = logf.Log.WithName(\"harborcluster-resource\")\n// SetupWebhookWithManager sets up validating webhook of HarborCluster.\n-func (hc *HarborCluster) SetupWebhookWithManager(ctx context.Context, mgr ctrl.Manager) error {\n+func (hc *HarborCluster) SetupWebhookWithManager(_ context.Context, mgr ctrl.Manager) error {\nreturn ctrl.NewWebhookManagedBy(mgr).\nFor(hc).\nComplete()\n@@ -142,8 +147,10 @@ func (hc *HarborCluster) validateStorage() *field.Error {\n// Validate more if incluster storage is configured.\nif hc.Spec.InClusterStorage != nil {\ndesiredReplicas := hc.Spec.InClusterStorage.MinIOSpec.Replicas\n- if desiredReplicas%2 != 0 || desiredReplicas > 16 {\n- return invalid(fp, desiredReplicas, \"minIOSpec.replicas should be even number and no more than 16\")\n+ volumePerServer := hc.Spec.InClusterStorage.MinIOSpec.VolumesPerServer\n+\n+ if desiredReplicas*volumePerServer < minimalVolumeCount {\n+ return invalid(fp, hc.Spec.InClusterStorage.MinIOSpec, fmt.Sprintf(\"minIOSpec.replicas * minIOSpec.volumesPerServer should be >=%d\", minimalVolumeCount))\n}\n}\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(webhook):revise in-cluster storage webhook (#593)
fix #554
Signed-off-by: Steven Zou <szou@vmware.com>
|
254,890
|
23.04.2021 15:45:11
| -28,800
|
6a229c8d168c57ea721385eeaefa66ef96ebfe5a
|
fix: make registryctl depend on config of registry
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/registryctl/resources.go",
"new_path": "controllers/goharbor/registryctl/resources.go",
"diff": "@@ -7,6 +7,7 @@ import (\nserrors \"github.com/goharbor/harbor-operator/pkg/controller/errors\"\n\"github.com/goharbor/harbor-operator/pkg/resources\"\n\"github.com/pkg/errors\"\n+ corev1 \"k8s.io/api/core/v1\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n)\n@@ -45,6 +46,18 @@ func (r *Reconciler) AddResources(ctx context.Context, resource resources.Resour\nreturn errors.Wrap(err, \"cannot get configMap\")\n}\n+ registryConfigMapName := r.Reconciler.Controller.NormalizeName(ctx, registryctl.Spec.RegistryRef)\n+\n+ registryConfigMapResource, err := r.AddExternalConfigMap(ctx, &corev1.ConfigMap{\n+ ObjectMeta: metav1.ObjectMeta{\n+ Name: registryConfigMapName,\n+ Namespace: registryctl.GetNamespace(),\n+ },\n+ })\n+ if err != nil {\n+ return errors.Wrapf(err, \"add registry configMap %s\", registryConfigMapName)\n+ }\n+\nconfigMapResource, err := r.AddConfigMapToManage(ctx, cm)\nif err != nil {\nreturn errors.Wrapf(err, \"cannot add configMap %s\", cm.GetName())\n@@ -55,7 +68,7 @@ func (r *Reconciler) AddResources(ctx context.Context, resource resources.Resour\nreturn errors.Wrap(err, \"cannot get deployment\")\n}\n- _, err = r.AddDeploymentToManage(ctx, deployment, registry, configMapResource)\n+ _, err = r.AddDeploymentToManage(ctx, deployment, registry, registryConfigMapResource, configMapResource)\nif err != nil {\nreturn errors.Wrapf(err, \"cannot add deployment %s\", deployment.GetName())\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/controller/resource.go",
"new_path": "pkg/controller/resource.go",
"diff": "@@ -238,6 +238,24 @@ func (c *Controller) AddExternalResource(ctx context.Context, resource resources\nreturn res, g.AddResource(ctx, res, dependencies, c.EnsureReady)\n}\n+func (c *Controller) AddExternalConfigMap(ctx context.Context, configMap *corev1.ConfigMap, dependencies ...graph.Resource) (graph.Resource, error) {\n+ if configMap == nil {\n+ return nil, nil\n+ }\n+\n+ res := &Resource{\n+ checkable: statuscheck.True,\n+ resource: configMap,\n+ }\n+\n+ g := sgraph.Get(ctx)\n+ if g == nil {\n+ return nil, errors.Errorf(\"no graph in current context\")\n+ }\n+\n+ return res, g.AddResource(ctx, res, dependencies, c.EnsureReady)\n+}\n+\nfunc (c *Controller) AddExternalTypedSecret(ctx context.Context, secret *corev1.Secret, secretType corev1.SecretType, dependencies ...graph.Resource) (graph.Resource, error) {\nif secret == nil {\nreturn nil, nil\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: make registryctl depend on config of registry (#594)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,870
|
23.04.2021 15:50:31
| -28,800
|
48280380646c56600d66f0d96aea77afe2fdbb7c
|
fix(pg) add pg default resource config
add pg default resource config
fix
|
[
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -21178,6 +21178,8 @@ data:\nconnection_pooler_image: registry.opensource.zalan.do/acid/pgbouncer:master-7\ndb_hosted_zone: db.example.com\ndebug_logging: \"true\"\n+ default_cpu_request: 250m\n+ default_memory_request: 500Mi\ndocker_image: registry.opensource.zalan.do/acid/spilo-12:1.6-p3\nenable_master_load_balancer: \"false\"\nenable_replica_load_balancer: \"false\"\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/kustomization.yaml",
"new_path": "manifests/cluster/kustomization.yaml",
"diff": "@@ -25,6 +25,7 @@ patchesStrategicMerge:\n# - patch/images.yaml\n- patch/delete-minio-console.yaml\n- patch/delete-duplicated-ns.yaml\n+ - patch/pg-configmap.yaml\npatchesJson6902:\n- target:\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "manifests/cluster/patch/pg-configmap.yaml",
"diff": "+apiVersion: v1\n+kind: ConfigMap\n+metadata:\n+ name: postgres-operator\n+data:\n+ default_cpu_request: 250m\n+ default_memory_request: 500Mi\n\\ No newline at end of file\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(pg) add pg default resource config (#579)
add pg default resource config
fix #539
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,870
|
24.04.2021 16:39:14
| -28,800
|
9606f48fa0457b4e6130fac50a1b72107947cb65
|
fix(pg) add postgress kb annotation and comments
add postgress kb annotation and comments
fixed
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"diff": "@@ -95,12 +95,19 @@ type Database struct {\ntype PostgresSQLSpec struct {\nharbormetav1.ImageSpec `json:\",inline\"`\n+ // Storage defines database data store pvc size\n+ // +kubebuilder:validation:Optional\nStorage string `json:\"storage,omitempty\"`\n+ // Replicas defines database instance replicas\n+ // +kubebuilder:validation:Optional\n+ // +kubebuilder:validation:Minimum:=1\nReplicas int `json:\"replicas,omitempty\"`\n+ // StorageClassName defines use which StorageClass to create pvc\n+ // +kubebuilder:validation:Optional\nStorageClassName string `json:\"storageClassName,omitempty\"`\n+ // Resources defines database pod resource config\n+ // +kubebuilder:validation:Optional\nResources corev1.ResourceRequirements `json:\"resources,omitempty\"`\n- SslConfig string `json:\"sslConfig,omitempty\"`\n- ConnectTimeout int `json:\"connectTimeout,omitempty\"`\n}\ntype Storage struct {\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -2967,8 +2967,6 @@ spec:\ntype: string\npostgresSqlSpec:\nproperties:\n- connectTimeout:\n- type: integer\nimage:\ndescription: Image name for the component.\ntype: string\n@@ -2989,9 +2987,11 @@ spec:\ntype: object\ntype: array\nreplicas:\n+ description: Replicas defines database instance replicas\n+ minimum: 1\ntype: integer\nresources:\n- description: ResourceRequirements describes the compute resource requirements.\n+ description: Resources defines database pod resource config\nproperties:\nlimits:\nadditionalProperties:\n@@ -3012,11 +3012,11 @@ spec:\ndescription: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'\ntype: object\ntype: object\n- sslConfig:\n- type: string\nstorage:\n+ description: Storage defines database data store pvc size\ntype: string\nstorageClassName:\n+ description: StorageClassName defines use which StorageClass to create pvc\ntype: string\ntype: object\nrequired:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -2967,8 +2967,6 @@ spec:\ntype: string\npostgresSqlSpec:\nproperties:\n- connectTimeout:\n- type: integer\nimage:\ndescription: Image name for the component.\ntype: string\n@@ -2989,9 +2987,11 @@ spec:\ntype: object\ntype: array\nreplicas:\n+ description: Replicas defines database instance replicas\n+ minimum: 1\ntype: integer\nresources:\n- description: ResourceRequirements describes the compute resource requirements.\n+ description: Resources defines database pod resource config\nproperties:\nlimits:\nadditionalProperties:\n@@ -3012,11 +3012,11 @@ spec:\ndescription: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'\ntype: object\ntype: object\n- sslConfig:\n- type: string\nstorage:\n+ description: Storage defines database data store pvc size\ntype: string\nstorageClassName:\n+ description: StorageClassName defines use which StorageClass to create pvc\ntype: string\ntype: object\nrequired:\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/utils.go",
"new_path": "pkg/cluster/controllers/database/utils.go",
"diff": "@@ -94,7 +94,7 @@ func (p *PostgreSQLController) GetPostgreResource(harborcluster *goharborv1.Harb\nreturn resources\n}\n-// GetRedisServerReplica returns postgres replicas.\n+// GetPostgreReplica returns postgres replicas.\nfunc (p *PostgreSQLController) GetPostgreReplica(harborcluster *goharborv1.HarborCluster) int32 {\nif harborcluster.Spec.InClusterDatabase.PostgresSQLSpec == nil {\nreturn DefaultDatabaseReplica\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(pg) add postgress kb annotation and comments (#559)
add postgress kb annotation and comments
fixed #552
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,875
|
27.04.2021 15:25:12
| -28,800
|
6a67475dec67256655b0d5b0b72ca5d73ae927d9
|
fix(crd) remove useless EncryptionKeyRef
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"diff": "@@ -188,11 +188,6 @@ type HarborSpec struct {\n// +kubebuilder:validation:Pattern=\"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\"\nHarborAdminPasswordRef string `json:\"harborAdminPasswordRef\"`\n- // +kubebuilder:validation:Required\n- // +kubebuilder:validation:Pattern=\"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\"\n- // The secret key used for encryption.\n- EncryptionKeyRef string `json:\"encryptionKeyRef\"`\n-\n// +kubebuilder:validation:Optional\n// +kubebuilder:default=\"RollingUpdate\"\nUpdateStrategyType appsv1.DeploymentStrategyType `json:\"updateStrategyType,omitempty\"`\n"
},
{
"change_type": "MODIFY",
"old_path": "config/kustomizeconfig/harbor.yaml",
"new_path": "config/kustomizeconfig/harbor.yaml",
"diff": "@@ -15,9 +15,6 @@ nameReference:\n- kind: Harbor\ngroup: goharbor.io\npath: spec/database/passwordRef\n- - kind: Harbor\n- group: goharbor.io\n- path: spec/encryptionKeyRef\n- kind: Harbor\ngroup: goharbor.io\npath: spec/expose/core/tls/certificateRef\n"
},
{
"change_type": "MODIFY",
"old_path": "config/kustomizeconfig/harborcluster.yaml",
"new_path": "config/kustomizeconfig/harborcluster.yaml",
"diff": "@@ -15,9 +15,6 @@ nameReference:\n- kind: HarborCluster\ngroup: goharbor.io\npath: spec/database/passwordRef\n- - kind: HarborCluster\n- group: goharbor.io\n- path: spec/encryptionKeyRef\n- kind: HarborCluster\ngroup: goharbor.io\npath: spec/expose/core/tls/certificateRef\n"
},
{
"change_type": "MODIFY",
"old_path": "config/samples/harbor/goharbor_v1alpha3_harbor.yaml",
"new_path": "config/samples/harbor/goharbor_v1alpha3_harbor.yaml",
"diff": "@@ -11,7 +11,6 @@ spec:\nhost: core.harbor.domain\ntls:\ncertificateRef: sample-public-certificate\n- encryptionKeyRef: core-database-encryption\ninternalTLS:\nenabled: true\nportal: {}\n"
},
{
"change_type": "MODIFY",
"old_path": "config/samples/harborcluster/goharbor_v1alpha3_harborcluster.yaml",
"new_path": "config/samples/harborcluster/goharbor_v1alpha3_harborcluster.yaml",
"diff": "@@ -30,7 +30,6 @@ spec:\nhost: notary.harbor.domain\ntls:\ncertificateRef: sample-public-certificate\n- encryptionKeyRef: core-database-encryption\ninternalTLS:\nenabled: true\nportal: {}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor_test.go",
"new_path": "controllers/goharbor/harbor_test.go",
"diff": "@@ -146,7 +146,6 @@ func setupValidHarbor(ctx context.Context, ns string) (Resource, client.ObjectKe\nSpec: goharborv1.HarborSpec{\nExternalURL: publicURL.String(),\nHarborAdminPasswordRef: adminSecretName,\n- EncryptionKeyRef: \"encryption-key\",\nVersion: harborversion.Default(),\nImageChartStorage: &goharborv1.HarborStorageImageChartStorageSpec{\nFileSystem: &goharborv1.HarborStorageImageChartStorageFileSystemSpec{\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/CRD/custom-resource-definition.md",
"new_path": "docs/CRD/custom-resource-definition.md",
"diff": "@@ -99,17 +99,6 @@ spec:\n# ... Skipped fields\n```\n-`encryptionKeyRef`(required): the secret key used for encryption.\n-\n-```yaml\n-spec:\n- # ... Skipped fields\n-\n- encryptionKeyRef: \"myEncryption\" # Required\n-\n- # ... Skipped fields\n-```\n-\n`updateStrategyType`(optional): the update strategy.\n```yaml\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/tutorial.md",
"new_path": "docs/tutorial.md",
"diff": "@@ -137,7 +137,6 @@ spec:\nhost: notary.10.10.10.100.xip.io\ntls:\ncertificateRef: sample-public-certificate\n- encryptionKeyRef: core-database-encryption\ninternalTLS:\nenabled: true\nportal: {}\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -2496,10 +2496,6 @@ spec:\nrequired:\n- hosts\ntype: object\n- encryptionKeyRef:\n- description: The secret key used for encryption.\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\nexporter:\nproperties:\ncache:\n@@ -4021,7 +4017,6 @@ spec:\ndescription: The version of the harbor, eg 2.1.2\ntype: string\nrequired:\n- - encryptionKeyRef\n- expose\n- externalURL\n- harborAdminPasswordRef\n@@ -4408,10 +4403,6 @@ spec:\nrequired:\n- hosts\ntype: object\n- encryptionKeyRef:\n- description: The secret key used for encryption.\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\nexporter:\nproperties:\ncache:\n@@ -5522,7 +5513,6 @@ spec:\ndescription: The version of the harbor, eg 2.1.2\ntype: string\nrequired:\n- - encryptionKeyRef\n- expose\n- externalURL\n- harborAdminPasswordRef\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -2496,10 +2496,6 @@ spec:\nrequired:\n- hosts\ntype: object\n- encryptionKeyRef:\n- description: The secret key used for encryption.\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\nexporter:\nproperties:\ncache:\n@@ -4021,7 +4017,6 @@ spec:\ndescription: The version of the harbor, eg 2.1.2\ntype: string\nrequired:\n- - encryptionKeyRef\n- expose\n- externalURL\n- harborAdminPasswordRef\n@@ -4408,10 +4403,6 @@ spec:\nrequired:\n- hosts\ntype: object\n- encryptionKeyRef:\n- description: The secret key used for encryption.\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\nexporter:\nproperties:\ncache:\n@@ -5522,7 +5513,6 @@ spec:\ndescription: The version of the harbor, eg 2.1.2\ntype: string\nrequired:\n- - encryptionKeyRef\n- expose\n- externalURL\n- harborAdminPasswordRef\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/samples/harbor_core_fs.yaml",
"new_path": "manifests/samples/harbor_core_fs.yaml",
"diff": "@@ -79,7 +79,6 @@ spec:\nhost: core.harbor.domain\ntls:\ncertificateRef: sample-public-certificate\n- encryptionKeyRef: core-database-encryption\ninternalTLS:\nenabled: true\nportal: {}\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/samples/harbor_core_minio.yaml",
"new_path": "manifests/samples/harbor_core_minio.yaml",
"diff": "@@ -78,7 +78,6 @@ spec:\nhost: core.harbor.domain\ntls:\ncertificateRef: sample-public-certificate\n- encryptionKeyRef: core-database-encryption\ninternalTLS:\nenabled: true\nportal: {}\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/samples/harbor_full_fs.yaml",
"new_path": "manifests/samples/harbor_full_fs.yaml",
"diff": "@@ -130,7 +130,6 @@ spec:\nclaimName: sample-harbor-trivy-reports\ncachePersistentVolume:\nclaimName: sample-harbor-trivy-cache\n- encryptionKeyRef: core-database-encryption\ninternalTLS:\nenabled: true\nportal: {}\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/samples/harbor_full_minio.yaml",
"new_path": "manifests/samples/harbor_full_minio.yaml",
"diff": "@@ -83,7 +83,6 @@ spec:\nhost: notary.harbor.domain\ntls:\ncertificateRef: sample-public-certificate\n- encryptionKeyRef: core-database-encryption\ninternalTLS:\nenabled: true\nportal: {}\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/samples/harborcluster_standard_stack_external.yaml",
"new_path": "manifests/samples/harborcluster_standard_stack_external.yaml",
"diff": "@@ -126,7 +126,6 @@ spec:\npasswordRef: harbor-database-password\nsslMode: disable\nusername: postgres\n- encryptionKeyRef: core-database-encryption-dddh7f9gfg\nexpose:\ncore:\ningress:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(crd) remove useless EncryptionKeyRef
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,893
|
28.04.2021 14:15:48
| -28,800
|
ba4e811f1a5101bd0070905341f07e49c73c5402
|
doc(console):add doc for enabling minio console
add doc for how to enable the minio console
add console doc link in the README
rename resource configurations to operator configurations
add words for checkout code to the specified branch/tag
fix
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -111,7 +111,8 @@ NOTES:\n* [Delete Harbor cluster](./docs/LCM/cluster-deletion.md)\n* [Backup data](./docs/LCM/backup-data.md)\n* [Useful Makefile Targets](./docs/makefile.md)\n-* [Resource configurations](./docs/configurations/resource-configurations.md)\n+* [Operator configurations](./docs/configurations/operator-configurations.md)\n+* [Enable Minio console](./docs/installation/enable_minio_console.md)\n* [Performance comparison between fs & MinIO](./docs/perf/simple-perf-comprasion.md)\n* [Monitor logs with grafana](./docs/LCM/monitor-logs-with-grafana.md)\n"
},
{
"change_type": "RENAME",
"old_path": "docs/configurations/resource-configurations.md",
"new_path": "docs/configurations/operator-configurations.md",
"diff": "-# Resource configurations\n+# Operator configurations\n+\n+There are some settings for you to configure your Harbor operator deployment.\n## common config\n"
},
{
"change_type": "ADD",
"old_path": "docs/images/console/dashboard.png",
"new_path": "docs/images/console/dashboard.png",
"diff": "Binary files /dev/null and b/docs/images/console/dashboard.png differ\n"
},
{
"change_type": "ADD",
"old_path": "docs/images/console/login.png",
"new_path": "docs/images/console/login.png",
"diff": "Binary files /dev/null and b/docs/images/console/login.png differ\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/by-helm-chart.md",
"new_path": "docs/installation/by-helm-chart.md",
"diff": "@@ -35,9 +35,13 @@ There are several ways to get the Harbor operator helm chart:\n```shell\ngit clone https://github.com/goharbor/harbor-operator.git && \\\ncd harbor-operator && \\\n- git checkout release-v1.0.0 && \\\n+ git checkout release-1.0.0 && \\\nmake helm-generate RELEASE_VERSION=v1.0.0\n+ # Checkout to the specified branch or the specified tag\n+ # To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n+ # To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n+\n# chart is generated to `charts/harbor-operator-v1.0.0.tgz`\n```\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "docs/installation/enable_minio_console.md",
"diff": "+# Enable Minio console\n+\n+[Minio console](https://github.com/minio/console) is a graphical user interface for you to manage the tenant created by the operator. By default, it is not enabled in the harbor operator [all-in-one](./kustomization-all-in-one.md) kustomization manifest. The doc shown here guides you to enable the Minio console if you have the Minio tenant management needs.\n+\n+>Notes: If you install Minio operator with its own manifests, the Minio console might be enabled automatically.\n+\n+## Prerequisites\n+\n+1. `kubectl` with a proper version(v1.18.6+) is [installed](https://kubernetes.io/docs/tasks/tools/).\n+1. `kustomize` (optional)with a proper version(v3.8.7+) is [installed](https://kubectl.docs.kubernetes.io/installation/kustomize/).\n+1. `git` (optional) is [installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).\n+\n+## Customize the kustomization manifest\n+\n+First, clone the code from the `harbor-operator` repository.\n+\n+```shell\n+git clone https://github.com/goharbor/harbor-operator.git\n+\n+# Checkout to the specified branch or the specified tag.\n+# To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n+# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n+```\n+\n+Then open the [all-in-one](./kustomization-all-in-one.md) kustomization manifest and locate the `patchesStrategicMerge` section. Comment the patch `- patch/delete-minio-console.yaml`.\n+\n+```yaml\n+# If you have to override the image path, uncomment this patch and also change the image paths in the patch/patches-images.yaml file.\n+# Then rebuild.\n+patchesStrategicMerge:\n+# - patch/images.yaml\n+# - patch/delete-minio-console.yaml\n+ - patch/delete-duplicated-ns.yaml\n+ - patch/pg-configmap.yaml\n+```\n+\n+As the resource manifests are not stored in the codebase, then you need to run the following command to generate the related resource manifests before using `kustomize` to build your customized operator deployment manifest.\n+\n+```shell\n+make manifests\n+```\n+\n+Run `kustomize` command to generate your customized operator deployment manifest.\n+\n+```shell\n+kustomize build manifest/cluster -o myCustom.yaml\n+```\n+\n+## Deploy Minio console\n+\n+Apply the customized deployment manifest to your Kubernetes cluster.\n+\n+```shell\n+kubectl apply -f myCustom.yaml\n+```\n+\n+Of course, if you're willing to, you can directly apply the deployment via kustomization manifest.\n+\n+```shell\n+kubectl apply -k manifests/cluster\n+\n+# OR\n+# kustomize build manifest/cluster | kubectl apply -f -\n+```\n+\n+After a short while, the console pod will be ready then.\n+\n+```shell\n+# Check console pod status\n+k8s get pods --selector=app=console -n harbor-operator-ns\n+\n+## Output\n+# NAME READY STATUS RESTARTS AGE\n+# console-97c5cdc46-q6ptc 1/1 Running 0 18h\n+```\n+\n+## Expose the Minio console service\n+\n+To access the console service outside your Kubernetes cluster, you need to expose the Minio console service.\n+\n+A simple way, expose it via port forward.\n+\n+```shell\n+kubectl port-forward --address 10.10.1.10 service/console -n harbor-operator-ns 29090:9090\n+```\n+\n+Alternatively, create an ingress.\n+e.g.:\n+\n+```yaml\n+apiVersion: networking.k8s.io/v1\n+kind: Ingress\n+metadata:\n+ name: minio-console\n+ namespace: harbor-operator-ns\n+spec:\n+ rules:\n+ - host: minio-console.10.10.1.10.xip.io\n+ http:\n+ paths:\n+ - backend:\n+ service:\n+ name: console\n+ port:\n+ number: 9090\n+ path: /\n+ pathType: Prefix\n+status:\n+ loadBalancer:\n+ ingress:\n+ - hostname: localhost\n+```\n+\n+## Access the Minio console\n+\n+Open browser and navigate to the expose host of the Minio console service, e.g.: `https://minio-console.10.10.1.10.xip.io`. You'll see the login page.\n+\n+\n+\n+Get the JWT token from your service account.\n+\n+```shell\n+kubectl -n harbor-operator-ns get secret $(kubectl -n harbor-operator-ns get serviceaccount console-sa -o jsonpath=\"{.secrets[0].name}\") -o jsonpath=\"{.data.token}\" | base64 --decode\n+```\n+\n+Input the token got from the above command in the login page and you'll be navigated to the dashboard page.\n+\n+All the tenants created are listed.\n+\n+\n+\n+Click any tenant to see their basic information.\n+\n+>NOTES: The available functionalities of the Minio console will be different based on the license subscription plan which is irrelevant with Harbor operator.\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/kustomization-all-in-one.md",
"new_path": "docs/installation/kustomization-all-in-one.md",
"diff": "@@ -46,7 +46,9 @@ If you want to customize the deployment manifest like editing image settings of\n```shell\ngit clone https://github.com/goharbor/harbor-operator.git\n-# Checkout to the necessary branch.\n+# Checkout to the specified branch or the specified tag.\n+# To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n+# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n```\nAs the resource manifests are not stored in the codebase, then you need to run the following command to generate the related resource manifests before using `kustomize` to build your customized operator deployment manifest:\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/kustomization-custom.md",
"new_path": "docs/installation/kustomization-custom.md",
"diff": "@@ -132,7 +132,9 @@ Of course, you can clone the codebase into your computer and then customize and\n```shell\ngit clone https://github.com/goharbor/harbor-operator.git\n-# Checkout to the necessary branch.\n+# Checkout to the specified branch or the specified tag.\n+# To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n+# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n# As the resource manifests are not stored in the codebase, then you need to run the following command to generate the related resource manifests before using `kustomize` to build your customized operator deployment manifest:\nmake manifests\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/makefile.md",
"new_path": "docs/makefile.md",
"diff": "@@ -8,6 +8,10 @@ Clone the harbor operator codebase into your computer with command\n```shell\ngit clone https://github.com/goharbor/harbor-operator.git\n+\n+# Checkout to the specified branch or the specified tag.\n+# To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n+# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n```\nThe `Makefile` is in the root dir of the code repository.\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(console):add doc for enabling minio console (#618)
- add doc for how to enable the minio console
- add console doc link in the README
- rename resource configurations to operator configurations
- add words for checkout code to the specified branch/tag
Signed-off-by: Steven Zou <szou@vmware.com>
fix #599
|
254,890
|
28.04.2021 17:21:01
| -28,800
|
6dcbdc96698a1c727f89b1db4a7ce22b5cefe1e5
|
refactor: create the minio bucket by the job
Create the minio bucket by the job in the target namespace of the harbor
to avoid problem when network is not accessable between operator and
harbor namespaces.
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -298,7 +298,7 @@ jobs:\ncd ..\nkubectl -n cluster-sample-ns patch deploy harborcluster-sample-harbor-harbor-core -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"core\",\"env\":[{\"name\":\"GC_TIME_WINDOW_HOURS\",\"value\":\"0\"}]}]}}}}'\nsleep 5\n- kubectl -n cluster-sample-ns wait --for=condition=Ready pod --all --timeout 600s\n+ kubectl -n cluster-sample-ns wait --for=condition=Ready -l job-type!=minio-init pod --all --timeout 600s\ndocker run --rm -t --privileged -v `pwd`/harbor:/drone -v /etc/docker/certs.d/$CORE_HOST/:/ca -v /etc/docker/certs.d/$CORE_HOST/:/root/.docker/tls/$NOTARY_HOST/ -e NOTARY_URL=https://$NOTARY_HOST -w /drone goharbor/harbor-e2e-engine:2.6.3 \\\npython -u -m robot -v DOCKER_USER:${{ secrets.DOCKER_USER }} -v DOCKER_PWD:${{ secrets.DOCKER_TOKEN }} -v ip:$CORE_HOST -v ip1: -v HARBOR_PASSWORD:Harbor12345 -X \\\n--exclude gc --exclude metrics --exclude singularity --exclude proxy_cache \\\n@@ -446,7 +446,7 @@ jobs:\necho $i\nkubectl get all\ndone\n- if ! time kubectl wait --for=condition=Ready pod --all --timeout 600s && ! time kubectl wait --for=condition=Ready pod --all --timeout 60s; then\n+ if ! time kubectl wait --for=condition=Ready -l job-type!=minio-init pod --all --timeout 600s && ! time kubectl wait --for=condition=Ready -l job-type!=minio-init pod --all --timeout 60s; then\necho install harbor failed\nkubectl get all\n@@ -487,7 +487,7 @@ jobs:\ngit clone https://github.com/goharbor/harbor -b v2.2.1\nkubectl patch deploy harborcluster-sample-harbor-harbor-core -p '{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"core\",\"env\":[{\"name\":\"GC_TIME_WINDOW_HOURS\",\"value\":\"0\"}]}]}}}}'\nsleep 5\n- kubectl wait --for=condition=Ready pod --all --timeout 600s\n+ kubectl wait --for=condition=Ready -l job-type!=minio-init pod --all --timeout 600s\ndocker run --rm -t --privileged -v `pwd`/harbor:/drone -v /etc/docker/certs.d/$CORE_HOST/:/ca -v /etc/docker/certs.d/$CORE_HOST/:/root/.docker/tls/$NOTARY_HOST/ -e NOTARY_URL=https://$NOTARY_HOST -w /drone goharbor/harbor-e2e-engine:2.6.3 \\\npython -u -m robot -v DOCKER_USER:${{ secrets.DOCKER_USER }} -v DOCKER_PWD:${{ secrets.DOCKER_TOKEN }} -v ip:$CORE_HOST -v ip1: -v HARBOR_PASSWORD:Harbor12345 -X \\\n--exclude gc --exclude metrics --exclude singularity --exclude proxy_cache \\\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harborcluster_types.go",
"diff": "@@ -153,6 +153,14 @@ type MinIOSpec struct {\n// If provided, use these requests and limit for cpu/memory resource allocation\n// +kubebuilder:validation:Optional\nResources corev1.ResourceRequirements `json:\"resources,omitempty\"`\n+\n+ // MinIOClientSpec the spec for the mc\n+ // +kubebuilder:validation:Optional\n+ MinIOClientSpec *MinIOClientSpec `json:\"mc,omitempty\"`\n+}\n+\n+type MinIOClientSpec struct {\n+ harbormetav1.ImageSpec `json:\",inline\"`\n}\n// HarborClusterStatus defines the observed state of HarborCluster.\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/zz_generated.deepcopy.go",
"new_path": "apis/goharbor.io/v1alpha3/zz_generated.deepcopy.go",
"diff": "@@ -1934,6 +1934,22 @@ func (in *JobServiceTokenSpec) DeepCopy() *JobServiceTokenSpec {\nreturn out\n}\n+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n+func (in *MinIOClientSpec) DeepCopyInto(out *MinIOClientSpec) {\n+ *out = *in\n+ in.ImageSpec.DeepCopyInto(&out.ImageSpec)\n+}\n+\n+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinIOClientSpec.\n+func (in *MinIOClientSpec) DeepCopy() *MinIOClientSpec {\n+ if in == nil {\n+ return nil\n+ }\n+ out := new(MinIOClientSpec)\n+ in.DeepCopyInto(out)\n+ return out\n+}\n+\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *MinIOSpec) DeepCopyInto(out *MinIOSpec) {\n*out = *in\n@@ -1941,6 +1957,11 @@ func (in *MinIOSpec) DeepCopyInto(out *MinIOSpec) {\nin.Redirect.DeepCopyInto(&out.Redirect)\nin.VolumeClaimTemplate.DeepCopyInto(&out.VolumeClaimTemplate)\nin.Resources.DeepCopyInto(&out.Resources)\n+ if in.MinIOClientSpec != nil {\n+ in, out := &in.MinIOClientSpec, &out.MinIOClientSpec\n+ *out = new(MinIOClientSpec)\n+ (*in).DeepCopyInto(*out)\n+ }\n}\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MinIOSpec.\n"
},
{
"change_type": "MODIFY",
"old_path": "charts/harbor-operator/templates/clusterrole.yaml",
"new_path": "charts/harbor-operator/templates/clusterrole.yaml",
"diff": "@@ -112,6 +112,18 @@ rules:\n- patch\n- update\n- watch\n+- apiGroups:\n+ - batch\n+ resources:\n+ - jobs\n+ verbs:\n+ - create\n+ - delete\n+ - get\n+ - list\n+ - patch\n+ - update\n+ - watch\n- apiGroups:\n- cert-manager.io\nresources:\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/ctrl_setup.go",
"new_path": "controllers/goharbor/harborcluster/ctrl_setup.go",
"diff": "@@ -22,6 +22,7 @@ import (\n\"github.com/pkg/errors\"\nredisOp \"github.com/spotahome/redis-operator/api/redisfailover/v1\"\npostgresv1 \"github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do/v1\"\n+ batchv1 \"k8s.io/api/batch/v1\"\n\"k8s.io/apimachinery/pkg/runtime\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/client\"\n@@ -64,6 +65,7 @@ type Reconciler struct {\n// +kubebuilder:rbac:groups=apps,resources=statefulsets;deployments,verbs=get;list;watch;create;update;patch;delete\n// +kubebuilder:rbac:groups=goharbor.io,resources=harbors,verbs=get;list;watch;create;update;patch;delete\n// +kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get;list;watch\n+// +kubebuilder:rbac:groups=batch,resources=jobs,verbs=get;list;watch;create;update;patch;delete\nfunc (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error {\nif err := r.ctrl.SetupWithManager(ctx, mgr); err != nil {\n@@ -112,6 +114,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nreturn builder.ControllerManagedBy(mgr).\nFor(&goharborv1.HarborCluster{}).\n+ Owns(&batchv1.Job{}).\nOwns(&goharborv1.Harbor{}).\nTryOwns(&minio.Tenant{}, minioCRD).\nTryOwns(&postgresv1.Postgresql{}, postgresCRD).\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -3049,6 +3049,29 @@ spec:\ntype: string\ntype: object\ntype: array\n+ mc:\n+ description: MinIOClientSpec the spec for the mc\n+ properties:\n+ image:\n+ description: Image name for the component.\n+ type: string\n+ imagePullPolicy:\n+ description: 'Image pull policy. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'\n+ enum:\n+ - Always\n+ - Never\n+ - IfNotPresent\n+ type: string\n+ imagePullSecrets:\n+ items:\n+ description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.\n+ properties:\n+ name:\n+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'\n+ type: string\n+ type: object\n+ type: array\n+ type: object\nredirect:\ndescription: Determine if the redirection of minio storage is disabled.\nproperties:\n@@ -19987,6 +20010,18 @@ rules:\n- patch\n- update\n- watch\n+- apiGroups:\n+ - batch\n+ resources:\n+ - jobs\n+ verbs:\n+ - create\n+ - delete\n+ - get\n+ - list\n+ - patch\n+ - update\n+ - watch\n- apiGroups:\n- cert-manager.io\nresources:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/patch/images.yaml",
"new_path": "manifests/cluster/patch/images.yaml",
"diff": "@@ -32,3 +32,5 @@ spec:\nvalue: ghcr.io/goharbor/redis:5.0-alpine\n- name: HARBORCLUSTER_POSTGRESQL_DOCKER_IMAGE_2_2_1\nvalue: ghcr.io/goharbor/spilo-12:1.6-p3\n+ - name: HARBORCLUSTER_MINIO_INIT_DOCKER_IMAGE_2_2_1\n+ value: ghcr.io/goharbor/mc:RELEASE.2021-03-23T05-46-11Z\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -3049,6 +3049,29 @@ spec:\ntype: string\ntype: object\ntype: array\n+ mc:\n+ description: MinIOClientSpec the spec for the mc\n+ properties:\n+ image:\n+ description: Image name for the component.\n+ type: string\n+ imagePullPolicy:\n+ description: 'Image pull policy. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images'\n+ enum:\n+ - Always\n+ - Never\n+ - IfNotPresent\n+ type: string\n+ imagePullSecrets:\n+ items:\n+ description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.\n+ properties:\n+ name:\n+ description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'\n+ type: string\n+ type: object\n+ type: array\n+ type: object\nredirect:\ndescription: Determine if the redirection of minio storage is disabled.\nproperties:\n@@ -12991,6 +13014,18 @@ rules:\n- patch\n- update\n- watch\n+- apiGroups:\n+ - batch\n+ resources:\n+ - jobs\n+ verbs:\n+ - create\n+ - delete\n+ - get\n+ - list\n+ - patch\n+ - update\n+ - watch\n- apiGroups:\n- cert-manager.io\nresources:\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/constants.go",
"new_path": "pkg/cluster/controllers/storage/constants.go",
"diff": "@@ -12,4 +12,8 @@ const (\nGetMinIOProperties = \"get MinIO Properties error\"\nUpdateIngressError = \"update minIO ingress error\"\nGetMinIOIngressError = \"get minIO ingress error\"\n+ CreateInitJobError = \"create minIO init job error\"\n+ DeleteInitJobError = \"delete minIO init job error\"\n+ GetInitJobError = \"get minIO init job error\"\n+ UpdateInitJobError = \"update minIO init job error\"\n)\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/image.go",
"new_path": "pkg/cluster/controllers/storage/image.go",
"diff": "@@ -18,16 +18,21 @@ import (\n\"context\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\n+ \"github.com/goharbor/harbor-operator/pkg/config\"\n\"github.com/goharbor/harbor-operator/pkg/image\"\n+ corev1 \"k8s.io/api/core/v1\"\n)\nconst (\nComponentName = \"cluster-minio\"\nConfigImageKey = \"minio-docker-image\"\n+\n+ MinIOClientComponentName = \"cluster-minio-init\"\n+ MinIOClientConfigImageKey = \"minio-init-docker-image\"\n)\n-// GetImage returns the configured image via configstore or default one.\n-func (m *MinIOController) GetImage(ctx context.Context, harborcluster *goharborv1.HarborCluster) (string, error) {\n+// getImage returns the configured image via configstore or default one.\n+func (m *MinIOController) getImage(ctx context.Context, harborcluster *goharborv1.HarborCluster) (string, error) {\nif harborcluster.Spec.InClusterStorage.MinIOSpec.Image != \"\" {\nreturn harborcluster.Spec.InClusterStorage.MinIOSpec.Image, nil\n}\n@@ -52,3 +57,80 @@ func (m *MinIOController) GetImage(ctx context.Context, harborcluster *goharborv\nreturn image, nil\n}\n+\n+func (m *MinIOController) getImagePullPolicy(_ context.Context, harborcluster *goharborv1.HarborCluster) corev1.PullPolicy {\n+ if harborcluster.Spec.InClusterStorage.MinIOSpec.ImagePullPolicy != nil {\n+ return *harborcluster.Spec.InClusterStorage.MinIOSpec.ImagePullPolicy\n+ }\n+\n+ if harborcluster.Spec.ImageSource != nil && harborcluster.Spec.ImageSource.ImagePullPolicy != nil {\n+ return *harborcluster.Spec.ImageSource.ImagePullPolicy\n+ }\n+\n+ return config.DefaultImagePullPolicy\n+}\n+\n+func (m *MinIOController) getImagePullSecret(_ context.Context, harborcluster *goharborv1.HarborCluster) corev1.LocalObjectReference {\n+ if len(harborcluster.Spec.InClusterStorage.MinIOSpec.ImagePullSecrets) > 0 {\n+ return harborcluster.Spec.InClusterStorage.MinIOSpec.ImagePullSecrets[0]\n+ }\n+\n+ if harborcluster.Spec.ImageSource != nil && len(harborcluster.Spec.ImageSource.ImagePullSecrets) > 0 {\n+ return harborcluster.Spec.ImageSource.ImagePullSecrets[0]\n+ }\n+\n+ return corev1.LocalObjectReference{Name: \"\"} // empty name means not using pull secret in minio\n+}\n+\n+func (m *MinIOController) getMinIOClientImage(ctx context.Context, harborcluster *goharborv1.HarborCluster) (string, error) {\n+ spec := harborcluster.Spec.InClusterStorage.MinIOSpec.MinIOClientSpec\n+ if spec != nil && spec.Image != \"\" {\n+ return spec.Image, nil\n+ }\n+\n+ options := []image.Option{image.WithHarborVersion(harborcluster.Spec.Version)}\n+ if harborcluster.Spec.ImageSource != nil && (harborcluster.Spec.ImageSource.Repository != \"\" || harborcluster.Spec.ImageSource.TagSuffix != \"\") {\n+ options = append(options,\n+ image.WithRepository(harborcluster.Spec.ImageSource.Repository),\n+ image.WithTagSuffix(harborcluster.Spec.ImageSource.TagSuffix),\n+ )\n+ } else {\n+ options = append(options,\n+ image.WithConfigstore(m.ConfigStore),\n+ image.WithConfigImageKey(MinIOClientConfigImageKey),\n+ )\n+ }\n+\n+ image, err := image.GetImage(ctx, MinIOClientComponentName, options...)\n+ if err != nil {\n+ return \"\", err\n+ }\n+\n+ return image, nil\n+}\n+\n+func (m *MinIOController) getMinIOClientImagePullPolicy(_ context.Context, harborcluster *goharborv1.HarborCluster) corev1.PullPolicy {\n+ spec := harborcluster.Spec.InClusterStorage.MinIOSpec.MinIOClientSpec\n+ if spec != nil && spec.ImagePullPolicy != nil {\n+ return *spec.ImagePullPolicy\n+ }\n+\n+ if harborcluster.Spec.ImageSource != nil && harborcluster.Spec.ImageSource.ImagePullPolicy != nil {\n+ return *harborcluster.Spec.ImageSource.ImagePullPolicy\n+ }\n+\n+ return config.DefaultImagePullPolicy\n+}\n+\n+func (m *MinIOController) getMinIOClientImagePullSecrets(_ context.Context, harborcluster *goharborv1.HarborCluster) []corev1.LocalObjectReference {\n+ spec := harborcluster.Spec.InClusterStorage.MinIOSpec.MinIOClientSpec\n+ if spec != nil && len(spec.ImagePullSecrets) > 0 {\n+ return spec.ImagePullSecrets\n+ }\n+\n+ if harborcluster.Spec.ImageSource != nil && len(harborcluster.Spec.ImageSource.ImagePullSecrets) > 0 {\n+ return harborcluster.Spec.ImageSource.ImagePullSecrets\n+ }\n+\n+ return nil\n+}\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "pkg/cluster/controllers/storage/job.go",
"diff": "+package storage\n+\n+import (\n+ \"context\"\n+ \"fmt\"\n+\n+ goharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\n+ \"github.com/goharbor/harbor-operator/pkg/cluster/controllers/common\"\n+ \"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n+ \"github.com/goharbor/harbor-operator/pkg/resources/checksum\"\n+ batchv1 \"k8s.io/api/batch/v1\"\n+ corev1 \"k8s.io/api/core/v1\"\n+ \"k8s.io/apimachinery/pkg/api/errors\"\n+ metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n+)\n+\n+const initBucketScript = `\n+for i in {1..10}; do\n+ if [[ $(mc alias set minio $MINIO_ENDPOINT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY 2>&1 1>/dev/null) ]]; then\n+ if [ $i -eq 10 ]; then\n+ echo \"Initialize bucket $MINIO_BUCKET failed for set alias failed with many retries\"\n+ exit 1\n+ fi\n+ echo \"Set minio alias for $MINIO_ENDPOINT failed, try again after $(($i+$i)) seconds\"\n+ sleep $(($i+$i))\n+ else\n+ echo \"Set minio alias for $MINIO_ENDPOINT success\"\n+ break\n+ fi\n+done\n+\n+for i in {1..10}; do\n+ if [[ $(mc ls minio/$MINIO_BUCKET 2>&1 1>/dev/null) ]]; then\n+ mc mb minio/$MINIO_BUCKET >/dev/null 2>&1\n+ if [ $? -eq 0 ]; then\n+ echo \"Initialize bucket $MINIO_BUCKET success\"\n+ exit 0\n+ else\n+ echo \"Create bucket $MINIO_BUCKET failed, try again after $(($i+$i)) seconds\"\n+ sleep $(($i+$i))\n+ fi\n+ else\n+ echo \"Bucket $MINIO_BUCKET found\"\n+ exit 0\n+ fi\n+done\n+\n+echo \"Initialize bucket $MINIO_BUCKET failed\"\n+exit 1\n+`\n+\n+func (m *MinIOController) generateMinIOInitJob(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*batchv1.Job, error) { // nolint:funlen\n+ image, err := m.getMinIOClientImage(ctx, harborcluster)\n+ if err != nil {\n+ return nil, err\n+ }\n+\n+ minioEndpoint := fmt.Sprintf(\"http://%s.%s.svc:%d\", m.getTenantsServiceName(harborcluster), harborcluster.Namespace, m.getServicePort())\n+\n+ job := &batchv1.Job{\n+ ObjectMeta: metav1.ObjectMeta{\n+ Name: m.getMinIONamespacedName(harborcluster).Name,\n+ Namespace: m.getMinIONamespacedName(harborcluster).Namespace,\n+ Labels: map[string]string{\n+ \"job-type\": \"minio-init\",\n+ },\n+ OwnerReferences: []metav1.OwnerReference{\n+ *metav1.NewControllerRef(harborcluster, goharborv1.HarborClusterGVK),\n+ },\n+ },\n+ Spec: batchv1.JobSpec{\n+ Template: corev1.PodTemplateSpec{\n+ ObjectMeta: metav1.ObjectMeta{\n+ Labels: map[string]string{\n+ \"job-type\": \"minio-init\",\n+ },\n+ },\n+ Spec: corev1.PodSpec{\n+ ImagePullSecrets: m.getMinIOClientImagePullSecrets(ctx, harborcluster),\n+ RestartPolicy: corev1.RestartPolicyOnFailure,\n+ Containers: []corev1.Container{{\n+ Name: \"init-minio\",\n+ Image: image,\n+ ImagePullPolicy: m.getMinIOClientImagePullPolicy(ctx, harborcluster),\n+ Command: []string{\"bash\", \"-c\", initBucketScript},\n+ Env: []corev1.EnvVar{{\n+ Name: \"MINIO_BUCKET\",\n+ Value: DefaultBucket,\n+ }, {\n+ Name: \"MINIO_ENDPOINT\",\n+ Value: minioEndpoint,\n+ }, {\n+ Name: \"MINIO_ACCESS_KEY\",\n+ ValueFrom: &corev1.EnvVarSource{\n+ SecretKeyRef: &corev1.SecretKeySelector{\n+ LocalObjectReference: corev1.LocalObjectReference{\n+ Name: m.getMinIOSecretNamespacedName(harborcluster).Name,\n+ },\n+ Key: \"accesskey\",\n+ },\n+ },\n+ }, {\n+ Name: \"MINIO_SECRET_KEY\",\n+ ValueFrom: &corev1.EnvVarSource{\n+ SecretKeyRef: &corev1.SecretKeySelector{\n+ LocalObjectReference: corev1.LocalObjectReference{\n+ Name: m.getMinIOSecretNamespacedName(harborcluster).Name,\n+ },\n+ Key: \"secretkey\",\n+ },\n+ },\n+ }},\n+ }},\n+ },\n+ },\n+ },\n+ }\n+\n+ dependencies := checksum.New(m.Scheme)\n+ dependencies.Add(ctx, harborcluster, true)\n+ dependencies.AddAnnotations(job)\n+\n+ return job, nil\n+}\n+\n+func (m *MinIOController) createMinIOInitJob(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*lcm.CRStatus, error) {\n+ job, err := m.generateMinIOInitJob(ctx, harborcluster)\n+ if err != nil {\n+ return minioNotReadyStatus(CreateDefaultBucketError, err.Error()), err\n+ }\n+\n+ if err := m.KubeClient.Create(ctx, job); err != nil {\n+ return minioNotReadyStatus(CreateInitJobError, err.Error()), err\n+ }\n+\n+ m.Log.Info(\"MinIO init job is created\")\n+\n+ return minioUnknownStatus(), nil\n+}\n+\n+func (m *MinIOController) applyMinIOInitJob(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*lcm.CRStatus, error) {\n+ initJob := &batchv1.Job{}\n+\n+ err := m.KubeClient.Get(ctx, m.getMinIONamespacedName(harborcluster), initJob)\n+ if err != nil {\n+ if errors.IsNotFound(err) {\n+ m.Log.Info(\"Start creating minio init job.\")\n+\n+ return m.createMinIOInitJob(ctx, harborcluster)\n+ }\n+\n+ return minioNotReadyStatus(GetInitJobError, err.Error()), err\n+ }\n+\n+ // Recreate if necessary\n+ if !common.Equals(ctx, m.Scheme, harborcluster, initJob) {\n+ // can't change the template after the job has been created, so delete it first and the recreate it\n+ // https://github.com/kubernetes/kubernetes/issues/89657\n+ if err := m.KubeClient.Delete(ctx, initJob); err != nil {\n+ return minioNotReadyStatus(DeleteInitJobError, err.Error()), err\n+ }\n+\n+ return m.createMinIOInitJob(ctx, harborcluster)\n+ }\n+\n+ return minioUnknownStatus(), nil\n+}\n+\n+func (m *MinIOController) checkMinIOInitJobReady(ctx context.Context, harborcluster *goharborv1.HarborCluster) (bool, error) {\n+ job := &batchv1.Job{}\n+ if err := m.KubeClient.Get(ctx, m.getMinIONamespacedName(harborcluster), job); err != nil {\n+ return false, err\n+ }\n+\n+ for _, condition := range job.Status.Conditions {\n+ if condition.Type == batchv1.JobComplete {\n+ return condition.Status == corev1.ConditionTrue, nil\n+ }\n+ }\n+\n+ return false, nil\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/minio.go",
"new_path": "pkg/cluster/controllers/storage/minio.go",
"diff": "@@ -2,6 +2,7 @@ package storage\nimport (\n\"context\"\n+ \"fmt\"\n\"github.com/go-logr/logr\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\n@@ -70,12 +71,12 @@ func (m *MinIOController) Apply(ctx context.Context, harborcluster *goharborv1.H\n}\n// Check readiness\n- mt, ready, err := m.checkMinIOReady(ctx, harborcluster)\n+ mt, tenantReady, err := m.checkMinIOReady(ctx, harborcluster)\nif err != nil {\nreturn minioNotReadyStatus(GetMinIOError, err.Error()), err\n}\n- if !ready {\n+ if !tenantReady {\nm.Log.Info(\"MinIO is not ready yet\")\nreturn minioUnknownStatus(), nil\n@@ -86,10 +87,20 @@ func (m *MinIOController) Apply(ctx context.Context, harborcluster *goharborv1.H\nreturn crs, err\n}\n- // Init minio\n- // TODO: init bucket in the minCR pods as creation by client may meet network connection issue.\n- if err := m.minioInit(ctx, harborcluster); err != nil {\n- return minioNotReadyStatus(CreateDefaultBucketError, err.Error()), err\n+ // Apply minio init job\n+ if crs, err := m.applyMinIOInitJob(ctx, harborcluster); err != nil {\n+ return crs, err\n+ }\n+\n+ initJobReady, err := m.checkMinIOInitJobReady(ctx, harborcluster)\n+ if err != nil {\n+ return minioNotReadyStatus(GetInitJobError, err.Error()), err\n+ }\n+\n+ if !initJobReady {\n+ m.Log.Info(\"MinIO init job is not ready yet\")\n+\n+ return minioUnknownStatus(), nil\n}\ncrs, err := m.ProvisionMinIOProperties(ctx, harborcluster, mt)\n@@ -119,34 +130,6 @@ func (m *MinIOController) Upgrade(_ context.Context, _ *goharborv1.HarborCluster\npanic(\"implement me\")\n}\n-func (m *MinIOController) minioInit(ctx context.Context, harborcluster *goharborv1.HarborCluster) error {\n- accessKey, secretKey, err := m.getCredsFromSecret(ctx, harborcluster)\n- if err != nil {\n- return err\n- }\n-\n- endpoint := m.getTenantsServiceName(harborcluster) + \".\" + harborcluster.Namespace\n-\n- edp := &MinioEndpoint{\n- Endpoint: endpoint,\n- AccessKeyID: string(accessKey),\n- SecretAccessKey: string(secretKey),\n- Location: DefaultRegion,\n- }\n-\n- m.MinioClient, err = NewMinioClient(edp)\n- if err != nil {\n- return err\n- }\n-\n- exists, err := m.MinioClient.IsBucketExists(ctx, DefaultBucket)\n- if err != nil || exists {\n- return err\n- }\n-\n- return m.MinioClient.CreateBucket(ctx, DefaultBucket)\n-}\n-\nfunc (m *MinIOController) checkMinIOReady(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*miniov2.Tenant, bool, error) {\nminioCR := &miniov2.Tenant{}\nif err := m.KubeClient.Get(ctx, m.getMinIONamespacedName(harborcluster), minioCR); err != nil {\n@@ -159,9 +142,15 @@ func (m *MinIOController) checkMinIOReady(ctx context.Context, harborcluster *go\n// For different version of minIO have different Status.\n// Ref https://github.com/minio/operator/commit/d387108ea494cf5cec57628c40d40604ac8d57ec#diff-48972613166d50a2acb9d562e33c5247\n- if minioCR.Status.CurrentState == miniov2.StatusInitialized {\n+ if minioCR.Status.CurrentState == miniov2.StatusInitialized && minioCR.Status.AvailableReplicas == harborcluster.Spec.InClusterStorage.MinIOSpec.Replicas {\n+ ssName := fmt.Sprintf(\"%s-%s\", m.getServiceName(harborcluster), DefaultZone)\n+\n+ for _, pool := range minioCR.Status.Pools {\n+ if pool.SSName == ssName && pool.State == miniov2.PoolInitialized {\nreturn minioCR, true, nil\n}\n+ }\n+ }\n// Not ready\nreturn minioCR, false, nil\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/tenant.go",
"new_path": "pkg/cluster/controllers/storage/tenant.go",
"diff": "@@ -11,7 +11,6 @@ import (\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/common\"\nminiov2 \"github.com/goharbor/harbor-operator/pkg/cluster/controllers/storage/minio/apis/minio.min.io/v2\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n- \"github.com/goharbor/harbor-operator/pkg/config\"\n\"github.com/goharbor/harbor-operator/pkg/resources/checksum\"\ncorev1 \"k8s.io/api/core/v1\"\nk8serror \"k8s.io/apimachinery/pkg/api/errors\"\n@@ -185,7 +184,7 @@ func (m *MinIOController) createTenant(ctx context.Context, harborcluster *gohar\n}\nfunc (m *MinIOController) generateMinIOCR(ctx context.Context, harborcluster *goharborv1.HarborCluster) (*miniov2.Tenant, error) { // nolint:funlen\n- image, err := m.GetImage(ctx, harborcluster)\n+ image, err := m.getImage(ctx, harborcluster)\nif err != nil {\nreturn nil, err\n}\n@@ -311,27 +310,3 @@ func (m *MinIOController) getCredsFromSecret(ctx context.Context, harborcluster\nreturn minIOSecret.Data[\"accesskey\"], minIOSecret.Data[\"secretkey\"], err\n}\n-\n-func (m *MinIOController) getImagePullPolicy(_ context.Context, harborcluster *goharborv1.HarborCluster) corev1.PullPolicy {\n- if harborcluster.Spec.InClusterStorage.MinIOSpec.ImagePullPolicy != nil {\n- return *harborcluster.Spec.InClusterStorage.MinIOSpec.ImagePullPolicy\n- }\n-\n- if harborcluster.Spec.ImageSource != nil && harborcluster.Spec.ImageSource.ImagePullPolicy != nil {\n- return *harborcluster.Spec.ImageSource.ImagePullPolicy\n- }\n-\n- return config.DefaultImagePullPolicy\n-}\n-\n-func (m *MinIOController) getImagePullSecret(_ context.Context, harborcluster *goharborv1.HarborCluster) corev1.LocalObjectReference {\n- if len(harborcluster.Spec.InClusterStorage.MinIOSpec.ImagePullSecrets) > 0 {\n- return harborcluster.Spec.InClusterStorage.MinIOSpec.ImagePullSecrets[0]\n- }\n-\n- if harborcluster.Spec.ImageSource != nil && len(harborcluster.Spec.ImageSource.ImagePullSecrets) > 0 {\n- return harborcluster.Spec.ImageSource.ImagePullSecrets[0]\n- }\n-\n- return corev1.LocalObjectReference{Name: \"\"} // empty name means not using pull secret in minio\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/image/image.go",
"new_path": "pkg/image/image.go",
"diff": "@@ -134,7 +134,7 @@ func RegisterImageName(component, imageName string, harborVersions ...string) {\nknowCompoents.RegisterImageName(component, imageName, harborVersions...)\n}\n-func RegisterRepsitory(component, repository string, harborVersions ...string) {\n+func RegisterRepository(component, repository string, harborVersions ...string) {\nknowCompoents.RegisterRepository(component, repository, harborVersions...)\n}\n@@ -157,22 +157,26 @@ func init() { // nolint:gochecknoinits\n\"trivy\": \"trivy-adapter-photon\",\n}\nfor component, imageName := range harborComponentImageNames {\n- RegisterRepsitory(component, \"goharbor\", \"*\") // the goharbor repository of dockerhub\n+ RegisterRepository(component, \"goharbor\", \"*\") // the goharbor repository of dockerhub\nRegisterImageName(component, imageName, \"*\")\n}\n// Register the cluster service components\n- RegisterRepsitory(\"cluster-redis\", \"\", \"*\") // the - repository of dockerhub\n+ RegisterRepository(\"cluster-redis\", \"\", \"*\") // the - repository of dockerhub\nRegisterImageName(\"cluster-redis\", \"redis\", \"*\")\nRegisterTag(\"cluster-redis\", \"5.0-alpine\", \"2.2.1\")\n- RegisterRepsitory(\"cluster-postgresql\", \"registry.opensource.zalan.do/acid\", \"*\")\n+ RegisterRepository(\"cluster-postgresql\", \"registry.opensource.zalan.do/acid\", \"*\")\nRegisterImageName(\"cluster-postgresql\", \"spilo-12\", \"*\")\nRegisterTag(\"cluster-postgresql\", \"1.6-p3\", \"2.2.1\")\n- RegisterRepsitory(\"cluster-minio\", \"minio\", \"*\") // the minio repository of dockerhub\n+ RegisterRepository(\"cluster-minio\", \"minio\", \"*\") // the minio repository of dockerhub\nRegisterImageName(\"cluster-minio\", \"minio\", \"*\")\nRegisterTag(\"cluster-minio\", \"RELEASE.2021-04-06T23-11-00Z\", \"2.2.1\")\n+\n+ RegisterRepository(\"cluster-minio-init\", \"minio\", \"*\") // the minio repository of dockerhub\n+ RegisterImageName(\"cluster-minio-init\", \"mc\", \"*\")\n+ RegisterTag(\"cluster-minio-init\", \"RELEASE.2021-03-23T05-46-11Z\", \"2.2.1\")\n}\ntype Options struct {\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
refactor: create the minio bucket by the job (#620)
Create the minio bucket by the job in the target namespace of the harbor
to avoid problem when network is not accessable between operator and
harbor namespaces.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,890
|
29.04.2021 08:29:42
| -28,800
|
2b24d02c86a66a943c8ee79aa129ac969a775f9f
|
docs: add doc about upgrade harbor cluster
|
[
{
"change_type": "MODIFY",
"old_path": "docs/LCM/upgrade-cluster.md",
"new_path": "docs/LCM/upgrade-cluster.md",
"diff": "# How to upgrade your Harbor cluster\n-TBD\n+The harbor operator only serves a specific version of the harbor and allows to upgrade the harbor cluster instances from the old version to the latest version the operator served.\n+\n+Assume that the harbor operator v1.0.0 which serves harbor v2.2.1 is installed in the Kubernetes cluster, and there is harbor clusters deployed in the Kubernetes cluster. Now the harbor operator v1.0.1 which serves harbor v2.2.2 is released, and the users want to upgrade the three harbor clusters to v2.2.2. Here are the steps to upgrade the harbor cluster managed by the harbor operator to the new version.\n+\n+1. Upgrade the harbor operator to v1.0.1 by helm or kustomize, the method depends on the original way to install the harbor operator. [Installation](../installation/installation.md) is a reference resources to upgrade the harbor operator to new release.\n+\n+2. Edit the manifest of the harbor cluster by `kubectl` and set the `version` field to `2.2.2` in the spec.\n+\n+ ```bash\n+ kubectl -n harbor-cluster-ns edit harborclusters cluster-name\n+ ```\n+\n+3. The harbor operator will get an update event of the harbor cluster resource and reconcile to upgrade the harbor cluster to v2.2.2.\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
docs: add doc about upgrade harbor cluster (#621)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,893
|
29.04.2021 15:12:53
| -28,800
|
9b2fa07e025a4ceed1d0c30e29c097f03e418924
|
doc(installation):add doc for custimizing storage,db and cache
add storage, db and cache customization doc in the README
also fix
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -105,6 +105,7 @@ NOTES:\n* [Installation](./docs/installation/installation.md)\n* [CRD references](./docs/CRD/custom-resource-definition.md)\n* [Manifests references](./docs/manifests-reference.md)\n+* [Customize storage, database and cache services](./docs/installation/customize-storage-db-redis.md)\n* [Customize images](./docs/customize-images.md)\n* [Day2 configurations](./docs/configurations/day2-config.md)\n* [Upgrade Harbor cluster](./docs/LCM/upgrade-cluster.md)\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/customize-storage-db-redis.md",
"new_path": "docs/installation/customize-storage-db-redis.md",
"diff": "# Customize the existing storage, database and cache services\n-tbd\n+Harbor depends on the storage, database and cache services to support its related functionalities. If you have pre-installed dependent services or subscribed cloud services in hand, you can customize the related specs of the deploying Harbor cluster to use those services. The guide documented here shows you how to do the customization of the storage, database and cache services.\n+\n+## Customize storage\n+\n+Harbor operator supports configuring `filesystem`(PV), `s3`(as well as `s3` compatible object storage service such as `Minio`) and `swift` as the backend storage of the deploying Harbor cluster.\n+\n+For customizing the storage spec, you can directly follow the [CRD spec](../CRD/custom-resource-definition.md#storage-related-fields) guideline that has very detailed description.\n+\n+## Customize database\n+\n+Harbor uses PostgreSQL as its database to store the related metadata. You can create a database instance from your cloud provider or pre-install a PostgreSQL on your resources. e.g.:\n+\n+```shell\n+helm upgrade --install harbor-database bitnami/postgresql --version 10.3.17 --set-string initdbScriptsConfigMap=harbor-init-db --set-string postgresqlPassword=the-psql-password --set-string image.registry=ghcr.io --set-string image.repository=goharbor/postgresql\n+```\n+\n+Here the `initdbScriptsConfigMap` is pointing to a `configMap` used to initialize the databases. e.g.:\n+\n+```yaml\n+apiVersion: v1\n+kind: ConfigMap\n+metadata:\n+ labels:\n+ sample: \"true\"\n+ name: harbor-init-db\n+data:\n+ init-db.sql: |\n+ CREATE DATABASE core WITH OWNER postgres;\n+ CREATE DATABASE notaryserver WITH OWNER postgres;\n+ CREATE DATABASE notarysigner WITH OWNER postgres;\n+```\n+\n+>NOTES: `make postgresql` can also help install a PostgreSQL instance quickly.\n+\n+Get the password of your PostgreSQL instance and wrap it into a Kubernetes secret.\n+\n+```yaml\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ labels:\n+ sample: \"true\"\n+ name: harbor-database-password\n+data:\n+ postgresql-password: dGhlLXBzcWwtcGFzc3dvcmQK\n+type: goharbor.io/postgresql\n+```\n+\n+Then put the related PostgreSQL info into the `database` spec. e.g.:\n+\n+```yaml\n+spec:\n+# Configure existing pre-deployed or cloud database service.\n+ database: # Optional\n+ # PostgreSQL user name to connect as.\n+ # Defaults to be the same as the operating system name of the user running the application.\n+ username: postgres # Required\n+ # Secret containing the password to be used if the server demands password authentication.\n+ passwordRef: harbor-database-password # Optional\n+ # PostgreSQL hosts.\n+ # At least 1.\n+ hosts:\n+ # Name of host to connect to.\n+ # If a host name begins with a slash, it specifies Unix-domain communication rather than\n+ # TCP/IP communication; the value is the name of the directory in which the socket file is stored.\n+ - host: my.psql.com # Required\n+ # Port number to connect to at the server host,\n+ # or socket file name extension for Unix-domain connections.\n+ # Zero, specifies the default port number established when PostgreSQL was built.\n+ port: 5432 # Optional\n+ # PostgreSQL has native support for using SSL connections to encrypt client/server communications for increased security.\n+ # Supports values [\"disable\",\"allow\",\"prefer\",\"require\",\"verify-ca\",\"verify-full\"].\n+ sslMode: prefer # Optional, default=prefer\n+ prefix: prefix # Optional\n+```\n+\n+The thing to note here is the names of the databases `core`, `notaryserver` (only needed when enabling notary) and `notarysigner` (only needed when enabling notary) are relatively unchangeable. You can only append some prefixes to the database names by setting the optional field `prefix` in the `database` spec. For example, if the `spec.database.prefix` is \"prefix\", the database names will be \"prefix-core\", \"prefix-notaryserver\" and \"prefix-notarysigner\".\n+\n+>NOTES: You need to make sure the related databases have been created before configuring them to the deploying Harbor cluster.\n+\n+## Customize cache\n+\n+Harbor uses Redis as its cache service to cache data. You can create a cache instance from your cloud provider or pre-install a Redis on your resources. e.g.:\n+\n+```shell\n+helm upgrade --install harbor-redis bitnami/redis --version 12.10.0 --set-string password=the-redis-password --set usePassword=true --set-string image.registry=ghcr.io --set-string image.repository=goharbor/redis\n+```\n+\n+>NOTES: `make redis` can also help install a Redis instance quickly.\n+\n+Get the Redis password and wrap it into a Kubernetes secret. If your Redis instance does not require a password to access, you can skip this creation.\n+\n+```yaml\n+apiVersion: v1\n+data:\n+ redis-password: dGhlLXJlZGlzLXBhc3N3b3JkCg==\n+kind: Secret\n+metadata:\n+ name: harbor-redis\n+ labels:\n+ sample: \"true\"\n+type: goharbor.io/redis\n+```\n+\n+Then put the related Redis info into the `redis` spec. e.g.:\n+\n+```yaml\n+spec:\n+ # Redis configuration.\n+ redis: # Optional\n+ # Server host.\n+ host: myredis.com # Required\n+ # Server port.\n+ port: 6347 # Required\n+ # For setting sentinel masterSet.\n+ sentinelMasterSet: sentinel # Optional\n+ # Secret containing the password to use when connecting to the server.\n+ passwordRef: harbor-redis # Optional\n+ # Secret containing the client certificate to authenticate with.\n+ certificateRef: cert # Optional\n+```\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/tutorial.md",
"new_path": "docs/tutorial.md",
"diff": "@@ -205,6 +205,8 @@ spec:\n```\n+>Notes: for using the `inClusterStorage` with `redirect` is `enable(=true)`, make sure the ingress route set in the `redirect.expose.ingress.host` field can be accessed from both inside and outside the cluster.\n+\nApply the above modified deployment manifest to your cluster.\n```shell\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(installation):add doc for custimizing storage,db and cache (#623)
- add storage, db and cache customization doc in the README
also fix #615
Signed-off-by: Steven Zou <szou@vmware.com>
|
254,893
|
29.04.2021 16:06:36
| -28,800
|
8481e684371f413894aef9d819e4f5ad9fe86495
|
fix(samples):revise errors in sample manifest
|
[
{
"change_type": "MODIFY",
"old_path": "manifests/samples/standard_stack.yaml",
"new_path": "manifests/samples/standard_stack.yaml",
"diff": "@@ -170,7 +170,7 @@ spec:\nselfSigned: {}\n---\napiVersion: goharbor.io/v1alpha3\n-kind: Harbor\n+kind: HarborCluster\nmetadata:\nlabels:\nsample: \"true\"\n@@ -218,7 +218,6 @@ spec:\nport: 6379\nregistry: {}\ntrivy:\n- githubTokenRef: github-credentials\nskipUpdate: false\nstorage:\ncachePersistentVolume:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(samples):revise errors in sample manifest (#624)
Signed-off-by: Steven Zou <szou@vmware.com>
|
254,893
|
29.04.2021 18:52:24
| -28,800
|
0592321d8cc5eea779d0e8a6b42e911b5c2ec869
|
fix(config):handle empty redis password
handle empty redis password for js
handle empty redis password for registry
handle empty redis password for chartmuseum
also fix
|
[
{
"change_type": "MODIFY",
"old_path": "config/config/assets/jobservice-config.yaml.tmpl",
"new_path": "config/config/assets/jobservice-config.yaml.tmpl",
"diff": "@@ -18,7 +18,11 @@ worker_pool:\nbackend: \"redis\"\nredis_pool:\n+{{- if .Spec.WorkerPool.Redis.PasswordRef }}\nredis_url: {{ \"redis-password\" | secretData .Spec.WorkerPool.Redis.PasswordRef | .Spec.WorkerPool.Redis.GetDSN }}\n+{{- else }}\n+ redis_url: {{ \"\" | .Spec.WorkerPool.Redis.GetDSN }}\n+{{- end }}\nnamespace: {{ default ( printf \"jobservice::%s::%s\" .ObjectMeta.Namespace .ObjectMeta.Name ) .Spec.WorkerPool.Redis.Namespace }}\nidle_timeout_second: {{ .Spec.WorkerPool.Redis.IdleTimeout.Duration.Seconds | int64 }}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/chartmuseum/deployments.go",
"new_path": "controllers/goharbor/chartmuseum/deployments.go",
"diff": "@@ -235,7 +235,7 @@ func (r *Reconciler) GetDeployment(ctx context.Context, chartMuseum *goharborv1.\n})\n}\n- if chartMuseum.Spec.Cache.Redis != nil {\n+ if chartMuseum.Spec.Cache.Redis != nil && len(chartMuseum.Spec.Cache.Redis.PasswordRef) > 0 {\nenvs = append(envs, corev1.EnvVar{\nName: \"CACHE_REDIS_PASSWORD\",\nValueFrom: &corev1.EnvVarSource{\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/registry/deployments.go",
"new_path": "controllers/goharbor/registry/deployments.go",
"diff": "@@ -98,7 +98,7 @@ func (r *Reconciler) GetDeployment(ctx context.Context, registry *goharborv1.Reg\n})\n}\n- if registry.Spec.Redis != nil {\n+ if registry.Spec.Redis != nil && len(registry.Spec.Redis.PasswordRef) > 0 {\nenvs = append(envs, corev1.EnvVar{\nName: \"REGISTRY_REDIS_PASSWORD\",\nValueFrom: &corev1.EnvVarSource{\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -20983,7 +20983,11 @@ data:\nbackend: \"redis\"\nredis_pool:\n+ {{- if .Spec.WorkerPool.Redis.PasswordRef }}\nredis_url: {{ \"redis-password\" | secretData .Spec.WorkerPool.Redis.PasswordRef | .Spec.WorkerPool.Redis.GetDSN }}\n+ {{- else }}\n+ redis_url: {{ \"\" | .Spec.WorkerPool.Redis.GetDSN }}\n+ {{- end }}\nnamespace: {{ default ( printf \"jobservice::%s::%s\" .ObjectMeta.Namespace .ObjectMeta.Name ) .Spec.WorkerPool.Redis.Namespace }}\nidle_timeout_second: {{ .Spec.WorkerPool.Redis.IdleTimeout.Duration.Seconds | int64 }}\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -13527,7 +13527,11 @@ data:\nbackend: \"redis\"\nredis_pool:\n+ {{- if .Spec.WorkerPool.Redis.PasswordRef }}\nredis_url: {{ \"redis-password\" | secretData .Spec.WorkerPool.Redis.PasswordRef | .Spec.WorkerPool.Redis.GetDSN }}\n+ {{- else }}\n+ redis_url: {{ \"\" | .Spec.WorkerPool.Redis.GetDSN }}\n+ {{- end }}\nnamespace: {{ default ( printf \"jobservice::%s::%s\" .ObjectMeta.Namespace .ObjectMeta.Name ) .Spec.WorkerPool.Redis.Namespace }}\nidle_timeout_second: {{ .Spec.WorkerPool.Redis.IdleTimeout.Duration.Seconds | int64 }}\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(config):handle empty redis password (#625)
- handle empty redis password for js
- handle empty redis password for registry
- handle empty redis password for chartmuseum
Signed-off-by: Steven Zou <szou@vmware.com>
also fix #608
|
254,890
|
30.04.2021 21:34:43
| -28,800
|
daeb48b754469a0a4a4c52da48f6b7306397d590
|
fix: remove the scale subresource for registry resource
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/registry_types.go",
"new_path": "apis/goharbor.io/v1alpha3/registry_types.go",
"diff": "@@ -15,7 +15,6 @@ import (\n// +k8s:openapi-gen=true\n// +resource:path=registry\n// +kubebuilder:subresource:status\n-// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas\n// +kubebuilder:resource:categories=\"goharbor\"\n// +kubebuilder:printcolumn:name=\"Age\",type=date,JSONPath=`.metadata.creationTimestamp`,description=\"Timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\",priority=1\n// +kubebuilder:printcolumn:name=\"Failure\",type=string,JSONPath=`.status.conditions[?(@.type==\"Failed\")].message`,description=\"Human readable message describing the failure\",priority=5\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -10397,9 +10397,6 @@ spec:\nserved: true\nstorage: true\nsubresources:\n- scale:\n- specReplicasPath: .spec.replicas\n- statusReplicasPath: .status.replicas\nstatus: {}\nstatus:\nacceptedNames:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -10397,9 +10397,6 @@ spec:\nserved: true\nstorage: true\nsubresources:\n- scale:\n- specReplicasPath: .spec.replicas\n- statusReplicasPath: .status.replicas\nstatus: {}\nstatus:\nacceptedNames:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: remove the scale subresource for registry resource (#628)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,890
|
30.04.2021 22:02:44
| -28,800
|
cae4dc97047ae699120268dee7d5717102a7b2af
|
docs: add doc of perf
|
[
{
"change_type": "MODIFY",
"old_path": "docs/perf/simple-perf-comprasion.md",
"new_path": "docs/perf/simple-perf-comprasion.md",
"diff": "# Performance\n-TBD\n+This document includes the performance of the pull/push for the Harbor deployed by the Harbor operator.\n+\n+## Environment\n+\n+The Harbor and Harbor operator are deployed in a Kubernetes cluster which has 3 control nodes and 3 worker nodes. Each node has 8 CPU which mode name is `Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz` and 16GiB memory.\n+\n+Here are the network benchmark for CNI using [knb](https://github.com/InfraBuilder/k8s-bench-suite) and disk benchmark for PV using [dbench](https://github.com/leeliu/dbench).\n+\n+### Benchmark of network\n+\n+```bash\n+=========================================================\n+ Benchmark Results\n+=========================================================\n+ Name : knb-1763415\n+ Date : 2021-04-29 01:59:31 UTC\n+ Generator : knb\n+ Version : 1.5.0\n+ Server : harbor-wl-1-md-0-977fbcc-hlmm8\n+ Client : harbor-wl-1-md-0-977fbcc-f9jhn\n+ UDP Socket size : auto\n+=========================================================\n+ Discovered CPU : Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz\n+ Discovered Kernel : 5.4.0-66-generic\n+ Discovered k8s version : v1.18.16+vmware.1\n+ Discovered MTU : 1450\n+ Idle :\n+ bandwidth = 0 Mbit/s\n+ client cpu =\n+ server cpu =\n+ client ram = MB\n+ server ram = MB\n+ Pod to pod :\n+ TCP :\n+ bandwidth = 7085 Mbit/s\n+ client cpu =\n+ server cpu =\n+ client ram = MB\n+ server ram = MB\n+ UDP :\n+ bandwidth = 1388 Mbit/s\n+ client cpu =\n+ server cpu =\n+ client ram = MB\n+ server ram = MB\n+ Pod to Service :\n+ TCP :\n+ bandwidth = 6909 Mbit/s\n+ client cpu =\n+ server cpu =\n+ client ram = MB\n+ server ram = MB\n+ UDP :\n+ bandwidth = 1467 Mbit/s\n+ client cpu =\n+ server cpu =\n+ client ram = MB\n+ server ram = MB\n+=========================================================\n+2021-04-29 02:01:13 [INFO] Cleaning kubernetes resources ...\n+```\n+\n+### Benchmark of disk\n+\n+```bash\n+==================\n+= Dbench Summary =\n+==================\n+Random Read/Write IOPS: 51.9k/10.1k. BW: 310MiB/s / 347MiB/s\n+Average Latency (usec) Read/Write: 355.22/1057.06\n+Sequential Read/Write: 403MiB/s / 369MiB/s\n+Mixed Random Read/Write IOPS: 20.0k/6950\n+```\n+\n+## Tests\n+\n+[k6](https://github.com/heww/xk6-harbor) is the testing tool to test the performance of the pull/push. Here is the scripts for the pull/push tests.\n+\n+### Script for the pull test\n+\n+```js\n+// Pull artifact which size is 10 MiB\n+\n+import harbor from 'k6/x/harbor'\n+import { ContentStore } from 'k6/x/harbor'\n+import { Rate } from 'k6/metrics'\n+\n+const missing = Object()\n+\n+function getEnv(env, def = missing) {\n+ const value = __ENV[env] ? __ENV[env] : def\n+ if (value === missing) {\n+ throw (`${env} envirument is required`)\n+ }\n+\n+ return value\n+}\n+\n+const teardownResources = getEnv('TEARDOWN_RESOURCES', 'true') === 'true'\n+\n+const artifactSize = getEnv('ARTIFACT_SIZE', '10 MiB')\n+\n+const store = new ContentStore('artifact-pull')\n+\n+export let successRate = new Rate('success')\n+\n+export let options = {\n+ noUsageReport: true,\n+ vus: 500,\n+ iterations: 1000,\n+ thresholds: {\n+ 'iteration_duration{scenario:default}': [\n+ `max>=0`,\n+ ],\n+ 'iteration_duration{group:::setup}': [`max>=0`],\n+ 'iteration_duration{group:::teardown}': [`max>=0`]\n+ }\n+};\n+\n+export function setup() {\n+ harbor.initialize({\n+ scheme: getEnv('HARBOR_SCHEME', 'https'),\n+ host: getEnv('HARBOR_HOST'),\n+ username: getEnv('HARBOR_USERNAME', 'admin'),\n+ password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),\n+ insecure: true,\n+ })\n+\n+ const projectName = `project-${Date.now()}`\n+ try {\n+ harbor.createProject({ projectName })\n+ } catch (e) {\n+ console.log(e)\n+ errorRate.add(true)\n+ }\n+\n+ harbor.push({\n+ ref: `${projectName}/benchmark:latest`,\n+ store,\n+ blobs: [store.generate(artifactSize)],\n+ })\n+\n+ return {\n+ projectName,\n+ }\n+}\n+\n+export default function ({ projectName }) {\n+ try {\n+ harbor.pull(`${projectName}/benchmark:latest`)\n+ successRate.add(true)\n+ } catch (e) {\n+ successRate.add(false)\n+ console.log(e)\n+ }\n+}\n+\n+export function teardown({ projectName }) {\n+ store.free()\n+\n+ if (teardownResources) {\n+ try {\n+ harbor.deleteProject(projectName, true)\n+ } catch (e) {\n+ console.log(e)\n+ }\n+ }\n+}\n+```\n+\n+### Script for push test\n+\n+```js\n+// Push artifact which size is 10 MiB\n+\n+import counter from \"k6/x/counter\"\n+import harbor from 'k6/x/harbor'\n+import { ContentStore } from 'k6/x/harbor'\n+import { Rate } from 'k6/metrics'\n+\n+const missing = Object()\n+\n+function getEnv(env, def = missing) {\n+ const value = __ENV[env] ? __ENV[env] : def\n+ if (value === missing) {\n+ throw (`${env} envirument is required`)\n+ }\n+\n+ return value\n+}\n+\n+function getEnvInt(env, def = missing) {\n+ return parseInt(getEnv(env, def), 10)\n+}\n+\n+const teardownResources = getEnv('TEARDOWN_RESOURCES', 'true') === 'true'\n+\n+const artifactSize = getEnv('ARTIFACT_SIZE', '10 MiB')\n+\n+const store = new ContentStore('artifact-push')\n+\n+export let successRate = new Rate('success')\n+\n+export let options = {\n+ setupTimeout: '2h',\n+ teardownTimeout: '1h',\n+ duration: '24h',\n+ noUsageReport: true,\n+ vus: 500,\n+ iterations: 1000,\n+ thresholds: {\n+ 'iteration_duration{scenario:default}': [\n+ `max>=0`,\n+ ],\n+ 'iteration_duration{group:::setup}': [`max>=0`],\n+ 'iteration_duration{group:::teardown}': [`max>=0`]\n+ }\n+};\n+\n+export function setup() {\n+ harbor.initialize({\n+ scheme: getEnv('HARBOR_SCHEME', 'https'),\n+ host: getEnv('HARBOR_HOST'),\n+ username: getEnv('HARBOR_USERNAME', 'admin'),\n+ password: getEnv('HARBOR_PASSWORD', 'Harbor12345'),\n+ insecure: true,\n+ })\n+\n+ const now = Date.now()\n+ const projectsCount = getEnvInt('PROJECTS_COUNT', `${options.vus}`)\n+\n+ const projectNames = []\n+ for (let i = 0; i < projectsCount; i++) {\n+ const projectName = `project-${now}-${i}`\n+ try {\n+ harbor.createProject({ projectName })\n+ projectNames.push(projectName)\n+ } catch (e) {\n+ console.log(e)\n+ }\n+ }\n+\n+ const contents = store.generateMany(artifactSize, options.iterations)\n+\n+ return {\n+ projectNames,\n+ contents\n+ }\n+}\n+\n+export default function ({ projectNames, contents }) {\n+ const i = counter.up() - 1\n+\n+ const projectName = projectNames[i % projectNames.length]\n+ const blob = contents[i % contents.length]\n+\n+ try {\n+ const repositoryName = getEnv('REPOSITORY_NAME', `repository-${Date.now()}-${i}`)\n+\n+ harbor.push({\n+ ref: `${projectName}/${repositoryName}:tag-${i}`,\n+ store,\n+ blobs: [blob],\n+ })\n+\n+ successRate.add(true)\n+ } catch (e) {\n+ console.log(e)\n+ successRate.add(false)\n+ }\n+}\n+\n+export function teardown({ projectNames }) {\n+ store.free()\n+\n+ if (teardownResources) {\n+ for (const projectName of projectNames) {\n+ try {\n+ harbor.deleteProject(projectName, true)\n+ } catch (e) {\n+ console.log(`failed to delete project ${projectName}, error: ${e}`)\n+ }\n+ }\n+ } else {\n+ for (const projectName of projectNames) {\n+ console.log(`project ${projectName} keeped`)\n+ }\n+ }\n+}\n+```\n+\n+## Manifests and results\n+\n+Two different harbor clusters will be tested for the performance, one uses minio storage, another one uses filesystem storage.\n+\n+### Manifests\n+\n+#### Manifest of minio as storage\n+\n+```yaml\n+# Sample namespace\n+apiVersion: v1\n+kind: Namespace\n+metadata:\n+ name: cluster-sample-ns\n+---\n+# A secret of harbor admin password.\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: admin-core-secret\n+ namespace: cluster-sample-ns\n+data:\n+ secret: SGFyYm9yMTIzNDU=\n+type: Opaque\n+---\n+# A secret for minIO access.\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: minio-access-secret\n+ namespace: cluster-sample-ns\n+data:\n+ accesskey: YWRtaW4=\n+ secretkey: bWluaW8xMjM=\n+type: Opaque\n+---\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: harbor-test-ca\n+ namespace: cluster-sample-ns\n+data:\n+ tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZpekNDQTNPZ0F3SUJBZ0lVU2Fva1FldWczaGJHQVF3U1BqaklsMmV1akl3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlZCQWdNQTFCRlN6RVJNQThHQTFVRUJ3d0lRbVZwSUVwcApibWN4RVRBUEJnTlZCQW9N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dYdUt3CnJnS2d6bm8vVjNxeEdKaFBWaFJJUW1Kb3U2M01LY1hxWXVwSlkxRTdjMmVhbU84SkpPZlpNTFFrWlN1MWlxSmIKZ3JITCt6YVAvTjRqVmkrWTJqbG81OEloYzBLNzVtak9rYjVBZ2ExOFhySnBlYlRHbFdnWFlxY05xUmZzbWhVago3VmMxQk9vVGwwb3pPU21JRmpyQUp3R0pNZjFuQzBuODI5Mks2WERyN0tDbDJXazN2OC9oVzNpRzJ6cW55aFBHCkl3czY0L0NLYU03OTdIc0R1ZXlBTU5vUVJXUHk5d2I3YXZqZlI2TDNGOWczS2l6c1pVbjFtUWcwc0JsQVRTU2QKVEN6SGxtdjZqQVFqY0RxVzdxQ3I0SHRFTXJBNjJGWT0KLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo=\n+---\n+# Cert issuer\n+apiVersion: cert-manager.io/v1\n+kind: Issuer\n+metadata:\n+ name: selfsigned-issuer\n+ namespace: cluster-sample-ns\n+spec:\n+ ca:\n+ secretName: harbor-test-ca\n+---\n+# Certificates of ingress\n+apiVersion: cert-manager.io/v1\n+kind: Certificate\n+metadata:\n+ name: sample-public-certificate\n+ namespace: cluster-sample-ns\n+spec:\n+ secretName: sample-public-certificate\n+ dnsNames:\n+ - core.harbor.domain\n+ - notary.harbor.domain\n+ - minio.harbor.domain\n+ issuerRef:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+---\n+# Full stack Harbor\n+apiVersion: goharbor.io/v1alpha3\n+kind: HarborCluster\n+metadata:\n+ name: harborcluster-sample\n+ namespace: cluster-sample-ns\n+spec:\n+ logLevel: debug\n+ imageSource:\n+ repository: ghcr.io/goharbor\n+ harborAdminPasswordRef: admin-core-secret\n+ externalURL: https://core.harbor.domain\n+ expose:\n+ core:\n+ ingress:\n+ host: core.harbor.domain\n+ tls:\n+ certificateRef: sample-public-certificate\n+ notary:\n+ ingress:\n+ host: notary.harbor.domain\n+ tls:\n+ certificateRef: sample-public-certificate\n+ internalTLS:\n+ enabled: true\n+ portal: {}\n+ registry:\n+ replicas: 3\n+ metrics:\n+ enabled: true\n+ core:\n+ replicas: 3\n+ tokenIssuer:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+ metrics:\n+ enabled: false\n+ chartmuseum: {}\n+ exporter: {}\n+ trivy:\n+ skipUpdate: false\n+ storage: {}\n+ notary:\n+ migrationEnabled: true\n+ inClusterDatabase:\n+ kind: PostgresSQL\n+ postgresSqlSpec:\n+ storage: 20Gi\n+ replicas: 1\n+ resources:\n+ limits:\n+ cpu: 5000m\n+ memory: 2500Mi\n+ requests:\n+ cpu: 1000m\n+ memory: 2500Mi\n+ inClusterStorage:\n+ kind: MinIO\n+ minIOSpec:\n+ replicas: 2\n+ secretRef: minio-access-secret\n+ redirect:\n+ enable: true\n+ expose:\n+ ingress:\n+ host: minio.harbor.domain\n+ tls:\n+ certificateRef: sample-public-certificate\n+ volumesPerServer: 2\n+ volumeClaimTemplate:\n+ spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ resources:\n+ requests:\n+ storage: 100Gi\n+ inClusterCache:\n+ kind: Redis\n+ redisSpec:\n+ server:\n+ replicas: 1\n+ sentinel:\n+ replicas: 1\n+\n+```\n+\n+#### Manifest of filesystem as storage\n+\n+```yaml\n+# Sample namespace\n+apiVersion: v1\n+kind: Namespace\n+metadata:\n+ name: cluster-sample-ns\n+---\n+# A secret of harbor admin password.\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: admin-core-secret\n+ namespace: cluster-sample-ns\n+data:\n+ secret: SGFyYm9yMTIzNDU=\n+type: Opaque\n+---\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: harbor-test-ca\n+ namespace: cluster-sample-ns\n+data:\n+ tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZpekNDQTNPZ0F3SUJBZ0lVU2Fva1FldWczaGJHQVF3U1BqaklsMmV1akl3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd1ZERUxNQW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MW1hNEt5WQowQUZ0QW9JQkFGZ1h0ZWM2VE1EVGVpRDFXQzRFK3E5aHNKZHBSamFwTGJqOGlTdFVyZVNmL2xIcFQrb1dYdUt3CnJnS2d6bm8vVjNxeEdKaFBWaFJJUW1Kb3U2M01LY1hxWXVwSlkxRTdjMmVhbU84SkpPZlpNTFFrWlN1MWlxSmIKZ3JITCt6YVAvTjRqVmkrWTJqbG81OEloYzBLNzVtak9rYjVBZ2ExOFhySnBlYlRHbFdnWFlxY05xUmZzbWhVago3VmMxQk9vVGwwb3pPU21JRmpyQUp3R0pNZjFuQzBuODI5Mks2WERyN0tDbDJXazN2OC9oVzNpRzJ6cW55aFBHCkl3czY0L0NLYU03OTdIc0R1ZXlBTU5vUVJXUHk5d2I3YXZqZlI2TDNGOWczS2l6c1pVbjFtUWcwc0JsQVRTU2QKVEN6SGxtdjZqQVFqY0RxVzdxQ3I0SHRFTXJBNjJGWT0KLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo=\n+---\n+# Cert issuer\n+apiVersion: cert-manager.io/v1\n+kind: Issuer\n+metadata:\n+ name: selfsigned-issuer\n+ namespace: cluster-sample-ns\n+spec:\n+ ca:\n+ secretName: harbor-test-ca\n+---\n+# Certificates of ingress\n+apiVersion: cert-manager.io/v1\n+kind: Certificate\n+metadata:\n+ name: sample-public-certificate\n+ namespace: cluster-sample-ns\n+spec:\n+ secretName: sample-public-certificate\n+ dnsNames:\n+ - core.harbor.domain\n+ - notary.harbor.domain\n+ issuerRef:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+---\n+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-registry\n+ namespace: cluster-sample-ns\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 100Gi\n+---\n+# Full stack Harbor\n+apiVersion: goharbor.io/v1alpha3\n+kind: HarborCluster\n+metadata:\n+ name: harborcluster-sample\n+ namespace: cluster-sample-ns\n+spec:\n+ logLevel: debug\n+ imageSource:\n+ repository: ghcr.io/goharbor\n+ harborAdminPasswordRef: admin-core-secret\n+ externalURL: https://core.harbor.domain\n+ expose:\n+ core:\n+ ingress:\n+ host: core.harbor.domain\n+ tls:\n+ certificateRef: sample-public-certificate\n+ notary:\n+ ingress:\n+ host: notary.harbor.domain\n+ tls:\n+ certificateRef: sample-public-certificate\n+ internalTLS:\n+ enabled: true\n+ portal: {}\n+ registry:\n+ replicas: 1\n+ metrics:\n+ enabled: true\n+ core:\n+ replicas: 3\n+ tokenIssuer:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+ metrics:\n+ enabled: false\n+ chartmuseum: {}\n+ exporter: {}\n+ trivy:\n+ skipUpdate: false\n+ storage: {}\n+ notary:\n+ migrationEnabled: true\n+ imageChartStorage:\n+ filesystem:\n+ registryPersistentVolume:\n+ claimName: sample-harbor-registry\n+ inClusterDatabase:\n+ kind: PostgresSQL\n+ postgresSqlSpec:\n+ storage: 20Gi\n+ replicas: 1\n+ resources:\n+ limits:\n+ cpu: 5000m\n+ memory: 2500Mi\n+ requests:\n+ cpu: 1000m\n+ memory: 2500Mi\n+ inClusterCache:\n+ kind: Redis\n+ redisSpec:\n+ server:\n+ replicas: 1\n+ sentinel:\n+ replicas: 1\n+\n+```\n+\n+### Results\n+\n+#### Result of minio as storage\n+\n+| Test | Avg | Min | Med | Max | P90 | P95 | VUS | Iterations |\n+| ---- | ------ | -------- | ------ | ------ | ------ | ------ | ---- | ---------- |\n+| Pull | 32.81s | 876.88ms | 31.19s | 1m25s | 1m6s | 1m14s | 200 | 400 |\n+| Push | 29.66s | 15.09s | 26.39s | 55.47s | 44.45s | 45.47s | 200 | 400 |\n+\n+#### Result of filesystem as storage\n+\n+| Test | Avg | Min | Med | Max | P90 | P95 | VUS | Iterations |\n+| ---- | ------ | -------- | ------ | ----- | ------ | ------ | ---- | ---------- |\n+| Pull | 32.34s | 838.94ms | 27.81s | 1m24s | 1m6s | 1m14s | 200 | 400 |\n+| Push | 20.43s | 10.62s | 20.33s | 35s | 24.92s | 28.18s | 200 | 400 |\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
docs: add doc of perf (#629)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,890
|
03.05.2021 09:29:37
| -28,800
|
2bbc1767c1a0469975e4451e4dc66f2107e57d14
|
feat: set ttlSecondsAfterFinished for job of init bucket
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/job.go",
"new_path": "pkg/cluster/controllers/storage/job.go",
"diff": "@@ -3,6 +3,7 @@ package storage\nimport (\n\"context\"\n\"fmt\"\n+ \"time\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/common\"\n@@ -12,6 +13,7 @@ import (\ncorev1 \"k8s.io/api/core/v1\"\n\"k8s.io/apimachinery/pkg/api/errors\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n+ \"sigs.k8s.io/controller-runtime/pkg/client\"\n)\nconst initBucketScript = `\n@@ -57,6 +59,8 @@ func (m *MinIOController) generateMinIOInitJob(ctx context.Context, harborcluste\nminioEndpoint := fmt.Sprintf(\"http://%s.%s.svc:%d\", m.getTenantsServiceName(harborcluster), harborcluster.Namespace, m.getServicePort())\n+ ttlSecondsAfterFinished := int32(time.Minute * 5 / time.Second)\n+\njob := &batchv1.Job{\nObjectMeta: metav1.ObjectMeta{\nName: m.getMinIONamespacedName(harborcluster).Name,\n@@ -69,6 +73,7 @@ func (m *MinIOController) generateMinIOInitJob(ctx context.Context, harborcluste\n},\n},\nSpec: batchv1.JobSpec{\n+ TTLSecondsAfterFinished: &ttlSecondsAfterFinished,\nTemplate: corev1.PodTemplateSpec{\nObjectMeta: metav1.ObjectMeta{\nLabels: map[string]string{\n@@ -116,6 +121,10 @@ func (m *MinIOController) generateMinIOInitJob(ctx context.Context, harborcluste\n},\n}\n+ job.Spec.Template.ObjectMeta.OwnerReferences = []metav1.OwnerReference{\n+ *metav1.NewControllerRef(job, batchv1.SchemeGroupVersion.WithKind(\"Job\")),\n+ }\n+\ndependencies := checksum.New(m.Scheme)\ndependencies.Add(ctx, harborcluster, true)\ndependencies.AddAnnotations(job)\n@@ -156,7 +165,7 @@ func (m *MinIOController) applyMinIOInitJob(ctx context.Context, harborcluster *\nif !common.Equals(ctx, m.Scheme, harborcluster, initJob) {\n// can't change the template after the job has been created, so delete it first and the recreate it\n// https://github.com/kubernetes/kubernetes/issues/89657\n- if err := m.KubeClient.Delete(ctx, initJob); err != nil {\n+ if err := m.KubeClient.Delete(ctx, initJob, client.PropagationPolicy(metav1.DeletePropagationBackground)); err != nil {\nreturn minioNotReadyStatus(DeleteInitJobError, err.Error()), err\n}\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat: set ttlSecondsAfterFinished for job of init bucket (#631)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,878
|
03.05.2021 21:32:31
| -28,800
|
2d63325cadf3b569c5e302b20262b2ed3a99e4ab
|
feature(doc): backup minio data
* feature(doc): backup minio data doc
* feature(doc): get minio access from secret
As it's doc PR, directly merged.
|
[
{
"change_type": "MODIFY",
"old_path": "docs/LCM/backup-minio-data.md",
"new_path": "docs/LCM/backup-minio-data.md",
"diff": "Documentation shown here guides you how to backup the Minio data.\n-TBD\n+## Prerequisites\n+\n+1. You need to install [mc]( https://docs.min.io/docs/minio-client-complete-guide.html) that is the MinIO CLI.\n+\n+2. Get the `access_key` and `secret_key` of MinIO.\n+\n+ ```shell\n+ $ kubectl get secret minio-access-secret -n cluster-sample-ns -o jsonpath='{.data.accesskey}' | base64 --decode\n+ admin\n+ $ kubectl get secret minio-access-secret -n cluster-sample-ns -o jsonpath='{.data.secretkey}' | base64 --decode\n+ minio123\n+ ```\n+\n+3. Please make sure you have the correct MinIO address to access.\n+\n+## Backup\n+\n+### Step 1\n+\n+Create the directory to storage Harbor Data in the backup pod, please make sure you have the Read/Write Permissions.\n+\n+```shell\n+mkdir {minio_backup_directory}\n+```\n+\n+### Step 2\n+\n+Setup mc config.\n+\n+```shell\n+mc --insecure -C {minio_backup_directory} config host add minio \\ http(s)://{minio_address}:9000 {minio_access_key} {minio_secret_key}\n+```\n+\n+### Step 3\n+\n+Start backup minio data\n+\n+```shell\n+mc --insecure -C {minio_backup_directory} \\\n+cp -r minio/harbor {minio_backup_directory}\n+```\n+\n+### Step 4\n+\n+Make sure that all data are backuped in the {minio_backup_directory}.\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feature(doc): backup minio data (#627)
* feature(doc): backup minio data doc
Signed-off-by: soulseen <zhuxiaoyang1996@gmail.com>
* feature(doc): get minio access from secret
Signed-off-by: soulseen <zhuxiaoyang1996@gmail.com>
As it's doc PR, directly merged.
|
254,893
|
03.05.2021 22:09:07
| -28,800
|
a560052b5d5d5bd0aef26356bf932a09905e95ee
|
doc(backup):add notes to the backup docs
|
[
{
"change_type": "MODIFY",
"old_path": "docs/LCM/backup-minio-data.md",
"new_path": "docs/LCM/backup-minio-data.md",
"diff": "# Backup Minio data\n-Documentation shown here guides you how to backup the Minio data.\n+Documentation shown here guides you how to backup the `Minio` data.\n+\n+>NOTES: The document shown here is for reference only, you can also look for other available data backup alternatives based on your real case.\n## Prerequisites\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/LCM/backup-psql-data.md",
"new_path": "docs/LCM/backup-psql-data.md",
"diff": "# Backup Postgresql data\n-Documentation shown here guides you how to backup the psql database data.\n+Documentation shown here guides you how to backup the `Postgresql` database data.\n+\n+>NOTES: The document shown here is for reference only, you can also look for other available data backup alternatives based on your real case.\n## get postgresql username and password from secret\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/LCM/backup-redis-data.md",
"new_path": "docs/LCM/backup-redis-data.md",
"diff": "# Backup Redis data\n-Documentation shown here guides you how to backup the Redis data.\n+Documentation shown here guides you how to backup the `Redis` data.\n+\n+>NOTES: The document shown here is for reference only, you can also look for other available data backup alternatives based on your real case.\n## Step 1\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(backup):add notes to the backup docs (#632)
Signed-off-by: Steven Zou <szou@vmware.com>
|
254,875
|
18.05.2021 17:52:03
| -28,800
|
12815e6bb0833523b1f86c23c3373a1c42ae4f9a
|
fix(version) notaryserver.go
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/notaryserver.go",
"new_path": "controllers/goharbor/harbor/notaryserver.go",
"diff": "@@ -107,7 +107,6 @@ func (r *Reconciler) GetNotaryServerCertificate(ctx context.Context, harbor *goh\nObjectMeta: metav1.ObjectMeta{\nName: r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String(), \"authentication\"),\nNamespace: harbor.GetNamespace(),\n- Annotations: version.SetVersion(nil, harbor.Spec.Version),\n},\nSpec: certv1.CertificateSpec{\nSecretName: secretName,\n@@ -196,9 +195,9 @@ func (r *Reconciler) GetNotaryServer(ctx context.Context, harbor *goharborv1.Har\nObjectMeta: metav1.ObjectMeta{\nName: name,\nNamespace: namespace,\n- Annotations: map[string]string{\n+ Annotations: version.SetVersion(map[string]string{\nharbormetav1.NetworkPoliciesAnnotationName: harbormetav1.NetworkPoliciesAnnotationDisabled,\n- },\n+ }, harbor.Spec.Version),\n},\nSpec: goharborv1.NotaryServerSpec{\nComponentSpec: harbor.GetComponentSpec(ctx, harbormetav1.NotaryServerComponent),\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(version) notaryserver.go (#656)
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,870
|
02.06.2021 15:20:58
| -28,800
|
055b6b5d248863101467f179f3c3e27b0c6065b4
|
fix(database) set ref pg secret owner
fixed
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/database/readiness.go",
"new_path": "pkg/cluster/controllers/database/readiness.go",
"diff": "@@ -67,6 +67,14 @@ func (p *PostgreSQLController) Readiness(ctx context.Context, harborcluster *goh\nreturn nil, err\n}\n+ if err := p.SetRefSecretOwner(ctx, \"postgres\", harborcluster); err != nil {\n+ return nil, err\n+ }\n+\n+ if err := p.SetRefSecretOwner(ctx, \"standby\", harborcluster); err != nil {\n+ return nil, err\n+ }\n+\np.Log.Info(\"Database is ready.\", \"namespace\", harborcluster.Namespace, \"name\", name)\nproperties := &lcm.Properties{}\n@@ -104,6 +112,31 @@ func getDatabasePasswordRefName(name string) string {\nreturn fmt.Sprintf(\"%s-%s-%s\", name, \"database\", \"password\")\n}\n+// SetRefSecretOwner set owner to pg operator created secrets.\n+func (p *PostgreSQLController) SetRefSecretOwner(ctx context.Context, dbName string, harborcluster *goharborv1.HarborCluster) error {\n+ ns := harborcluster.Namespace\n+ secretName := GenInClusterPasswordSecretName(dbName, p.resourceName(harborcluster.Namespace, harborcluster.Name))\n+\n+ secret := &corev1.Secret{}\n+ if err := p.Client.Get(ctx, types.NamespacedName{Name: secretName, Namespace: ns}, secret); err != nil {\n+ if kerr.IsNotFound(err) {\n+ return nil\n+ }\n+\n+ return err\n+ }\n+\n+ if err := controllerutil.SetControllerReference(harborcluster, secret, p.Scheme); err != nil {\n+ return err\n+ }\n+\n+ if err := p.Client.Update(ctx, secret); err != nil {\n+ return err\n+ }\n+\n+ return nil\n+}\n+\n// DeployComponentSecret deploy harbor component database secret.\nfunc (p *PostgreSQLController) DeployComponentSecret(ctx context.Context, conn *Connect, secretName string, harborcluster *goharborv1.HarborCluster) error {\nns := harborcluster.Namespace\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(database) set ref pg secret owner (#662)
fixed #660
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,893
|
15.06.2021 09:39:35
| -28,800
|
773796410c88a3a582949228509621783da122ae
|
doc(readme): update versioning and compatibility matrix
fix
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -60,11 +60,11 @@ Versions of the underlying components are listed below:\n| Components | Harbor | MinIO operator | PostgreSQL operator | Redis operator |\n|---------------|-------------------|----------------|---------------------|----------------|\n-| Versions | 2.2.1 `[1]` | 4.0.6 | 1.5.0 | 1.0.0 |\n+| Versions | 2.2.x `[1]` | 4.0.6 | 1.5.0 | 1.0.0 |\nNOTES:\n-[1] Only one given Harbor version is supported in one operator version\n+[1] `.x` means all the patch releases of Harbor can be naturally supported in one operator version.\n## Compatibility\n@@ -73,25 +73,25 @@ NOTES:\nHarbor operator supports two extra Kubernetes versions besides the current latest version (`n-2` pattern):\n| Versions | 1.18 | 1.19 | 1.20 | 1.21 |\n-|---------------|--------------------|--------------------|--------------------|------|\n-| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :o: |\n+|---------------|--------------------|--------------------|--------------------|---------------------------|\n+| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: |\n### Cert manager versions\nHarbor operator relies on cert manager to manage kinds of certificates used by Harbor cluster components. Table shown below lists the compatibilities of cert manager versions:\n-| Versions | <0.16 | 1.0.4 | 1.2.0 | 1.3.0 |\n-|---------------|--------------------------|--------------------|--------------------|-------|\n-| Compatibility | :heavy_multiplication_x: | :heavy_check_mark: | :heavy_check_mark: | :o: |\n+| Versions | 1.0.4 | 1.2.0 | 1.3.1 |\n+|---------------|--------------------|--------------------|----------------------|\n+| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n### Ingress controller types\nHarbor operator exposes the frontend service with ingress (CRD version: `v1beta1`). Table shown below lists the ingress controller types supported.\n-| Ingress Controller | default | gce | ncp |\n-|----------------------|---------------------|--------------------|--------------------|\n-| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n-| Description | Default ingress controller like NGINX | Google Cloud Engine ingress controller | NSX-T Container plugin ingress controller |\n+| Ingress Controller | default | gce | ncp | contour |\n+|----------------------|---------------------|--------------------|--------------------|---------------------|\n+| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n+| Description | Default ingress controller like NGINX | Google Cloud Engine ingress controller | NSX-T Container plugin ingress controller | Ingress controller that works by deploying the Envoy proxy |\nNOTES:\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/LCM/upgrade-cluster.md",
"new_path": "docs/LCM/upgrade-cluster.md",
"diff": "# How to upgrade your Harbor cluster\n-The harbor operator only serves a specific version of the harbor and allows to upgrade the harbor cluster instances from the old version to the latest version the operator served.\n+A specified version of Harbor operator supports a corresponding Harbor minor version as well as its subsequent patch releases. e.g: harbor operator v1.0.1 supports 2.2.x harbor versions such as 2.2.0, 2.2.1 and 2.2.2 etc. For upgrading your Harbor cluster, there might be two different cases.\n-Assume that the harbor operator v1.0.0 which serves harbor v2.2.1 is installed in the Kubernetes cluster, and there is harbor clusters deployed in the Kubernetes cluster. Now the harbor operator v1.0.1 which serves harbor v2.2.2 is released, and the users want to upgrade the three harbor clusters to v2.2.2. Here are the steps to upgrade the harbor cluster managed by the harbor operator to the new version.\n+## Upgrade to patch releases\n-1. Upgrade the harbor operator to v1.0.1 by helm or kustomize, the method depends on the original way to install the harbor operator. [Installation](../installation/installation.md) is a reference resources to upgrade the harbor operator to new release.\n+The guideline shown below describes how to upgrade your Harbor cluster from lower patch version to higher patch version without operator upgrading (because there is no need as a Harbor operator version supports all patch releases).\n-2. Edit the manifest of the harbor cluster by `kubectl` and set the `version` field to `2.2.2` in the spec.\n+Assume that the harbor operator v1.0.1 which serves harbor v2.2.x is installed in the Kubernetes cluster, and there is a harbor cluster v2.2.2 deployed in the Kubernetes cluster.\n+\n+If you want to upgrade the harbor cluster from v2.2.2 to v2.2.3, just edit the manifest of the harbor cluster by `kubectl` and set the `version` field from `2.2.2` to `2.2.3` and the harbor operator will upgrade the harbor cluster instance to harbor v2.2.3.\n+\n+## Upgrade to minor+ releases\n+\n+For upgrading Harbor cluster across different minor versions, an operator upgrading should be involved first (because one Harbor operator version only serves one minor version serials). Steps shown below describes how to do such upgrading.\n+\n+1. Upgrade the harbor operator to the newer version that supports the Harbor version you're planning to upgrade your existing Harbor cluster to by `helm` or `kustomize`, the method depends on the original way to install the harbor operator. [Installation](../installation/installation.md) is a reference resources to upgrade the harbor operator to new release.\n+\n+1. Edit the manifest of the harbor cluster by `kubectl` and set the `version` field to the newer Harbor version (e.g:`2.3.0`) in the spec.\n```bash\nkubectl -n harbor-cluster-ns edit harborclusters cluster-name\n```\n-3. The harbor operator will get an update event of the harbor cluster resource and reconcile to upgrade the harbor cluster to v2.2.2.\n+1. The harbor operator will get an update event of the harbor cluster resource and reconcile to upgrade the harbor cluster to v2.3.0.\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(readme): update versioning and compatibility matrix (#675)
Signed-off-by: Steven Zou <szou@vmware.com>
fix #673
|
254,875
|
16.06.2021 18:09:01
| -28,800
|
a9a269d86ac28ab1ec9916edb733898007e528e4
|
feat(api) upgrade ingress api from v1beta to v1
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"diff": "@@ -652,12 +652,12 @@ func (err ErrUnsupportedComponent) Error() string {\nreturn fmt.Sprintf(\"%s is not supported\", harbormetav1.ComponentWithTLS(err).String())\n}\n-func (r *HarborInternalTLSSpec) GetInternalPort(component harbormetav1.ComponentWithTLS) (int32, error) {\n+func (r *HarborInternalTLSSpec) GetInternalPort(component harbormetav1.ComponentWithTLS) int32 {\nif !r.IsEnabled() {\n- return harbormetav1.HTTPPort, nil\n+ return harbormetav1.HTTPPort\n}\n- return harbormetav1.HTTPSPort, nil\n+ return harbormetav1.HTTPSPort\n}\nfunc (r *HarborInternalTLSSpec) GetComponentTLSSpec(certificateRef string) *harbormetav1.ComponentsTLSSpec {\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/harbor.go",
"new_path": "controllers/goharbor/harbor/harbor.go",
"diff": "@@ -14,7 +14,6 @@ import (\n\"github.com/pkg/errors\"\ncorev1 \"k8s.io/api/core/v1\"\nnetv1 \"k8s.io/api/networking/v1\"\n- netv1beta1 \"k8s.io/api/networking/v1beta1\"\nctrl \"sigs.k8s.io/controller-runtime\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -64,7 +63,6 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err\nOwns(&corev1.Secret{}).\nOwns(&certv1.Issuer{}).\nOwns(&certv1.Certificate{}).\n- Owns(&netv1beta1.Ingress{}).\nOwns(&netv1.NetworkPolicy{}).\nWithOptions(controller.Options{\nMaxConcurrentReconciles: concurrentReconcile,\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/ingresses.go",
"new_path": "controllers/goharbor/harbor/ingresses.go",
"diff": "@@ -10,9 +10,8 @@ import (\n\"github.com/goharbor/harbor-operator/controllers/goharbor/notaryserver\"\n\"github.com/goharbor/harbor-operator/pkg/graph\"\n\"github.com/pkg/errors\"\n- netv1beta1 \"k8s.io/api/networking/v1beta1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n- \"k8s.io/apimachinery/pkg/util/intstr\"\n)\nconst (\n@@ -33,15 +32,15 @@ func (r *Reconciler) AddCoreIngress(ctx context.Context, harbor *goharborv1.Harb\nreturn CoreIngress(ingressRes), errors.Wrap(err, \"cannot add core ingress\")\n}\n-func (r *Reconciler) GetCoreIngress(ctx context.Context, harbor *goharborv1.Harbor) (*netv1beta1.Ingress, error) {\n+func (r *Reconciler) GetCoreIngress(ctx context.Context, harbor *goharborv1.Harbor) (*netv1.Ingress, error) {\nif harbor.Spec.Expose.Core.Ingress == nil {\nreturn nil, nil\n}\n- var tls []netv1beta1.IngressTLS\n+ var tls []netv1.IngressTLS\nif harbor.Spec.Expose.Core.TLS.Enabled() {\n- tls = []netv1beta1.IngressTLS{{\n+ tls = []netv1.IngressTLS{{\nSecretName: harbor.Spec.Expose.Core.TLS.CertificateRef,\nHosts: []string{harbor.Spec.Expose.Core.Ingress.Host},\n}}\n@@ -52,38 +51,37 @@ func (r *Reconciler) GetCoreIngress(ctx context.Context, harbor *goharborv1.Harb\nreturn nil, errors.Wrap(err, \"ingress rules\")\n}\n- return &netv1beta1.Ingress{\n+ return &netv1.Ingress{\nObjectMeta: metav1.ObjectMeta{\nName: r.NormalizeName(ctx, harbor.GetName()),\nNamespace: harbor.GetNamespace(),\nAnnotations: r.GetCoreIngressAnnotations(ctx, harbor),\n},\n- Spec: netv1beta1.IngressSpec{\n+ Spec: netv1.IngressSpec{\nTLS: tls,\nRules: rules,\n},\n}, nil\n}\n-func (r *Reconciler) GetCoreIngressRules(ctx context.Context, harbor *goharborv1.Harbor) ([]netv1beta1.IngressRule, error) {\n- corePort, err := harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.CoreTLS)\n- if err != nil {\n- return nil, errors.Wrapf(err, \"%s internal port\", harbormetav1.CoreTLS)\n- }\n-\n- coreBackend := netv1beta1.IngressBackend{\n- ServiceName: r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String()),\n- ServicePort: intstr.FromInt(int(corePort)),\n- }\n-\n- portalPort, err := harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.PortalTLS)\n- if err != nil {\n- return nil, errors.Wrapf(err, \"%s internal port\", harbormetav1.PortalTLS)\n+func (r *Reconciler) GetCoreIngressRules(ctx context.Context, harbor *goharborv1.Harbor) ([]netv1.IngressRule, error) {\n+ coreBackend := netv1.IngressBackend{\n+ Service: &netv1.IngressServiceBackend{\n+ Name: r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String()),\n+ Port: netv1.ServiceBackendPort{\n+ Number: harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.CoreTLS),\n+ },\n+ },\n+ Resource: nil,\n}\n- portalBackend := netv1beta1.IngressBackend{\n- ServiceName: r.NormalizeName(ctx, harbor.GetName(), \"portal\"),\n- ServicePort: intstr.FromInt(int(portalPort)),\n+ portalBackend := netv1.IngressBackend{\n+ Service: &netv1.IngressServiceBackend{\n+ Name: r.NormalizeName(ctx, harbor.GetName(), \"portal\"),\n+ Port: netv1.ServiceBackendPort{\n+ Number: harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.PortalTLS),\n+ },\n+ },\n}\nruleValue, err := r.GetCoreIngressRuleValue(ctx, harbor, coreBackend, portalBackend)\n@@ -91,7 +89,7 @@ func (r *Reconciler) GetCoreIngressRules(ctx context.Context, harbor *goharborv1\nreturn nil, errors.Wrap(err, \"rule value\")\n}\n- return []netv1beta1.IngressRule{{\n+ return []netv1.IngressRule{{\nHost: harbor.Spec.Expose.Core.Ingress.Host,\nIngressRuleValue: *ruleValue,\n}}, nil\n@@ -110,7 +108,7 @@ func (r *Reconciler) AddNotaryIngress(ctx context.Context, harbor *goharborv1.Ha\nreturn NotaryIngress(ingressRes), errors.Wrapf(err, \"cannot add notary ingress\")\n}\n-func (r *Reconciler) GetNotaryServerIngress(ctx context.Context, harbor *goharborv1.Harbor) (*netv1beta1.Ingress, error) {\n+func (r *Reconciler) GetNotaryServerIngress(ctx context.Context, harbor *goharborv1.Harbor) (*netv1.Ingress, error) {\nif harbor.Spec.Notary == nil {\nreturn nil, nil\n}\n@@ -119,10 +117,10 @@ func (r *Reconciler) GetNotaryServerIngress(ctx context.Context, harbor *goharbo\nreturn nil, nil\n}\n- var tls []netv1beta1.IngressTLS\n+ var tls []netv1.IngressTLS\nif harbor.Spec.Expose.Notary.TLS.Enabled() {\n- tls = []netv1beta1.IngressTLS{{\n+ tls = []netv1.IngressTLS{{\nSecretName: harbor.Spec.Expose.Notary.TLS.CertificateRef,\nHosts: []string{harbor.Spec.Expose.Notary.Ingress.Host},\n}}\n@@ -133,33 +131,37 @@ func (r *Reconciler) GetNotaryServerIngress(ctx context.Context, harbor *goharbo\nreturn nil, errors.Wrap(err, \"cannot get notary ingress rules\")\n}\n- return &netv1beta1.Ingress{\n+ return &netv1.Ingress{\nObjectMeta: metav1.ObjectMeta{\nName: r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String()),\nNamespace: harbor.GetNamespace(),\nAnnotations: r.GetNotaryIngressAnnotations(ctx, harbor),\n},\n- Spec: netv1beta1.IngressSpec{\n+ Spec: netv1.IngressSpec{\nTLS: tls,\nRules: ingressRules,\n},\n}, nil\n}\n-func (r *Reconciler) GetNotaryIngressRules(ctx context.Context, harbor *goharborv1.Harbor) ([]netv1beta1.IngressRule, error) {\n- backend := netv1beta1.IngressBackend{\n- ServiceName: r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String()),\n- ServicePort: intstr.FromInt(notaryserver.PublicPort),\n+func (r *Reconciler) GetNotaryIngressRules(ctx context.Context, harbor *goharborv1.Harbor) ([]netv1.IngressRule, error) {\n+ backend := netv1.IngressBackend{\n+ Service: &netv1.IngressServiceBackend{\n+ Name: r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String()),\n+ Port: netv1.ServiceBackendPort{\n+ Number: notaryserver.PublicPort,\n+ },\n+ },\n}\n- pathTypePrefix := netv1beta1.PathTypePrefix\n+ pathTypePrefix := netv1.PathTypePrefix\n- return []netv1beta1.IngressRule{\n+ return []netv1.IngressRule{\n{\nHost: harbor.Spec.Expose.Notary.Ingress.Host,\n- IngressRuleValue: netv1beta1.IngressRuleValue{\n- HTTP: &netv1beta1.HTTPIngressRuleValue{\n- Paths: []netv1beta1.HTTPIngressPath{\n+ IngressRuleValue: netv1.IngressRuleValue{\n+ HTTP: &netv1.HTTPIngressRuleValue{\n+ Paths: []netv1.HTTPIngressPath{\n{\nPath: \"/\",\nPathType: &pathTypePrefix,\n@@ -242,12 +244,12 @@ func (err ErrInvalidIngressController) Error() string {\nreturn fmt.Sprintf(\"controller %s unsupported\", err.Controller)\n}\n-func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharborv1.Harbor, core, portal netv1beta1.IngressBackend) (*netv1beta1.IngressRuleValue, error) {\n- pathTypePrefix := netv1beta1.PathTypePrefix\n+func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharborv1.Harbor, core, portal netv1.IngressBackend) (*netv1.IngressRuleValue, error) {\n+ pathTypePrefix := netv1.PathTypePrefix\n- return &netv1beta1.IngressRuleValue{\n- HTTP: &netv1beta1.HTTPIngressRuleValue{\n- Paths: []netv1beta1.HTTPIngressPath{{\n+ return &netv1.IngressRuleValue{\n+ HTTP: &netv1.HTTPIngressRuleValue{\n+ Paths: []netv1.HTTPIngressPath{{\nPath: \"/\",\nPathType: &pathTypePrefix,\nBackend: portal,\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/jobservice.go",
"new_path": "controllers/goharbor/harbor/jobservice.go",
"diff": "@@ -9,7 +9,6 @@ import (\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1alpha3\"\nharbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n\"github.com/goharbor/harbor-operator/controllers\"\n- serrors \"github.com/goharbor/harbor-operator/pkg/controller/errors\"\n\"github.com/goharbor/harbor-operator/pkg/graph\"\n\"github.com/goharbor/harbor-operator/pkg/version\"\n\"github.com/pkg/errors\"\n@@ -121,10 +120,7 @@ func (r *Reconciler) GetJobService(ctx context.Context, harbor *goharborv1.Harbo\nPath: \"/service/token\",\n}).String()\n- registryctlPort, err := harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.RegistryControllerTLS)\n- if err != nil {\n- return nil, serrors.UnrecoverrableError(errors.Wrap(err, \"cannot get registryController port\"), serrors.OperatorReason, \"unable to configure registry controller url\")\n- }\n+ registryctlPort := harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.RegistryControllerTLS)\nregistryControllerURL := (&url.URL{\nScheme: harbor.Spec.InternalTLS.GetScheme(),\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/ingress.go",
"new_path": "pkg/cluster/controllers/storage/ingress.go",
"diff": "@@ -9,10 +9,9 @@ import (\nminiov2 \"github.com/goharbor/harbor-operator/pkg/cluster/controllers/storage/minio/apis/minio.min.io/v2\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n\"github.com/goharbor/harbor-operator/pkg/resources/checksum\"\n- netv1 \"k8s.io/api/networking/v1beta1\"\n+ netv1 \"k8s.io/api/networking/v1\"\nk8serror \"k8s.io/apimachinery/pkg/api/errors\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n- \"k8s.io/apimachinery/pkg/util/intstr\"\n)\nconst (\n@@ -156,8 +155,12 @@ func (m *MinIOController) generateIngress(ctx context.Context, harborcluster *go\nPath: \"/\",\nPathType: &pathTypePrefix,\nBackend: netv1.IngressBackend{\n- ServiceName: m.getTenantsServiceName(harborcluster),\n- ServicePort: intstr.FromInt(m.getServicePort()),\n+ Service: &netv1.IngressServiceBackend{\n+ Name: m.getTenantsServiceName(harborcluster),\n+ Port: netv1.ServiceBackendPort{\n+ Number: m.getServicePort(),\n+ },\n+ },\n},\n},\n},\n@@ -175,6 +178,6 @@ func (m *MinIOController) generateIngress(ctx context.Context, harborcluster *go\nreturn ingress\n}\n-func (m *MinIOController) getServicePort() int {\n+func (m *MinIOController) getServicePort() int32 {\nreturn DefaultServicePort\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/controller/resource.go",
"new_path": "pkg/controller/resource.go",
"diff": "@@ -16,7 +16,6 @@ import (\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\nnetv1 \"k8s.io/api/networking/v1\"\n- netv1beta1 \"k8s.io/api/networking/v1beta1\"\napierrors \"k8s.io/apimachinery/pkg/api/errors\"\nmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\"\n@@ -328,7 +327,7 @@ func (c *Controller) AddIssuerToManage(ctx context.Context, resource *certv1.Iss\nreturn res, g.AddResource(ctx, res, dependencies, c.ProcessFunc(ctx, resource, dependencies...))\n}\n-func (c *Controller) AddIngressToManage(ctx context.Context, resource *netv1beta1.Ingress, dependencies ...graph.Resource) (graph.Resource, error) {\n+func (c *Controller) AddIngressToManage(ctx context.Context, resource *netv1.Ingress, dependencies ...graph.Resource) (graph.Resource, error) {\nif resource == nil {\nreturn nil, nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "pkg/controller/resource_test.go",
"new_path": "pkg/controller/resource_test.go",
"diff": "@@ -16,7 +16,7 @@ import (\ncertv1 \"github.com/jetstack/cert-manager/pkg/apis/certmanager/v1\"\nappsv1 \"k8s.io/api/apps/v1\"\ncorev1 \"k8s.io/api/core/v1\"\n- netv1beta1 \"k8s.io/api/networking/v1beta1\"\n+ netv1 \"k8s.io/api/networking/v1\"\n\"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured\"\n\"k8s.io/apimachinery/pkg/types\"\ncontrollerruntime \"sigs.k8s.io/controller-runtime\"\n@@ -36,8 +36,8 @@ var _ = Context(\"Adding\", func() {\n&corev1.Secret{}: func(c *Controller, ctx context.Context, res resources.Resource, dep ...graph.Resource) (graph.Resource, error) {\nreturn c.AddSecretToManage(ctx, res.(*corev1.Secret), dep...)\n},\n- &netv1beta1.Ingress{}: func(c *Controller, ctx context.Context, res resources.Resource, dep ...graph.Resource) (graph.Resource, error) {\n- return c.AddIngressToManage(ctx, res.(*netv1beta1.Ingress), dep...)\n+ &netv1.Ingress{}: func(c *Controller, ctx context.Context, res resources.Resource, dep ...graph.Resource) (graph.Resource, error) {\n+ return c.AddIngressToManage(ctx, res.(*netv1.Ingress), dep...)\n},\n&certv1.Certificate{}: func(c *Controller, ctx context.Context, res resources.Resource, dep ...graph.Resource) (graph.Resource, error) {\nreturn c.AddCertificateToManage(ctx, res.(*certv1.Certificate), dep...)\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(api) upgrade ingress api from v1beta to v1
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,890
|
03.07.2021 17:18:43
| -28,800
|
89ee3049ff380979820532be595319ab0b91fcfd
|
fix: remove ttl for job of creating bucket
|
[
{
"change_type": "MODIFY",
"old_path": "pkg/cluster/controllers/storage/job.go",
"new_path": "pkg/cluster/controllers/storage/job.go",
"diff": "@@ -3,7 +3,6 @@ package storage\nimport (\n\"context\"\n\"fmt\"\n- \"time\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/controllers/common\"\n@@ -59,8 +58,6 @@ func (m *MinIOController) generateMinIOInitJob(ctx context.Context, harborcluste\nminioEndpoint := fmt.Sprintf(\"http://%s.%s.svc:%d\", m.getTenantsServiceName(harborcluster), harborcluster.Namespace, m.getServicePort())\n- ttlSecondsAfterFinished := int32(time.Minute * 5 / time.Second)\n-\njob := &batchv1.Job{\nObjectMeta: metav1.ObjectMeta{\nName: m.getMinIONamespacedName(harborcluster).Name,\n@@ -73,7 +70,6 @@ func (m *MinIOController) generateMinIOInitJob(ctx context.Context, harborcluste\n},\n},\nSpec: batchv1.JobSpec{\n- TTLSecondsAfterFinished: &ttlSecondsAfterFinished,\nTemplate: corev1.PodTemplateSpec{\nObjectMeta: metav1.ObjectMeta{\nLabels: map[string]string{\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: remove ttl for job of creating bucket (#694)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,893
|
30.06.2021 14:21:02
| -28,800
|
047072b4021c3de0642063b2cc665f833eeeaea8
|
doc(Readme): add release plan sections
add release plan 1.1
add release plan 1.2
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -50,6 +50,11 @@ Harbor deployment stack is controlled by a custom Harbor resource `HarborCluster\n* Container image path rewriting\n* Transparent proxy cache settings\n+## Replease plans\n+\n+* [Release 1.1](https://github.com/goharbor/harbor-operator/projects/8)\n+* [Release 1.2](https://github.com/goharbor/harbor-operator/projects/7)\n+\n## Getting started\nFor a quick first try follow the instructions of this [tutorial](./docs/tutorial.md).\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(Readme): add release plan sections
- add release plan 1.1
- add release plan 1.2
|
254,875
|
13.07.2021 14:10:28
| -28,800
|
599e7a12a4796570f551267cdc61b4eeeeb05cab
|
fix(ci) support certmanager 1.4
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -144,7 +144,7 @@ jobs:\ncertManager:\n- \"1.1.1\"\n# - \"1.2.0\"\n- - \"1.3.1\"\n+ - \"1.4.0\"\n# https://snapcraft.io/microk8s\nk8sVersion:\n@@ -221,6 +221,8 @@ jobs:\nexit 1\nfi\n+ sleep 10\n+\n- name: install harbor\nrun: |\nset -ex\n"
},
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -85,9 +85,9 @@ Harbor operator supports two extra Kubernetes versions besides the current lates\nHarbor operator relies on cert manager to manage kinds of certificates used by Harbor cluster components. Table shown below lists the compatibilities of cert manager versions:\n-| Versions | 1.0.4 | 1.2.0 | 1.3.1 |\n-|---------------|--------------------|--------------------|----------------------|\n-| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n+| Versions | 1.1.1 | 1.2.0 | 1.3.1 | 1.4.0 |\n+|---------------|--------------------|--------------------|----------------------|----------------------|\n+| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n### Ingress controller types\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/notarysigner.go",
"new_path": "controllers/goharbor/harbor/notarysigner.go",
"diff": "@@ -82,7 +82,7 @@ func (r *Reconciler) GetNotarySignerCertificateAuthority(ctx context.Context, ha\nDuration: &metav1.Duration{\nDuration: duration,\n},\n- CommonName: r.NormalizeName(ctx, harbor.GetName(), controllers.NotarySigner.String()),\n+ CommonName: r.NormalizeName(ctx, harbor.GetName(), controllers.NotarySigner.String(), \"CA\"),\nIsCA: true,\nUsages: []certv1.KeyUsage{\ncertv1.UsageClientAuth,\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(ci) support certmanager 1.4 (#697)
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,878
|
14.07.2021 10:31:39
| -28,800
|
a0db41fe34264c1dedddc69e53f188d648110798
|
optimization of log consist
optimization of log consist
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/configuration/reconciler.go",
"new_path": "controllers/goharbor/configuration/reconciler.go",
"diff": "@@ -6,10 +6,9 @@ import (\n\"fmt\"\n\"time\"\n- \"github.com/go-logr/logr\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1\"\n+ \"github.com/goharbor/harbor-operator/controllers\"\ncommonCtrl \"github.com/goharbor/harbor-operator/pkg/controller\"\n- \"github.com/goharbor/harbor-operator/pkg/factories/application\"\n\"github.com/goharbor/harbor-operator/pkg/harbor\"\n\"github.com/goharbor/harbor-operator/pkg/utils/strings\"\n\"github.com/ovh/configstore\"\n@@ -20,7 +19,6 @@ import (\n\"k8s.io/apimachinery/pkg/runtime\"\n\"k8s.io/apimachinery/pkg/types\"\nctrl \"sigs.k8s.io/controller-runtime\"\n- \"sigs.k8s.io/controller-runtime/pkg/client\"\n\"sigs.k8s.io/controller-runtime/pkg/event\"\n\"sigs.k8s.io/controller-runtime/pkg/predicate\"\n\"sigs.k8s.io/yaml\"\n@@ -31,9 +29,10 @@ var pwdFields = []string{\"email_password\", \"ldap_search_password\", \"uaa_client_s\n// New HarborConfiguration reconciler.\nfunc New(ctx context.Context, configStore *configstore.Store) (commonCtrl.Reconciler, error) {\n- return &Reconciler{\n- Log: ctrl.Log.WithName(application.GetName(ctx)).WithName(\"configuration-controller\").WithValues(\"controller\", \"HarborConfiguration\"),\n- }, nil\n+ r := &Reconciler{}\n+ r.Controller = commonCtrl.NewController(ctx, controllers.HarborCluster, nil, configStore)\n+\n+ return r, nil\n}\nconst (\n@@ -47,8 +46,7 @@ const (\n// Reconciler reconciles a configuration configmap.\ntype Reconciler struct {\n- client.Client\n- Log logr.Logger\n+ *commonCtrl.Controller\nScheme *runtime.Scheme\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/ctrl_setup.go",
"new_path": "controllers/goharbor/harborcluster/ctrl_setup.go",
"diff": "@@ -3,7 +3,6 @@ package harborcluster\nimport (\n\"context\"\n- \"github.com/go-logr/logr\"\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1\"\n\"github.com/goharbor/harbor-operator/controllers\"\n\"github.com/goharbor/harbor-operator/pkg/builder\"\n@@ -16,7 +15,6 @@ import (\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n\"github.com/goharbor/harbor-operator/pkg/config\"\ncommonCtrl \"github.com/goharbor/harbor-operator/pkg/controller\"\n- \"github.com/goharbor/harbor-operator/pkg/factories/application\"\n\"github.com/goharbor/harbor-operator/pkg/utils/strings\"\n\"github.com/ovh/configstore\"\n\"github.com/pkg/errors\"\n@@ -25,7 +23,6 @@ import (\nbatchv1 \"k8s.io/api/batch/v1\"\n\"k8s.io/apimachinery/pkg/runtime\"\nctrl \"sigs.k8s.io/controller-runtime\"\n- \"sigs.k8s.io/controller-runtime/pkg/client\"\n\"sigs.k8s.io/controller-runtime/pkg/controller\"\n)\n@@ -38,21 +35,16 @@ const (\n// TODO: Refactor to inherit the common reconciler in future\n// Reconciler reconciles a HarborCluster object.\ntype Reconciler struct {\n- client.Client\n- Log logr.Logger\nScheme *runtime.Scheme\n// In case\n- ConfigStore *configstore.Store\nName string\n- Version string\nCacheCtrl lcm.Controller\nDatabaseCtrl lcm.Controller\nStorageCtrl lcm.Controller\nHarborCtrl *harbor.Controller\n-\n- ctrl *commonCtrl.Controller // TODO: move the Reconcile to pkg/controller.Controller\n+ *commonCtrl.Controller // TODO: move the Reconcile to pkg/controller.Controller\n}\n// +kubebuilder:rbac:groups=goharbor.io,resources=harborclusters,verbs=get;list;watch\n@@ -69,10 +61,6 @@ type Reconciler struct {\n// +kubebuilder:rbac:groups=\"\",resources=persistentvolumeclaims,verbs=get;list;watch;create;update;patch;delete\nfunc (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error {\n- if err := r.ctrl.SetupWithManager(ctx, mgr); err != nil {\n- return err\n- }\n-\nconcurrentReconcile, err := config.GetInt(r.ConfigStore, config.ReconciliationKey, config.DefaultConcurrentReconcile)\nif err != nil {\nreturn errors.Wrap(err, \"cannot get concurrent reconcile\")\n@@ -134,10 +122,8 @@ func (r *Reconciler) NormalizeName(ctx context.Context, name string, suffixes ..\n// New HarborCluster reconciler.\nfunc New(ctx context.Context, configStore *configstore.Store) (commonCtrl.Reconciler, error) {\n- return &Reconciler{\n- Version: application.GetVersion(ctx),\n- ConfigStore: configStore,\n- Log: ctrl.Log.WithName(application.GetName(ctx)).WithName(\"controller\").WithValues(\"controller\", \"HarborCluster\"),\n- ctrl: commonCtrl.NewController(ctx, controllers.HarborCluster, nil, configStore),\n- }, nil\n+ r := &Reconciler{}\n+ r.Controller = commonCtrl.NewController(ctx, controllers.HarborCluster, nil, configStore)\n+\n+ return r, nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harborcluster/harborcluster.go",
"new_path": "controllers/goharbor/harborcluster/harborcluster.go",
"diff": "@@ -8,7 +8,6 @@ import (\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/gos\"\n\"github.com/goharbor/harbor-operator/pkg/cluster/lcm\"\n- \"github.com/goharbor/harbor-operator/pkg/factories/logger\"\n\"github.com/pkg/errors\"\ncorev1 \"k8s.io/api/core/v1\"\napierrors \"k8s.io/apimachinery/pkg/api/errors\"\n@@ -17,8 +16,7 @@ import (\n// Reconcile logic of the HarborCluster.\nfunc (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err error) { // nolint:funlen\n- ctx = r.ctrl.PopulateContext(ctx, req)\n- log := logger.Get(ctx)\n+ ctx = r.PopulateContext(ctx, req)\n// Get the harborcluster first\nharborcluster := &goharborv1.HarborCluster{}\n@@ -34,20 +32,20 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.\n// Check if it is being deleted\nif !harborcluster.ObjectMeta.DeletionTimestamp.IsZero() {\n- log.Info(\"harbor cluster is being deleted\", \"name\", req.NamespacedName)\n+ r.Log.Info(\"harbor cluster is being deleted\", \"name\", req.NamespacedName)\nreturn ctrl.Result{}, nil\n}\n- if err := r.ctrl.PrepareStatus(ctx, harborcluster); err != nil {\n- return r.ctrl.HandleError(ctx, harborcluster, errors.Wrap(err, \"cannot prepare owner status\"))\n+ if err := r.PrepareStatus(ctx, harborcluster); err != nil {\n+ return r.HandleError(ctx, harborcluster, errors.Wrap(err, \"cannot prepare owner status\"))\n}\n// For tracking status\nst := newStatus(harborcluster).\nWithContext(ctx).\nWithClient(r.Client).\n- WithLog(log)\n+ WithLog(r.Log)\ndefer func() {\n// Execute the status update operation\n@@ -130,7 +128,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.\nr.Log.Info(\"Reconcile is completed\")\nif harborStatus.Condition.Status == corev1.ConditionTrue {\n- return ctrl.Result{}, r.ctrl.SetSuccessStatus(ctx, harborcluster)\n+ return ctrl.Result{}, r.SetSuccessStatus(ctx, harborcluster)\n}\nreturn ctrl.Result{}, nil\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
optimization of log consist (#689)
optimization of log consist
Signed-off-by: soulseen <zhuxiaoyang1996@gmail.com>
|
254,870
|
21.07.2021 13:36:50
| -28,800
|
628c523ea79ed577bb35074143e89038d981adb6
|
feat(lb) support to expost service loadbalance
support to expost service loadbalance
fixed
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"diff": "@@ -684,8 +684,6 @@ type HarborExposeComponentSpec struct {\n// +kubebuilder:validation:Optional\nIngress *HarborExposeIngressSpec `json:\"ingress,omitempty\"`\n-\n- // TODO Add supports to ClusterIP, LoadBalancer and NodePort by deploying the nginx component\n}\ntype HarborExposeIngressSpec struct {\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1beta1/harbor_types.go",
"new_path": "apis/goharbor.io/v1beta1/harbor_types.go",
"diff": "@@ -673,6 +673,9 @@ type HarborExposeSpec struct {\n// +kubebuilder:validation:Optional\n// The ingress of the notary, required when notary component enabled.\nNotary *HarborExposeComponentSpec `json:\"notary,omitempty\"`\n+\n+ // +kubebuilder:validation:Optional\n+ Portal *HarborExposeComponentSpec `json:\"portal,omitempty\"`\n}\ntype HarborExposeComponentSpec struct {\n@@ -682,7 +685,13 @@ type HarborExposeComponentSpec struct {\n// +kubebuilder:validation:Optional\nIngress *HarborExposeIngressSpec `json:\"ingress,omitempty\"`\n- // TODO Add supports to ClusterIP, LoadBalancer and NodePort by deploying the nginx component\n+ // +kubebuilder:validation:Optional\n+ LoadBalancer *HarborExposeLBSpec `json:\"loadbalancer,omitempty\"`\n+}\n+\n+type HarborExposeLBSpec struct {\n+ // +kubebuilder:validation:Optional\n+ Enable bool `json:\"enable,omitempty\"`\n}\ntype HarborExposeIngressSpec struct {\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1beta1/harborcluster_webhook.go",
"new_path": "apis/goharbor.io/v1beta1/harborcluster_webhook.go",
"diff": "@@ -113,6 +113,10 @@ func (harborcluster *HarborCluster) validate(old *HarborCluster) error {\nallErrs = append(allErrs, err)\n}\n+ if err := harborcluster.validateExpose(); err != nil {\n+ allErrs = append(allErrs, err)\n+ }\n+\nif old == nil { // create harbor resource\nif err := version.Validate(harborcluster.Spec.Version); err != nil {\nallErrs = append(allErrs, field.Invalid(field.NewPath(\"spec\").Child(\"version\"), harborcluster.Spec.Version, err.Error()))\n@@ -208,6 +212,31 @@ func (harborcluster *HarborCluster) validateCache() *field.Error {\nreturn nil\n}\n+func (harborcluster *HarborCluster) validateExpose() *field.Error {\n+ core := field.NewPath(\"spec\").Child(\"expose\").Child(\"core\")\n+\n+ if harborcluster.Spec.Expose.Core.LoadBalancer != nil &&\n+ harborcluster.Spec.Expose.Core.Ingress != nil {\n+ lb := core.Child(\"loadbalancer\")\n+ ingress := core.Child(\"ingress\")\n+\n+ return forbidden(ingress, lb)\n+ }\n+\n+ notary := field.NewPath(\"spec\").Child(\"expose\").Child(\"notary\")\n+\n+ if harborcluster.Spec.Expose.Notary != nil &&\n+ harborcluster.Spec.Expose.Notary.LoadBalancer != nil &&\n+ harborcluster.Spec.Expose.Notary.Ingress != nil {\n+ lb := notary.Child(\"loadbalancer\")\n+ ingress := notary.Child(\"ingress\")\n+\n+ return forbidden(ingress, lb)\n+ }\n+\n+ return nil\n+}\n+\nfunc required(mainPath *field.Path) *field.Error {\nreturn field.Required(mainPath, fmt.Sprintf(\"%s should be configured\", mainPath.String()))\n}\n@@ -215,3 +244,7 @@ func required(mainPath *field.Path) *field.Error {\nfunc invalid(mainPath *field.Path, value interface{}, details string) *field.Error {\nreturn field.Invalid(mainPath, value, details)\n}\n+\n+func forbidden(mainPath fmt.Stringer, conflictPath *field.Path) *field.Error {\n+ return field.Forbidden(conflictPath, fmt.Sprintf(\"conflicts: %s should not be configured as %s has been configured already\", conflictPath.String(), mainPath.String()))\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1beta1/zz_generated.deepcopy.go",
"new_path": "apis/goharbor.io/v1beta1/zz_generated.deepcopy.go",
"diff": "@@ -1726,6 +1726,11 @@ func (in *HarborExposeComponentSpec) DeepCopyInto(out *HarborExposeComponentSpec\n*out = new(HarborExposeIngressSpec)\n(*in).DeepCopyInto(*out)\n}\n+ if in.LoadBalancer != nil {\n+ in, out := &in.LoadBalancer, &out.LoadBalancer\n+ *out = new(HarborExposeLBSpec)\n+ **out = **in\n+ }\n}\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborExposeComponentSpec.\n@@ -1760,6 +1765,21 @@ func (in *HarborExposeIngressSpec) DeepCopy() *HarborExposeIngressSpec {\nreturn out\n}\n+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n+func (in *HarborExposeLBSpec) DeepCopyInto(out *HarborExposeLBSpec) {\n+ *out = *in\n+}\n+\n+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborExposeLBSpec.\n+func (in *HarborExposeLBSpec) DeepCopy() *HarborExposeLBSpec {\n+ if in == nil {\n+ return nil\n+ }\n+ out := new(HarborExposeLBSpec)\n+ in.DeepCopyInto(out)\n+ return out\n+}\n+\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *HarborExposeSpec) DeepCopyInto(out *HarborExposeSpec) {\n*out = *in\n@@ -1769,6 +1789,11 @@ func (in *HarborExposeSpec) DeepCopyInto(out *HarborExposeSpec) {\n*out = new(HarborExposeComponentSpec)\n(*in).DeepCopyInto(*out)\n}\n+ if in.Portal != nil {\n+ in, out := &in.Portal, &out.Portal\n+ *out = new(HarborExposeComponentSpec)\n+ (*in).DeepCopyInto(*out)\n+ }\n}\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborExposeSpec.\n"
},
{
"change_type": "MODIFY",
"old_path": "charts/harbor-operator/templates/crds.yaml",
"new_path": "charts/harbor-operator/templates/crds.yaml",
"diff": "@@ -6820,6 +6820,11 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -6850,6 +6855,45 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\n+ tls:\n+ properties:\n+ certificateRef:\n+ pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n+ type: string\n+ type: object\n+ type: object\n+ portal:\n+ properties:\n+ ingress:\n+ properties:\n+ annotations:\n+ additionalProperties:\n+ type: string\n+ type: object\n+ controller:\n+ default: default\n+ description: Set to the type of ingress controller.\n+ enum:\n+ - default\n+ - gce\n+ - ncp\n+ - contour\n+ type: string\n+ host:\n+ type: string\n+ required:\n+ - host\n+ type: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -7610,6 +7654,11 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10465,6 +10514,11 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10495,6 +10549,45 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\n+ tls:\n+ properties:\n+ certificateRef:\n+ pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n+ type: string\n+ type: object\n+ type: object\n+ portal:\n+ properties:\n+ ingress:\n+ properties:\n+ annotations:\n+ additionalProperties:\n+ type: string\n+ type: object\n+ controller:\n+ default: default\n+ description: Set to the type of ingress controller.\n+ enum:\n+ - default\n+ - gce\n+ - ncp\n+ - contour\n+ type: string\n+ host:\n+ type: string\n+ required:\n+ - host\n+ type: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "controllers/goharbor/harbor/loadblance.go",
"diff": "+package harbor\n+\n+import (\n+ \"context\"\n+ \"fmt\"\n+\n+ goharborv1beta1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1\"\n+ harbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n+ \"github.com/goharbor/harbor-operator/controllers\"\n+ \"github.com/goharbor/harbor-operator/pkg/graph\"\n+ \"github.com/pkg/errors\"\n+ corev1 \"k8s.io/api/core/v1\"\n+ metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n+ \"k8s.io/apimachinery/pkg/util/intstr\"\n+)\n+\n+type CoreLB graph.Resource\n+\n+func (r *Reconciler) AddCoreLB(ctx context.Context, harbor *goharborv1beta1.Harbor, core Core, portal Portal) (CoreLB, error) {\n+ lbRes, err := r.Controller.AddServiceToManage(ctx, r.GetCoreLB(ctx, harbor), core, portal)\n+\n+ return CoreLB(lbRes), errors.Wrap(err, \"cannot add core lb service\")\n+}\n+\n+func (r *Reconciler) GetCoreLB(ctx context.Context, harbor *goharborv1beta1.Harbor) *corev1.Service {\n+ if harbor.Spec.Expose.Core.LoadBalancer == nil {\n+ return nil\n+ }\n+\n+ if !harbor.Spec.Expose.Core.LoadBalancer.Enable {\n+ return nil\n+ }\n+\n+ core := r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String())\n+\n+ name := fmt.Sprintf(\"%s-lb\", core)\n+ namespace := harbor.GetNamespace()\n+\n+ return &corev1.Service{\n+ ObjectMeta: metav1.ObjectMeta{\n+ Name: name,\n+ Namespace: namespace,\n+ },\n+ Spec: corev1.ServiceSpec{\n+ Ports: []corev1.ServicePort{{\n+ Name: harbormetav1.CoreHTTPPortName,\n+ Port: harbormetav1.HTTPPort,\n+ TargetPort: intstr.FromString(harbormetav1.CoreHTTPPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ }, {\n+ Name: harbormetav1.CoreHTTPSPortName,\n+ Port: harbormetav1.HTTPSPort,\n+ TargetPort: intstr.FromString(harbormetav1.CoreHTTPSPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ }},\n+ Selector: map[string]string{\n+ r.Label(\"name\"): core,\n+ r.Label(\"namespace\"): namespace,\n+ },\n+ Type: corev1.ServiceTypeLoadBalancer,\n+ },\n+ }\n+}\n+\n+type NotaryServerLB graph.Resource\n+\n+func (r *Reconciler) AddNotaryServerLB(ctx context.Context, harbor *goharborv1beta1.Harbor, server NotaryServer) (NotaryServerLB, error) {\n+ lbRes, err := r.Controller.AddServiceToManage(ctx, r.GetNotaryServerLB(ctx, harbor), server)\n+\n+ return NotaryServerLB(lbRes), errors.Wrap(err, \"cannot add notary server lb service\")\n+}\n+\n+func (r *Reconciler) GetNotaryServerLB(ctx context.Context, harbor *goharborv1beta1.Harbor) *corev1.Service {\n+ if harbor.Spec.Expose.Notary == nil || harbor.Spec.Expose.Notary.LoadBalancer == nil {\n+ return nil\n+ }\n+\n+ if !harbor.Spec.Expose.Notary.LoadBalancer.Enable {\n+ return nil\n+ }\n+\n+ server := r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String())\n+ tls := harbor.Spec.InternalTLS.GetComponentTLSSpec(r.GetInternalTLSCertificateSecretName(ctx, harbor, harbormetav1.NotaryServerTLS))\n+\n+ name := fmt.Sprintf(\"%s-lb\", server)\n+ namespace := harbor.GetNamespace()\n+\n+ return &corev1.Service{\n+ ObjectMeta: metav1.ObjectMeta{\n+ Name: name,\n+ Namespace: namespace,\n+ },\n+ Spec: corev1.ServiceSpec{\n+ Ports: []corev1.ServicePort{{\n+ Name: harbormetav1.NotaryServerAPIPortName,\n+ Port: tls.GetInternalPort(),\n+ TargetPort: intstr.FromString(harbormetav1.NotaryServerAPIPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ }},\n+ Selector: map[string]string{\n+ r.Label(\"name\"): name,\n+ r.Label(\"namespace\"): namespace,\n+ },\n+ Type: corev1.ServiceTypeLoadBalancer,\n+ },\n+ }\n+}\n+\n+type NotarySignerLB graph.Resource\n+\n+func (r *Reconciler) AddNotarySignerLB(ctx context.Context, harbor *goharborv1beta1.Harbor, signer NotarySigner) (NotarySignerLB, error) {\n+ lbRes, err := r.Controller.AddServiceToManage(ctx, r.GetNotarySignerLB(ctx, harbor), signer)\n+\n+ return NotarySignerLB(lbRes), errors.Wrap(err, \"cannot add notary signer lb service\")\n+}\n+\n+func (r *Reconciler) GetNotarySignerLB(ctx context.Context, harbor *goharborv1beta1.Harbor) *corev1.Service {\n+ if harbor.Spec.Expose.Notary == nil || harbor.Spec.Expose.Notary.LoadBalancer == nil {\n+ return nil\n+ }\n+\n+ if !harbor.Spec.Expose.Notary.LoadBalancer.Enable {\n+ return nil\n+ }\n+\n+ server := r.NormalizeName(ctx, harbor.GetName(), controllers.NotarySigner.String())\n+ name := fmt.Sprintf(\"%s-lb\", server)\n+ namespace := harbor.GetNamespace()\n+\n+ return &corev1.Service{\n+ ObjectMeta: metav1.ObjectMeta{\n+ Name: name,\n+ Namespace: namespace,\n+ },\n+ Spec: corev1.ServiceSpec{\n+ Ports: []corev1.ServicePort{{\n+ Name: harbormetav1.NotarySignerAPIPortName,\n+ Port: goharborv1beta1.NotarySignerAPIPort,\n+ TargetPort: intstr.FromString(harbormetav1.NotarySignerAPIPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ }},\n+ Selector: map[string]string{\n+ r.Label(\"name\"): name,\n+ r.Label(\"namespace\"): namespace,\n+ },\n+ Type: corev1.ServiceTypeLoadBalancer,\n+ },\n+ }\n+}\n+\n+type PortalLB graph.Resource\n+\n+func (r *Reconciler) AddPortalLB(ctx context.Context, harbor *goharborv1beta1.Harbor, portal Portal) (NotarySignerLB, error) {\n+ lbRes, err := r.Controller.AddServiceToManage(ctx, r.GetPortalLB(ctx, harbor), portal)\n+\n+ return PortalLB(lbRes), errors.Wrap(err, \"cannot add portal lb service\")\n+}\n+\n+func (r *Reconciler) GetPortalLB(ctx context.Context, harbor *goharborv1beta1.Harbor) *corev1.Service {\n+ if harbor.Spec.Expose.Portal == nil || harbor.Spec.Expose.Portal.LoadBalancer == nil {\n+ return nil\n+ }\n+\n+ if !harbor.Spec.Expose.Portal.LoadBalancer.Enable {\n+ return nil\n+ }\n+\n+ server := r.NormalizeName(ctx, harbor.GetName(), controllers.Portal.String())\n+ name := fmt.Sprintf(\"%s-lb\", server)\n+ namespace := harbor.GetNamespace()\n+\n+ return &corev1.Service{\n+ ObjectMeta: metav1.ObjectMeta{\n+ Name: name,\n+ Namespace: namespace,\n+ },\n+ Spec: corev1.ServiceSpec{\n+ Ports: []corev1.ServicePort{{\n+ Name: harbormetav1.PortalHTTPPortName,\n+ Port: harbormetav1.HTTPPort,\n+ TargetPort: intstr.FromString(harbormetav1.PortalHTTPPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ }, {\n+ Name: harbormetav1.PortalHTTPSPortName,\n+ Port: harbormetav1.HTTPSPort,\n+ TargetPort: intstr.FromString(harbormetav1.PortalHTTPSPortName),\n+ Protocol: corev1.ProtocolTCP,\n+ }},\n+ Selector: map[string]string{\n+ r.Label(\"name\"): name,\n+ r.Label(\"namespace\"): namespace,\n+ },\n+ Type: corev1.ServiceTypeLoadBalancer,\n+ },\n+ }\n+}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/resources.go",
"new_path": "controllers/goharbor/harbor/resources.go",
"diff": "@@ -120,6 +120,16 @@ func (r *Reconciler) AddResources(ctx context.Context, resource resources.Resour\nreturn errors.Wrapf(err, \"add %s ingress\", controllers.Core)\n}\n+ _, err = r.AddCoreLB(ctx, harbor, core, portal)\n+ if err != nil {\n+ return errors.Wrapf(err, \"cannot add %s lb service\", controllers.Core)\n+ }\n+\n+ _, err = r.AddPortalLB(ctx, harbor, portal)\n+ if err != nil {\n+ return errors.Wrapf(err, \"cannot add %s lb service\", controllers.Portal)\n+ }\n+\n_, err = r.AddNotaryIngress(ctx, harbor, notaryServer)\nif err != nil {\nreturn errors.Wrapf(err, \"add %s ingress\", controllers.NotaryServer)\n@@ -130,5 +140,10 @@ func (r *Reconciler) AddResources(ctx context.Context, resource resources.Resour\nreturn errors.Wrapf(err, \"add network policies\")\n}\n+ _, err = r.AddNotaryServerLB(ctx, harbor, notaryServer)\n+ if err != nil {\n+ return errors.Wrapf(err, \"cannot add %s lb service\", controllers.NotaryServer)\n+ }\n+\nreturn nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -6839,6 +6839,11 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -6869,6 +6874,45 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\n+ tls:\n+ properties:\n+ certificateRef:\n+ pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n+ type: string\n+ type: object\n+ type: object\n+ portal:\n+ properties:\n+ ingress:\n+ properties:\n+ annotations:\n+ additionalProperties:\n+ type: string\n+ type: object\n+ controller:\n+ default: default\n+ description: Set to the type of ingress controller.\n+ enum:\n+ - default\n+ - gce\n+ - ncp\n+ - contour\n+ type: string\n+ host:\n+ type: string\n+ required:\n+ - host\n+ type: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -7629,6 +7673,11 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10489,6 +10538,11 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10519,6 +10573,45 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\n+ tls:\n+ properties:\n+ certificateRef:\n+ pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n+ type: string\n+ type: object\n+ type: object\n+ portal:\n+ properties:\n+ ingress:\n+ properties:\n+ annotations:\n+ additionalProperties:\n+ type: string\n+ type: object\n+ controller:\n+ default: default\n+ description: Set to the type of ingress controller.\n+ enum:\n+ - default\n+ - gce\n+ - ncp\n+ - contour\n+ type: string\n+ host:\n+ type: string\n+ required:\n+ - host\n+ type: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -6839,6 +6839,11 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -6869,6 +6874,45 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\n+ tls:\n+ properties:\n+ certificateRef:\n+ pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n+ type: string\n+ type: object\n+ type: object\n+ portal:\n+ properties:\n+ ingress:\n+ properties:\n+ annotations:\n+ additionalProperties:\n+ type: string\n+ type: object\n+ controller:\n+ default: default\n+ description: Set to the type of ingress controller.\n+ enum:\n+ - default\n+ - gce\n+ - ncp\n+ - contour\n+ type: string\n+ host:\n+ type: string\n+ required:\n+ - host\n+ type: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -7629,6 +7673,11 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10489,6 +10538,11 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10519,6 +10573,45 @@ spec:\nrequired:\n- host\ntype: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\n+ tls:\n+ properties:\n+ certificateRef:\n+ pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n+ type: string\n+ type: object\n+ type: object\n+ portal:\n+ properties:\n+ ingress:\n+ properties:\n+ annotations:\n+ additionalProperties:\n+ type: string\n+ type: object\n+ controller:\n+ default: default\n+ description: Set to the type of ingress controller.\n+ enum:\n+ - default\n+ - gce\n+ - ncp\n+ - contour\n+ type: string\n+ host:\n+ type: string\n+ required:\n+ - host\n+ type: object\n+ loadbalancer:\n+ properties:\n+ enable:\n+ type: boolean\n+ type: object\ntls:\nproperties:\ncertificateRef:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(lb) support to expost service loadbalance (#696)
support to expost service loadbalance
fixed #178
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,875
|
22.07.2021 10:46:50
| -28,800
|
d3d7cacab1a193f14470c69d5cd61c169bb116ce
|
fix k8s version
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -137,8 +137,8 @@ jobs:\n# https://snapcraft.io/microk8s\nk8sVersion:\n- \"1.19.11\"\n- - \"1.20.2\"\n- - \"1.21.1\"\n+ - \"1.20.7\"\n+ - \"1.21.2\"\ningress:\n- \"0.46.0\"\n@@ -546,7 +546,7 @@ jobs:\n# https://snapcraft.io/microk8s\nk8sVersion:\n- - \"1.21.1\"\n+ - \"1.21.2\"\ningress:\n- \"0.46.0\"\n"
},
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -77,9 +77,9 @@ NOTES:\nHarbor operator supports two extra Kubernetes versions besides the current latest version (`n-2` pattern):\n-| Versions | 1.18 | 1.19 | 1.20 | 1.21 |\n-|---------------|--------------------|--------------------|--------------------|---------------------------|\n-| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: |\n+| Versions | 1.19 | 1.20 | 1.21 |\n+|---------------|--------------------|--------------------|---------------------------|\n+| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: |\n### Cert manager versions\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix k8s version (#709)
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,893
|
22.07.2021 14:36:26
| -28,800
|
6208eb3ce874e8a80e33760f2b5e6559880bbbee
|
sys(stale): add stale configurations
add stale configurations
|
[
{
"change_type": "ADD",
"old_path": null,
"new_path": ".github/stale.yml",
"diff": "+# Number of days of inactivity before an issue becomes stale\n+daysUntilStale: 60\n+# Number of days of inactivity before a stale issue is closed\n+daysUntilClose: 7\n+# Issues with these labels will never be considered stale\n+exemptLabels:\n+ - kind/requirement\n+ - kind/enhancement\n+# Label to use when marking an issue as stale\n+staleLabel: stale\n+# Comment to post when marking an issue as stale. Set to `false` to disable\n+markComment: >\n+ This issue has been automatically marked as stale because it has not had\n+ recent activity. It will be closed if no further activity occurs. Thank you\n+ for your contributions.\n+# Comment to post when closing a stale issue. Set to `false` to disable\n+closeComment: false\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
sys(stale): add stale configurations
add stale configurations
|
254,890
|
22.07.2021 08:06:34
| 0
|
cc9952eba17e37d5d7a756898fc5c06a54d6817c
|
fix: add missing component spec copy for exporter
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"new_path": "apis/goharbor.io/v1alpha3/harbor_types.go",
"diff": "@@ -49,7 +49,6 @@ func (h *Harbor) GetComponentSpec(ctx context.Context, component harbormetav1.Co\n}\nfunc (h *Harbor) deepCopyComponentSpecInto(_ context.Context, component harbormetav1.Component, spec *harbormetav1.ComponentSpec) {\n- // nolint:exhaustive\nswitch component {\ncase harbormetav1.ChartMuseumComponent:\nif h.Spec.ChartMuseum != nil {\n@@ -57,6 +56,8 @@ func (h *Harbor) deepCopyComponentSpecInto(_ context.Context, component harborme\n}\ncase harbormetav1.CoreComponent:\nh.Spec.Core.ComponentSpec.DeepCopyInto(spec)\n+ case harbormetav1.ExporterComponent:\n+ h.Spec.Exporter.ComponentSpec.DeepCopyInto(spec)\ncase harbormetav1.JobServiceComponent:\nh.Spec.JobService.ComponentSpec.DeepCopyInto(spec)\ncase harbormetav1.NotaryServerComponent:\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1beta1/harbor_types.go",
"new_path": "apis/goharbor.io/v1beta1/harbor_types.go",
"diff": "@@ -50,7 +50,6 @@ func (h *Harbor) GetComponentSpec(ctx context.Context, component harbormetav1.Co\n}\nfunc (h *Harbor) deepCopyComponentSpecInto(_ context.Context, component harbormetav1.Component, spec *harbormetav1.ComponentSpec) {\n- // nolint:exhaustive\nswitch component {\ncase harbormetav1.ChartMuseumComponent:\nif h.Spec.ChartMuseum != nil {\n@@ -58,6 +57,8 @@ func (h *Harbor) deepCopyComponentSpecInto(_ context.Context, component harborme\n}\ncase harbormetav1.CoreComponent:\nh.Spec.Core.ComponentSpec.DeepCopyInto(spec)\n+ case harbormetav1.ExporterComponent:\n+ h.Spec.Exporter.ComponentSpec.DeepCopyInto(spec)\ncase harbormetav1.JobServiceComponent:\nh.Spec.JobService.ComponentSpec.DeepCopyInto(spec)\ncase harbormetav1.NotaryServerComponent:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: add missing component spec copy for exporter
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,890
|
27.07.2021 10:55:35
| -28,800
|
af83486e8e369a97a0c3c105f77e7c4176413e60
|
fix: let jobservice of exporter be optional
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1beta1/exporter_types.go",
"new_path": "apis/goharbor.io/v1beta1/exporter_types.go",
"diff": "@@ -56,8 +56,8 @@ type ExporterSpec struct {\n// +kubebuilder:validation:Required\nDatabase ExporterDatabaseSpec `json:\"database\"`\n- // +kubebuilder:validation:Required\n- JobService ExporterJobServiceSpec `json:\"jobservice\"`\n+ // +kubebuilder:validation:Optional\n+ JobService *ExporterJobServiceSpec `json:\"jobservice,omitempty\"`\n// +kubebuilder:validation:Optional\n// +kubebuilder:default=8001\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1beta1/zz_generated.deepcopy.go",
"new_path": "apis/goharbor.io/v1beta1/zz_generated.deepcopy.go",
"diff": "@@ -1166,7 +1166,11 @@ func (in *ExporterSpec) DeepCopyInto(out *ExporterSpec) {\nin.Cache.DeepCopyInto(&out.Cache)\nout.Core = in.Core\nin.Database.DeepCopyInto(&out.Database)\n- in.JobService.DeepCopyInto(&out.JobService)\n+ if in.JobService != nil {\n+ in, out := &in.JobService, &out.JobService\n+ *out = new(ExporterJobServiceSpec)\n+ (*in).DeepCopyInto(*out)\n+ }\n}\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExporterSpec.\n"
},
{
"change_type": "MODIFY",
"old_path": "charts/harbor-operator/templates/crds.yaml",
"new_path": "charts/harbor-operator/templates/crds.yaml",
"diff": "@@ -4246,7 +4246,6 @@ spec:\nrequired:\n- core\n- database\n- - jobservice\ntype: object\nstatus:\ndescription: ComponentStatus represents the current status of the resource. https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/exporter/deployments.go",
"new_path": "controllers/goharbor/exporter/deployments.go",
"diff": "@@ -113,7 +113,6 @@ func (r *Reconciler) GetDeployment(ctx context.Context, exporter *goharborv1.Exp\n})\n}\n- if exporter.Spec.JobService.Redis != nil {\nredisURL, err := r.getJobServiceRedisURL(ctx, exporter)\nif err != nil {\nreturn nil, errors.Wrap(err, \"get redis url of jobservice\")\n@@ -134,7 +133,6 @@ func (r *Reconciler) GetDeployment(ctx context.Context, exporter *goharborv1.Exp\n{Name: \"HARBOR_REDIS_NAMESPACE\", Value: redisNamespace},\n{Name: \"HARBOR_REDIS_TIMEOUT\", Value: fmt.Sprintf(\"%d\", redisTimeout)},\n}...)\n- }\nvolumes := []corev1.Volume{}\n@@ -249,16 +247,26 @@ func (r *Reconciler) GetDeployment(ctx context.Context, exporter *goharborv1.Exp\n}\nfunc (r *Reconciler) getJobServiceRedisURL(ctx context.Context, exporter *goharborv1.Exporter) (string, error) {\n- if exporter.Spec.JobService.Redis == nil {\n- return \"\", nil\n+ if exporter.Spec.JobService == nil {\n+ // compatible with the exporter converted from v1alpha3 and the upgrade to harbor v2.3.x\n+ key := client.ObjectKey{\n+ Namespace: exporter.Namespace,\n+ Name: strings.TrimSuffix(exporter.Name, \"-harbor\"),\n}\n- var redisPassword string\n+ var harbor goharborv1.Harbor\n+ if err := r.Client.Get(ctx, key, &harbor); err != nil {\n+ return \"\", err\n+ }\n- if exporter.Spec.JobService.Redis.PasswordRef != \"\" {\n- var err error\n+ exporter.Spec.JobService = &goharborv1.ExporterJobServiceSpec{\n+ Redis: &goharborv1.JobServicePoolRedisSpec{\n+ RedisConnection: harbor.Spec.RedisConnection(harbormetav1.JobServiceRedis),\n+ },\n+ }\n+ }\n- redisPassword, err = r.getValueFromSecret(ctx, exporter.GetNamespace(), exporter.Spec.JobService.Redis.PasswordRef, jobserivceRedisPasswordKey)\n+ redisPassword, err := r.getValueFromSecret(ctx, exporter.GetNamespace(), exporter.Spec.JobService.Redis.PasswordRef, jobserivceRedisPasswordKey)\nif err != nil {\nreturn \"\", errors.Wrap(err, \"get redis password of jobservice\")\n}\n@@ -266,7 +274,6 @@ func (r *Reconciler) getJobServiceRedisURL(ctx context.Context, exporter *goharb\nif redisPassword == \"\" {\nlogger.Get(ctx).Info(\"redis password secret of jobservice not found\", \"secret\", exporter.Spec.JobService.Redis.PasswordRef)\n}\n- }\nreturn exporter.Spec.JobService.Redis.GetDSNStringWithRawPassword(redisPassword), nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/exporter_test.go",
"new_path": "controllers/goharbor/exporter_test.go",
"diff": "@@ -49,7 +49,7 @@ func setupValidExporter(ctx context.Context, ns string) (Resource, client.Object\nPostgresConnectionWithParameters: core.Spec.Database.PostgresConnectionWithParameters,\nEncryptionKeyRef: core.Spec.Database.EncryptionKeyRef,\n},\n- JobService: goharborv1.ExporterJobServiceSpec{\n+ JobService: &goharborv1.ExporterJobServiceSpec{\nRedis: &goharborv1.JobServicePoolRedisSpec{\nRedisConnection: redis,\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/exporter.go",
"new_path": "controllers/goharbor/harbor/exporter.go",
"diff": "@@ -98,7 +98,7 @@ func (r *Reconciler) GetExporter(ctx context.Context, harbor *goharborv1.Harbor)\nPostgresConnectionWithParameters: *postgresConn,\nEncryptionKeyRef: encryptionKeyRef,\n},\n- JobService: goharborv1.ExporterJobServiceSpec{\n+ JobService: &goharborv1.ExporterJobServiceSpec{\nRedis: &goharborv1.JobServicePoolRedisSpec{\nRedisConnection: harbor.Spec.RedisConnection(harbormetav1.JobServiceRedis),\n},\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -4262,7 +4262,6 @@ spec:\nrequired:\n- core\n- database\n- - jobservice\ntype: object\nstatus:\ndescription: ComponentStatus represents the current status of the resource. https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -4262,7 +4262,6 @@ spec:\nrequired:\n- core\n- database\n- - jobservice\ntype: object\nstatus:\ndescription: ComponentStatus represents the current status of the resource. https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: let jobservice of exporter be optional (#722)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,875
|
28.07.2021 23:42:47
| -28,800
|
9084bb84d02aa9a731613002480215f240770f26
|
add v1beta1 sample
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -144,8 +144,8 @@ jobs:\n- \"0.46.0\"\nsamples:\n- - \"full_stack.yaml\"\n- - \"standard_stack_fs.yaml\"\n+ - \"full_stack_v1beta1.yaml\"\n+ - \"standard_stack_fs_v1beta1.yaml\"\nsteps:\n- uses: actions/checkout@v2\n@@ -345,7 +345,7 @@ jobs:\n- \"1.20.7\"\nsamples:\n- - \"full_stack.yaml\"\n+ - \"full_stack_v1beta1.yaml\"\nsteps:\n- uses: actions/checkout@v2\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "manifests/samples/minimal_stack_fs_v1beta1.yaml",
"diff": "+# Sample namespace\n+apiVersion: v1\n+kind: Namespace\n+metadata:\n+ name: cluster-sample-ns\n+---\n+# A secret of harbor admin password.\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: admin-core-secret\n+ namespace: cluster-sample-ns\n+data:\n+ secret: SGFyYm9yMTIzNDU=\n+type: Opaque\n+---\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: harbor-test-ca\n+ namespace: cluster-sample-ns\n+data:\n+ tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZpekNDQTNPZ0F3SUJBZ0lVU2Fva1FldWczaGJHQVF3U1BqaklsMmV1akl3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlZCQWdNQTFCRl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GVpRDFXQzRFK3E5aHNKZHBSamFwTGJqOGlTdFVyZVNmL2xIcFQrb1dYdUt3CnJnS2d6bm8vVjNxeEdKaFBWaFJJUW1Kb3U2M01LY1hxWXVwSlkxRTdjMmVhbU84SkpPZlpNTFFrWlN1MWlxSmIKZ3JITCt6YVAvTjRqVmkrWTJqbG81OEloYzBLNzVtak9rYjVBZ2ExOFhySnBlYlRHbFdnWFlxY05xUmZzbWhVago3VmMxQk9vVGwwb3pPU21JRmpyQUp3R0pNZjFuQzBuODI5Mks2WERyN0tDbDJXazN2OC9oVzNpRzJ6cW55aFBHCkl3czY0L0NLYU03OTdIc0R1ZXlBTU5vUVJXUHk5d2I3YXZqZlI2TDNGOWczS2l6c1pVbjFtUWcwc0JsQVRTU2QKVEN6SGxtdjZqQVFqY0RxVzdxQ3I0SHRFTXJBNjJGWT0KLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo=\n+---\n+# Cert issuer\n+apiVersion: cert-manager.io/v1\n+kind: Issuer\n+metadata:\n+ name: selfsigned-issuer\n+ namespace: cluster-sample-ns\n+spec:\n+ ca:\n+ secretName: harbor-test-ca\n+---\n+# Certificates of ingress\n+apiVersion: cert-manager.io/v1\n+kind: Certificate\n+metadata:\n+ name: sample-public-certificate\n+ namespace: cluster-sample-ns\n+spec:\n+ secretName: sample-public-certificate\n+ dnsNames:\n+ - core.harbor.domain\n+ - notary.harbor.domain\n+ issuerRef:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+---\n+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-registry\n+ namespace: cluster-sample-ns\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 2Gi\n+---\n+# Full stack Harbor\n+apiVersion: goharbor.io/v1beta1\n+kind: HarborCluster\n+metadata:\n+ name: harborcluster-sample\n+ namespace: cluster-sample-ns\n+spec:\n+ version: 2.3.0\n+ logLevel: info\n+ imageSource:\n+ repository: ghcr.io/goharbor\n+ harborAdminPasswordRef: admin-core-secret\n+ externalURL: https://core.harbor.domain\n+ expose:\n+ core:\n+ ingress:\n+ host: core.harbor.domain\n+ controller: default\n+ tls:\n+ certificateRef: sample-public-certificate\n+ internalTLS:\n+ enabled: true\n+ portal: {}\n+ registry:\n+ metrics:\n+ enabled: true\n+ core:\n+ tokenIssuer:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+ metrics:\n+ enabled: true\n+ exporter: {}\n+ database:\n+ kind: Zlando/PostgreSQL\n+ spec:\n+ zlandoPostgreSql:\n+ operatorVersion: \"1.5.0\"\n+ storage: 1Gi\n+ replicas: 1\n+ resources:\n+ limits:\n+ cpu: 500m\n+ memory: 500Mi\n+ requests:\n+ cpu: 100m\n+ memory: 250Mi\n+ storage:\n+ kind: FileSystem\n+ spec:\n+ fileSystem:\n+ chartPersistentVolume:\n+ claimName: sample-harbor-chart\n+ registryPersistentVolume:\n+ claimName: sample-harbor-registry\n+ cache:\n+ kind: RedisFailover\n+ spec:\n+ redisFailover:\n+ operatorVersion: \"1.0.0\"\n+ server:\n+ replicas: 1\n+ resources:\n+ limits:\n+ cpu: 500m\n+ memory: 500Mi\n+ requests:\n+ cpu: 100m\n+ memory: 250Mi\n+ sentinel:\n+ replicas: 1\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "manifests/samples/minimal_stack_incluster_v1beta1.yaml",
"diff": "+# Sample namespace\n+apiVersion: v1\n+kind: Namespace\n+metadata:\n+ name: cluster-sample-ns\n+---\n+# A secret of harbor admin password.\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: admin-core-secret\n+ namespace: cluster-sample-ns\n+data:\n+ secret: SGFyYm9yMTIzNDU=\n+type: Opaque\n+---\n+# A secret for minIO access.\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: minio-access-secret\n+ namespace: cluster-sample-ns\n+data:\n+ accesskey: YWRtaW4=\n+ secretkey: bWluaW8xMjM=\n+type: Opaque\n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SSzNSeVZ5a3QxeTJvandxOW5hSmpyUG1nM1ZBYXdUakZSbDN0CnQ2NHkyUlVqdHdlK3lqdUZLN3l5NkdwRnoySkFIVDYzblpZdHE5Y0F3NFJENjhJN0tGY3NZbGpLdHFwS1hoOEMKeGExQjRDVjhNclV3RnRPcnBxQ2xuTFBZWXNuZDhlM2xPM29oY1NEaTVJMUQ1Vmd5QkZVL05XcGdpMW1hNEt5WQowQUZ0QW9JQkFGZ1h0ZWM2VE1EVGVpRDFXQzRFK3E5aHNKZHBSamFwTGJqOGlTdFVyZVNmL2xIcFQrb1dYdUt3CnJnS2d6bm8vVjNxeEdKaFBWaFJJUW1Kb3U2M01LY1hxWXVwSlkxRTdjMmVhbU84SkpPZlpNTFFrWlN1MWlxSmIKZ3JITCt6YVAvTjRqVmkrWTJqbG81OEloYzBLNzVtak9rYjVBZ2ExOFhySnBlYlRHbFdnWFlxY05xUmZzbWhVago3VmMxQk9vVGwwb3pPU21JRmpyQUp3R0pNZjFuQzBuODI5Mks2WERyN0tDbDJXazN2OC9oVzNpRzJ6cW55aFBHCkl3czY0L0NLYU03OTdIc0R1ZXlBTU5vUVJXUHk5d2I3YXZqZlI2TDNGOWczS2l6c1pVbjFtUWcwc0JsQVRTU2QKVEN6SGxtdjZqQVFqY0RxVzdxQ3I0SHRFTXJBNjJGWT0KLS0tLS1FTkQgUFJJVkFURSBLRVktLS0tLQo=\n+---\n+# Cert issuer\n+apiVersion: cert-manager.io/v1\n+kind: Issuer\n+metadata:\n+ name: selfsigned-issuer\n+ namespace: cluster-sample-ns\n+spec:\n+ ca:\n+ secretName: harbor-test-ca\n+---\n+# Certificates of ingress\n+apiVersion: cert-manager.io/v1\n+kind: Certificate\n+metadata:\n+ name: sample-public-certificate\n+ namespace: cluster-sample-ns\n+spec:\n+ secretName: sample-public-certificate\n+ dnsNames:\n+ - core.harbor.domain\n+ - notary.harbor.domain\n+ - minio.harbor.domain\n+ issuerRef:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+---\n+# Full stack Harbor\n+apiVersion: goharbor.io/v1beta1\n+kind: HarborCluster\n+metadata:\n+ name: harborcluster-sample\n+ namespace: cluster-sample-ns\n+spec:\n+ version: 2.3.0\n+ logLevel: info\n+ imageSource:\n+ repository: ghcr.io/goharbor\n+ harborAdminPasswordRef: admin-core-secret\n+ externalURL: https://core.harbor.domain\n+ expose:\n+ core:\n+ ingress:\n+ host: core.harbor.domain\n+ controller: default\n+ tls:\n+ certificateRef: sample-public-certificate\n+ internalTLS:\n+ enabled: true\n+ portal: {}\n+ registry:\n+ metrics:\n+ enabled: true\n+ core:\n+ tokenIssuer:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+ metrics:\n+ enabled: true\n+ exporter: {}\n+ database:\n+ kind: Zlando/PostgreSQL\n+ spec:\n+ zlandoPostgreSql:\n+ operatorVersion: \"1.5.0\"\n+ storage: 1Gi\n+ replicas: 1\n+ resources:\n+ limits:\n+ cpu: 500m\n+ memory: 500Mi\n+ requests:\n+ cpu: 100m\n+ memory: 250Mi\n+ storage:\n+ kind: MinIO\n+ spec:\n+ minIO:\n+ operatorVersion: \"4.0.6\"\n+ replicas: 2\n+ secretRef: minio-access-secret\n+ redirect:\n+ enable: true\n+ expose:\n+ ingress:\n+ host: minio.harbor.domain\n+ tls:\n+ certificateRef: sample-public-certificate\n+ volumesPerServer: 2\n+ volumeClaimTemplate:\n+ spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ resources:\n+ requests:\n+ storage: 10Gi\n+ cache:\n+ kind: RedisFailover\n+ spec:\n+ redisFailover:\n+ operatorVersion: \"1.0.0\"\n+ server:\n+ replicas: 1\n+ resources:\n+ limits:\n+ cpu: 500m\n+ memory: 500Mi\n+ requests:\n+ cpu: 100m\n+ memory: 250Mi\n+ sentinel:\n+ replicas: 1\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "manifests/samples/standard_stack_fs_v1beta1.yaml",
"diff": "+# Sample namespace\n+apiVersion: v1\n+kind: Namespace\n+metadata:\n+ name: cluster-sample-ns\n+---\n+# A secret of harbor admin password.\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: admin-core-secret\n+ namespace: cluster-sample-ns\n+data:\n+ secret: SGFyYm9yMTIzNDU=\n+type: Opaque\n+---\n+# A secret for minIO access.\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: minio-access-secret\n+ namespace: cluster-sample-ns\n+data:\n+ accesskey: YWRtaW4=\n+ secretkey: bWluaW8xMjM=\n+type: Opaque\n+---\n+apiVersion: v1\n+kind: Secret\n+metadata:\n+ name: harbor-test-ca\n+ namespace: cluster-sample-ns\n+data:\n+ tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZpekNDQTNPZ0F3SUJBZ0lVU2Fva1FldWczaGJHQVF3U1BqaklsMmV1akl3d0RRWUpLb1pJaHZjTkFRRUwKQlFBd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlZCQWdNQTFCRlN6RVJNQThHQTFVRUJ3d0lRbVZwSUVwcApibWN4RVRBUEJnTlZCQW9NQ0dkdmFHRnlZbTl5TVJFd0R3WURWUVFEREFoSVlYSmliM0pEUVRBZ0Z3MHlNREE0Ck1USXhNRFV5TkROYUdBOHlNVEl3TURjeE9URXdOVEkwTTFvd1ZERUxNQWtHQTFVRUJoTUNRMDR4RERBS0JnTlYKQkFnTUExQkZTekVSTUE4R0ExVUVCd3dJUW1WcElFcHBibWN4RVRBUEJnTlZCQW9NQ0dkdmFHRnlZbTl5TVJFdwpEd1lEVlFRRERBaElZWEppYjNKRFFUQ0NBaUl3RFFZSktvWklodmNOQVFFQkJRQURnZ0lQQURDQ0Fnb0NnZ0lCCkFPWlJaWWtGbVZCTmFiRVU0Y0RhcWEyN2s1K091VUhnMW9vU2NDbmJiQkZ4TkIyMi83Q3pYSVdPV21GQ1ZQalgKTHdBVjEzdTZwUWtNTWFqRHFQQS83bGR6OGFqWW05VlREZzgvcUdib2E2YW9OTzRHTExkeW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metadata:\n+ name: selfsigned-issuer\n+ namespace: cluster-sample-ns\n+spec:\n+ ca:\n+ secretName: harbor-test-ca\n+---\n+# Certificates of ingress\n+apiVersion: cert-manager.io/v1\n+kind: Certificate\n+metadata:\n+ name: sample-public-certificate\n+ namespace: cluster-sample-ns\n+spec:\n+ secretName: sample-public-certificate\n+ dnsNames:\n+ - core.harbor.domain\n+ - notary.harbor.domain\n+ - minio.harbor.domain\n+ issuerRef:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+---\n+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-registry\n+ namespace: cluster-sample-ns\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 5Gi\n+---\n+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-trivy-reports\n+ namespace: cluster-sample-ns\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 5Gi\n+---\n+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-trivy-cache\n+ namespace: cluster-sample-ns\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 5Gi\n+---\n+apiVersion: v1\n+kind: PersistentVolumeClaim\n+metadata:\n+ name: sample-harbor-chart\n+ namespace: cluster-sample-ns\n+spec:\n+ accessModes:\n+ - ReadWriteOnce\n+ volumeMode: Filesystem\n+ resources:\n+ requests:\n+ storage: 5Gi\n+---\n+# Full stack Harbor\n+apiVersion: goharbor.io/v1beta1\n+kind: HarborCluster\n+metadata:\n+ name: harborcluster-sample\n+ namespace: cluster-sample-ns\n+spec:\n+ version: 2.3.0\n+ logLevel: info\n+ imageSource:\n+ repository: ghcr.io/goharbor\n+ harborAdminPasswordRef: admin-core-secret\n+ externalURL: https://core.harbor.domain\n+ expose:\n+ core:\n+ ingress:\n+ host: core.harbor.domain\n+ controller: default\n+ tls:\n+ certificateRef: sample-public-certificate\n+ notary:\n+ ingress:\n+ host: notary.harbor.domain\n+ controller: default\n+ tls:\n+ certificateRef: sample-public-certificate\n+ internalTLS:\n+ enabled: true\n+ portal: {}\n+ registry:\n+ metrics:\n+ enabled: true\n+ core:\n+ tokenIssuer:\n+ name: selfsigned-issuer\n+ kind: Issuer\n+ metrics:\n+ enabled: true\n+ chartmuseum: {}\n+ exporter: {}\n+ trivy:\n+ skipUpdate: false\n+ storage:\n+ cachePersistentVolume:\n+ claimName: sample-harbor-trivy-cache\n+ reportsPersistentVolume:\n+ claimName: sample-harbor-trivy-reports\n+ notary:\n+ migrationEnabled: true\n+ database:\n+ kind: Zlando/PostgreSQL\n+ spec:\n+ zlandoPostgreSql:\n+ operatorVersion: \"1.5.0\"\n+ storage: 1Gi\n+ replicas: 1\n+ resources:\n+ limits:\n+ cpu: 500m\n+ memory: 500Mi\n+ requests:\n+ cpu: 100m\n+ memory: 250Mi\n+ storage:\n+ kind: FileSystem\n+ spec:\n+ fileSystem:\n+ chartPersistentVolume:\n+ claimName: sample-harbor-chart\n+ registryPersistentVolume:\n+ claimName: sample-harbor-registry\n+ cache:\n+ kind: RedisFailover\n+ spec:\n+ redisFailover:\n+ operatorVersion: \"1.0.0\"\n+ server:\n+ replicas: 1\n+ resources:\n+ limits:\n+ cpu: 500m\n+ memory: 500Mi\n+ requests:\n+ cpu: 100m\n+ memory: 250Mi\n+ sentinel:\n+ replicas: 1\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
add v1beta1 sample
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,875
|
29.07.2021 17:30:23
| -28,800
|
5abfbdc7d3db49df153814a5b443b008a5ee6ed1
|
fix go version in CI charts
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/build-dev.yml",
"new_path": ".github/workflows/build-dev.yml",
"diff": "@@ -46,6 +46,9 @@ jobs:\ncharts:\nruns-on: ubuntu-latest\nsteps:\n+ - uses: actions/setup-go@v2\n+ with:\n+ go-version: 1.16\n- uses: actions/checkout@v2\n- name: Package charts\nrun: make helm-generate\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix go version in CI charts
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,879
|
05.08.2021 17:59:29
| -7,200
|
6195bc8a2582300139130fcaf9c54d81e6d85bd3
|
fix(Makefile): fix kubebuilder installation
|
[
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -558,9 +558,8 @@ kubebuilder:\n$(KUBEBUILDER):\n$(MAKE) $(BIN)\n# https://kubebuilder.io/quick-start.html#installation\n- curl -sSL \"https://go.kubebuilder.io/dl/$(KUBEBUIDER_VERSION)/$$(go env GOOS)/$$(go env GOARCH)\" \\\n- | tar -xz -C /tmp\n- mv /tmp/kubebuilder_$(KUBEBUIDER_VERSION)_$$(go env GOOS)_$$(go env GOARCH)/bin/kubebuilder $(KUBEBUILDER)\n+ curl -sSL \"https://go.kubebuilder.io/dl/$(KUBEBUIDER_VERSION)/$$(go env GOOS)/$$(go env GOARCH)\" --output $(KUBEBUILDER)\n+ chmod u+x $(KUBEBUILDER)\n# find or download kustomize\n# download kustomize if necessary\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(Makefile): fix kubebuilder installation
Signed-off-by: Thomas Coudert <thomas.coudert@ovhcloud.com>
|
254,893
|
11.08.2021 18:15:01
| -28,800
|
36567d3c835df562e3ddd63be8205188794dcc0e
|
doc(README):update README to reflect latest changes
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -29,8 +29,9 @@ Harbor deployment stack is controlled by a custom Harbor resource `HarborCluster\n* Add the optional Harbor components\n* Support upgrading the managed Harbor registry version\n* Deletes all the linked resources when deleting the Harbor cluster\n-* Configures Harbor system settings with ConfigMap in a declarative way\n-* Support services exposed with [ingress](https://kubernetes.io/fr/docs/concepts/services-networking/ingress/) ([`default`](https://git.k8s.io/ingress-nginx/README.md#readme), [`gce`](https://git.k8s.io/ingress-gce/README.md#readme) and `ncp`)\n+* Configures Harbor system settings with CRD-based configuration or labeled ConfigMap\n+* Support services exposed with [ingress](https://kubernetes.io/fr/docs/concepts/services-networking/ingress/) ([`default`](https://git.k8s.io/ingress-nginx/README.md#readme), [`gce`](https://git.k8s.io/ingress-gce/README.md#readme), `ncp` and `contour`)\n+* Support services exposed with LoadBalancer\n## Future features\n@@ -42,15 +43,13 @@ Harbor deployment stack is controlled by a custom Harbor resource `HarborCluster\n* [ ] [gcs](https://cloud.google.com/storage): A driver storing objects in a Google Cloud Storage bucket.\n* Supports updating the deployed Harbor cluster\n* Remove the optional Harbor components\n-* CRD based day2 configuration\n-* Support services exposed with LoadBalancer\n* More day2 operations (see [PoC project](https://github.com/szlabs/harbor-automation-4k8s))\n* Auto mapping Kubernetes namespaces and Harbor project\n* Pull secrets injections\n* Container image path rewriting\n* Transparent proxy cache settings\n-## Replease plans\n+## Release plans\n* [Release 1.1](https://github.com/goharbor/harbor-operator/projects/8)\n* [Release 1.2](https://github.com/goharbor/harbor-operator/projects/7)\n@@ -65,7 +64,7 @@ Versions of the underlying components are listed below:\n| Components | Harbor | MinIO operator | PostgreSQL operator | Redis operator |\n|---------------|-------------------|----------------|---------------------|----------------|\n-| Versions | 2.2.x `[1]` | 4.0.6 | 1.5.0 | 1.0.0 |\n+| Versions | 2.3.x `[1]` | 4.0.6+ | 1.5.0+ | 1.0.0 |\nNOTES:\n@@ -78,27 +77,29 @@ NOTES:\nHarbor operator supports two extra Kubernetes versions besides the current latest version (`n-2` pattern):\n| Versions | 1.19 | 1.20 | 1.21 |\n-|---------------|--------------------|--------------------|---------------------------|\n-| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_multiplication_x: |\n+|---------------|--------------------|--------------------|---------------------|\n+| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n### Cert manager versions\nHarbor operator relies on cert manager to manage kinds of certificates used by Harbor cluster components. Table shown below lists the compatibilities of cert manager versions:\n-| Versions | 1.1.1 | 1.2.0 | 1.3.1 | 1.4.0 |\n-|---------------|--------------------|--------------------|----------------------|----------------------|\n-| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n+| Versions | 1.2 | 1.3 | 1.4 |\n+|---------------|--------------------|----------------------|----------------------|\n+| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n### Ingress controller types\nHarbor operator exposes the frontend service with ingress (CRD version: `v1beta1`). Table shown below lists the ingress controller types supported.\n-| Ingress Controller | default | gce | ncp | contour |\n-|----------------------|---------------------|--------------------|--------------------|---------------------|\n-| Compatibility | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |\n-| Description | Default ingress controller like NGINX | Google Cloud Engine ingress controller | NSX-T Container plugin ingress controller | Ingress controller that works by deploying the Envoy proxy |\n+| Ingress Controller | Compatibility | Description |\n+|----------------------|---------------------|------------------------------------------------------------|\n+| default | :heavy_check_mark: | Default ingress controller like NGINX |\n+| gce | :heavy_check_mark: | Google Cloud Engine ingress controller |\n+| ncp | :heavy_check_mark: | NSX-T Container plugin ingress controller |\n+| contour | :heavy_check_mark: | Ingress controller that works by deploying the Envoy proxy |\n-NOTES:\n+**NOTES:**\n:heavy_check_mark: : support\n:heavy_multiplication_x: : not support\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/customize-storage-db-redis.md",
"new_path": "docs/installation/customize-storage-db-redis.md",
"diff": "@@ -52,8 +52,13 @@ Then put the related PostgreSQL info into the `database` spec. e.g.:\n```yaml\nspec:\n+ database:\n# Configure existing pre-deployed or cloud database service.\n- database: # Optional\n+ kind: PostgreSQL\n+ # Database spec\n+ spec:\n+ # PostgreSQL configuration spec.\n+ postgresql:\n# PostgreSQL user name to connect as.\n# Defaults to be the same as the operating system name of the user running the application.\nusername: postgres # Required\n@@ -107,9 +112,11 @@ type: goharbor.io/redis\nThen put the related Redis info into the `redis` spec. e.g.:\n```yaml\n+spec:\n+ kind: Redis\nspec:\n# Redis configuration.\n- redis: # Optional\n+ redis:\n# Server host.\nhost: myredis.com # Required\n# Server port.\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(README):update README to reflect latest changes (#740)
Signed-off-by: Steven Zou <szou@vmware.com>
|
254,875
|
11.08.2021 18:23:37
| -28,800
|
f428219ddb5ca26cedbf914559c24928577cb7c6
|
feat(ci) update tools version
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/tests.yml",
"new_path": ".github/workflows/tests.yml",
"diff": "@@ -132,16 +132,16 @@ jobs:\ncertManager:\n- \"1.1.1\"\n# - \"1.2.0\"\n- - \"1.4.0\"\n+ - \"1.4.3\"\n- # https://snapcraft.io/microk8s\n+ # https://github.com/kubernetes-sigs/kind/releases\nk8sVersion:\n- \"1.19.11\"\n- \"1.20.7\"\n- \"1.21.2\"\ningress:\n- - \"0.46.0\"\n+ - \"0.48.1\"\nsamples:\n- \"full_stack_v1beta1.yaml\"\n@@ -388,7 +388,7 @@ jobs:\n- name: Install Contour\nrun: |\n- kubectl apply -f https://projectcontour.io/quickstart/contour.yaml\n+ kubectl apply -f https://raw.githubusercontent.com/projectcontour/contour/release-1.18/examples/render/contour.yaml\nsleep 5\nkubectl patch daemonsets -n projectcontour envoy -p '{\"spec\":{\"template\":{\"spec\":{\"nodeSelector\":{\"ingress-ready\":\"true\"},\"tolerations\":[{\"key\":\"node-role.kubernetes.io/master\",\"operator\":\"Equal\",\"effect\":\"NoSchedule\"}]}}}}'\nsleep 5\n@@ -542,14 +542,14 @@ jobs:\nmatrix:\n# https://github.com/jetstack/cert-manager/tags\ncertManager:\n- - \"1.3.1\"\n+ - \"1.3.3\"\n# https://snapcraft.io/microk8s\nk8sVersion:\n- \"1.21.2\"\ningress:\n- - \"0.46.0\"\n+ - \"0.48.1\"\nsteps:\n- uses: actions/checkout@v2\n"
},
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -450,7 +450,7 @@ certmanager: helm jetstack\n$(HELM) repo add jetstack https://charts.jetstack.io # https://cert-manager.io/docs/installation/kubernetes/\n$(HELM) upgrade --install certmanager jetstack/cert-manager \\\n--namespace $(CERTMANAGER_NAMESPACE) \\\n- --version v1.0.3 \\\n+ --version v1.4.3 \\\n--set installCRDs=true\n.PHONY: jetstack\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/by-helm-chart.md",
"new_path": "docs/installation/by-helm-chart.md",
"diff": "@@ -6,7 +6,7 @@ The Harbor operator can also be deployed via the operator helm chart provided. W\n1. `Kubernetes` cluster (v1.19+) is running (see [Applicative Kubernetes versions](../../README.md#applicative-kubernetes-versions)\nfor more information). For local development purpose, check [Kind installation](./kind-installation.md).\n-1. `cert-manager` (v1.0+) is [installed](https://cert-manager.io/docs/installation/kubernetes/).\n+1. `cert-manager` (v1.2+) is [installed](https://cert-manager.io/docs/installation/kubernetes/).\n1. Ingress controller is deployed (see [Ingress controller types](../../README.md#ingress-controller-types) for more information). For default\ningress controller, check [NGINX ingress controller](https://kubernetes.github.io/ingress-nginx/deploy/).\n1. `kubectl` with a proper version(v1.18.6+) is [installed](https://kubernetes.io/docs/tasks/tools/).\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/kustomization-all-in-one.md",
"new_path": "docs/installation/kustomization-all-in-one.md",
"diff": "@@ -6,7 +6,7 @@ The installation guide documented here help you deploy Harbor operator stack wit\n1. `Kubernetes` cluster (v1.19+) is running (see [Applicative Kubernetes versions](../../README.md#applicative-kubernetes-versions)\nfor more information). For local development purpose, check [Kind installation](./kind-installation.md).\n-1. `cert-manager` (v1.0+) is [installed](https://cert-manager.io/docs/installation/kubernetes/).\n+1. `cert-manager` (v1.2+) is [installed](https://cert-manager.io/docs/installation/kubernetes/).\n1. Ingress controller is deployed (see [Ingress controller types](../../README.md#ingress-controller-types) for more information). For default\ningress controller, check [NGINX ingress controller](https://kubernetes.github.io/ingress-nginx/deploy/).\n1. `kubectl` with a proper version(v1.18.6+) is [installed](https://kubernetes.io/docs/tasks/tools/).\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(ci) update tools version
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,879
|
12.08.2021 08:02:50
| -7,200
|
53ca0ac1802bd99265770fe79b9d6dc52bf5c7f4
|
doc(Development): Remove cert-manager deployment
|
[
{
"change_type": "MODIFY",
"old_path": "docs/development.md",
"new_path": "docs/development.md",
"diff": "@@ -30,15 +30,6 @@ make dev-tools\n### Services\n- [Kubernetes cluster](https://kubernetes.io). You can order a Kubernetes cluster on [ovh.com](https://www.ovh.com/fr/public-cloud/kubernetes/). Then configure your environment to have the right [`Kubeconfig`](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/).\n-- [CertManager](https://cert-manager.io/docs/installation/kubernetes/#steps) >= 0.11\n-\n- ```bash\n- helm install cert-manager \\\n- --namespace cert-manager \\\n- --version v0.12.0 \\\n- jetstack/cert-manager\n- ```\n-\n- Jaeger server.\n```bash\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(Development): Remove cert-manager deployment (#735)
Signed-off-by: Thomas Coudert <thomas.coudert@ovhcloud.com>
|
254,890
|
16.08.2021 13:45:34
| -28,800
|
c6e2642c26eeac5e33161862a50c8e88aed71295
|
fix: let backend port in notary ingress depend on internal tls
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/ingresses.go",
"new_path": "controllers/goharbor/harbor/ingresses.go",
"diff": "@@ -7,7 +7,6 @@ import (\ngoharborv1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1\"\nharbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n\"github.com/goharbor/harbor-operator/controllers\"\n- \"github.com/goharbor/harbor-operator/controllers/goharbor/notaryserver\"\n\"github.com/goharbor/harbor-operator/pkg/graph\"\n\"github.com/pkg/errors\"\nnetv1 \"k8s.io/api/networking/v1\"\n@@ -149,7 +148,7 @@ func (r *Reconciler) GetNotaryIngressRules(ctx context.Context, harbor *goharbor\nService: &netv1.IngressServiceBackend{\nName: r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String()),\nPort: netv1.ServiceBackendPort{\n- Number: notaryserver.PublicPort,\n+ Number: harbor.Spec.InternalTLS.GetInternalPort(harbormetav1.NotaryServerTLS),\n},\n},\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/notaryserver/services.go",
"new_path": "controllers/goharbor/notaryserver/services.go",
"diff": "@@ -10,10 +10,6 @@ import (\n\"k8s.io/apimachinery/pkg/util/intstr\"\n)\n-const (\n- PublicPort = 443\n-)\n-\nfunc (r *Reconciler) GetService(ctx context.Context, notary *goharborv1.NotaryServer) (*corev1.Service, error) {\nname := r.NormalizeName(ctx, notary.GetName())\nnamespace := notary.GetNamespace()\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: let backend port in notary ingress depend on internal tls (#744)
Signed-off-by: He Weiwei <hweiwei@vmware.com>
|
254,881
|
20.08.2021 10:43:11
| -28,800
|
69527e6e00af19db1f2dbd1e974382079696289a
|
fix(configuration): clean status reason when reconcile success
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/configuration/reconciler.go",
"new_path": "controllers/goharbor/configuration/reconciler.go",
"diff": "@@ -74,8 +74,11 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.\ndefer func() {\nif err != nil {\nhc.Status.Status = goharborv1.HarborConfigurationStatusFail\n+ hc.Status.Message = err.Error()\n} else {\nhc.Status.Status = goharborv1.HarborConfigurationStatusReady\n+ hc.Status.Reason = \"\"\n+ hc.Status.Message = \"\"\nnow := metav1.Now()\nhc.Status.LastApplyTime = &now\nhc.Status.LastConfiguration = &hcCopy.Spec\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(configuration): clean status reason when reconcile success (#752)
Signed-off-by: chlins <chlins.zhang@gmail.com>
|
254,875
|
20.08.2021 16:46:35
| -28,800
|
1b2132d1933647f6b8600c04106b938f575ecdb6
|
feat(release) update version in docs
|
[
{
"change_type": "MODIFY",
"old_path": "docs/installation/by-helm-chart.md",
"new_path": "docs/installation/by-helm-chart.md",
"diff": "@@ -35,14 +35,14 @@ There are several ways to get the Harbor operator helm chart:\n```shell\ngit clone https://github.com/goharbor/harbor-operator.git && \\\ncd harbor-operator && \\\n- git checkout release-1.0.0 && \\\n- make helm-generate RELEASE_VERSION=v1.0.0\n+ git checkout release-1.1.0 && \\\n+ make helm-generate RELEASE_VERSION=v1.1.0\n# Checkout to the specified branch or the specified tag\n- # To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n- # To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n+ # To branch: git checkout <branch-name> e.g.: git checkout release-1.1.0\n+ # To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.1.0 -b tag-v1.1.0\n- # chart is generated to `charts/harbor-operator-v1.0.0.tgz`\n+ # chart is generated to `charts/harbor-operator-v1.1.0.tgz`\n```\n## Deploy Harbor operator with chart\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/enable_minio_console.md",
"new_path": "docs/installation/enable_minio_console.md",
"diff": "@@ -18,8 +18,8 @@ First, clone the code from the `harbor-operator` repository.\ngit clone https://github.com/goharbor/harbor-operator.git\n# Checkout to the specified branch or the specified tag.\n-# To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n-# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n+# To branch: git checkout <branch-name> e.g.: git checkout release-1.1.0\n+# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.1.0 -b tag-v1.1.0\n```\nThen open the [all-in-one](./kustomization-all-in-one.md) kustomization manifest and locate the `patchesStrategicMerge` section. Comment the patch `- patch/delete-minio-console.yaml`.\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/kustomization-all-in-one.md",
"new_path": "docs/installation/kustomization-all-in-one.md",
"diff": "@@ -21,7 +21,7 @@ Directly apply the all-in-one deployment manifest to your Kubernetes cluster:\nkubectl apply -f https://raw.githubusercontent.com/goharbor/harbor-operator/master/manifests/cluster/deployment.yaml\n```\n->NOTES: Here we use the deployment manifest in the `master` branch as an example, for deploying the released versions, you can get the deployment manifest in the GitHub release page or find it in the corresponding code branch such as `release-1.0.0`.\n+>NOTES: Here we use the deployment manifest in the `master` branch as an example, for deploying the released versions, you can get the deployment manifest in the GitHub release page or find it in the corresponding code branch such as `release-1.1.0`.\nCheck the installed operators:\n@@ -47,8 +47,8 @@ If you want to customize the deployment manifest like editing image settings of\ngit clone https://github.com/goharbor/harbor-operator.git\n# Checkout to the specified branch or the specified tag.\n-# To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n-# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n+# To branch: git checkout <branch-name> e.g.: git checkout release-1.1.0\n+# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.1.0 -b tag-v1.1.0\n```\nAs the resource manifests are not stored in the codebase, then you need to run the following command to generate the related resource manifests before using `kustomize` to build your customized operator deployment manifest:\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/kustomization-custom.md",
"new_path": "docs/installation/kustomization-custom.md",
"diff": "@@ -133,8 +133,8 @@ Of course, you can clone the codebase into your computer and then customize and\ngit clone https://github.com/goharbor/harbor-operator.git\n# Checkout to the specified branch or the specified tag.\n-# To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n-# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n+# To branch: git checkout <branch-name> e.g.: git checkout release-1.1.0\n+# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.1.0 -b tag-v1.1.0\n# As the resource manifests are not stored in the codebase, then you need to run the following command to generate the related resource manifests before using `kustomize` to build your customized operator deployment manifest:\nmake manifests\n@@ -146,7 +146,7 @@ kustomize build manifests/harbor | kubectl apply -f -\n## kustomize build manifests/harbor | kubectl delete -f -\n```\n->NOTES: Here we use the deployment manifest in the `master` branch as an example, for deploying the released versions,you can get the deployment manifest in the GitHub release page or find it in the corresponding code branch such as `release-1.0.0`.\n+>NOTES: Here we use the deployment manifest in the `master` branch as an example, for deploying the released versions,you can get the deployment manifest in the GitHub release page or find it in the corresponding code branch such as `release-1.1.0`.\n## What's next\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/makefile.md",
"new_path": "docs/makefile.md",
"diff": "@@ -10,8 +10,8 @@ Clone the harbor operator codebase into your computer with command\ngit clone https://github.com/goharbor/harbor-operator.git\n# Checkout to the specified branch or the specified tag.\n-# To branch: git checkout <branch-name> e.g.: git checkout release-1.0.0\n-# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.0.0 -b tag-v1.0.0\n+# To branch: git checkout <branch-name> e.g.: git checkout release-1.1.0\n+# To tag: git checkout tags/<tag> -b <branch-name> e.g: git checkout tags/v1.1.0 -b tag-v1.1.0\n```\nThe `Makefile` is in the root dir of the code repository.\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -4,7 +4,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: harbor-operator-ns\n---\napiVersion: apiextensions.k8s.io/v1\n@@ -15,7 +15,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: chartmuseums.goharbor.io\nspec:\nconversion:\n@@ -2720,7 +2720,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: cores.goharbor.io\nspec:\nconversion:\n@@ -3735,7 +3735,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: exporters.goharbor.io\nspec:\nconversion:\n@@ -4356,7 +4356,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: harborclusters.goharbor.io\nspec:\nconversion:\n@@ -8262,7 +8262,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\ncreationTimestamp: null\nname: harborconfigurations.goharbor.io\nspec:\n@@ -8699,7 +8699,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: harbors.goharbor.io\nspec:\nconversion:\n@@ -11713,7 +11713,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: jobservices.goharbor.io\nspec:\nconversion:\n@@ -16171,7 +16171,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: notaryservers.goharbor.io\nspec:\nconversion:\n@@ -16772,7 +16772,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: notarysigners.goharbor.io\nspec:\nconversion:\n@@ -17285,7 +17285,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: portals.goharbor.io\nspec:\nconversion:\n@@ -17675,7 +17675,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: registries.goharbor.io\nspec:\nconversion:\n@@ -21178,7 +21178,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: registrycontrollers.goharbor.io\nspec:\nconversion:\n@@ -21610,7 +21610,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.4.7\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\noperator.min.io/authors: MinIO, Inc.\noperator.min.io/license: AGPLv3\noperator.min.io/support: https://subnet.min.io\n@@ -28574,7 +28574,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: trivies.goharbor.io\nspec:\nconversion:\n@@ -32993,7 +32993,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\noperator.min.io/authors: MinIO, Inc.\noperator.min.io/license: AGPLv3\noperator.min.io/support: https://subnet.min.io\n@@ -33006,7 +33006,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: postgres-operator\nnamespace: harbor-operator-ns\n---\n@@ -33016,7 +33016,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: redisoperator\nnamespace: harbor-operator-ns\n---\n@@ -33026,7 +33026,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: leader-election-role\nnamespace: harbor-operator-ns\nrules:\n@@ -33063,7 +33063,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\ncreationTimestamp: null\nname: harbor-operator-role\nrules:\n@@ -33587,7 +33587,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\noperator.min.io/authors: MinIO, Inc.\noperator.min.io/license: AGPLv3\noperator.min.io/support: https://subnet.min.io\n@@ -33713,7 +33713,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: postgres-operator\nrules:\n- apiGroups:\n@@ -33895,7 +33895,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: postgres-pod\nrules:\n- apiGroups:\n@@ -33942,7 +33942,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: redisoperator\nrules:\n- apiGroups:\n@@ -33993,7 +33993,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: leader-election-rolebinding\nnamespace: harbor-operator-ns\nroleRef:\n@@ -34011,7 +34011,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: harbor-operator-rolebinding\nroleRef:\napiGroup: rbac.authorization.k8s.io\n@@ -34028,7 +34028,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\noperator.min.io/authors: MinIO, Inc.\noperator.min.io/license: AGPLv3\noperator.min.io/support: https://subnet.min.io\n@@ -34048,7 +34048,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: postgres-operator\nroleRef:\napiGroup: rbac.authorization.k8s.io\n@@ -34065,7 +34065,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: redisoperator\nroleRef:\napiGroup: rbac.authorization.k8s.io\n@@ -34151,7 +34151,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: config\nnamespace: harbor-operator-ns\n---\n@@ -34486,7 +34486,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: config-template\nnamespace: harbor-operator-ns\n---\n@@ -34538,7 +34538,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: postgres-operator\nnamespace: harbor-operator-ns\n---\n@@ -34548,7 +34548,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\noperator.min.io/authors: MinIO, Inc.\noperator.min.io/license: AGPLv3\noperator.min.io/support: https://subnet.min.io\n@@ -34572,7 +34572,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: postgres-operator\nnamespace: harbor-operator-ns\nspec:\n@@ -34590,7 +34590,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: webhook-service\nnamespace: harbor-operator-ns\nspec:\n@@ -34604,7 +34604,7 @@ apiVersion: apps/v1\nkind: Deployment\nmetadata:\nannotations:\n- cache.goharbor.io/version: v1.0.0\n+ cache.goharbor.io/version: v1.1.0\ndatabase.goharbor.io/version: v1.5.0\nstorage.goharbor.io/version: v4.0.6\nlabels:\n@@ -34620,7 +34620,7 @@ spec:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nlabels:\ncontrol-plane: harbor-operator\nspec:\n@@ -34697,7 +34697,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\noperator.min.io/authors: MinIO, Inc.\noperator.min.io/license: AGPLv3\noperator.min.io/support: https://subnet.min.io\n@@ -34713,7 +34713,7 @@ spec:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\noperator.min.io/authors: MinIO, Inc.\noperator.min.io/license: AGPLv3\noperator.min.io/support: https://subnet.min.io\n@@ -34741,7 +34741,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: postgres-operator\nnamespace: harbor-operator-ns\nspec:\n@@ -34754,7 +34754,7 @@ spec:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nlabels:\nname: postgres-operator\nspec:\n@@ -34784,7 +34784,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nlabels:\napp: redisoperator\nname: redisoperator\n@@ -34801,7 +34801,7 @@ spec:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nlabels:\napp: redisoperator\nspec:\n@@ -34829,7 +34829,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: serving-cert\nnamespace: harbor-operator-ns\nspec:\n@@ -34847,7 +34847,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: selfsigned-issuer\nnamespace: harbor-operator-ns\nspec:\n@@ -34860,7 +34860,7 @@ metadata:\ncert-manager.io/inject-ca-from: harbor-operator-ns/serving-cert\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: mutating-webhook-configuration\nwebhooks:\n- admissionReviewVersions:\n@@ -34892,7 +34892,7 @@ metadata:\ncert-manager.io/inject-ca-from: harbor-operator-ns/serving-cert\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: validating-webhook-configuration\nwebhooks:\n- admissionReviewVersions:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/kustomization.yaml",
"new_path": "manifests/cluster/kustomization.yaml",
"diff": "@@ -8,7 +8,7 @@ namespace: harbor-operator-ns\ncommonAnnotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: cluster\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\n# All the referred deployment manifests\n# NOTES: when doing changes to the ref versions, please also do same changes in the patch/annotation.yaml file\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/patch/annotations.yaml",
"new_path": "manifests/cluster/patch/annotations.yaml",
"diff": "- op: add\npath: \"/metadata/annotations\"\nvalue:\n- cache.goharbor.io/version: v1.0.0\n+ cache.goharbor.io/version: v1.1.0\ndatabase.goharbor.io/version: v1.5.0\nstorage.goharbor.io/version: v4.0.6\n\\ No newline at end of file\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -4,7 +4,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: harbor-operator-ns\n---\napiVersion: apiextensions.k8s.io/v1\n@@ -15,7 +15,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: chartmuseums.goharbor.io\nspec:\nconversion:\n@@ -2720,7 +2720,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: cores.goharbor.io\nspec:\nconversion:\n@@ -3735,7 +3735,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: exporters.goharbor.io\nspec:\nconversion:\n@@ -4356,7 +4356,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: harborclusters.goharbor.io\nspec:\nconversion:\n@@ -8262,7 +8262,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\ncreationTimestamp: null\nname: harborconfigurations.goharbor.io\nspec:\n@@ -8699,7 +8699,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: harbors.goharbor.io\nspec:\nconversion:\n@@ -11713,7 +11713,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: jobservices.goharbor.io\nspec:\nconversion:\n@@ -16171,7 +16171,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: notaryservers.goharbor.io\nspec:\nconversion:\n@@ -16772,7 +16772,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: notarysigners.goharbor.io\nspec:\nconversion:\n@@ -17285,7 +17285,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: portals.goharbor.io\nspec:\nconversion:\n@@ -17675,7 +17675,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: registries.goharbor.io\nspec:\nconversion:\n@@ -21178,7 +21178,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: registrycontrollers.goharbor.io\nspec:\nconversion:\n@@ -21611,7 +21611,7 @@ metadata:\ncontroller-gen.kubebuilder.io/version: v0.5.0\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: trivies.goharbor.io\nspec:\nconversion:\n@@ -26030,7 +26030,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: leader-election-role\nnamespace: harbor-operator-ns\nrules:\n@@ -26067,7 +26067,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\ncreationTimestamp: null\nname: harbor-operator-role\nrules:\n@@ -26591,7 +26591,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: leader-election-rolebinding\nnamespace: harbor-operator-ns\nroleRef:\n@@ -26609,7 +26609,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: harbor-operator-rolebinding\nroleRef:\napiGroup: rbac.authorization.k8s.io\n@@ -26695,7 +26695,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: config\nnamespace: harbor-operator-ns\n---\n@@ -27030,7 +27030,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: config-template\nnamespace: harbor-operator-ns\n---\n@@ -27040,7 +27040,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: webhook-service\nnamespace: harbor-operator-ns\nspec:\n@@ -27056,7 +27056,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nlabels:\ncontrol-plane: harbor-operator\nname: harbor-operator\n@@ -27070,7 +27070,7 @@ spec:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nlabels:\ncontrol-plane: harbor-operator\nspec:\n@@ -27147,7 +27147,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: serving-cert\nnamespace: harbor-operator-ns\nspec:\n@@ -27165,7 +27165,7 @@ metadata:\nannotations:\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: selfsigned-issuer\nnamespace: harbor-operator-ns\nspec:\n@@ -27178,7 +27178,7 @@ metadata:\ncert-manager.io/inject-ca-from: harbor-operator-ns/serving-cert\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: mutating-webhook-configuration\nwebhooks:\n- admissionReviewVersions:\n@@ -27210,7 +27210,7 @@ metadata:\ncert-manager.io/inject-ca-from: harbor-operator-ns/serving-cert\ngoharbor.io/deploy-engine: Kustomization\ngoharbor.io/deploy-mode: harbor\n- goharbor.io/operator-version: v1.0.0\n+ goharbor.io/operator-version: v1.1.0\nname: validating-webhook-configuration\nwebhooks:\n- admissionReviewVersions:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/kustomization.yaml",
"new_path": "manifests/harbor/kustomization.yaml",
"diff": "@@ -6,7 +6,7 @@ namespace: harbor-operator-ns\n# Common annotations\ncommonAnnotations:\n- goharbor.io/operator-version: \"v1.0.0\"\n+ goharbor.io/operator-version: \"v1.1.0\"\ngoharbor.io/deploy-mode: \"harbor\"\ngoharbor.io/deploy-engine: \"Kustomization\"\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(release) update version in docs
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,875
|
21.08.2021 22:59:45
| -28,800
|
f5054e8c8531bd1c58afc210c1ab74920e6eee2a
|
fix(ci) image in kustomization.yaml
|
[
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -34637,7 +34637,7 @@ spec:\nfieldPath: metadata.namespace\n- name: CONFIGURATION_FROM\nvalue: env,file:/etc/harbor-operator/config.yaml\n- image: heww/harbor-operator:dev\n+ image: ghcr.io/goharbor/harbor-operator:dev_master\nlivenessProbe:\nhttpGet:\npath: /healthz\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/kustomization.yaml",
"new_path": "manifests/cluster/kustomization.yaml",
"diff": "@@ -13,38 +13,38 @@ commonAnnotations:\n# All the referred deployment manifests\n# NOTES: when doing changes to the ref versions, please also do same changes in the patch/annotation.yaml file\nresources:\n-- ../../config/default\n+ - ../../config/default # harbor operator\n- patch/namespace.yaml\n-- https://raw.githubusercontent.com/spotahome/redis-operator/master/example/operator/all-redis-operator-resources.yaml?ref=v1.0.0\n-- github.com/zalando/postgres-operator/manifests?ref=v1.5.0\n-- github.com/minio/operator?ref=v4.0.6\n+ - https://raw.githubusercontent.com/spotahome/redis-operator/master/example/operator/all-redis-operator-resources.yaml?ref=v1.0.0 # redis operator\n+ - github.com/zalando/postgres-operator/manifests?ref=v1.5.0 # postgresql operator\n+ - github.com/minio/operator?ref=v4.0.6 # minIO storage operator\n# If you have to override the image source, uncomment this patch and also change the image source in the patch/image-source.yaml file.\n# Then rebuild.\n-# - patch/image-source.yaml\npatchesStrategicMerge:\n+ # - patch/image-source.yaml\n- patch/delete-minio-console.yaml\n- patch/delete-duplicated-ns.yaml\n- patch/pg-configmap.yaml\npatchesJson6902:\n-- path: patch/annotations.yaml\n- target:\n- group: apps\n+ - target:\nkind: Deployment\nname: harbor-operator\n+ group: apps\nversion: v1\n+ path: patch/annotations.yaml # add version annotations to the harbor operator ctrl\nimages:\n-- name: goharbor/harbor-operator\n- newName: heww/harbor-operator\n- newTag: dev\n-- name: minio/console\n- newName: ghcr.io/goharbor/minio-console\n-- name: minio/operator\n- newName: ghcr.io/goharbor/minio-operator\n- name: quay.io/spotahome/redis-operator\nnewName: ghcr.io/goharbor/redis-operator\nnewTag: v1.0.0\n+ - name: minio/operator\n+ newName: ghcr.io/goharbor/minio-operator\n+ - name: minio/console\n+ newName: ghcr.io/goharbor/minio-console\n- name: registry.opensource.zalan.do/acid/postgres-operator\nnewName: ghcr.io/goharbor/postgres-operator\n+ - name: goharbor/harbor-operator\n+ newName: ghcr.io/goharbor/harbor-operator\n+ newTag: dev_master\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(ci) image in kustomization.yaml
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,893
|
23.08.2021 14:45:18
| -28,800
|
598dbdb1cdaf53c176bd662c1628c6c17839f7c2
|
doc(README):update release plan
remove release 1.1
add release plan 1.3
|
[
{
"change_type": "MODIFY",
"old_path": "README.md",
"new_path": "README.md",
"diff": "@@ -51,8 +51,8 @@ Harbor deployment stack is controlled by a custom Harbor resource `HarborCluster\n## Release plans\n-* [Release 1.1](https://github.com/goharbor/harbor-operator/projects/8)\n* [Release 1.2](https://github.com/goharbor/harbor-operator/projects/7)\n+* [Release 1.3](https://github.com/goharbor/harbor-operator/projects/9)\n## Getting started\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(README):update release plan
- remove release 1.1
- add release plan 1.3
|
254,870
|
07.09.2021 21:19:02
| -28,800
|
13b36635f1704da94fb567145251dee3da5db1aa
|
revert(lb) revert loadblance from 1.0
|
[
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1beta1/harbor_types.go",
"new_path": "apis/goharbor.io/v1beta1/harbor_types.go",
"diff": "@@ -662,9 +662,6 @@ type HarborExposeSpec struct {\n// +kubebuilder:validation:Optional\n// The ingress of the notary, required when notary component enabled.\nNotary *HarborExposeComponentSpec `json:\"notary,omitempty\"`\n-\n- // +kubebuilder:validation:Optional\n- Portal *HarborExposeComponentSpec `json:\"portal,omitempty\"`\n}\ntype HarborExposeComponentSpec struct {\n@@ -673,14 +670,6 @@ type HarborExposeComponentSpec struct {\n// +kubebuilder:validation:Optional\nIngress *HarborExposeIngressSpec `json:\"ingress,omitempty\"`\n-\n- // +kubebuilder:validation:Optional\n- LoadBalancer *HarborExposeLBSpec `json:\"loadbalancer,omitempty\"`\n-}\n-\n-type HarborExposeLBSpec struct {\n- // +kubebuilder:validation:Optional\n- Enable bool `json:\"enable,omitempty\"`\n}\ntype HarborExposeIngressSpec struct {\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1beta1/harborcluster_webhook.go",
"new_path": "apis/goharbor.io/v1beta1/harborcluster_webhook.go",
"diff": "@@ -117,10 +117,6 @@ func (harborcluster *HarborCluster) validate(old *HarborCluster) error {\nallErrs = append(allErrs, err)\n}\n- if err := harborcluster.validateExpose(); err != nil {\n- allErrs = append(allErrs, err)\n- }\n-\nif old == nil { // create harbor resource\nif err := version.Validate(harborcluster.Spec.Version); err != nil {\nallErrs = append(allErrs, field.Invalid(field.NewPath(\"spec\").Child(\"version\"), harborcluster.Spec.Version, err.Error()))\n@@ -216,31 +212,6 @@ func (harborcluster *HarborCluster) validateCache() *field.Error {\nreturn nil\n}\n-func (harborcluster *HarborCluster) validateExpose() *field.Error {\n- core := field.NewPath(\"spec\").Child(\"expose\").Child(\"core\")\n-\n- if harborcluster.Spec.Expose.Core.LoadBalancer != nil &&\n- harborcluster.Spec.Expose.Core.Ingress != nil {\n- lb := core.Child(\"loadbalancer\")\n- ingress := core.Child(\"ingress\")\n-\n- return forbidden(ingress, lb)\n- }\n-\n- notary := field.NewPath(\"spec\").Child(\"expose\").Child(\"notary\")\n-\n- if harborcluster.Spec.Expose.Notary != nil &&\n- harborcluster.Spec.Expose.Notary.LoadBalancer != nil &&\n- harborcluster.Spec.Expose.Notary.Ingress != nil {\n- lb := notary.Child(\"loadbalancer\")\n- ingress := notary.Child(\"ingress\")\n-\n- return forbidden(ingress, lb)\n- }\n-\n- return nil\n-}\n-\nfunc required(mainPath *field.Path) *field.Error {\nreturn field.Required(mainPath, fmt.Sprintf(\"%s should be configured\", mainPath.String()))\n}\n@@ -248,7 +219,3 @@ func required(mainPath *field.Path) *field.Error {\nfunc invalid(mainPath *field.Path, value interface{}, details string) *field.Error {\nreturn field.Invalid(mainPath, value, details)\n}\n-\n-func forbidden(mainPath fmt.Stringer, conflictPath *field.Path) *field.Error {\n- return field.Forbidden(conflictPath, fmt.Sprintf(\"conflicts: %s should not be configured as %s has been configured already\", conflictPath.String(), mainPath.String()))\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "apis/goharbor.io/v1beta1/zz_generated.deepcopy.go",
"new_path": "apis/goharbor.io/v1beta1/zz_generated.deepcopy.go",
"diff": "@@ -1769,11 +1769,6 @@ func (in *HarborExposeComponentSpec) DeepCopyInto(out *HarborExposeComponentSpec\n*out = new(HarborExposeIngressSpec)\n(*in).DeepCopyInto(*out)\n}\n- if in.LoadBalancer != nil {\n- in, out := &in.LoadBalancer, &out.LoadBalancer\n- *out = new(HarborExposeLBSpec)\n- **out = **in\n- }\n}\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborExposeComponentSpec.\n@@ -1808,21 +1803,6 @@ func (in *HarborExposeIngressSpec) DeepCopy() *HarborExposeIngressSpec {\nreturn out\n}\n-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\n-func (in *HarborExposeLBSpec) DeepCopyInto(out *HarborExposeLBSpec) {\n- *out = *in\n-}\n-\n-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborExposeLBSpec.\n-func (in *HarborExposeLBSpec) DeepCopy() *HarborExposeLBSpec {\n- if in == nil {\n- return nil\n- }\n- out := new(HarborExposeLBSpec)\n- in.DeepCopyInto(out)\n- return out\n-}\n-\n// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.\nfunc (in *HarborExposeSpec) DeepCopyInto(out *HarborExposeSpec) {\n*out = *in\n@@ -1832,11 +1812,6 @@ func (in *HarborExposeSpec) DeepCopyInto(out *HarborExposeSpec) {\n*out = new(HarborExposeComponentSpec)\n(*in).DeepCopyInto(*out)\n}\n- if in.Portal != nil {\n- in, out := &in.Portal, &out.Portal\n- *out = new(HarborExposeComponentSpec)\n- (*in).DeepCopyInto(*out)\n- }\n}\n// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborExposeSpec.\n"
},
{
"change_type": "MODIFY",
"old_path": "charts/harbor-operator/templates/crds.yaml",
"new_path": "charts/harbor-operator/templates/crds.yaml",
"diff": "@@ -6843,11 +6843,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -6878,45 +6873,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\n- tls:\n- properties:\n- certificateRef:\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\n- type: object\n- type: object\n- portal:\n- properties:\n- ingress:\n- properties:\n- annotations:\n- additionalProperties:\n- type: string\n- type: object\n- controller:\n- default: default\n- description: Set to the type of ingress controller.\n- enum:\n- - default\n- - gce\n- - ncp\n- - contour\n- type: string\n- host:\n- type: string\n- required:\n- - host\n- type: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -7686,11 +7642,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10560,11 +10511,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10595,45 +10541,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\n- tls:\n- properties:\n- certificateRef:\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\n- type: object\n- type: object\n- portal:\n- properties:\n- ingress:\n- properties:\n- annotations:\n- additionalProperties:\n- type: string\n- type: object\n- controller:\n- default: default\n- description: Set to the type of ingress controller.\n- enum:\n- - default\n- - gce\n- - ncp\n- - contour\n- type: string\n- host:\n- type: string\n- required:\n- - host\n- type: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n"
},
{
"change_type": "DELETE",
"old_path": "controllers/goharbor/harbor/loadblance.go",
"new_path": null,
"diff": "-package harbor\n-\n-import (\n- \"context\"\n- \"fmt\"\n-\n- goharborv1beta1 \"github.com/goharbor/harbor-operator/apis/goharbor.io/v1beta1\"\n- harbormetav1 \"github.com/goharbor/harbor-operator/apis/meta/v1alpha1\"\n- \"github.com/goharbor/harbor-operator/controllers\"\n- \"github.com/goharbor/harbor-operator/pkg/graph\"\n- \"github.com/pkg/errors\"\n- corev1 \"k8s.io/api/core/v1\"\n- metav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n- \"k8s.io/apimachinery/pkg/util/intstr\"\n-)\n-\n-type CoreLB graph.Resource\n-\n-func (r *Reconciler) AddCoreLB(ctx context.Context, harbor *goharborv1beta1.Harbor, core Core, portal Portal) (CoreLB, error) {\n- lbRes, err := r.Controller.AddServiceToManage(ctx, r.GetCoreLB(ctx, harbor), core, portal)\n-\n- return CoreLB(lbRes), errors.Wrap(err, \"cannot add core lb service\")\n-}\n-\n-func (r *Reconciler) GetCoreLB(ctx context.Context, harbor *goharborv1beta1.Harbor) *corev1.Service {\n- if harbor.Spec.Expose.Core.LoadBalancer == nil {\n- return nil\n- }\n-\n- if !harbor.Spec.Expose.Core.LoadBalancer.Enable {\n- return nil\n- }\n-\n- core := r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String())\n-\n- name := fmt.Sprintf(\"%s-lb\", core)\n- namespace := harbor.GetNamespace()\n-\n- return &corev1.Service{\n- ObjectMeta: metav1.ObjectMeta{\n- Name: name,\n- Namespace: namespace,\n- },\n- Spec: corev1.ServiceSpec{\n- Ports: []corev1.ServicePort{{\n- Name: harbormetav1.CoreHTTPPortName,\n- Port: harbormetav1.HTTPPort,\n- TargetPort: intstr.FromString(harbormetav1.CoreHTTPPortName),\n- Protocol: corev1.ProtocolTCP,\n- }, {\n- Name: harbormetav1.CoreHTTPSPortName,\n- Port: harbormetav1.HTTPSPort,\n- TargetPort: intstr.FromString(harbormetav1.CoreHTTPSPortName),\n- Protocol: corev1.ProtocolTCP,\n- }},\n- Selector: map[string]string{\n- r.Label(\"name\"): core,\n- r.Label(\"namespace\"): namespace,\n- },\n- Type: corev1.ServiceTypeLoadBalancer,\n- },\n- }\n-}\n-\n-type NotaryServerLB graph.Resource\n-\n-func (r *Reconciler) AddNotaryServerLB(ctx context.Context, harbor *goharborv1beta1.Harbor, server NotaryServer) (NotaryServerLB, error) {\n- lbRes, err := r.Controller.AddServiceToManage(ctx, r.GetNotaryServerLB(ctx, harbor), server)\n-\n- return NotaryServerLB(lbRes), errors.Wrap(err, \"cannot add notary server lb service\")\n-}\n-\n-func (r *Reconciler) GetNotaryServerLB(ctx context.Context, harbor *goharborv1beta1.Harbor) *corev1.Service {\n- if harbor.Spec.Expose.Notary == nil || harbor.Spec.Expose.Notary.LoadBalancer == nil {\n- return nil\n- }\n-\n- if !harbor.Spec.Expose.Notary.LoadBalancer.Enable {\n- return nil\n- }\n-\n- server := r.NormalizeName(ctx, harbor.GetName(), controllers.NotaryServer.String())\n- tls := harbor.Spec.InternalTLS.GetComponentTLSSpec(r.GetInternalTLSCertificateSecretName(ctx, harbor, harbormetav1.NotaryServerTLS))\n-\n- name := fmt.Sprintf(\"%s-lb\", server)\n- namespace := harbor.GetNamespace()\n-\n- return &corev1.Service{\n- ObjectMeta: metav1.ObjectMeta{\n- Name: name,\n- Namespace: namespace,\n- },\n- Spec: corev1.ServiceSpec{\n- Ports: []corev1.ServicePort{{\n- Name: harbormetav1.NotaryServerAPIPortName,\n- Port: tls.GetInternalPort(),\n- TargetPort: intstr.FromString(harbormetav1.NotaryServerAPIPortName),\n- Protocol: corev1.ProtocolTCP,\n- }},\n- Selector: map[string]string{\n- r.Label(\"name\"): name,\n- r.Label(\"namespace\"): namespace,\n- },\n- Type: corev1.ServiceTypeLoadBalancer,\n- },\n- }\n-}\n-\n-type NotarySignerLB graph.Resource\n-\n-func (r *Reconciler) AddNotarySignerLB(ctx context.Context, harbor *goharborv1beta1.Harbor, signer NotarySigner) (NotarySignerLB, error) {\n- lbRes, err := r.Controller.AddServiceToManage(ctx, r.GetNotarySignerLB(ctx, harbor), signer)\n-\n- return NotarySignerLB(lbRes), errors.Wrap(err, \"cannot add notary signer lb service\")\n-}\n-\n-func (r *Reconciler) GetNotarySignerLB(ctx context.Context, harbor *goharborv1beta1.Harbor) *corev1.Service {\n- if harbor.Spec.Expose.Notary == nil || harbor.Spec.Expose.Notary.LoadBalancer == nil {\n- return nil\n- }\n-\n- if !harbor.Spec.Expose.Notary.LoadBalancer.Enable {\n- return nil\n- }\n-\n- server := r.NormalizeName(ctx, harbor.GetName(), controllers.NotarySigner.String())\n- name := fmt.Sprintf(\"%s-lb\", server)\n- namespace := harbor.GetNamespace()\n-\n- return &corev1.Service{\n- ObjectMeta: metav1.ObjectMeta{\n- Name: name,\n- Namespace: namespace,\n- },\n- Spec: corev1.ServiceSpec{\n- Ports: []corev1.ServicePort{{\n- Name: harbormetav1.NotarySignerAPIPortName,\n- Port: goharborv1beta1.NotarySignerAPIPort,\n- TargetPort: intstr.FromString(harbormetav1.NotarySignerAPIPortName),\n- Protocol: corev1.ProtocolTCP,\n- }},\n- Selector: map[string]string{\n- r.Label(\"name\"): name,\n- r.Label(\"namespace\"): namespace,\n- },\n- Type: corev1.ServiceTypeLoadBalancer,\n- },\n- }\n-}\n-\n-type PortalLB graph.Resource\n-\n-func (r *Reconciler) AddPortalLB(ctx context.Context, harbor *goharborv1beta1.Harbor, portal Portal) (NotarySignerLB, error) {\n- lbRes, err := r.Controller.AddServiceToManage(ctx, r.GetPortalLB(ctx, harbor), portal)\n-\n- return PortalLB(lbRes), errors.Wrap(err, \"cannot add portal lb service\")\n-}\n-\n-func (r *Reconciler) GetPortalLB(ctx context.Context, harbor *goharborv1beta1.Harbor) *corev1.Service {\n- if harbor.Spec.Expose.Portal == nil || harbor.Spec.Expose.Portal.LoadBalancer == nil {\n- return nil\n- }\n-\n- if !harbor.Spec.Expose.Portal.LoadBalancer.Enable {\n- return nil\n- }\n-\n- server := r.NormalizeName(ctx, harbor.GetName(), controllers.Portal.String())\n- name := fmt.Sprintf(\"%s-lb\", server)\n- namespace := harbor.GetNamespace()\n-\n- return &corev1.Service{\n- ObjectMeta: metav1.ObjectMeta{\n- Name: name,\n- Namespace: namespace,\n- },\n- Spec: corev1.ServiceSpec{\n- Ports: []corev1.ServicePort{{\n- Name: harbormetav1.PortalHTTPPortName,\n- Port: harbormetav1.HTTPPort,\n- TargetPort: intstr.FromString(harbormetav1.PortalHTTPPortName),\n- Protocol: corev1.ProtocolTCP,\n- }, {\n- Name: harbormetav1.PortalHTTPSPortName,\n- Port: harbormetav1.HTTPSPort,\n- TargetPort: intstr.FromString(harbormetav1.PortalHTTPSPortName),\n- Protocol: corev1.ProtocolTCP,\n- }},\n- Selector: map[string]string{\n- r.Label(\"name\"): name,\n- r.Label(\"namespace\"): namespace,\n- },\n- Type: corev1.ServiceTypeLoadBalancer,\n- },\n- }\n-}\n"
},
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/resources.go",
"new_path": "controllers/goharbor/harbor/resources.go",
"diff": "@@ -120,16 +120,6 @@ func (r *Reconciler) AddResources(ctx context.Context, resource resources.Resour\nreturn errors.Wrapf(err, \"add %s ingress\", controllers.Core)\n}\n- _, err = r.AddCoreLB(ctx, harbor, core, portal)\n- if err != nil {\n- return errors.Wrapf(err, \"cannot add %s lb service\", controllers.Core)\n- }\n-\n- _, err = r.AddPortalLB(ctx, harbor, portal)\n- if err != nil {\n- return errors.Wrapf(err, \"cannot add %s lb service\", controllers.Portal)\n- }\n-\n_, err = r.AddNotaryIngress(ctx, harbor, notaryServer)\nif err != nil {\nreturn errors.Wrapf(err, \"add %s ingress\", controllers.NotaryServer)\n@@ -140,10 +130,5 @@ func (r *Reconciler) AddResources(ctx context.Context, resource resources.Resour\nreturn errors.Wrapf(err, \"add network policies\")\n}\n- _, err = r.AddNotaryServerLB(ctx, harbor, notaryServer)\n- if err != nil {\n- return errors.Wrapf(err, \"cannot add %s lb service\", controllers.NotaryServer)\n- }\n-\nreturn nil\n}\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -6862,11 +6862,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -6897,45 +6892,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\n- tls:\n- properties:\n- certificateRef:\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\n- type: object\n- type: object\n- portal:\n- properties:\n- ingress:\n- properties:\n- annotations:\n- additionalProperties:\n- type: string\n- type: object\n- controller:\n- default: default\n- description: Set to the type of ingress controller.\n- enum:\n- - default\n- - gce\n- - ncp\n- - contour\n- type: string\n- host:\n- type: string\n- required:\n- - host\n- type: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -7705,11 +7661,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10584,11 +10535,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10619,45 +10565,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\n- tls:\n- properties:\n- certificateRef:\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\n- type: object\n- type: object\n- portal:\n- properties:\n- ingress:\n- properties:\n- annotations:\n- additionalProperties:\n- type: string\n- type: object\n- controller:\n- default: default\n- description: Set to the type of ingress controller.\n- enum:\n- - default\n- - gce\n- - ncp\n- - contour\n- type: string\n- host:\n- type: string\n- required:\n- - host\n- type: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/harbor/deployment.yaml",
"new_path": "manifests/harbor/deployment.yaml",
"diff": "@@ -6862,11 +6862,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -6897,45 +6892,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\n- tls:\n- properties:\n- certificateRef:\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\n- type: object\n- type: object\n- portal:\n- properties:\n- ingress:\n- properties:\n- annotations:\n- additionalProperties:\n- type: string\n- type: object\n- controller:\n- default: default\n- description: Set to the type of ingress controller.\n- enum:\n- - default\n- - gce\n- - ncp\n- - contour\n- type: string\n- host:\n- type: string\n- required:\n- - host\n- type: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -7705,11 +7661,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10584,11 +10535,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n@@ -10619,45 +10565,6 @@ spec:\nrequired:\n- host\ntype: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\n- tls:\n- properties:\n- certificateRef:\n- pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'\n- type: string\n- type: object\n- type: object\n- portal:\n- properties:\n- ingress:\n- properties:\n- annotations:\n- additionalProperties:\n- type: string\n- type: object\n- controller:\n- default: default\n- description: Set to the type of ingress controller.\n- enum:\n- - default\n- - gce\n- - ncp\n- - contour\n- type: string\n- host:\n- type: string\n- required:\n- - host\n- type: object\n- loadbalancer:\n- properties:\n- enable:\n- type: boolean\n- type: object\ntls:\nproperties:\ncertificateRef:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
revert(lb) revert loadblance from 1.0
Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
|
254,879
|
24.09.2021 07:22:08
| -7,200
|
7e1acc40f6b26a62ca02a2f64ea94b4d97c1d704
|
fix(Makefile): Set default ingress class when installing nginx-ingress with helm
|
[
{
"change_type": "MODIFY",
"old_path": "Makefile",
"new_path": "Makefile",
"diff": "@@ -455,7 +455,8 @@ ingress: helm\n$(HELM) repo add ingress-nginx https://kubernetes.github.io/ingress-nginx # https://github.com/kubernetes/ingress-nginx/tree/master/charts/ingress-nginx#get-repo-info\n$(HELM) upgrade --install nginx ingress-nginx/ingress-nginx \\\n--namespace $(INGRESS_NAMESPACE) \\\n- --set-string controller.config.proxy-body-size=0\n+ --set-string controller.config.proxy-body-size=0 \\\n+ --set-string controller.ingressClassResource.default=true\nCERTMANAGER_NAMESPACE := cert-manager\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix(Makefile): Set default ingress class when installing nginx-ingress with helm (#775)
Signed-off-by: Thomas Coudert <thomas.coudert@ovhcloud.com>
|
254,875
|
28.09.2021 16:43:13
| -28,800
|
8fc120d917f78633c5ef6e4b63d94de420fe71c8
|
fix RELEASE_VERSION in docker image
|
[
{
"change_type": "MODIFY",
"old_path": ".github/workflows/build-dev.yml",
"new_path": ".github/workflows/build-dev.yml",
"diff": "@@ -18,7 +18,7 @@ jobs:\nrun: |\nmkdir ./target\necho -n \"dev_${GITHUB_REF##refs/*/}\" > ./target/TAG_NAME\n- make dist/harbor-operator_linux_amd64/manager GIT_COMMIT=${{ github.sha }}\n+ make dist/harbor-operator_linux_amd64/manager GIT_COMMIT=${{ github.sha }} RELEASE_VERSION=`cat ./target/TAG_NAME`\n- name: Docker Build & Push to Docker Hub\nuses: opspresso/action-docker@master\nwith:\n"
},
{
"change_type": "MODIFY",
"old_path": ".github/workflows/release.yml",
"new_path": ".github/workflows/release.yml",
"diff": "@@ -48,7 +48,7 @@ jobs:\nrun: |\nmkdir ./target\necho -n \"${GITHUB_REF##refs/*/}\" > ./target/TAG_NAME\n- make dist/harbor-operator_linux_amd64/manager GIT_COMMIT=${{ github.sha }}\n+ make dist/harbor-operator_linux_amd64/manager GIT_COMMIT=${{ github.sha }} RELEASE_VERSION=`cat ./target/TAG_NAME`\n- name: Docker Build & Push to Docker Hub\nuses: opspresso/action-docker@master\nwith:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix RELEASE_VERSION in docker image
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,893
|
28.09.2021 18:50:16
| -28,800
|
2b3aae4274ae8414e6ee7f93b96ee15d54b0df26
|
doc(tutorial):update the outdated guides info
fix
|
[
{
"change_type": "MODIFY",
"old_path": "docs/installation/kustomization-all-in-one.md",
"new_path": "docs/installation/kustomization-all-in-one.md",
"diff": "@@ -8,7 +8,7 @@ The installation guide documented here help you deploy Harbor operator stack wit\nfor more information). For local development purpose, check [Kind installation](./kind-installation.md).\n1. `cert-manager` (v1.2+) is [installed](https://cert-manager.io/docs/installation/kubernetes/).\n1. Ingress controller is deployed (see [Ingress controller types](../../README.md#ingress-controller-types) for more information). For default\n- ingress controller, check [NGINX ingress controller](https://kubernetes.github.io/ingress-nginx/deploy/).\n+ ingress controller, check [NGINX ingress controller](https://kubernetes.github.io/ingress-nginx/deploy/) (version should be < v0.48.1).\n1. `kubectl` with a proper version(v1.18.6+) is [installed](https://kubernetes.io/docs/tasks/tools/).\n1. `kustomize` (optional) with a proper version(v3.8.7+) is [installed](https://kubectl.docs.kubernetes.io/installation/kustomize/).\n1. `git` (optional) is [installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/tutorial.md",
"new_path": "docs/tutorial.md",
"diff": "@@ -15,27 +15,27 @@ Before moving on, make sure the harbor operator is successfully deployed in the\n```shell\n~/harbor-operator$ k8s get all -n harbor-operator-ns\nNAME READY STATUS RESTARTS AGE\n-pod/harbor-operator-54454997d-bjkt9 1/1 Running 0 59s\n-pod/minio-operator-c4d8f7b4d-dztwl 1/1 Running 0 59s\n-pod/postgres-operator-94578ffd5-6kdql 1/1 Running 0 58s\n-pod/redisoperator-6b75fc4555-ps5kj 1/1 Running 0 58s\n+pod/harbor-operator-6fd4dc66b-sh6cc 1/1 Running 0 3h18m\n+pod/minio-operator-667b56db9c-q6v4j 1/1 Running 0 3h18m\n+pod/postgres-operator-749db5dd66-phw98 1/1 Running 0 3h18m\n+pod/redisoperator-64dc645c84-9jlv6 1/1 Running 0 3h18m\nNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\n-service/operator ClusterIP 10.96.114.34 <none> 4222/TCP,4233/TCP 59s\n-service/postgres-operator ClusterIP 10.96.208.57 <none> 8080/TCP 59s\n-service/webhook-service ClusterIP 10.96.234.182 <none> 443/TCP 59s\n+service/operator ClusterIP 10.96.202.139 <none> 4222/TCP,4233/TCP 3h18m\n+service/postgres-operator ClusterIP 10.96.193.93 <none> 8080/TCP 3h18m\n+service/webhook-service ClusterIP 10.96.251.203 <none> 443/TCP 3h18m\nNAME READY UP-TO-DATE AVAILABLE AGE\n-deployment.apps/harbor-operator 1/1 1 1 59s\n-deployment.apps/minio-operator 1/1 1 1 59s\n-deployment.apps/postgres-operator 1/1 1 1 59s\n-deployment.apps/redisoperator 1/1 1 1 58s\n+deployment.apps/harbor-operator 1/1 1 1 3h18m\n+deployment.apps/minio-operator 1/1 1 1 3h18m\n+deployment.apps/postgres-operator 1/1 1 1 3h18m\n+deployment.apps/redisoperator 1/1 1 1 3h18m\nNAME DESIRED CURRENT READY AGE\n-replicaset.apps/harbor-operator-54454997d 1 1 1 59s\n-replicaset.apps/minio-operator-c4d8f7b4d 1 1 1 59s\n-replicaset.apps/postgres-operator-94578ffd5 1 1 1 58s\n-replicaset.apps/redisoperator-6b75fc4555 1 1 1 58s\n+replicaset.apps/harbor-operator-6fd4dc66b 1 1 1 3h18m\n+replicaset.apps/minio-operator-667b56db9c 1 1 1 3h18m\n+replicaset.apps/postgres-operator-749db5dd66 1 1 1 3h18m\n+replicaset.apps/redisoperator-64dc645c84 1 1 1 3h18m\n```\n## Deploy Harbor cluster\n@@ -45,9 +45,9 @@ To deploy a Harbor cluster, you need to prepare a deployment manifest first. For\nLearn more about the sample manifests, you can check [manifests reference](./manifests-reference.md#manifestssamples).\n> NOTES: to allow the deployed Harbor cluster to be accessible outside the Kubenetes cluster, make sure the ingress hosts and host in the `externalURL` should be mapping with accessible IPs in the /etc/hosts (for local development environments) or can be resolved and accessible by DNS resolver.\n->TIPS: for local development, some plan-domain services like `sub-domain.<IP>.xip.io` can be used to provide simple public accessible hosts.\n+>TIPS: for local development, some plan-domain services like `sub-domain.<IP>.nip.io` can be used to provide simple public accessible hosts.\n-Here we clone the [full stack sample manifest](../manifests/samples/full_stack.yaml) as an example and modify the external host and ingress hosts with `sub-domain.<IP>.xip.io` pattern. Modified content is shown as below. Please pay attention here, the 'namespace', 'admin password', 'minio access secret' and 'cert-manager issuer' are pre-defined resources and bound to the deploying Harbor cluster.\n+Here we clone the [full stack sample manifest](../manifests/samples/full_stack.yaml) as an example and modify the external host and ingress hosts with `sub-domain.<IP>.nip.io` pattern. Modified content is shown as below. Please pay attention here, the 'namespace', 'admin core secret', 'minio access secret' and 'cert-manager issuer/certificate/key' are pre-defined resources and bound to the deploying Harbor cluster.\n`my_full_stack.yaml`:\n@@ -107,34 +107,41 @@ metadata:\nspec:\nsecretName: sample-public-certificate\ndnsNames:\n- - core.10.10.10.100.xip.io\n- - notary.10.10.10.100.xip.io\n- - minio.10.10.10.100.xip.io\n+ - core.10.10.10.100.nip.io\n+ - notary.10.10.10.100.nip.io\n+ - minio.10.10.10.100.nip.io\nissuerRef:\nname: selfsigned-issuer\nkind: Issuer\n---\n# Full stack Harbor\n-apiVersion: goharbor.io/v1alpha3\n+apiVersion: goharbor.io/v1beta1\nkind: HarborCluster\nmetadata:\nname: harborcluster-sample\nnamespace: cluster-sample-ns\nspec:\n+ version: 2.3.0\nlogLevel: info\n+ network:\n+ ipFamilies:\n+ - IPv4\n+ - IPv6\nimageSource:\nrepository: ghcr.io/goharbor\nharborAdminPasswordRef: admin-core-secret\n- externalURL: https://core.10.10.10.100.xip.io\n+ externalURL: https://core.10.10.10.100.nip.io\nexpose:\ncore:\ningress:\n- host: core.10.10.10.100.xip.io\n+ host: core.10.10.10.100.nip.io\n+ controller: default\ntls:\ncertificateRef: sample-public-certificate\nnotary:\ningress:\n- host: notary.10.10.10.100.xip.io\n+ host: notary.10.10.10.100.nip.io\n+ controller: default\ntls:\ncertificateRef: sample-public-certificate\ninternalTLS:\n@@ -156,9 +163,11 @@ spec:\nstorage: {}\nnotary:\nmigrationEnabled: true\n- inClusterDatabase:\n- kind: PostgresSQL\n- postgresSqlSpec:\n+ database:\n+ kind: Zlando/PostgreSQL\n+ spec:\n+ zlandoPostgreSql:\n+ operatorVersion: \"1.5.0\"\nstorage: 1Gi\nreplicas: 1\nresources:\n@@ -168,16 +177,18 @@ spec:\nrequests:\ncpu: 100m\nmemory: 250Mi\n- inClusterStorage:\n+ storage:\nkind: MinIO\n- minIOSpec:\n+ spec:\n+ minIO:\n+ operatorVersion: \"4.0.6\"\nreplicas: 2\nsecretRef: minio-access-secret\nredirect:\nenable: true\nexpose:\ningress:\n- host: minio.10.10.10.100.xip.io\n+ host: minio.10.10.10.100.nip.io\ntls:\ncertificateRef: sample-public-certificate\nvolumesPerServer: 2\n@@ -188,9 +199,11 @@ spec:\nresources:\nrequests:\nstorage: 10Gi\n- inClusterCache:\n- kind: Redis\n- redisSpec:\n+ cache:\n+ kind: RedisFailover\n+ spec:\n+ redisFailover:\n+ operatorVersion: \"1.0.0\"\nserver:\nreplicas: 1\nresources:\n@@ -223,7 +236,7 @@ The `name`, `public URL`, `status`, `operator version` and `operator commit` inf\n```log\nNAME PUBLIC URL STATUS OPERATOR VERSION OPERATOR GIT COMMIT\n-harborcluster-sample https://core.10.10.10.100.xip.io healthy 0.0.0-dev 796c6d3acd4a8801f77b242c2797f931944656c6\n+harborcluster-sample https://core.10.10.10.100.xip.io healthy 1.1.1 20072ed0511e59778f5325416314e41af8d76087\n```\nYou can check more detailed status(conditions) info of the deployed Harbor cluster with appending `-o yaml`.\n@@ -237,24 +250,27 @@ Some status info like the following data is printed out:\n```yaml\nstatus:\nconditions:\n- - lastTransitionTime: \"2021-04-20T07:13:02Z\"\n+ - lastTransitionTime: \"2021-09-28T07:40:45Z\"\nstatus: \"True\"\ntype: StorageReady\n- - lastTransitionTime: \"2021-04-20T07:15:38Z\"\n+ - lastTransitionTime: \"2021-09-28T07:40:45Z\"\nmessage: Harbor component database secrets are already create\nreason: Database is ready\nstatus: \"True\"\ntype: DatabaseReady\n- - lastTransitionTime: \"2021-04-20T07:15:38Z\"\n+ - lastTransitionTime: \"2021-09-28T07:23:55Z\"\nmessage: harbor component redis secrets are already create.\nreason: redis already ready\nstatus: \"True\"\ntype: CacheReady\n- - status: \"False\"\n+ - lastTransitionTime: \"2021-09-28T07:40:34Z\"\n+ status: \"False\"\ntype: InProgress\n- - lastTransitionTime: \"2021-04-20T07:16:05Z\"\n+ - lastTransitionTime: \"2021-09-28T10:20:14Z\"\nstatus: \"True\"\ntype: ServiceReady\n+ - status: \"False\"\n+ type: Failed\n```\nYou can also check what Kubernetes resources are created by getting all.\n@@ -266,97 +282,80 @@ kubectl get all -n cluster-sample-ns\nA few of resources info like the following data are output:\n```log\n-NAME READY STATUS RESTARTS AGE\n-harborcluster-sample-harbor-harbor-chartmuseum-7b75745c8f-dvzh9 1/1 Running 0 9m56s\n-harborcluster-sample-harbor-harbor-core-8446dc9bdc-t8jms 1/1 Running 0 10m\n-harborcluster-sample-harbor-harbor-exporter-5bc9ccf9db-c9qsl 1/1 Running 0 8m24s\n-harborcluster-sample-harbor-harbor-jobservice-6586c85665-dsx99 1/1 Running 0 8m23s\n-harborcluster-sample-harbor-harbor-notaryserver-78c799554-pdbmd 1/1 Running 0 10m\n-harborcluster-sample-harbor-harbor-notarysigner-cc457d87d-556zm 1/1 Running 0 10m\n-harborcluster-sample-harbor-harbor-portal-6599969476-lmppn 1/1 Running 0 10m\n-harborcluster-sample-harbor-harbor-registry-7558db475-n78fm 1/1 Running 0 9m59s\n-harborcluster-sample-harbor-harbor-registryctl-7d5479c4f8-czk8f 1/1 Running 0 8m40s\n-harborcluster-sample-harbor-harbor-trivy-678966b955-pmb9b 1/1 Running 0 10m\n-minio-harborcluster-sample-zone-harbor-0 1/1 Running 0 11m\n-minio-harborcluster-sample-zone-harbor-1 1/1 Running 0 11m\n-postgresql-cluster-sample-ns-harborcluster-sample-0 1/1 Running 0 11m\n-rfr-harborcluster-sample-redis-0 1/1 Running 0 11m\n-rfs-harborcluster-sample-redis-6b7f4c4756-mrpsz 1/1 Running 0 11m\n-steven@steven-zou:~/samples$ k8s get all -n cluster-sample-ns\n-NAME READY STATUS RESTARTS AGE\n-pod/harborcluster-sample-harbor-harbor-chartmuseum-7b75745c8f-dvzh9 1/1 Running 0 21m\n-pod/harborcluster-sample-harbor-harbor-core-8446dc9bdc-t8jms 1/1 Running 0 21m\n-pod/harborcluster-sample-harbor-harbor-exporter-5bc9ccf9db-c9qsl 1/1 Running 0 19m\n-pod/harborcluster-sample-harbor-harbor-jobservice-6586c85665-dsx99 1/1 Running 0 19m\n-pod/harborcluster-sample-harbor-harbor-notaryserver-78c799554-pdbmd 1/1 Running 0 21m\n-pod/harborcluster-sample-harbor-harbor-notarysigner-cc457d87d-556zm 1/1 Running 0 21m\n-pod/harborcluster-sample-harbor-harbor-portal-6599969476-lmppn 1/1 Running 0 21m\n-pod/harborcluster-sample-harbor-harbor-registry-7558db475-n78fm 1/1 Running 0 21m\n-pod/harborcluster-sample-harbor-harbor-registryctl-7d5479c4f8-czk8f 1/1 Running 0 20m\n-pod/harborcluster-sample-harbor-harbor-trivy-678966b955-pmb9b 1/1 Running 0 21m\n-pod/minio-harborcluster-sample-zone-harbor-0 1/1 Running 0 22m\n-pod/minio-harborcluster-sample-zone-harbor-1 1/1 Running 0 22m\n-pod/postgresql-cluster-sample-ns-harborcluster-sample-0 1/1 Running 0 23m\n-pod/rfr-harborcluster-sample-redis-0 1/1 Running 0 23m\n-pod/rfs-harborcluster-sample-redis-6b7f4c4756-mrpsz 1/1 Running 0 23m\n+NAME READY STATUS RESTARTS AGEpod/harborcluster-sample-harbor-harbor-chartmuseum-5fcd966f47-6c2vb 1/1 Running 0 3h1m\n+pod/harborcluster-sample-harbor-harbor-core-74bb457c94-wmsjr 1/1 Running 0 3h1m\n+pod/harborcluster-sample-harbor-harbor-exporter-5dfb5c6f4-kbmtf 1/1 Running 0 3h17m\n+pod/harborcluster-sample-harbor-harbor-jobservice-58c8946c6c-bwg84 1/1 Running 0 3h17m\n+pod/harborcluster-sample-harbor-harbor-notaryserver-7dc7dc5f8dfnqkj 1/1 Running 0 3h1m\n+pod/harborcluster-sample-harbor-harbor-notarysigner-85459fbbb5rxsk5 1/1 Running 0 3h17m\n+pod/harborcluster-sample-harbor-harbor-portal-844cf56674-4c657 1/1 Running 0 3h17m\n+pod/harborcluster-sample-harbor-harbor-registry-89487bb8c-gkfn6 1/1 Running 0 21m\n+pod/harborcluster-sample-harbor-harbor-registryctl-7db9744d44-xl76b 1/1 Running 0 3h17m\n+pod/harborcluster-sample-harbor-harbor-trivy-5c795b8c77-ksdhk 1/1 Running 0 3h17m\n+pod/minio-harborcluster-sample-gn4qb 0/1 Completed 0 3h1m\n+pod/minio-harborcluster-sample-zone-harbor-0 1/1 Running 0 3h\n+pod/minio-harborcluster-sample-zone-harbor-1 1/1 Running 0 3h1m\n+pod/postgresql-cluster-sample-ns-harborcluster-sample-0 1/1 Running 0 3h18m\n+pod/rfr-harborcluster-sample-redis-0 1/1 Running 0 3h18m\n+pod/rfs-harborcluster-sample-redis-6fddf664-c7vj7 1/1 Running 0 3h18m\nNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE\n-service/harborcluster-sample-harbor-harbor-chartmuseum ClusterIP 10.96.177.5 <none> 443/TCP 21m\n-service/harborcluster-sample-harbor-harbor-core ClusterIP 10.96.179.126 <none> 443/TCP,8001/TCP 21m\n-service/harborcluster-sample-harbor-harbor-exporter ClusterIP 10.96.34.119 <none> 8001/TCP 19m\n-service/harborcluster-sample-harbor-harbor-jobservice ClusterIP 10.96.55.96 <none> 443/TCP 19m\n-service/harborcluster-sample-harbor-harbor-notaryserver ClusterIP 10.96.222.39 <none> 443/TCP 21m\n-service/harborcluster-sample-harbor-harbor-notarysigner ClusterIP 10.96.108.105 <none> 7899/TCP 21m\n-service/harborcluster-sample-harbor-harbor-portal ClusterIP 10.96.236.44 <none> 443/TCP 21m\n-service/harborcluster-sample-harbor-harbor-registry ClusterIP 10.96.44.59 <none> 443/TCP,8001/TCP 21m\n-service/harborcluster-sample-harbor-harbor-registryctl ClusterIP 10.96.113.239 <none> 443/TCP 20m\n-service/harborcluster-sample-harbor-harbor-trivy ClusterIP 10.96.142.63 <none> 443/TCP 21m\n-service/minio ClusterIP 10.96.149.137 <none> 80/TCP 23m\n-service/minio-harborcluster-sample-hl ClusterIP None <none> 9000/TCP 23m\n-service/postgresql-cluster-sample-ns-harborcluster-sample ClusterIP 10.96.138.163 <none> 5432/TCP 23m\n-service/postgresql-cluster-sample-ns-harborcluster-sample-config ClusterIP None <none> <none> 22m\n-service/postgresql-cluster-sample-ns-harborcluster-sample-repl ClusterIP 10.96.197.105 <none> 5432/TCP 23m\n-service/rfs-harborcluster-sample-redis ClusterIP 10.96.250.26 <none> 26379/TCP 23m\n+service/harborcluster-sample-harbor-harbor-chartmuseum ClusterIP 10.96.180.44 <none> 443/TCP 3h17m\n+service/harborcluster-sample-harbor-harbor-core ClusterIP 10.96.147.11 <none> 443/TCP,8001/TCP 3h17m\n+service/harborcluster-sample-harbor-harbor-exporter ClusterIP 10.96.242.24 <none> 8001/TCP 3h17m\n+service/harborcluster-sample-harbor-harbor-jobservice ClusterIP 10.96.90.187 <none> 443/TCP 3h17m\n+service/harborcluster-sample-harbor-harbor-notaryserver ClusterIP 10.96.18.168 <none> 443/TCP 3h17m\n+service/harborcluster-sample-harbor-harbor-notarysigner ClusterIP 10.96.242.45 <none> 7899/TCP 3h17m\n+service/harborcluster-sample-harbor-harbor-portal ClusterIP 10.96.54.68 <none> 443/TCP 3h17m\n+service/harborcluster-sample-harbor-harbor-registry ClusterIP 10.96.249.140 <none> 443/TCP,8001/TCP 3h17m\n+service/harborcluster-sample-harbor-harbor-registryctl ClusterIP 10.96.44.32 <none> 443/TCP 3h17m\n+service/harborcluster-sample-harbor-harbor-trivy ClusterIP 10.96.231.198 <none> 443/TCP 3h17m\n+service/minio ClusterIP 10.96.74.160 <none> 80/TCP 3h17m\n+service/minio-harborcluster-sample-hl ClusterIP None <none> 9000/TCP 3h17m\n+service/postgresql-cluster-sample-ns-harborcluster-sample ClusterIP 10.96.75.26 <none> 5432/TCP 3h18m\n+service/postgresql-cluster-sample-ns-harborcluster-sample-config ClusterIP None <none> <none> 3h17m\n+service/postgresql-cluster-sample-ns-harborcluster-sample-repl ClusterIP 10.96.135.172 <none> 5432/TCP 3h18m\n+service/rfs-harborcluster-sample-redis ClusterIP 10.96.217.247 <none> 26379/TCP 3h18m\nNAME READY UP-TO-DATE AVAILABLE AGE\n-deployment.apps/harborcluster-sample-harbor-harbor-chartmuseum 1/1 1 1 21m\n-deployment.apps/harborcluster-sample-harbor-harbor-core 1/1 1 1 21m\n-deployment.apps/harborcluster-sample-harbor-harbor-exporter 1/1 1 1 19m\n-deployment.apps/harborcluster-sample-harbor-harbor-jobservice 1/1 1 1 19m\n-deployment.apps/harborcluster-sample-harbor-harbor-notaryserver 1/1 1 1 21m\n-deployment.apps/harborcluster-sample-harbor-harbor-notarysigner 1/1 1 1 21m\n-deployment.apps/harborcluster-sample-harbor-harbor-portal 1/1 1 1 21m\n-deployment.apps/harborcluster-sample-harbor-harbor-registry 1/1 1 1 21m\n-deployment.apps/harborcluster-sample-harbor-harbor-registryctl 1/1 1 1 20m\n-deployment.apps/harborcluster-sample-harbor-harbor-trivy 1/1 1 1 21m\n-deployment.apps/rfs-harborcluster-sample-redis 1/1 1 1 23m\n+deployment.apps/harborcluster-sample-harbor-harbor-chartmuseum 1/1 1 1 3h17m\n+deployment.apps/harborcluster-sample-harbor-harbor-core 1/1 1 1 3h17m\n+deployment.apps/harborcluster-sample-harbor-harbor-exporter 1/1 1 1 3h17m\n+deployment.apps/harborcluster-sample-harbor-harbor-jobservice 1/1 1 1 3h17m\n+deployment.apps/harborcluster-sample-harbor-harbor-notaryserver 1/1 1 1 3h17m\n+deployment.apps/harborcluster-sample-harbor-harbor-notarysigner 1/1 1 1 3h17m\n+deployment.apps/harborcluster-sample-harbor-harbor-portal 1/1 1 1 3h17m\n+deployment.apps/harborcluster-sample-harbor-harbor-registry 1/1 1 1 3h17m\n+deployment.apps/harborcluster-sample-harbor-harbor-registryctl 1/1 1 1 3h17m\n+deployment.apps/harborcluster-sample-harbor-harbor-trivy 1/1 1 1 3h17m\n+deployment.apps/rfs-harborcluster-sample-redis 1/1 1 1 3h18m\nNAME DESIRED CURRENT READY AGE\n-replicaset.apps/harborcluster-sample-harbor-harbor-chartmuseum-7b75745c8f 1 1 1 21m\n-replicaset.apps/harborcluster-sample-harbor-harbor-core-8446dc9bdc 1 1 1 21m\n-replicaset.apps/harborcluster-sample-harbor-harbor-exporter-5bc9ccf9db 1 1 1 19m\n-replicaset.apps/harborcluster-sample-harbor-harbor-jobservice-6586c85665 1 1 1 19m\n-replicaset.apps/harborcluster-sample-harbor-harbor-notaryserver-78c799554 1 1 1 21m\n-replicaset.apps/harborcluster-sample-harbor-harbor-notarysigner-cc457d87d 1 1 1 21m\n-replicaset.apps/harborcluster-sample-harbor-harbor-portal-6599969476 1 1 1 21m\n-replicaset.apps/harborcluster-sample-harbor-harbor-registry-7558db475 1 1 1 21m\n-replicaset.apps/harborcluster-sample-harbor-harbor-registryctl-7d5479c4f8 1 1 1 20m\n-replicaset.apps/harborcluster-sample-harbor-harbor-trivy-678966b955 1 1 1 21m\n-replicaset.apps/rfs-harborcluster-sample-redis-6b7f4c4756 1 1 1 23m\n+replicaset.apps/harborcluster-sample-harbor-harbor-chartmuseum-5fcd966f47 1 1 1 3h1m\n+replicaset.apps/harborcluster-sample-harbor-harbor-core-74bb457c94 1 1 1 3h1m\n+replicaset.apps/harborcluster-sample-harbor-harbor-exporter-5dfb5c6f4 1 1 1 3h17m\n+replicaset.apps/harborcluster-sample-harbor-harbor-jobservice-58c8946c6c 1 1 1 3h17m\n+replicaset.apps/harborcluster-sample-harbor-harbor-notaryserver-7dc7dc5f8d 1 1 1 3h1m\n+replicaset.apps/harborcluster-sample-harbor-harbor-notarysigner-85459fbbb5 1 1 1 3h17m\n+replicaset.apps/harborcluster-sample-harbor-harbor-portal-844cf56674 1 1 1 3h17m\n+replicaset.apps/harborcluster-sample-harbor-harbor-registry-89487bb8c 1 1 1 3h1m\n+replicaset.apps/harborcluster-sample-harbor-harbor-registryctl-7db9744d44 1 1 1 3h17m\n+replicaset.apps/harborcluster-sample-harbor-harbor-trivy-5c795b8c77 1 1 1 3h17m\n+replicaset.apps/rfs-harborcluster-sample-redis-6fddf664 1 1 1 3h18m\nNAME READY AGE\n-statefulset.apps/minio-harborcluster-sample-zone-harbor 2/2 22m\n-statefulset.apps/postgresql-cluster-sample-ns-harborcluster-sample 1/1 23m\n-statefulset.apps/rfr-harborcluster-sample-redis 1/1 23m\n+statefulset.apps/minio-harborcluster-sample-zone-harbor 2/2 3h17m\n+statefulset.apps/postgresql-cluster-sample-ns-harborcluster-sample 1/1 3h18m\n+statefulset.apps/rfr-harborcluster-sample-redis 1/1 3h18m\n-NAME TEAM VERSION PODS VOLUME CPU-REQUEST MEMORY-REQUEST AGE STATUS\n-postgresql.acid.zalan.do/postgresql-cluster-sample-ns-harborcluster-sample postgresql-cluster-sample-ns 12 1 1Gi 100m 250Mi 23m Running\n+NAME COMPLETIONS DURATION AGE\n+job.batch/minio-harborcluster-sample 1/1 11s 3h1m\nNAME AGE\n-redisfailover.databases.spotahome.com/harborcluster-sample-redis 23m\n+redisfailover.databases.spotahome.com/harborcluster-sample-redis 3h18m\n```\n-Of course, you can also check other resources such as `secret`, `pv`, `certificate` and `configMap` etc. under the specified namespace with `kubectl get xxxx -n cluster-sample-ns` commands.\n+Of course, you can also check other resources such as `ingress`, `secret`, `pv`, `certificate` and `configMap` etc. under the specified namespace with `kubectl get xxxx -n cluster-sample-ns` commands.\n## Try the deployed Harbor cluster [Optional]\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
doc(tutorial):update the outdated guides info
fix #759
Signed-off-by: Steven Zou <szou@vmware.com>
|
254,875
|
02.11.2021 10:14:23
| -28,800
|
32b3914fd8dcbc795df9a5279466571fd45f5bb2
|
feat(doc) update doc typo
|
[
{
"change_type": "MODIFY",
"old_path": "docs/installation/enable_minio_console.md",
"new_path": "docs/installation/enable_minio_console.md",
"diff": "@@ -67,7 +67,7 @@ After a short while, the console pod will be ready then.\n```shell\n# Check console pod status\n-k8s get pods --selector=app=console -n harbor-operator-ns\n+kubectl get pods --selector=app=console -n harbor-operator-ns\n## Output\n# NAME READY STATUS RESTARTS AGE\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/kustomization-all-in-one.md",
"new_path": "docs/installation/kustomization-all-in-one.md",
"diff": "@@ -26,7 +26,7 @@ kubectl apply -f https://raw.githubusercontent.com/goharbor/harbor-operator/mast\nCheck the installed operators:\n```shell\n-k8s get pod -n harbor-operator-ns\n+kubectl get pod -n harbor-operator-ns\n```\nOutput:\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/installation/kustomization-custom.md",
"new_path": "docs/installation/kustomization-custom.md",
"diff": "@@ -111,7 +111,7 @@ kubectl apply -f https://raw.githubusercontent.com/goharbor/harbor-operator/mast\nCheck the Harbor operator status (by default it's deployed into the `harbor-operator-ns` namespace):\n```shell\n-k8s get pod -n harbor-operator-ns\n+kubectl get pod -n harbor-operator-ns\n```\nOutput:\n"
},
{
"change_type": "MODIFY",
"old_path": "docs/tutorial.md",
"new_path": "docs/tutorial.md",
"diff": "@@ -13,7 +13,7 @@ Check the prerequisites and install the Harbor operator base on your needs by fo\nBefore moving on, make sure the harbor operator is successfully deployed in the Kubenetes cluster.\n```shell\n-~/harbor-operator$ k8s get all -n harbor-operator-ns\n+~/harbor-operator$ kubectl get all -n harbor-operator-ns\nNAME READY STATUS RESTARTS AGE\npod/harbor-operator-6fd4dc66b-sh6cc 1/1 Running 0 3h18m\npod/minio-operator-667b56db9c-q6v4j 1/1 Running 0 3h18m\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/deployment.yaml",
"new_path": "manifests/cluster/deployment.yaml",
"diff": "@@ -33888,6 +33888,7 @@ rules:\n- databases.spotahome.com\nresources:\n- redisfailovers\n+ - redisfailovers/finalizers\nverbs:\n- '*'\n- apiGroups:\n@@ -33904,6 +33905,8 @@ rules:\n- endpoints\n- events\n- configmaps\n+ - persistentvolumeclaims\n+ - persistentvolumeclaims/finalizers\nverbs:\n- '*'\n- apiGroups:\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
feat(doc) update doc typo
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,881
|
19.10.2021 15:08:51
| -28,800
|
f19ac81575b079300e3834d52a864ea9aa49621a
|
fix: add redis cluster role patch to be compatible with openshift
|
[
{
"change_type": "MODIFY",
"old_path": "charts/harbor-operator/charts/redisoperator/templates/rbac.yaml",
"new_path": "charts/harbor-operator/charts/redisoperator/templates/rbac.yaml",
"diff": "@@ -36,6 +36,8 @@ rules:\n- endpoints\n- events\n- configmaps\n+ - persistentvolumeclaims\n+ - persistentvolumeclaims/finalizers\nverbs:\n- \"*\"\n- apiGroups:\n"
},
{
"change_type": "MODIFY",
"old_path": "manifests/cluster/kustomization.yaml",
"new_path": "manifests/cluster/kustomization.yaml",
"diff": "@@ -26,6 +26,7 @@ patchesStrategicMerge:\n- patch/delete-minio-console.yaml\n- patch/delete-duplicated-ns.yaml\n- patch/pg-configmap.yaml\n+ - patch/redis-rbac.yaml\npatchesJson6902:\n- target:\n"
},
{
"change_type": "ADD",
"old_path": null,
"new_path": "manifests/cluster/patch/redis-rbac.yaml",
"diff": "+apiVersion: rbac.authorization.k8s.io/v1\n+kind: ClusterRole\n+metadata:\n+ annotations:\n+ goharbor.io/deploy-engine: Kustomization\n+ goharbor.io/deploy-mode: cluster\n+ goharbor.io/operator-version: v1.1.0\n+ name: redisoperator\n+rules:\n+- apiGroups:\n+ - databases.spotahome.com\n+ resources:\n+ - redisfailovers\n+ - redisfailovers/finalizers\n+ verbs:\n+ - '*'\n+- apiGroups:\n+ - apiextensions.k8s.io\n+ resources:\n+ - customresourcedefinitions\n+ verbs:\n+ - '*'\n+- apiGroups:\n+ - \"\"\n+ resources:\n+ - pods\n+ - services\n+ - endpoints\n+ - events\n+ - configmaps\n+ - persistentvolumeclaims\n+ - persistentvolumeclaims/finalizers\n+ verbs:\n+ - '*'\n+- apiGroups:\n+ - \"\"\n+ resources:\n+ - secrets\n+ verbs:\n+ - get\n+- apiGroups:\n+ - apps\n+ resources:\n+ - deployments\n+ - statefulsets\n+ verbs:\n+ - '*'\n+- apiGroups:\n+ - policy\n+ resources:\n+ - poddisruptionbudgets\n+ verbs:\n+ - '*'\n\\ No newline at end of file\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix: add redis cluster role patch to be compatible with openshift
Signed-off-by: chlins <chenyuzh@vmware.com>
|
254,875
|
26.10.2021 08:27:16
| -28,800
|
cbcfec046b81d191ca3e4529ccff164eea2c291a
|
fix core token when using "https://IP:port" as the external URL
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/core.go",
"new_path": "controllers/goharbor/harbor/core.go",
"diff": "@@ -251,7 +251,7 @@ func (r *Reconciler) GetCoreTokenCertificate(ctx context.Context, harbor *goharb\nAlgorithm: certv1.RSAKeyAlgorithm,\nSize: CoreTokenServiceDefaultKeySize,\n},\n- DNSNames: []string{publicDNS.Host},\n+ DNSNames: []string{publicDNS.Hostname()},\nSecretName: secretName,\nUsages: []certv1.KeyUsage{certv1.UsageSigning},\nIssuerRef: harbor.Spec.Core.TokenIssuer,\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
fix core token when using "https://IP:port" as the external URL
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,875
|
26.10.2021 08:50:50
| -28,800
|
1565a88a69440a870ee3ffc6a6c4c9e612d78b9f
|
remove dns name from externalURL in tokencert
|
[
{
"change_type": "MODIFY",
"old_path": "controllers/goharbor/harbor/core.go",
"new_path": "controllers/goharbor/harbor/core.go",
"diff": "@@ -231,11 +231,6 @@ func (r *Reconciler) GetCoreTokenCertificate(ctx context.Context, harbor *goharb\nname := r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String(), \"tokencert\")\nnamespace := harbor.GetNamespace()\n- publicDNS, err := url.Parse(harbor.Spec.ExternalURL)\n- if err != nil {\n- return nil, errors.Wrap(err, \"cannot parse external url\")\n- }\n-\nsecretName := r.NormalizeName(ctx, harbor.GetName(), controllers.Core.String(), \"tokencert\")\nreturn &certv1.Certificate{\n@@ -247,11 +242,11 @@ func (r *Reconciler) GetCoreTokenCertificate(ctx context.Context, harbor *goharb\nDuration: &metav1.Duration{\nDuration: CoreTokenServiceDefaultCertificateDuration,\n},\n+ CommonName: secretName,\nPrivateKey: &certv1.CertificatePrivateKey{\nAlgorithm: certv1.RSAKeyAlgorithm,\nSize: CoreTokenServiceDefaultKeySize,\n},\n- DNSNames: []string{publicDNS.Hostname()},\nSecretName: secretName,\nUsages: []certv1.KeyUsage{certv1.UsageSigning},\nIssuerRef: harbor.Spec.Core.TokenIssuer,\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
remove dns name from externalURL in tokencert
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
254,875
|
12.11.2021 11:57:09
| -28,800
|
6e2b2c2e1f21cfe503a103b08acdc0cb7e05d1a4
|
remove push_cnab test in CI
push_cnab test need to pull docker image from dockerhub, which meet rate limitation sometime
|
[
{
"change_type": "MODIFY",
"old_path": ".github/scripts/apidb_test.sh",
"new_path": ".github/scripts/apidb_test.sh",
"diff": "@@ -13,7 +13,7 @@ sed -i '15i\\ ${dfout}= Run df -h\\n Log To Console ${dfout}' harbor/test\nsed -i 's/timeout=30/timeout=300/g' harbor/tests/apitests/python/library/docker_api.py\n-EXCLUDES=\"--exclude metrics --exclude singularity --exclude proxy_cache\"\n+EXCLUDES=\"--exclude metrics --exclude singularity --exclude proxy_cache --exclude push_cnab\"\nROBOT_FILES=\"/drone/tests/robot-cases/Group1-Nightly/Setup.robot /drone/tests/robot-cases/Group0-BAT/API_DB.robot\"\nCMD=\"robot -v DOCKER_USER:$DOCKER_USER -v DOCKER_PWD:$DOCKER_PWD -v ip:$CORE_HOST -v ip1: -v HARBOR_PASSWORD:Harbor12345 -v http_get_ca:true $EXCLUDES $ROBOT_FILES\"\n"
}
] |
Go
|
Apache License 2.0
|
goharbor/harbor-operator
|
remove push_cnab test in CI
push_cnab test need to pull docker image from dockerhub, which meet rate limitation sometime
Signed-off-by: Ziming Zhang <zziming@vmware.com>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.