From cc686e77fac8571592130c061ec78dc4715352b4 Mon Sep 17 00:00:00 2001 From: Pete Savage Date: Wed, 9 Nov 2022 17:43:40 +0000 Subject: [PATCH 001/228] Added SSL mode for openshift --- api/v1alpha1/frontendenvironment_types.go | 4 ++++ ...cloud.redhat.com_frontendenvironments.yaml | 5 +++++ controllers/reconcile.go | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/api/v1alpha1/frontendenvironment_types.go b/api/v1alpha1/frontendenvironment_types.go index b7154419..82de0a36 100644 --- a/api/v1alpha1/frontendenvironment_types.go +++ b/api/v1alpha1/frontendenvironment_types.go @@ -45,6 +45,10 @@ type FrontendEnvironmentSpec struct { // local will add it to the frontend's namespace // app-interface will add it to "openshift-customer-monitoring" Monitoring *MonitoringConfig `json:"monitoring,omitempty"` + + // SSL mode requests SSL from the services in openshift and k8s and then applies them to the + // pod, the route is also set to reencrypt in the case of OpenShift + SSL bool `json:"ssl,omitempty"` } type MonitoringConfig struct { diff --git a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml index fcce4168..8a6f374b 100644 --- a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml +++ b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml @@ -67,6 +67,11 @@ spec: - disabled - mode type: object + ssl: + description: SSL mode requests SSL from the services in openshift + and k8s and then applies them to the pod, the route is also set + to reencrypt in the case of OpenShift + type: boolean sso: description: Foo is an example field of FrontendEnvironment. Edit FrontendEnvironment_types.go to remove/update diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 134287bc..20ab265a 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -220,6 +220,15 @@ func (r *FrontendReconciliation) createFrontendService() error { return err } + if r.FrontendEnvironment.Spec.SSL { + annotations := s.GetAnnotations() + if annotations == nil { + annotations = make(map[string]string) + } + annotations["service.beta.openshift.io/serving-cert-secret-name"] = fmt.Sprintf("%s-%s", r.Frontend.Name, "cert") + s.SetAnnotations(annotations) + } + labels := make(map[string]string) labels["frontend"] = r.Frontend.Name labeler := utils.GetCustomLabeler(labels, nn, r.Frontend) @@ -282,6 +291,16 @@ func (r *FrontendReconciliation) createAnnotationsAndPopulate(nn types.Namespace netobj.SetAnnotations(annotations) } + if r.FrontendEnvironment.Spec.SSL { + annotations := netobj.GetAnnotations() + if annotations == nil { + annotations = map[string]string{} + } + + annotations["route.openshift.io/termination"] = "reencrypt" + netobj.SetAnnotations(annotations) + } + if r.Frontend.Spec.Image != "" { r.populateConsoleDotIngress(nn, netobj, ingressClass, nn.Name) } else { From c64ae961ece12d63fc736d7d3d9bb5aa5177c481 Mon Sep 17 00:00:00 2001 From: Pete Savage Date: Thu, 5 Jan 2023 13:52:37 +0000 Subject: [PATCH 002/228] Added deploy changes --- api/v1alpha1/zz_generated.deepcopy.go | 2 +- deploy.yml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 4af03772..777d1aa5 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -37,7 +37,7 @@ func (in *APIInfo) DeepCopyInto(out *APIInfo) { } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApiInfo. +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIInfo. func (in *APIInfo) DeepCopy() *APIInfo { if in == nil { return nil diff --git a/deploy.yml b/deploy.yml index 69c8591c..4c34200a 100644 --- a/deploy.yml +++ b/deploy.yml @@ -368,6 +368,11 @@ objects: - disabled - mode type: object + ssl: + description: SSL mode requests SSL from the services in openshift + and k8s and then applies them to the pod, the route is also set + to reencrypt in the case of OpenShift + type: boolean sso: description: Foo is an example field of FrontendEnvironment. Edit FrontendEnvironment_types.go to remove/update From 31215baa77f1a33dcb22070ba67e9b8b1c8ec8e4 Mon Sep 17 00:00:00 2001 From: Gabor Burges Date: Tue, 10 Jan 2023 14:50:49 +0100 Subject: [PATCH 003/228] Tempfix to shut DVO until we fix the issues --- api/v1alpha1/zz_generated.deepcopy.go | 2 +- config/manager/manager.yaml | 2 ++ controllers/reconcile.go | 2 ++ deploy.yml | 3 +++ docs/antora/modules/ROOT/pages/api_reference.adoc | 4 ++-- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 4af03772..777d1aa5 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -37,7 +37,7 @@ func (in *APIInfo) DeepCopyInto(out *APIInfo) { } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApiInfo. +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIInfo. func (in *APIInfo) DeepCopy() *APIInfo { if in == nil { return nil diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 4fcd2a2d..01fbc29d 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -13,6 +13,8 @@ metadata: labels: control-plane: controller-manager operator-name: frontend-operator + annotations: + ignore-check.kube-linter.io/minimum-three-replicas: "operator doesn't need more than one" spec: selector: matchLabels: diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 134287bc..d1f1a054 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -173,6 +173,8 @@ func (r *FrontendReconciliation) createFrontendDeployment(hash, ssoHash string) annotations["configHash"] = hash annotations["ssoHash"] = ssoHash + // This is a temporary measure to silence DVO from opening 600 million tickets for each frontend - Issue fix ETA is TBD + annotations["kube-linter.io/ignore-all"] = "we don't need no any checking" d.Spec.Template.SetAnnotations(annotations) diff --git a/deploy.yml b/deploy.yml index 69c8591c..61ee6530 100644 --- a/deploy.yml +++ b/deploy.yml @@ -1167,6 +1167,9 @@ objects: - apiVersion: apps/v1 kind: Deployment metadata: + annotations: + ignore-check.kube-linter.io/minimum-three-replicas: operator doesn't need more + than one labels: control-plane: controller-manager operator-name: frontend-operator diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index a1b729d0..b5580b91 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -24,7 +24,7 @@ Package v1alpha1 contains API Schema definitions for the v1alpha1 API group [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-apiinfo"] -==== ApiInfo +==== APIInfo @@ -368,7 +368,7 @@ FrontendSpec defines the desired state of Frontend | *`envName`* __string__ | | *`title`* __string__ | | *`deploymentRepo`* __string__ | -| *`API`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-apiinfo[$$ApiInfo$$]__ | +| *`API`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-apiinfo[$$APIInfo$$]__ | | *`frontend`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendinfo[$$FrontendInfo$$]__ | | *`image`* __string__ | | *`service`* __string__ | From a83234e650d65e2e4c9efd17e236fcae46e3ec2c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 08:43:12 -0500 Subject: [PATCH 004/228] Add the string to end of deployment name --- controllers/reconcile.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index d1f1a054..b159e1b0 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -142,9 +142,11 @@ func (r *FrontendReconciliation) createFrontendDeployment(hash, ssoHash string) // Create new empty struct d := &apps.Deployment{} + deploymentName := r.Frontend.Name + "-frontend" + // Define name of resource nn := types.NamespacedName{ - Name: r.Frontend.Name, + Name: deploymentName, Namespace: r.Frontend.Namespace, } From 72d9526a896c6a430109c38d726c3180b2347197 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:17:53 -0500 Subject: [PATCH 005/228] Change some tests --- controllers/frontend_controller_suite_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 9ddc0dba..785221d3 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -563,7 +563,7 @@ var _ = Describe("Frontend controller with chrome", func() { err := k8sClient.Get(ctx, deploymentLookupKey, createdDeployment) return err == nil }, timeout, interval).Should(BeTrue()) - Expect(createdDeployment.Name).Should(Equal(FrontendName)) + Expect(createdDeployment.Name).Should(Equal(FrontendName + "-frontend")) fmt.Printf("\n%v\n", createdDeployment.GetAnnotations()) Expect(createdDeployment.Spec.Template.GetAnnotations()["ssoHash"]).ShouldNot(Equal("")) Expect(createdDeployment.Spec.Template.GetAnnotations()["configHash"]).ShouldNot(Equal("")) @@ -573,14 +573,14 @@ var _ = Describe("Frontend controller with chrome", func() { err := k8sClient.Get(ctx, ingressLookupKey, createdIngress) return err == nil }, timeout, interval).Should(BeTrue()) - Expect(createdIngress.Name).Should(Equal(FrontendName)) + Expect(createdIngress.Name).Should(Equal(FrontendName + "-frontend")) createdService := &v1.Service{} Eventually(func() bool { err := k8sClient.Get(ctx, serviceLookupKey, createdService) return err == nil }, timeout, interval).Should(BeTrue()) - Expect(createdService.Name).Should(Equal(FrontendName)) + Expect(createdService.Name).Should(Equal(FrontendName + "-frontend")) createdConfigMap := &v1.ConfigMap{} Eventually(func() bool { From 99b4dafe2143f2d5658515cff57a9a43690ceef8 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:22:18 -0500 Subject: [PATCH 006/228] Another name change --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 785221d3..3029f78d 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -173,7 +173,7 @@ var _ = Describe("Frontend controller with image", func() { err := k8sClient.Get(ctx, deploymentLookupKey, createdDeployment) return err == nil }, timeout, interval).Should(BeTrue()) - Expect(createdDeployment.Name).Should(Equal(FrontendName)) + Expect(createdDeployment.Name).Should(Equal(FrontendName + "-frontend")) fmt.Printf("\n%v\n", createdDeployment.GetAnnotations()) Expect(createdDeployment.Spec.Template.GetAnnotations()["ssoHash"]).ShouldNot(Equal("")) Expect(createdDeployment.Spec.Template.GetAnnotations()["configHash"]).ShouldNot(Equal("")) From e0f5385fd1c5292c6e297e500fd5518faf21254a Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:24:59 -0500 Subject: [PATCH 007/228] Another name change --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 3029f78d..3bd37167 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -162,7 +162,7 @@ var _ = Describe("Frontend controller with image", func() { } Expect(k8sClient.Create(ctx, bundle)).Should(Succeed()) - deploymentLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} + deploymentLookupKey := types.NamespacedName{Name: frontend.Name + "-frontend", Namespace: FrontendNamespace} ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} configMapLookupKey := types.NamespacedName{Name: frontendEnvironment.Name, Namespace: FrontendNamespace} configSSOMapLookupKey := types.NamespacedName{Name: fmt.Sprintf("%s-sso", frontendEnvironment.Name), Namespace: FrontendNamespace} From 491645288bf2a1627d4030d9a1d45abbb6cd4dca Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:27:26 -0500 Subject: [PATCH 008/228] Another name change --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 3bd37167..bdfef7c2 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -552,7 +552,7 @@ var _ = Describe("Frontend controller with chrome", func() { } Expect(k8sClient.Create(ctx, bundle)).Should(Succeed()) - deploymentLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} + deploymentLookupKey := types.NamespacedName{Name: frontend.Name + "-frontend", Namespace: FrontendNamespace} ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} configMapLookupKey := types.NamespacedName{Name: frontendEnvironment.Name, Namespace: FrontendNamespace} configSSOMapLookupKey := types.NamespacedName{Name: fmt.Sprintf("%s-sso", frontendEnvironment.Name), Namespace: FrontendNamespace} From fe6f1cd80ab5475e86fab170ee6cc881d17577a3 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:30:00 -0500 Subject: [PATCH 009/228] Another name change --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index bdfef7c2..3bd37167 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -552,7 +552,7 @@ var _ = Describe("Frontend controller with chrome", func() { } Expect(k8sClient.Create(ctx, bundle)).Should(Succeed()) - deploymentLookupKey := types.NamespacedName{Name: frontend.Name + "-frontend", Namespace: FrontendNamespace} + deploymentLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} configMapLookupKey := types.NamespacedName{Name: frontendEnvironment.Name, Namespace: FrontendNamespace} configSSOMapLookupKey := types.NamespacedName{Name: fmt.Sprintf("%s-sso", frontendEnvironment.Name), Namespace: FrontendNamespace} From 23098490bead1603a432a767e4c97f640c712aa2 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:38:18 -0500 Subject: [PATCH 010/228] Another name change --- controllers/frontend_controller_suite_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 3bd37167..d95b1ef3 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -546,13 +546,13 @@ var _ = Describe("Frontend controller with chrome", func() { Spec: crd.BundleSpec{ ID: BundleName, Title: "", - AppList: []string{FrontendName, FrontendName2, FrontendName3}, + AppList: []string{FrontendName + "-frontend", FrontendName2 + "-frontend", FrontendName3 + "-frontend"}, EnvName: FrontendEnvName, }, } Expect(k8sClient.Create(ctx, bundle)).Should(Succeed()) - deploymentLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} + deploymentLookupKey := types.NamespacedName{Name: frontend.Name + "-frontend", Namespace: FrontendNamespace} ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} configMapLookupKey := types.NamespacedName{Name: frontendEnvironment.Name, Namespace: FrontendNamespace} configSSOMapLookupKey := types.NamespacedName{Name: fmt.Sprintf("%s-sso", frontendEnvironment.Name), Namespace: FrontendNamespace} From 92058a3f1fa494432df3afeb94d8c3ceebc5fab2 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:41:53 -0500 Subject: [PATCH 011/228] Got a little over-zealous --- controllers/frontend_controller_suite_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index d95b1ef3..342797e7 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -573,14 +573,14 @@ var _ = Describe("Frontend controller with chrome", func() { err := k8sClient.Get(ctx, ingressLookupKey, createdIngress) return err == nil }, timeout, interval).Should(BeTrue()) - Expect(createdIngress.Name).Should(Equal(FrontendName + "-frontend")) + Expect(createdIngress.Name).Should(Equal(FrontendName)) createdService := &v1.Service{} Eventually(func() bool { err := k8sClient.Get(ctx, serviceLookupKey, createdService) return err == nil }, timeout, interval).Should(BeTrue()) - Expect(createdService.Name).Should(Equal(FrontendName + "-frontend")) + Expect(createdService.Name).Should(Equal(FrontendName)) createdConfigMap := &v1.ConfigMap{} Eventually(func() bool { From da0b3d5a88e6788e948a4ee3542b3b00c405b2d2 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:46:37 -0500 Subject: [PATCH 012/228] Another name in the test --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 342797e7..eaa8b3f7 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -597,7 +597,7 @@ var _ = Describe("Frontend controller with chrome", func() { Expect(createdConfigMap.Data).Should(Equal(map[string]string{ "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"}},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}}}", "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) - Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) + Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName + "-frontend")) createdSSOConfigMap := &v1.ConfigMap{} Eventually(func() bool { err := k8sClient.Get(ctx, configSSOMapLookupKey, createdSSOConfigMap) From dc07ab2484c4c870df3f79c22af607265a0221ae Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:50:21 -0500 Subject: [PATCH 013/228] Name in JSON --- controllers/frontend_controller_suite_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index eaa8b3f7..6fe6cfc3 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -595,9 +595,9 @@ var _ = Describe("Frontend controller with chrome", func() { }, timeout, interval).Should(BeTrue()) Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ - "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"}},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}}}", + "fed-modules.json": "{\"chrome-frontend\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"}},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}}}", "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) - Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName + "-frontend")) + Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) createdSSOConfigMap := &v1.ConfigMap{} Eventually(func() bool { err := k8sClient.Get(ctx, configSSOMapLookupKey, createdSSOConfigMap) From 9acb5097542e5d825169ce7eba653e5a8b102e73 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:53:40 -0500 Subject: [PATCH 014/228] I am not sure what's failing here --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 6fe6cfc3..342797e7 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -595,7 +595,7 @@ var _ = Describe("Frontend controller with chrome", func() { }, timeout, interval).Should(BeTrue()) Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ - "fed-modules.json": "{\"chrome-frontend\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"}},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}}}", + "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"}},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}}}", "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) createdSSOConfigMap := &v1.ConfigMap{} From 0fd3bdbbdf5bbdd48eed8660b10755e3fcc9d7bc Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 11 Jan 2023 13:58:35 -0500 Subject: [PATCH 015/228] I am deep into trial and error and seeing that this is more complex than I expected due to side-effecty uses of names --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 342797e7..3b42dc1a 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -546,7 +546,7 @@ var _ = Describe("Frontend controller with chrome", func() { Spec: crd.BundleSpec{ ID: BundleName, Title: "", - AppList: []string{FrontendName + "-frontend", FrontendName2 + "-frontend", FrontendName3 + "-frontend"}, + AppList: []string{FrontendName, FrontendName2, FrontendName3}, EnvName: FrontendEnvName, }, } From 0250ac0c6ca126972aaaaa02d284d7af461340bd Mon Sep 17 00:00:00 2001 From: Gabor Burges Date: Thu, 12 Jan 2023 11:09:30 +0100 Subject: [PATCH 016/228] Setting the annotation to the right place --- controllers/reconcile.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index d1f1a054..97d103e4 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -173,11 +173,17 @@ func (r *FrontendReconciliation) createFrontendDeployment(hash, ssoHash string) annotations["configHash"] = hash annotations["ssoHash"] = ssoHash - // This is a temporary measure to silence DVO from opening 600 million tickets for each frontend - Issue fix ETA is TBD - annotations["kube-linter.io/ignore-all"] = "we don't need no any checking" d.Spec.Template.SetAnnotations(annotations) + // This is a temporary measure to silence DVO from opening 600 million tickets for each frontend - Issue fix ETA is TBD + deploymentAnnotation := d.ObjectMeta.GetAnnotations() + if deploymentAnnotation == nil { + deploymentAnnotation = make(map[string]string) + } + deploymentAnnotation["kube-linter.io/ignore-all"] = "we don't need no any checking" + d.ObjectMeta.SetAnnotations(deploymentAnnotation) + // Inform the cache that our updates are complete if err := r.Cache.Update(CoreDeployment, d); err != nil { return err From c6541fe828383c0a1240e524dd6bb8bfcce72535 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 18 Jan 2023 14:09:57 -0500 Subject: [PATCH 017/228] spec change --- api/v1alpha1/frontendenvironment_types.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/v1alpha1/frontendenvironment_types.go b/api/v1alpha1/frontendenvironment_types.go index b7154419..771ace51 100644 --- a/api/v1alpha1/frontendenvironment_types.go +++ b/api/v1alpha1/frontendenvironment_types.go @@ -45,6 +45,11 @@ type FrontendEnvironmentSpec struct { // local will add it to the frontend's namespace // app-interface will add it to "openshift-customer-monitoring" Monitoring *MonitoringConfig `json:"monitoring,omitempty"` + + // GenerateChromeConfig determines if a chrome configmap will be generated + // If empty or false the chrome nav config in the chrome container will be used + // If true a configmap will be generated and mounted into the chrome container + GenerateChromeConfig bool `json:"generateChromeConfig,omitempty"` } type MonitoringConfig struct { From 6892cc8e188e72787e23367bf7bde426df92c184 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 18 Jan 2023 14:12:50 -0500 Subject: [PATCH 018/228] Guard in populateVolume --- controllers/reconcile.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index f2ee6e27..f416a7bd 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -112,7 +112,10 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir } } -func populateVolumes(d *apps.Deployment, frontend *crd.Frontend) { +func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { + if !frontendEnvironment.Spec.GenerateChromeConfig { + return + } d.Spec.Template.Spec.Volumes = []v1.Volume{ { Name: "config", @@ -162,7 +165,7 @@ func (r *FrontendReconciliation) createFrontendDeployment(hash, ssoHash string) labeler(d) populateContainer(d, r.Frontend, r.FrontendEnvironment) - populateVolumes(d, r.Frontend) + populateVolumes(d, r.Frontend, r.FrontendEnvironment) d.Spec.Template.ObjectMeta.Labels = labels From b7fa51e6dcd395d80e2f0ed24e5775f50c976330 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 18 Jan 2023 14:44:44 -0500 Subject: [PATCH 019/228] Make generating the config configmap conditional --- controllers/reconcile.go | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index f416a7bd..7af6735d 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -41,18 +41,24 @@ type FrontendReconciliation struct { } func (r *FrontendReconciliation) run() error { - hash, err := r.setupConfigMap() - if err != nil { - return err + var annotationHashes []map[string]string + + if r.FrontendEnvironment.Spec.GenerateChromeConfig { + configHash, err := r.setupConfigMap() + if err != nil { + return err + } + annotationHashes = append(annotationHashes, map[string]string{"configHash": configHash}) } ssoHash, err := r.createSSOConfigMap() if err != nil { return err } + annotationHashes = append(annotationHashes, map[string]string{"ssoHash": ssoHash}) if r.Frontend.Spec.Image != "" { - if err := r.createFrontendDeployment(hash, ssoHash); err != nil { + if err := r.createFrontendDeployment(annotationHashes); err != nil { return err } if err := r.createFrontendService(); err != nil { @@ -140,7 +146,7 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnviron } } -func (r *FrontendReconciliation) createFrontendDeployment(hash, ssoHash string) error { +func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map[string]string) error { // Create new empty struct d := &apps.Deployment{} @@ -176,8 +182,11 @@ func (r *FrontendReconciliation) createFrontendDeployment(hash, ssoHash string) annotations = make(map[string]string) } - annotations["configHash"] = hash - annotations["ssoHash"] = ssoHash + for _, hash := range annotationHashes { + for k, v := range hash { + annotations[k] = v + } + } d.Spec.Template.SetAnnotations(annotations) From 5b2214255b834b113b4e0018bbf6842d0f273997 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 18 Jan 2023 14:47:33 -0500 Subject: [PATCH 020/228] Make sure tests all generate chrome config --- controllers/frontend_controller_suite_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 3b42dc1a..c47c40a0 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -140,6 +140,7 @@ var _ = Describe("Frontend controller with image", func() { Monitoring: &crd.MonitoringConfig{ Mode: "app-interface", }, + GenerateChromeConfig: true, }, } Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) @@ -530,6 +531,7 @@ var _ = Describe("Frontend controller with chrome", func() { Monitoring: &crd.MonitoringConfig{ Mode: "app-interface", }, + GenerateChromeConfig: true, }, } Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) @@ -678,6 +680,7 @@ var _ = Describe("ServiceMonitor Creation", func() { Monitoring: &crd.MonitoringConfig{ Mode: "app-interface", }, + GenerateChromeConfig: true, }, } Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) @@ -881,6 +884,7 @@ var _ = Describe("Dependencies", func() { Monitoring: &crd.MonitoringConfig{ Mode: "app-interface", }, + GenerateChromeConfig: true, }, } Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) From 44016f45d9dc0f0cbe5e27a0bbac6001a6e2eac6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 18 Jan 2023 14:58:32 -0500 Subject: [PATCH 021/228] Missed a FrontendEnvironment in the controller test --- controllers/frontend_controller_suite_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index c47c40a0..040778a5 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -256,6 +256,7 @@ var _ = Describe("Frontend controller with service", func() { Monitoring: &crd.MonitoringConfig{ Mode: "local", }, + GenerateChromeConfig: true, }, } Expect(k8sClient.Create(ctx, &frontendEnvironment)).Should(Succeed()) From 265f169ce4af53505f74a42ed835e8f42b43f316 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 18 Jan 2023 15:00:09 -0500 Subject: [PATCH 022/228] pre-push' --- config/crd/bases/cloud.redhat.com_frontendenvironments.yaml | 6 ++++++ deploy.yml | 6 ++++++ docs/antora/modules/ROOT/pages/api_reference.adoc | 1 + 3 files changed, 13 insertions(+) diff --git a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml index fcce4168..189bb997 100644 --- a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml +++ b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml @@ -45,6 +45,12 @@ spec: spec: description: FrontendEnvironmentSpec defines the desired state of FrontendEnvironment properties: + generateChromeConfig: + description: GenerateChromeConfig determines if a chrome configmap + will be generated If empty or false the chrome nav config in the + chrome container will be used If true a configmap will be generated + and mounted into the chrome container + type: boolean hostname: description: Hostname type: string diff --git a/deploy.yml b/deploy.yml index 61ee6530..714ed23f 100644 --- a/deploy.yml +++ b/deploy.yml @@ -346,6 +346,12 @@ objects: spec: description: FrontendEnvironmentSpec defines the desired state of FrontendEnvironment properties: + generateChromeConfig: + description: GenerateChromeConfig determines if a chrome configmap + will be generated If empty or false the chrome nav config in the + chrome container will be used If true a configmap will be generated + and mounted into the chrome container + type: boolean hostname: description: Hostname type: string diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index b5580b91..7e59e216 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -311,6 +311,7 @@ FrontendEnvironmentSpec defines the desired state of FrontendEnvironment | *`hostname`* __string__ | Hostname | *`whitelist`* __string array__ | Whitelist CIDRs | *`monitoring`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-monitoringconfig[$$MonitoringConfig$$]__ | MonitorMode determines where a ServiceMonitor object will be placed local will add it to the frontend's namespace app-interface will add it to "openshift-customer-monitoring" +| *`generateChromeConfig`* __boolean__ | GenerateChromeConfig determines if a chrome configmap will be generated If empty or false the chrome nav config in the chrome container will be used If true a configmap will be generated and mounted into the chrome container |=== From 2d6b1db5c0e55a5643de88ce13aa071956d35ca0 Mon Sep 17 00:00:00 2001 From: Pete Savage Date: Fri, 20 Jan 2023 13:20:01 +0000 Subject: [PATCH 023/228] Finished SSL mode --- controllers/reconcile.go | 76 ++++++++++++++----- .../modules/ROOT/pages/api_reference.adoc | 5 +- 2 files changed, 58 insertions(+), 23 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 20ab265a..822dbc58 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -75,6 +75,43 @@ func (r *FrontendReconciliation) run() error { func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) + mounts := []v1.VolumeMount{ + { + Name: "config", + MountPath: "/opt/app-root/src/build/chrome", + }, + { + Name: "sso", + MountPath: "/opt/app-root/src/build/js/sso-url.js", + SubPath: "sso-url.js", + }, + } + + envs := []v1.EnvVar{{ + Name: "SSO_URL", + Value: frontendEnvironment.Spec.SSO, + }, { + Name: "ROUTE_PREFIX", + Value: "apps", + }} + + if frontendEnvironment.Spec.SSL { + mounts = append(mounts, v1.VolumeMount{ + Name: "certs", + MountPath: "/opt/certs", + }) + envs = append(envs, + v1.EnvVar{ + Name: "CADDY_TLS_MODE", + Value: "https_port 8000", + }, + v1.EnvVar{ + Name: "CADDY_TLS_CERT", + Value: "tls /opt/certs/tls.crt /top/certs/tls.key", + }, + ) + } + // Modify the obejct to set the things we care about d.Spec.Template.Spec.Containers = []v1.Container{{ Name: "fe-image", @@ -91,29 +128,13 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir Protocol: "TCP", }, }, - VolumeMounts: []v1.VolumeMount{ - { - Name: "config", - MountPath: "/opt/app-root/src/build/chrome", - }, - { - Name: "sso", - MountPath: "/opt/app-root/src/build/js/sso-url.js", - SubPath: "sso-url.js", - }, - }, - Env: []v1.EnvVar{{ - Name: "SSO_URL", - Value: frontendEnvironment.Spec.SSO, - }, { - Name: "ROUTE_PREFIX", - Value: "apps", - }}}, + VolumeMounts: mounts, + Env: envs}, } } -func populateVolumes(d *apps.Deployment, frontend *crd.Frontend) { - d.Spec.Template.Spec.Volumes = []v1.Volume{ +func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { + vols := []v1.Volume{ { Name: "config", VolumeSource: v1.VolumeSource{ @@ -135,6 +156,19 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend) { }, }, } + + if frontendEnvironment.Spec.SSL { + vols = append(vols, v1.Volume{ + Name: "certs", + VolumeSource: v1.VolumeSource{ + Secret: &v1.SecretVolumeSource{ + SecretName: fmt.Sprintf("%s-cert", frontend.Name), + }, + }, + }) + } + + d.Spec.Template.Spec.Volumes = vols } func (r *FrontendReconciliation) createFrontendDeployment(hash, ssoHash string) error { @@ -160,7 +194,7 @@ func (r *FrontendReconciliation) createFrontendDeployment(hash, ssoHash string) labeler(d) populateContainer(d, r.Frontend, r.FrontendEnvironment) - populateVolumes(d, r.Frontend) + populateVolumes(d, r.Frontend, r.FrontendEnvironment) d.Spec.Template.ObjectMeta.Labels = labels diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index a1b729d0..2f61066f 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -24,7 +24,7 @@ Package v1alpha1 contains API Schema definitions for the v1alpha1 API group [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-apiinfo"] -==== ApiInfo +==== APIInfo @@ -311,6 +311,7 @@ FrontendEnvironmentSpec defines the desired state of FrontendEnvironment | *`hostname`* __string__ | Hostname | *`whitelist`* __string array__ | Whitelist CIDRs | *`monitoring`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-monitoringconfig[$$MonitoringConfig$$]__ | MonitorMode determines where a ServiceMonitor object will be placed local will add it to the frontend's namespace app-interface will add it to "openshift-customer-monitoring" +| *`ssl`* __boolean__ | SSL mode requests SSL from the services in openshift and k8s and then applies them to the pod, the route is also set to reencrypt in the case of OpenShift |=== @@ -368,7 +369,7 @@ FrontendSpec defines the desired state of Frontend | *`envName`* __string__ | | *`title`* __string__ | | *`deploymentRepo`* __string__ | -| *`API`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-apiinfo[$$ApiInfo$$]__ | +| *`API`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-apiinfo[$$APIInfo$$]__ | | *`frontend`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-frontendinfo[$$FrontendInfo$$]__ | | *`image`* __string__ | | *`service`* __string__ | From e23b580514405ba773f17f88f48ede3c186e074e Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 20 Jan 2023 11:48:28 -0500 Subject: [PATCH 024/228] Fixed a bug in how I handle the volumes --- controllers/reconcile.go | 27 +++++++++++++++++---------- examples/chrome.yaml | 2 +- examples/feenvironment.yaml | 1 + 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 7af6735d..b1b696e5 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -119,31 +119,38 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir } func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { - if !frontendEnvironment.Spec.GenerateChromeConfig { - return - } - d.Spec.Template.Spec.Volumes = []v1.Volume{ + // By default we just want the SSO volume + volumes := []v1.Volume{ { - Name: "config", + Name: "sso", VolumeSource: v1.VolumeSource{ ConfigMap: &v1.ConfigMapVolumeSource{ LocalObjectReference: v1.LocalObjectReference{ - Name: frontend.Spec.EnvName, + Name: fmt.Sprintf("%s-sso", frontend.Spec.EnvName), }, }, }, }, - { - Name: "sso", + } + + // If we are generating the chrome config, add it to the volumes + if frontendEnvironment.Spec.GenerateChromeConfig { + config := v1.Volume{ + Name: "config", VolumeSource: v1.VolumeSource{ ConfigMap: &v1.ConfigMapVolumeSource{ LocalObjectReference: v1.LocalObjectReference{ - Name: fmt.Sprintf("%s-sso", frontend.Spec.EnvName), + Name: frontend.Spec.EnvName, }, }, }, - }, + } + volumes = append(volumes, config) } + + // Set the volumes on the deployment + d.Spec.Template.Spec.Volumes = volumes + } func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map[string]string) error { diff --git a/examples/chrome.yaml b/examples/chrome.yaml index 2a9f91c0..e59960ae 100644 --- a/examples/chrome.yaml +++ b/examples/chrome.yaml @@ -14,4 +14,4 @@ spec: paths: - / - /config/chrome - image: quay.io/cloudservices/insights-chrome-frontend:1ddc0de + image: quay.io/cloudservices/insights-chrome-frontend:2712b0a diff --git a/examples/feenvironment.yaml b/examples/feenvironment.yaml index cd676b22..4b9fb2ff 100644 --- a/examples/feenvironment.yaml +++ b/examples/feenvironment.yaml @@ -7,3 +7,4 @@ spec: monitoring: mode: "local" disabled: false + generateChromeConfig: true From 39741ac0ba9414b448717ef818e30dbc7747cda7 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 20 Jan 2023 11:54:44 -0500 Subject: [PATCH 025/228] Fixed conditionally mounting the volumes --- controllers/reconcile.go | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index b1b696e5..e03f406e 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -78,6 +78,25 @@ func (r *FrontendReconciliation) run() error { return nil } +func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) []v1.VolumeMount { + volumeMounts := []v1.VolumeMount{ + { + Name: "sso", + MountPath: "/opt/app-root/src/build/js/sso-url.js", + SubPath: "sso-url.js", + }, + } + + if frontendEnvironment.Spec.GenerateChromeConfig { + volumeMounts = append(volumeMounts, v1.VolumeMount{ + Name: "config", + MountPath: "/opt/app-root/src/build/chrome", + }) + } + + return volumeMounts +} + func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) @@ -97,17 +116,7 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir Protocol: "TCP", }, }, - VolumeMounts: []v1.VolumeMount{ - { - Name: "config", - MountPath: "/opt/app-root/src/build/chrome", - }, - { - Name: "sso", - MountPath: "/opt/app-root/src/build/js/sso-url.js", - SubPath: "sso-url.js", - }, - }, + VolumeMounts: populateContainerVolumeMounts(frontendEnvironment), Env: []v1.EnvVar{{ Name: "SSO_URL", Value: frontendEnvironment.Spec.SSO, @@ -150,7 +159,6 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnviron // Set the volumes on the deployment d.Spec.Template.Spec.Volumes = volumes - } func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map[string]string) error { From 94bda08416f627c0ab6f6326b6e0a0dfb3792b77 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 24 Jan 2023 10:13:54 -0500 Subject: [PATCH 026/228] Move to rhc-osdk-utils for annotations --- controllers/reconcile.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index e03f406e..3198ff8c 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -192,24 +192,15 @@ func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map d.Spec.Selector = &metav1.LabelSelector{MatchLabels: labels} - annotations := d.Spec.Template.GetAnnotations() - if annotations == nil { - annotations = make(map[string]string) - } - - for _, hash := range annotationHashes { - for k, v := range hash { - annotations[k] = v - } - } - - d.Spec.Template.SetAnnotations(annotations) + utils.UpdateAnnotations(&d.Spec.Template, annotationHashes...) // This is a temporary measure to silence DVO from opening 600 million tickets for each frontend - Issue fix ETA is TBD deploymentAnnotation := d.ObjectMeta.GetAnnotations() if deploymentAnnotation == nil { deploymentAnnotation = make(map[string]string) } + + // Gabor wrote the string "we don't need no any checking" and we will never change it deploymentAnnotation["kube-linter.io/ignore-all"] = "we don't need no any checking" d.ObjectMeta.SetAnnotations(deploymentAnnotation) From a67887552def4f8b15c357c8c6e314598f0d0b8f Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 24 Jan 2023 13:39:35 -0500 Subject: [PATCH 027/228] Updated rhc-osdk-utils. Made some changes to make that upgrade work. --- controllers/frontend_controller.go | 2 +- controllers/reconcile.go | 2 +- controllers/status.go | 5 ++++- go.mod | 2 +- go.sum | 2 ++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index 2a5cd548..cf4c14c0 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -39,7 +39,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/source" crd "github.com/RedHatInsights/frontend-operator/api/v1alpha1" - resCache "github.com/RedHatInsights/rhc-osdk-utils/resource_cache" + resCache "github.com/RedHatInsights/rhc-osdk-utils/resourceCache" prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/RedHatInsights/rhc-osdk-utils/utils" diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 3198ff8c..cddeac3c 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -10,7 +10,7 @@ import ( crd "github.com/RedHatInsights/frontend-operator/api/v1alpha1" localUtil "github.com/RedHatInsights/frontend-operator/controllers/utils" - resCache "github.com/RedHatInsights/rhc-osdk-utils/resource_cache" + resCache "github.com/RedHatInsights/rhc-osdk-utils/resourceCache" "github.com/RedHatInsights/rhc-osdk-utils/utils" "github.com/go-logr/logr" diff --git a/controllers/status.go b/controllers/status.go index fff67135..503d9b8d 100644 --- a/controllers/status.go +++ b/controllers/status.go @@ -105,7 +105,10 @@ func GetFrontendFigures(ctx context.Context, client client.Client, o *crd.Fronte }}, } - results := counter.Count(ctx, client) + results, err := counter.Count(ctx, client) + if err != nil { + return crd.FrontendDeployments{}, "", errors.Wrap("count resources: ", err) + } deploymentStats.ManagedDeployments = int32(results.Managed) deploymentStats.ReadyDeployments = int32(results.Ready) diff --git a/go.mod b/go.mod index 87db9af1..701a9f8f 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/RedHatInsights/clowder v0.50.0 - github.com/RedHatInsights/rhc-osdk-utils v0.6.2 + github.com/RedHatInsights/rhc-osdk-utils v0.7.0 github.com/go-logr/logr v1.2.0 github.com/go-logr/zapr v1.2.0 github.com/onsi/ginkgo v1.16.5 diff --git a/go.sum b/go.sum index 26c26990..ecc1e7f6 100644 --- a/go.sum +++ b/go.sum @@ -79,6 +79,8 @@ github.com/RedHatInsights/go-difflib v1.0.0 h1:BoruyjZfxO81sEynhkG6c4SMAQOjuBWez github.com/RedHatInsights/go-difflib v1.0.0/go.mod h1:UMKOFdypYfrKT1B1nbGodM09nhOiAmcjes8qWP7Myrs= github.com/RedHatInsights/rhc-osdk-utils v0.6.2 h1:VXTqk6VHrsaEPSw3N95rCq+g0y2LR7t9Za0wBS2/RyA= github.com/RedHatInsights/rhc-osdk-utils v0.6.2/go.mod h1:MQoUQGaVjM25JsownEKKa2Tef0qnJOm1ljocaQ0nx40= +github.com/RedHatInsights/rhc-osdk-utils v0.7.0 h1:KgOiw2nKS26RuiSRVWVHtXNPx23VMspuB0bLCLIAlTs= +github.com/RedHatInsights/rhc-osdk-utils v0.7.0/go.mod h1:MQoUQGaVjM25JsownEKKa2Tef0qnJOm1ljocaQ0nx40= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= From 4262f359a65e554f842cd1ea882b4761260198a1 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 25 Jan 2023 14:01:25 -0500 Subject: [PATCH 028/228] Minor refactor after conflict resolution --- controllers/reconcile.go | 71 ++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 0d626df1..c52eaf36 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -94,25 +94,44 @@ func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) }) } + if frontendEnvironment.Spec.SSL { + volumeMounts = append(volumeMounts, v1.VolumeMount{ + Name: "certs", + MountPath: "/opt/certs", + }) + } + return volumeMounts } func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) - mounts := []v1.VolumeMount{ - { - Name: "config", - MountPath: "/opt/app-root/src/build/chrome", - }, - { - Name: "sso", - MountPath: "/opt/app-root/src/build/js/sso-url.js", - SubPath: "sso-url.js", + // Modify the obejct to set the things we care about + d.Spec.Template.Spec.Containers = []v1.Container{{ + Name: "fe-image", + Image: frontend.Spec.Image, + Ports: []v1.ContainerPort{ + { + Name: "web", + ContainerPort: 80, + Protocol: "TCP", + }, + { + Name: "metrics", + ContainerPort: 9000, + Protocol: "TCP", + }, }, + VolumeMounts: populateContainerVolumeMounts(frontendEnvironment), + Env: populateContainerEnvVars(frontendEnvironment), + }, } +} + +func populateContainerEnvVars(frontendEnvironment *crd.FrontendEnvironment) []v1.EnvVar { - envs := []v1.EnvVar{{ + envVars := []v1.EnvVar{{ Name: "SSO_URL", Value: frontendEnvironment.Spec.SSO, }, { @@ -121,11 +140,7 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir }} if frontendEnvironment.Spec.SSL { - mounts = append(mounts, v1.VolumeMount{ - Name: "certs", - MountPath: "/opt/certs", - }) - envs = append(envs, + envVars = append(envVars, v1.EnvVar{ Name: "CADDY_TLS_MODE", Value: "https_port 8000", @@ -137,31 +152,7 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir ) } - // Modify the obejct to set the things we care about - d.Spec.Template.Spec.Containers = []v1.Container{{ - Name: "fe-image", - Image: frontend.Spec.Image, - Ports: []v1.ContainerPort{ - { - Name: "web", - ContainerPort: 80, - Protocol: "TCP", - }, - { - Name: "metrics", - ContainerPort: 9000, - Protocol: "TCP", - }, - }, - VolumeMounts: populateContainerVolumeMounts(frontendEnvironment), - Env: []v1.EnvVar{{ - Name: "SSO_URL", - Value: frontendEnvironment.Spec.SSO, - }, { - Name: "ROUTE_PREFIX", - Value: "apps", - }}}, - } + return envVars } func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { From dccec1c5f2654555f348249d8c47eec9439cac45 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 25 Jan 2023 14:02:31 -0500 Subject: [PATCH 029/228] pre-push --- api/v1alpha1/frontendenvironment_types.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/v1alpha1/frontendenvironment_types.go b/api/v1alpha1/frontendenvironment_types.go index 92abb0e0..029263a5 100644 --- a/api/v1alpha1/frontendenvironment_types.go +++ b/api/v1alpha1/frontendenvironment_types.go @@ -46,12 +46,11 @@ type FrontendEnvironmentSpec struct { // app-interface will add it to "openshift-customer-monitoring" Monitoring *MonitoringConfig `json:"monitoring,omitempty"` - // SSL mode requests SSL from the services in openshift and k8s and then applies them to the // pod, the route is also set to reencrypt in the case of OpenShift SSL bool `json:"ssl,omitempty"` - // GenerateChromeConfig determines if a chrome configmap will be generated + // GenerateChromeConfig determines if a chrome configmap will be generated // If empty or false the chrome nav config in the chrome container will be used // If true a configmap will be generated and mounted into the chrome container GenerateChromeConfig bool `json:"generateChromeConfig,omitempty"` From f1a5cdb2b69f72c2ddcf9bdf1bba3332fcbbc462 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 26 Jan 2023 10:15:06 -0500 Subject: [PATCH 030/228] Refactor config building, remove SSO cruft, change name in spec. --- api/v1alpha1/frontendenvironment_types.go | 8 +- controllers/frontend_controller_suite_test.go | 10 +- controllers/reconcile.go | 119 ++---------------- 3 files changed, 20 insertions(+), 117 deletions(-) diff --git a/api/v1alpha1/frontendenvironment_types.go b/api/v1alpha1/frontendenvironment_types.go index 029263a5..541bc7b0 100644 --- a/api/v1alpha1/frontendenvironment_types.go +++ b/api/v1alpha1/frontendenvironment_types.go @@ -50,10 +50,10 @@ type FrontendEnvironmentSpec struct { // pod, the route is also set to reencrypt in the case of OpenShift SSL bool `json:"ssl,omitempty"` - // GenerateChromeConfig determines if a chrome configmap will be generated - // If empty or false the chrome nav config in the chrome container will be used - // If true a configmap will be generated and mounted into the chrome container - GenerateChromeConfig bool `json:"generateChromeConfig,omitempty"` + // GenerateNavJSON determines if the nav json configmap + // parts should be generated for the bundles. We want to do + // do this in epehemeral environments but not in production + GenerateNavJSON bool `json:"generateNavJSON,omitempty"` } type MonitoringConfig struct { diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 040778a5..ec5ac4f5 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -140,7 +140,7 @@ var _ = Describe("Frontend controller with image", func() { Monitoring: &crd.MonitoringConfig{ Mode: "app-interface", }, - GenerateChromeConfig: true, + GenerateNavJSON: true, }, } Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) @@ -256,7 +256,7 @@ var _ = Describe("Frontend controller with service", func() { Monitoring: &crd.MonitoringConfig{ Mode: "local", }, - GenerateChromeConfig: true, + GenerateNavJSON: true, }, } Expect(k8sClient.Create(ctx, &frontendEnvironment)).Should(Succeed()) @@ -532,7 +532,7 @@ var _ = Describe("Frontend controller with chrome", func() { Monitoring: &crd.MonitoringConfig{ Mode: "app-interface", }, - GenerateChromeConfig: true, + GenerateNavJSON: true, }, } Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) @@ -681,7 +681,7 @@ var _ = Describe("ServiceMonitor Creation", func() { Monitoring: &crd.MonitoringConfig{ Mode: "app-interface", }, - GenerateChromeConfig: true, + GenerateNavJSON: true, }, } Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) @@ -885,7 +885,7 @@ var _ = Describe("Dependencies", func() { Monitoring: &crd.MonitoringConfig{ Mode: "app-interface", }, - GenerateChromeConfig: true, + GenerateNavJSON: true, }, } Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index c52eaf36..9c666be8 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -43,19 +43,11 @@ type FrontendReconciliation struct { func (r *FrontendReconciliation) run() error { var annotationHashes []map[string]string - if r.FrontendEnvironment.Spec.GenerateChromeConfig { - configHash, err := r.setupConfigMap() - if err != nil { - return err - } - annotationHashes = append(annotationHashes, map[string]string{"configHash": configHash}) - } - - ssoHash, err := r.createSSOConfigMap() + configHash, err := r.setupConfigMap() if err != nil { return err } - annotationHashes = append(annotationHashes, map[string]string{"ssoHash": ssoHash}) + annotationHashes = append(annotationHashes, map[string]string{"configHash": configHash}) if r.Frontend.Spec.Image != "" { if err := r.createFrontendDeployment(annotationHashes); err != nil { @@ -79,21 +71,15 @@ func (r *FrontendReconciliation) run() error { } func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) []v1.VolumeMount { + // By default we always generate fed-modules.json for chrome volumeMounts := []v1.VolumeMount{ { - Name: "sso", - MountPath: "/opt/app-root/src/build/js/sso-url.js", - SubPath: "sso-url.js", - }, - } - - if frontendEnvironment.Spec.GenerateChromeConfig { - volumeMounts = append(volumeMounts, v1.VolumeMount{ Name: "config", MountPath: "/opt/app-root/src/build/chrome", - }) + }, } + // We generate SSL cert mounts conditionally if frontendEnvironment.Spec.SSL { volumeMounts = append(volumeMounts, v1.VolumeMount{ Name: "certs", @@ -124,55 +110,14 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir }, }, VolumeMounts: populateContainerVolumeMounts(frontendEnvironment), - Env: populateContainerEnvVars(frontendEnvironment), }, } } -func populateContainerEnvVars(frontendEnvironment *crd.FrontendEnvironment) []v1.EnvVar { - - envVars := []v1.EnvVar{{ - Name: "SSO_URL", - Value: frontendEnvironment.Spec.SSO, - }, { - Name: "ROUTE_PREFIX", - Value: "apps", - }} - - if frontendEnvironment.Spec.SSL { - envVars = append(envVars, - v1.EnvVar{ - Name: "CADDY_TLS_MODE", - Value: "https_port 8000", - }, - v1.EnvVar{ - Name: "CADDY_TLS_CERT", - Value: "tls /opt/certs/tls.crt /top/certs/tls.key", - }, - ) - } - - return envVars -} - func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { - // By default we just want the SSO volume + // By default we just want the config volume volumes := []v1.Volume{ { - Name: "sso", - VolumeSource: v1.VolumeSource{ - ConfigMap: &v1.ConfigMapVolumeSource{ - LocalObjectReference: v1.LocalObjectReference{ - Name: fmt.Sprintf("%s-sso", frontend.Spec.EnvName), - }, - }, - }, - }, - } - - // If we are generating the chrome config, add it to the volumes - if frontendEnvironment.Spec.GenerateChromeConfig { - config := v1.Volume{ Name: "config", VolumeSource: v1.VolumeSource{ ConfigMap: &v1.ConfigMapVolumeSource{ @@ -181,8 +126,7 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnviron }, }, }, - } - volumes = append(volumes, config) + }, } if frontendEnvironment.Spec.SSL { @@ -637,8 +581,10 @@ func (r *FrontendReconciliation) populateConfigMap(cfgMap *v1.ConfigMap, cacheMa cfgMap.SetOwnerReferences([]metav1.OwnerReference{r.FrontendEnvironment.MakeOwnerReference()}) cfgMap.Data = map[string]string{} - if err := r.setupBundleData(cfgMap, cacheMap); err != nil { - return err + if r.FrontendEnvironment.Spec.GenerateNavJSON { + if err := r.setupBundleData(cfgMap, cacheMap); err != nil { + return err + } } fedModules := make(map[string]crd.FedModule) @@ -655,49 +601,6 @@ func (r *FrontendReconciliation) populateConfigMap(cfgMap *v1.ConfigMap, cacheMa return nil } -func (r *FrontendReconciliation) createSSOConfigMap() (string, error) { - // Will need to interact directly with the client here, and not the cache because - // we need to read ALL the Frontend CRDs in the Env that we care about - - cfgMap := &v1.ConfigMap{} - - nn := types.NamespacedName{ - Name: fmt.Sprintf("%s-sso", r.Frontend.Spec.EnvName), - Namespace: r.Frontend.Namespace, - } - - if err := r.Cache.Create(SSOConfig, nn, cfgMap); err != nil { - return "", err - } - - hashString := "" - - labels := r.FrontendEnvironment.GetLabels() - labler := utils.GetCustomLabeler(labels, nn, r.Frontend) - labler(cfgMap) - cfgMap.SetOwnerReferences([]metav1.OwnerReference{r.Frontend.MakeOwnerReference()}) - - ssoData := fmt.Sprintf(`"use strict";(self.webpackChunkinsights_chrome=self.webpackChunkinsights_chrome||[]).push([[172],{30701:(s,e,h)=>{h.r(e),h.d(e,{default:()=>c});const c="%s"}}]);`, r.FrontendEnvironment.Spec.SSO) - - cfgMap.Data = map[string]string{ - "sso-url.js": ssoData, - } - - h := sha256.New() - h.Write([]byte(ssoData)) - hashString += fmt.Sprintf("%x", h.Sum(nil)) - - h = sha256.New() - h.Write([]byte(hashString)) - hash := fmt.Sprintf("%x", h.Sum(nil)) - - if err := r.Cache.Update(SSOConfig, cfgMap); err != nil { - return "", err - } - - return hash, nil -} - func (r *FrontendReconciliation) createServiceMonitor() error { // the monitor mode will default to "app-interface" From d5d90a7661217562143efacac5947b66e56a0ddb Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 26 Jan 2023 10:21:34 -0500 Subject: [PATCH 031/228] Remove old test artifacts --- controllers/frontend_controller_suite_test.go | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index ec5ac4f5..301010e9 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -166,7 +166,6 @@ var _ = Describe("Frontend controller with image", func() { deploymentLookupKey := types.NamespacedName{Name: frontend.Name + "-frontend", Namespace: FrontendNamespace} ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} configMapLookupKey := types.NamespacedName{Name: frontendEnvironment.Name, Namespace: FrontendNamespace} - configSSOMapLookupKey := types.NamespacedName{Name: fmt.Sprintf("%s-sso", frontendEnvironment.Name), Namespace: FrontendNamespace} serviceLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} createdDeployment := &apps.Deployment{} @@ -176,7 +175,6 @@ var _ = Describe("Frontend controller with image", func() { }, timeout, interval).Should(BeTrue()) Expect(createdDeployment.Name).Should(Equal(FrontendName + "-frontend")) fmt.Printf("\n%v\n", createdDeployment.GetAnnotations()) - Expect(createdDeployment.Spec.Template.GetAnnotations()["ssoHash"]).ShouldNot(Equal("")) Expect(createdDeployment.Spec.Template.GetAnnotations()["configHash"]).ShouldNot(Equal("")) createdIngress := &networking.Ingress{} @@ -210,11 +208,7 @@ var _ = Describe("Frontend controller with image", func() { "test-env.json": "{\"id\":\"test-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", })) Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) - createdSSOConfigMap := &v1.ConfigMap{} - Eventually(func() bool { - err := k8sClient.Get(ctx, configSSOMapLookupKey, createdSSOConfigMap) - return err == nil - }, timeout, interval).Should(BeTrue()) + }) }) }) @@ -327,7 +321,6 @@ var _ = Describe("Frontend controller with service", func() { ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} configMapLookupKey := types.NamespacedName{Name: frontendEnvironment.Name, Namespace: FrontendNamespace} - configSSOMapLookupKey := types.NamespacedName{Name: fmt.Sprintf("%s-sso", frontendEnvironment.Name), Namespace: FrontendNamespace} createdIngress := &networking.Ingress{} Eventually(func() bool { @@ -350,12 +343,6 @@ var _ = Describe("Frontend controller with service", func() { "test-env-service.json": "{\"id\":\"test-service-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test2\",\"href\":\"/test/href2\"}]}", })) - createdSSOConfigMap := &v1.ConfigMap{} - Eventually(func() bool { - err := k8sClient.Get(ctx, configSSOMapLookupKey, createdSSOConfigMap) - return err == nil - }, timeout, interval).Should(BeTrue()) - Eventually(func() bool { nfe := &crd.Frontend{} err := k8sClient.Get(ctx, types.NamespacedName{Name: frontend.Name, Namespace: frontend.Namespace}, nfe) @@ -558,7 +545,6 @@ var _ = Describe("Frontend controller with chrome", func() { deploymentLookupKey := types.NamespacedName{Name: frontend.Name + "-frontend", Namespace: FrontendNamespace} ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} configMapLookupKey := types.NamespacedName{Name: frontendEnvironment.Name, Namespace: FrontendNamespace} - configSSOMapLookupKey := types.NamespacedName{Name: fmt.Sprintf("%s-sso", frontendEnvironment.Name), Namespace: FrontendNamespace} serviceLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} createdDeployment := &apps.Deployment{} @@ -568,7 +554,6 @@ var _ = Describe("Frontend controller with chrome", func() { }, timeout, interval).Should(BeTrue()) Expect(createdDeployment.Name).Should(Equal(FrontendName + "-frontend")) fmt.Printf("\n%v\n", createdDeployment.GetAnnotations()) - Expect(createdDeployment.Spec.Template.GetAnnotations()["ssoHash"]).ShouldNot(Equal("")) Expect(createdDeployment.Spec.Template.GetAnnotations()["configHash"]).ShouldNot(Equal("")) createdIngress := &networking.Ingress{} @@ -601,11 +586,7 @@ var _ = Describe("Frontend controller with chrome", func() { "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"}},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}}}", "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) - createdSSOConfigMap := &v1.ConfigMap{} - Eventually(func() bool { - err := k8sClient.Get(ctx, configSSOMapLookupKey, createdSSOConfigMap) - return err == nil - }, timeout, interval).Should(BeTrue()) + }) }) }) From c1391ae6d74a60bc0e50af2b20e75cf2a2dec4d6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 26 Jan 2023 10:25:03 -0500 Subject: [PATCH 032/228] prepush --- .../crd/bases/cloud.redhat.com_frontendenvironments.yaml | 9 ++++----- deploy.yml | 9 ++++----- docs/antora/modules/ROOT/pages/api_reference.adoc | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml index 97d0a5fa..dffd9ab8 100644 --- a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml +++ b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml @@ -45,11 +45,10 @@ spec: spec: description: FrontendEnvironmentSpec defines the desired state of FrontendEnvironment properties: - generateChromeConfig: - description: GenerateChromeConfig determines if a chrome configmap - will be generated If empty or false the chrome nav config in the - chrome container will be used If true a configmap will be generated - and mounted into the chrome container + generateNavJSON: + description: GenerateNavJSON determines if the nav json configmap + parts should be generated for the bundles. We want to do do this + in epehemeral environments but not in production type: boolean hostname: description: Hostname diff --git a/deploy.yml b/deploy.yml index 4770f874..ca649e4f 100644 --- a/deploy.yml +++ b/deploy.yml @@ -346,11 +346,10 @@ objects: spec: description: FrontendEnvironmentSpec defines the desired state of FrontendEnvironment properties: - generateChromeConfig: - description: GenerateChromeConfig determines if a chrome configmap - will be generated If empty or false the chrome nav config in the - chrome container will be used If true a configmap will be generated - and mounted into the chrome container + generateNavJSON: + description: GenerateNavJSON determines if the nav json configmap + parts should be generated for the bundles. We want to do do this + in epehemeral environments but not in production type: boolean hostname: description: Hostname diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index ddf8b2fc..9e167cc6 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -312,7 +312,7 @@ FrontendEnvironmentSpec defines the desired state of FrontendEnvironment | *`whitelist`* __string array__ | Whitelist CIDRs | *`monitoring`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-monitoringconfig[$$MonitoringConfig$$]__ | MonitorMode determines where a ServiceMonitor object will be placed local will add it to the frontend's namespace app-interface will add it to "openshift-customer-monitoring" | *`ssl`* __boolean__ | SSL mode requests SSL from the services in openshift and k8s and then applies them to the pod, the route is also set to reencrypt in the case of OpenShift -| *`generateChromeConfig`* __boolean__ | GenerateChromeConfig determines if a chrome configmap will be generated If empty or false the chrome nav config in the chrome container will be used If true a configmap will be generated and mounted into the chrome container +| *`generateNavJSON`* __boolean__ | GenerateNavJSON determines if the nav json configmap parts should be generated for the bundles. We want to do do this in epehemeral environments but not in production |=== From 68498dc08f7f7cdd843155ea5292fbe7a75a8f60 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 26 Jan 2023 13:30:10 -0500 Subject: [PATCH 033/228] getting the groundwork laid for the refactor --- controllers/reconcile.go | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 9c666be8..d5eaa339 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -43,7 +43,7 @@ type FrontendReconciliation struct { func (r *FrontendReconciliation) run() error { var annotationHashes []map[string]string - configHash, err := r.setupConfigMap() + configHash, err := r.setupConfigMaps() if err != nil { return err } @@ -75,7 +75,7 @@ func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) volumeMounts := []v1.VolumeMount{ { Name: "config", - MountPath: "/opt/app-root/src/build/chrome", + MountPath: "/opt/app-root/src/build/chrome/fed-modules.json", }, } @@ -517,7 +517,7 @@ func (r *FrontendReconciliation) setupBundleData(cfgMap *v1.ConfigMap, cacheMap return nil } -func createHash(cfgMap *v1.ConfigMap) (string, error) { +func createConfigmapHash(cfgMap *v1.ConfigMap) (string, error) { hashData, err := json.Marshal(cfgMap.Data) if err != nil { return "", err @@ -529,38 +529,45 @@ func createHash(cfgMap *v1.ConfigMap) (string, error) { return hash, nil } -func (r *FrontendReconciliation) setupConfigMap() (string, error) { +// setupConfigMaps will create configmaps for the various config json +// files, including fed-modules.json and the various bundle json files +func (r *FrontendReconciliation) setupConfigMaps() (string, error) { // Will need to interact directly with the client here, and not the cache because // we need to read ALL the Frontend CRDs in the Env that we care about + //Create a frontend list frontendList := &crd.FrontendList{} + //Populate the frontendlist by looking for all frontends in our env if err := r.FRE.Client.List(r.Ctx, frontendList, client.MatchingFields{"spec.envName": r.Frontend.Spec.EnvName}); err != nil { return "", err } + //Create a map of frontend names to frontends objects cacheMap := make(map[string]crd.Frontend) for _, frontend := range frontendList.Items { cacheMap[frontend.Name] = frontend } - cfgMap := &v1.ConfigMap{} + cfgMap, err := r.createConfigMap(cacheMap, frontendList) - if err := r.createConfigMap(cfgMap, cacheMap, frontendList); err != nil { + if err != nil { return "", err } - return createHash(cfgMap) + return createConfigmapHash(cfgMap) } -func (r *FrontendReconciliation) createConfigMap(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend, feList *crd.FrontendList) error { +func (r *FrontendReconciliation) createConfigMap(cacheMap map[string]crd.Frontend, feList *crd.FrontendList) (*v1.ConfigMap, error) { + cfgMap := &v1.ConfigMap{} + nn := types.NamespacedName{ Name: r.Frontend.Spec.EnvName, Namespace: r.Frontend.Namespace, } if err := r.Cache.Create(CoreConfig, nn, cfgMap); err != nil { - return err + return cfgMap, err } labels := r.FrontendEnvironment.GetLabels() @@ -568,13 +575,13 @@ func (r *FrontendReconciliation) createConfigMap(cfgMap *v1.ConfigMap, cacheMap labler(cfgMap) if err := r.populateConfigMap(cfgMap, cacheMap, feList); err != nil { - return err + return cfgMap, err } if err := r.Cache.Update(CoreConfig, cfgMap); err != nil { - return err + return cfgMap, err } - return nil + return cfgMap, nil } func (r *FrontendReconciliation) populateConfigMap(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend, feList *crd.FrontendList) error { From 78f617bf91b5ec6ec67edc2f1d9a52110b72c92b Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 26 Jan 2023 13:52:23 -0500 Subject: [PATCH 034/228] Continuing to lay ground work by moving things around --- controllers/reconcile.go | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index d5eaa339..a9ce4635 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -41,12 +41,18 @@ type FrontendReconciliation struct { } func (r *FrontendReconciliation) run() error { - var annotationHashes []map[string]string - configHash, err := r.setupConfigMaps() + configMap, err := r.setupConfigMaps() + if err != nil { + return err + } + + configHash, err := createConfigmapHash(configMap) if err != nil { return err } + + var annotationHashes []map[string]string annotationHashes = append(annotationHashes, map[string]string{"configHash": configHash}) if r.Frontend.Spec.Image != "" { @@ -531,7 +537,7 @@ func createConfigmapHash(cfgMap *v1.ConfigMap) (string, error) { // setupConfigMaps will create configmaps for the various config json // files, including fed-modules.json and the various bundle json files -func (r *FrontendReconciliation) setupConfigMaps() (string, error) { +func (r *FrontendReconciliation) setupConfigMaps() (*v1.ConfigMap, error) { // Will need to interact directly with the client here, and not the cache because // we need to read ALL the Frontend CRDs in the Env that we care about @@ -540,27 +546,23 @@ func (r *FrontendReconciliation) setupConfigMaps() (string, error) { //Populate the frontendlist by looking for all frontends in our env if err := r.FRE.Client.List(r.Ctx, frontendList, client.MatchingFields{"spec.envName": r.Frontend.Spec.EnvName}); err != nil { - return "", err + return &v1.ConfigMap{}, err } + cfgMap, err := r.createConfigMap(frontendList) + + return cfgMap, err +} + +func (r *FrontendReconciliation) createConfigMap(frontendList *crd.FrontendList) (*v1.ConfigMap, error) { + cfgMap := &v1.ConfigMap{} + //Create a map of frontend names to frontends objects cacheMap := make(map[string]crd.Frontend) for _, frontend := range frontendList.Items { cacheMap[frontend.Name] = frontend } - cfgMap, err := r.createConfigMap(cacheMap, frontendList) - - if err != nil { - return "", err - } - - return createConfigmapHash(cfgMap) -} - -func (r *FrontendReconciliation) createConfigMap(cacheMap map[string]crd.Frontend, feList *crd.FrontendList) (*v1.ConfigMap, error) { - cfgMap := &v1.ConfigMap{} - nn := types.NamespacedName{ Name: r.Frontend.Spec.EnvName, Namespace: r.Frontend.Namespace, @@ -574,7 +576,7 @@ func (r *FrontendReconciliation) createConfigMap(cacheMap map[string]crd.Fronten labler := utils.GetCustomLabeler(labels, nn, r.FrontendEnvironment) labler(cfgMap) - if err := r.populateConfigMap(cfgMap, cacheMap, feList); err != nil { + if err := r.populateConfigMap(cfgMap, cacheMap, frontendList); err != nil { return cfgMap, err } From 4ad589d3946fa3a31c363d80b7e6d5e2fd87e6b0 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 26 Jan 2023 13:57:29 -0500 Subject: [PATCH 035/228] Make lint happy --- controllers/reconcile.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index a9ce4635..47982e49 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -541,10 +541,10 @@ func (r *FrontendReconciliation) setupConfigMaps() (*v1.ConfigMap, error) { // Will need to interact directly with the client here, and not the cache because // we need to read ALL the Frontend CRDs in the Env that we care about - //Create a frontend list + // Create a frontend list frontendList := &crd.FrontendList{} - //Populate the frontendlist by looking for all frontends in our env + // Populate the frontendlist by looking for all frontends in our env if err := r.FRE.Client.List(r.Ctx, frontendList, client.MatchingFields{"spec.envName": r.Frontend.Spec.EnvName}); err != nil { return &v1.ConfigMap{}, err } @@ -557,7 +557,7 @@ func (r *FrontendReconciliation) setupConfigMaps() (*v1.ConfigMap, error) { func (r *FrontendReconciliation) createConfigMap(frontendList *crd.FrontendList) (*v1.ConfigMap, error) { cfgMap := &v1.ConfigMap{} - //Create a map of frontend names to frontends objects + // Create a map of frontend names to frontends objects cacheMap := make(map[string]crd.Frontend) for _, frontend := range frontendList.Items { cacheMap[frontend.Name] = frontend From 834e152035ce6e36fe7415c0f07cb39f32c75168 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 26 Jan 2023 15:03:08 -0500 Subject: [PATCH 036/228] Refactor how we mount the configmap volume --- controllers/reconcile.go | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 47982e49..0a391e5d 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -77,12 +77,24 @@ func (r *FrontendReconciliation) run() error { } func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) []v1.VolumeMount { - // By default we always generate fed-modules.json for chrome - volumeMounts := []v1.VolumeMount{ - { + + volumeMounts := []v1.VolumeMount{} + + if frontendEnvironment.Spec.GenerateNavJSON { + // If we are generating all of the JSON config (nav and fed-modules) + // then we just need to mount the while configmap over the whole chrome directory + volumeMounts = append(volumeMounts, v1.VolumeMount{ + Name: "config", + MountPath: "/opt/app-root/src/build/chrome", + }) + } else { + // If we are not generating the nav JSON then we need to mount the fed-modules.json + // and leave the rest of the directory intact + volumeMounts = append(volumeMounts, v1.VolumeMount{ Name: "config", MountPath: "/opt/app-root/src/build/chrome/fed-modules.json", - }, + SubPath: "fed-modules.json", + }) } // We generate SSL cert mounts conditionally From 9b2e660eb1ba4e4530dd8695c47637728ae1bfc1 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 26 Jan 2023 15:07:42 -0500 Subject: [PATCH 037/228] Get just the key/path we want from the configmap for the volume --- controllers/reconcile.go | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 0a391e5d..5f4c968b 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -134,8 +134,9 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { // By default we just want the config volume - volumes := []v1.Volume{ - { + volumes := []v1.Volume{} + if frontendEnvironment.Spec.GenerateNavJSON { + volumes = append(volumes, v1.Volume{ Name: "config", VolumeSource: v1.VolumeSource{ ConfigMap: &v1.ConfigMapVolumeSource{ @@ -144,7 +145,24 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnviron }, }, }, - }, + }) + } else { + volumes = append(volumes, v1.Volume{ + Name: "config", + VolumeSource: v1.VolumeSource{ + ConfigMap: &v1.ConfigMapVolumeSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: frontend.Spec.EnvName, + }, + Items: []v1.KeyToPath{ + { + Key: "fed-modules.json", + Path: "fed-modules.json", + }, + }, + }, + }, + }) } if frontendEnvironment.Spec.SSL { From 4c3b1b2cf981ddb8882eaba3219500892029c85d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Feb 2023 12:09:21 -0500 Subject: [PATCH 038/228] Create env vars if SSL mode is on --- controllers/reconcile.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 5f4c968b..12b8ce36 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -180,6 +180,26 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnviron d.Spec.Template.Spec.Volumes = volumes } +func (r *FrontendReconciliation) populateEnvVars(d *apps.Deployment, frontendEnvironment *crd.FrontendEnvironment) { + // If we are generating SSL then we need to add the environment variables + // for the cert and key + if !frontendEnvironment.Spec.SSL { + return + } + envVars := []v1.EnvVar{} + if frontendEnvironment.Spec.SSL { + envVars = append(envVars, v1.EnvVar{ + Name: "CADDY_TLS_MODE", + Value: "https_port 8000", + }) + envVars = append(envVars, v1.EnvVar{ + Name: "CADDY_TLS_CERT", + Value: "tlc /opt/certs/tls.cert /opt/certs/tls.key", + }) + } + d.Spec.Template.Spec.Containers[0].Env = envVars +} + func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map[string]string) error { // Create new empty struct @@ -205,6 +225,7 @@ func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map labeler(d) populateContainer(d, r.Frontend, r.FrontendEnvironment) + r.populateEnvVars(d, r.FrontendEnvironment) populateVolumes(d, r.Frontend, r.FrontendEnvironment) d.Spec.Template.ObjectMeta.Labels = labels From 5533484ee393fce62e02a33b4078f80268d6fca0 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Feb 2023 12:13:51 -0500 Subject: [PATCH 039/228] Forgot to remove other if --- controllers/reconcile.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 12b8ce36..e539faa6 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -187,16 +187,14 @@ func (r *FrontendReconciliation) populateEnvVars(d *apps.Deployment, frontendEnv return } envVars := []v1.EnvVar{} - if frontendEnvironment.Spec.SSL { - envVars = append(envVars, v1.EnvVar{ - Name: "CADDY_TLS_MODE", - Value: "https_port 8000", - }) - envVars = append(envVars, v1.EnvVar{ - Name: "CADDY_TLS_CERT", - Value: "tlc /opt/certs/tls.cert /opt/certs/tls.key", - }) - } + envVars = append(envVars, v1.EnvVar{ + Name: "CADDY_TLS_MODE", + Value: "https_port 8000", + }) + envVars = append(envVars, v1.EnvVar{ + Name: "CADDY_TLS_CERT", + Value: "tlc /opt/certs/tls.cert /opt/certs/tls.key", + }) d.Spec.Template.Spec.Containers[0].Env = envVars } From 4f1b48f8db34680adeaad179a956ab5c2d316872 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Feb 2023 12:14:51 -0500 Subject: [PATCH 040/228] I'm just sloppy today --- controllers/reconcile.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index e539faa6..95aa914a 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -186,15 +186,15 @@ func (r *FrontendReconciliation) populateEnvVars(d *apps.Deployment, frontendEnv if !frontendEnvironment.Spec.SSL { return } - envVars := []v1.EnvVar{} - envVars = append(envVars, v1.EnvVar{ - Name: "CADDY_TLS_MODE", - Value: "https_port 8000", - }) - envVars = append(envVars, v1.EnvVar{ - Name: "CADDY_TLS_CERT", - Value: "tlc /opt/certs/tls.cert /opt/certs/tls.key", - }) + envVars := []v1.EnvVar{ + { + Name: "CADDY_TLS_MODE", + Value: "https_port 8000", + }, + { + Name: "CADDY_TLS_CERT", + Value: "tlc /opt/certs/tls.cert /opt/certs/tls.key", + }} d.Spec.Template.Spec.Containers[0].Env = envVars } From 73fe0089451ca419ef30cff58e27c4f44d5b0be3 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Feb 2023 12:15:41 -0500 Subject: [PATCH 041/228] tlc != tls --- controllers/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 95aa914a..e929ecf5 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -193,7 +193,7 @@ func (r *FrontendReconciliation) populateEnvVars(d *apps.Deployment, frontendEnv }, { Name: "CADDY_TLS_CERT", - Value: "tlc /opt/certs/tls.cert /opt/certs/tls.key", + Value: "tls /opt/certs/tls.cert /opt/certs/tls.key", }} d.Spec.Template.Spec.Containers[0].Env = envVars } From 3ca54a319b95cd7e19180b23245bfa652b0977ff Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Feb 2023 12:18:17 -0500 Subject: [PATCH 042/228] Comment --- controllers/reconcile.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index e929ecf5..a25cf87d 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -180,9 +180,8 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnviron d.Spec.Template.Spec.Volumes = volumes } +// Add the SSL env vars if we SSL mode is set in the frontend environment func (r *FrontendReconciliation) populateEnvVars(d *apps.Deployment, frontendEnvironment *crd.FrontendEnvironment) { - // If we are generating SSL then we need to add the environment variables - // for the cert and key if !frontendEnvironment.Spec.SSL { return } From b02063db4e2728ac0f8c127ffc8f30107b904992 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Feb 2023 13:13:11 -0500 Subject: [PATCH 043/228] A couple of small errors in the last PR --- controllers/reconcile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index a25cf87d..044ff385 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -192,7 +192,7 @@ func (r *FrontendReconciliation) populateEnvVars(d *apps.Deployment, frontendEnv }, { Name: "CADDY_TLS_CERT", - Value: "tls /opt/certs/tls.cert /opt/certs/tls.key", + Value: "tls /opt/certs/tls.crt /opt/certs/tls.key", }} d.Spec.Template.Spec.Containers[0].Env = envVars } @@ -222,8 +222,8 @@ func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map labeler(d) populateContainer(d, r.Frontend, r.FrontendEnvironment) - r.populateEnvVars(d, r.FrontendEnvironment) populateVolumes(d, r.Frontend, r.FrontendEnvironment) + r.populateEnvVars(d, r.FrontendEnvironment) d.Spec.Template.ObjectMeta.Labels = labels From 9d96c582b79ed7af9e49d00bfe06fe15511846c5 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 21 Feb 2023 13:21:14 -0500 Subject: [PATCH 044/228] Add FullProfile to the FrontendSpec --- api/v1alpha1/frontend_types.go | 1 + 1 file changed, 1 insertion(+) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index c5228a83..3b979b16 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -54,6 +54,7 @@ type FrontendSpec struct { Module *FedModule `json:"module,omitempty" yaml:"module,omitempty"` NavItems []*BundleNavItem `json:"navItems,omitempty" yaml:"navItems,omitempty"` AssetsPrefix string `json:"assetsPrefix,omitempty" yaml:"assetsPrefix,omitempty"` + FullProfile bool `json:"fullProfile,omitempty" yaml:"fullProfile,omitempty"` } var ReconciliationSuccessful clusterv1.ConditionType = "ReconciliationSuccessful" From 28678e4b7b7ba8d9b732c838313161bb3c7fc10e Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 21 Feb 2023 13:55:07 -0500 Subject: [PATCH 045/228] Add FullProfile --- api/v1alpha1/frontend_types.go | 2 +- config/crd/bases/cloud.redhat.com_frontends.yaml | 2 ++ controllers/frontend_controller_suite_test.go | 4 +++- controllers/reconcile.go | 7 +++++++ deploy.yml | 2 ++ docs/antora/modules/ROOT/pages/api_reference.adoc | 1 + 6 files changed, 16 insertions(+), 2 deletions(-) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 3b979b16..ad852844 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -54,7 +54,6 @@ type FrontendSpec struct { Module *FedModule `json:"module,omitempty" yaml:"module,omitempty"` NavItems []*BundleNavItem `json:"navItems,omitempty" yaml:"navItems,omitempty"` AssetsPrefix string `json:"assetsPrefix,omitempty" yaml:"assetsPrefix,omitempty"` - FullProfile bool `json:"fullProfile,omitempty" yaml:"fullProfile,omitempty"` } var ReconciliationSuccessful clusterv1.ConditionType = "ReconciliationSuccessful" @@ -78,6 +77,7 @@ type FedModule struct { Modules []Module `json:"modules,omitempty" yaml:"modules,omitempty"` ModuleID string `json:"moduleID,omitempty" yaml:"moduleID,omitempty"` Config *apiextensions.JSON `json:"config,omitempty" yaml:"config,omitempty"` + FullProfile bool `json:"fullProfile,omitempty" yaml:"fullProfile,omitempty"` } type Module struct { diff --git a/config/crd/bases/cloud.redhat.com_frontends.yaml b/config/crd/bases/cloud.redhat.com_frontends.yaml index ff0658df..e0a953c3 100644 --- a/config/crd/bases/cloud.redhat.com_frontends.yaml +++ b/config/crd/bases/cloud.redhat.com_frontends.yaml @@ -82,6 +82,8 @@ spec: properties: config: x-kubernetes-preserve-unknown-fields: true + fullProfile: + type: boolean manifestLocation: type: string moduleID: diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 301010e9..ee1cd16d 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -72,6 +72,7 @@ var _ = Describe("Frontend controller with image", func() { }}, Module: &crd.FedModule{ ManifestLocation: "/apps/inventory/fed-mods.json", + FullProfile: true, Modules: []crd.Module{{ ID: "test", Module: "./RootApp", @@ -112,6 +113,7 @@ var _ = Describe("Frontend controller with image", func() { }}, Module: &crd.FedModule{ ManifestLocation: "/apps/inventory/fed-mods.json", + FullProfile: true, Modules: []crd.Module{{ ID: "test", Module: "./RootApp", @@ -204,7 +206,7 @@ var _ = Describe("Frontend controller with image", func() { }, timeout, interval).Should(BeTrue()) Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ - "fed-modules.json": "{\"testFrontend\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}},\"testFrontend2\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"cheese\":\"pasty\"}}}", + "fed-modules.json": "{\"testFrontend\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"fullProfile\":\"true\",\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}},\"testFrontend2\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"cheese\":\"pasty\"}}}", "test-env.json": "{\"id\":\"test-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", })) Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 044ff385..6bee98b3 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -502,9 +502,16 @@ func setupFedModules(feEnv *crd.FrontendEnvironment, frontendList *crd.FrontendL modName = frontend.Spec.Module.ModuleID } fedModules[modName] = *frontend.Spec.Module + if frontend.Name == "chrome" { module := fedModules[modName] + module.FullProfile = frontend.Spec.Module.FullProfile + // I'm really not sure if I have to do this + if frontend.Spec.Module == nil { + module.FullProfile = false + } + var configSource apiextensions.JSON err := configSource.UnmarshalJSON([]byte(`{}`)) if err != nil { diff --git a/deploy.yml b/deploy.yml index ca649e4f..c4d51012 100644 --- a/deploy.yml +++ b/deploy.yml @@ -489,6 +489,8 @@ objects: properties: config: x-kubernetes-preserve-unknown-fields: true + fullProfile: + type: boolean manifestLocation: type: string moduleID: diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index 9e167cc6..410851b5 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -212,6 +212,7 @@ EmbeddedRoutes allow deeply nested navs to have support for routes | *`modules`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-module[$$Module$$] array__ | | *`moduleID`* __string__ | | *`config`* __JSON__ | +| *`fullProfile`* __boolean__ | |=== From 9e830c5ad17599d4cf3da8959cc378539929ce06 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 21 Feb 2023 14:42:47 -0500 Subject: [PATCH 046/228] Pass them tests! --- api/v1alpha1/frontend_types.go | 8 +++++++- api/v1alpha1/zz_generated.deepcopy.go | 5 +++++ controllers/frontend_controller_suite_test.go | 11 ++++++----- controllers/reconcile.go | 8 ++++---- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index ad852844..2960c5d0 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -77,7 +77,7 @@ type FedModule struct { Modules []Module `json:"modules,omitempty" yaml:"modules,omitempty"` ModuleID string `json:"moduleID,omitempty" yaml:"moduleID,omitempty"` Config *apiextensions.JSON `json:"config,omitempty" yaml:"config,omitempty"` - FullProfile bool `json:"fullProfile,omitempty" yaml:"fullProfile,omitempty"` + FullProfile *bool `json:"fullProfile,omitempty" yaml:"fullProfile,omitempty"` } type Module struct { @@ -149,6 +149,12 @@ func TruePtr() *bool { return &t } +// TruePtr returns a pointer to True +func FalsePtr() *bool { + t := false + return &t +} + // GetIdent returns an ident . that should be unique across the cluster. func (i *Frontend) GetIdent() string { return fmt.Sprintf("%v.%v", i.Spec.EnvName, i.Name) diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 777d1aa5..3af634cc 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -277,6 +277,11 @@ func (in *FedModule) DeepCopyInto(out *FedModule) { *out = new(v1.JSON) (*in).DeepCopyInto(*out) } + if in.FullProfile != nil { + in, out := &in.FullProfile, &out.FullProfile + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FedModule. diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index ee1cd16d..f851bb68 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -72,7 +72,7 @@ var _ = Describe("Frontend controller with image", func() { }}, Module: &crd.FedModule{ ManifestLocation: "/apps/inventory/fed-mods.json", - FullProfile: true, + FullProfile: crd.TruePtr(), Modules: []crd.Module{{ ID: "test", Module: "./RootApp", @@ -113,15 +113,16 @@ var _ = Describe("Frontend controller with image", func() { }}, Module: &crd.FedModule{ ManifestLocation: "/apps/inventory/fed-mods.json", - FullProfile: true, Modules: []crd.Module{{ ID: "test", Module: "./RootApp", + Routes: []crd.Route{{ Pathname: "/test/href", }}, }}, - Config: &customConfig2, + Config: &customConfig2, + FullProfile: crd.FalsePtr(), }, }, } @@ -206,7 +207,7 @@ var _ = Describe("Frontend controller with image", func() { }, timeout, interval).Should(BeTrue()) Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ - "fed-modules.json": "{\"testFrontend\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"fullProfile\":\"true\",\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}},\"testFrontend2\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"cheese\":\"pasty\"}}}", + "fed-modules.json": "{\"testFrontend\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"},\"fullProfile\":true},\"testFrontend2\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"cheese\":\"pasty\"},\"fullProfile\":false}}", "test-env.json": "{\"id\":\"test-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", })) Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) @@ -585,7 +586,7 @@ var _ = Describe("Frontend controller with chrome", func() { }, timeout, interval).Should(BeTrue()) Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ - "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"}},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}}}", + "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"},\"fullProfile\":false},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}}}", "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 6bee98b3..c18408b2 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -506,10 +506,10 @@ func setupFedModules(feEnv *crd.FrontendEnvironment, frontendList *crd.FrontendL if frontend.Name == "chrome" { module := fedModules[modName] - module.FullProfile = frontend.Spec.Module.FullProfile - // I'm really not sure if I have to do this - if frontend.Spec.Module == nil { - module.FullProfile = false + if frontend.Spec.Module.FullProfile == nil { + module.FullProfile = crd.FalsePtr() + } else { + module.FullProfile = crd.TruePtr() } var configSource apiextensions.JSON From 2be7807b0cb0b56cd006b721bdf54ccdff80500e Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 21 Feb 2023 14:57:10 -0500 Subject: [PATCH 047/228] Those comments - they get tricky sometimes! --- api/v1alpha1/frontend_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 2960c5d0..27714c7c 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -149,7 +149,7 @@ func TruePtr() *bool { return &t } -// TruePtr returns a pointer to True +// FalsePtr returns a pointer to False func FalsePtr() *bool { t := false return &t From 2b6f003a041c174e0b0fee90f39a4d9eafd90c7d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 23 Feb 2023 14:17:23 -0500 Subject: [PATCH 048/228] Add a new preview ingress --- controllers/reconcile.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index c18408b2..101bef5e 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -377,9 +377,11 @@ func (r *FrontendReconciliation) getFrontendPaths() []string { frontendPaths := r.Frontend.Spec.Frontend.Paths defaultPath := fmt.Sprintf("/apps/%s", r.Frontend.Name) defaultBetaPath := fmt.Sprintf("/beta/apps/%s", r.Frontend.Name) + defaultPreviewPath := fmt.Sprintf("/preview/apps/%s", r.Frontend.Name) if r.Frontend.Spec.AssetsPrefix != "" { defaultPath = fmt.Sprintf("/%s/%s", r.Frontend.Spec.AssetsPrefix, r.Frontend.Name) defaultBetaPath = fmt.Sprintf("/beta/%s/%s", r.Frontend.Spec.AssetsPrefix, r.Frontend.Name) + defaultPreviewPath = fmt.Sprintf("/preview/%s/%s", r.Frontend.Spec.AssetsPrefix, r.Frontend.Name) } if !r.Frontend.Spec.Frontend.HasPath(defaultPath) { @@ -389,6 +391,11 @@ func (r *FrontendReconciliation) getFrontendPaths() []string { if !r.Frontend.Spec.Frontend.HasPath(defaultBetaPath) { frontendPaths = append(frontendPaths, defaultBetaPath) } + + if !r.Frontend.Spec.Frontend.HasPath(defaultPreviewPath) { + frontendPaths = append(frontendPaths, defaultPreviewPath) + } + return frontendPaths } From 042fb1c8f7c16ae948ab8263a1e9dd751a01bc57 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 20 Mar 2023 09:16:12 -0400 Subject: [PATCH 049/228] FullProfile should work for all apps, not just chrome --- controllers/reconcile.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 101bef5e..0db06786 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -510,14 +510,15 @@ func setupFedModules(feEnv *crd.FrontendEnvironment, frontendList *crd.FrontendL } fedModules[modName] = *frontend.Spec.Module - if frontend.Name == "chrome" { - module := fedModules[modName] + module := fedModules[modName] - if frontend.Spec.Module.FullProfile == nil { - module.FullProfile = crd.FalsePtr() - } else { - module.FullProfile = crd.TruePtr() - } + if frontend.Spec.Module.FullProfile == nil { + module.FullProfile = crd.FalsePtr() + } else { + module.FullProfile = crd.TruePtr() + } + + if frontend.Name == "chrome" { var configSource apiextensions.JSON err := configSource.UnmarshalJSON([]byte(`{}`)) @@ -547,8 +548,9 @@ func setupFedModules(feEnv *crd.FrontendEnvironment, frontendList *crd.FrontendL return fmt.Errorf("error unmarshaling config: %w", err) } - fedModules[modName] = module } + + fedModules[modName] = module } } return nil From 59b1f3ddaa32471919aa7472b5eb3dd2f728ce63 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 20 Mar 2023 13:17:19 -0400 Subject: [PATCH 050/228] Remove unused varaible --- controllers/frontend_controller.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index cf4c14c0..629ec927 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -286,7 +286,7 @@ func (r *FrontendReconciler) SetupWithManager(mgr ctrl.Manager) error { Complete(r) } -func logMessage(logr logr.Logger, ctrlName string, msg string, keysAndValues ...interface{}) { +func logMessage(logr logr.Logger, msg string, keysAndValues ...interface{}) { logr.Info(msg, keysAndValues...) } @@ -294,22 +294,22 @@ func defaultPredicate(logr logr.Logger, ctrlName string) predicate.Funcs { return predicate.Funcs{ CreateFunc: func(e event.CreateEvent) bool { gvk, _ := utils.GetKindFromObj(scheme, e.Object) - logMessage(logr, ctrlName, "Reconciliation trigger", "ctrl", ctrlName, "type", "create", "resType", gvk.Kind, "name", e.Object.GetName(), "namespace", e.Object.GetNamespace()) + logMessage(logr, "Reconciliation trigger", "ctrl", ctrlName, "type", "create", "resType", gvk.Kind, "name", e.Object.GetName(), "namespace", e.Object.GetNamespace()) return true }, DeleteFunc: func(e event.DeleteEvent) bool { gvk, _ := utils.GetKindFromObj(scheme, e.Object) - logMessage(logr, ctrlName, "Reconciliation trigger", "ctrl", ctrlName, "type", "delete", "resType", gvk.Kind, "name", e.Object.GetName(), "namespace", e.Object.GetNamespace()) + logMessage(logr, "Reconciliation trigger", "ctrl", ctrlName, "type", "delete", "resType", gvk.Kind, "name", e.Object.GetName(), "namespace", e.Object.GetNamespace()) return true }, UpdateFunc: func(e event.UpdateEvent) bool { gvk, _ := utils.GetKindFromObj(scheme, e.ObjectOld) - logMessage(logr, ctrlName, "Reconciliation trigger", "ctrl", ctrlName, "type", "update", "resType", gvk.Kind, "name", e.ObjectNew.GetName(), "namespace", e.ObjectNew.GetNamespace(), "old", e.ObjectOld, "new", e.ObjectNew) + logMessage(logr, "Reconciliation trigger", "ctrl", ctrlName, "type", "update", "resType", gvk.Kind, "name", e.ObjectNew.GetName(), "namespace", e.ObjectNew.GetNamespace(), "old", e.ObjectOld, "new", e.ObjectNew) return true }, GenericFunc: func(e event.GenericEvent) bool { gvk, _ := utils.GetKindFromObj(scheme, e.Object) - logMessage(logr, ctrlName, "Reconciliation trigger", "ctrl", ctrlName, "type", "generic", "resType", gvk.Kind, "name", e.Object.GetName(), "namespace", e.Object.GetNamespace()) + logMessage(logr, "Reconciliation trigger", "ctrl", ctrlName, "type", "generic", "resType", gvk.Kind, "name", e.Object.GetName(), "namespace", e.Object.GetNamespace()) return true }, } From 9ae87e6b93a0e34cb64b3d1037052aee8047a01d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 20 Mar 2023 13:21:40 -0400 Subject: [PATCH 051/228] Remove some unused vars and fix other things the linter is mad about --- controllers/reconcile.go | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 0db06786..0e33e083 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -242,11 +242,8 @@ func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map d.ObjectMeta.SetAnnotations(deploymentAnnotation) // Inform the cache that our updates are complete - if err := r.Cache.Update(CoreDeployment, d); err != nil { - return err - } - - return nil + err := r.Cache.Update(CoreDeployment, d) + return err } func createPorts() []v1.ServicePort { @@ -307,10 +304,9 @@ func (r *FrontendReconciliation) createFrontendService() error { utils.MakeService(s, nn, labels, ports, r.Frontend, false) // Inform the cache that our updates are complete - if err := r.Cache.Update(CoreService, s); err != nil { - return err - } - return nil + err := r.Cache.Update(CoreService, s) + return err + } func (r *FrontendReconciliation) createFrontendIngress() error { @@ -333,11 +329,8 @@ func (r *FrontendReconciliation) createFrontendIngress() error { r.createAnnotationsAndPopulate(nn, netobj) - if err := r.Cache.Update(WebIngress, netobj); err != nil { - return err - } - - return nil + err := r.Cache.Update(WebIngress, netobj) + return err } func (r *FrontendReconciliation) createAnnotationsAndPopulate(nn types.NamespacedName, netobj *networking.Ingress) { @@ -367,9 +360,9 @@ func (r *FrontendReconciliation) createAnnotationsAndPopulate(nn types.Namespace } if r.Frontend.Spec.Image != "" { - r.populateConsoleDotIngress(nn, netobj, ingressClass, nn.Name) + r.populateConsoleDotIngress(netobj, ingressClass, nn.Name) } else { - r.populateConsoleDotIngress(nn, netobj, ingressClass, r.Frontend.Spec.Service) + r.populateConsoleDotIngress(netobj, ingressClass, r.Frontend.Spec.Service) } } @@ -399,7 +392,7 @@ func (r *FrontendReconciliation) getFrontendPaths() []string { return frontendPaths } -func (r *FrontendReconciliation) populateConsoleDotIngress(nn types.NamespacedName, netobj *networking.Ingress, ingressClass, serviceName string) { +func (r *FrontendReconciliation) populateConsoleDotIngress(netobj *networking.Ingress, ingressClass, serviceName string) { frontendPaths := r.getFrontendPaths() var ingressPaths []networking.HTTPIngressPath From 7c5e50b4a2e67996730692d60f529bd168d8afa4 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 20 Mar 2023 13:24:03 -0400 Subject: [PATCH 052/228] More making the linter happy --- controllers/reconcile.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 0e33e083..960f658f 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -704,8 +704,6 @@ func (r *FrontendReconciliation) createServiceMonitor() error { }, } - if err := r.Cache.Update(MetricsServiceMonitor, svcMonitor); err != nil { - return err - } - return nil + err := r.Cache.Update(MetricsServiceMonitor, svcMonitor) + return err } From 24d55fa9499cc834a3cf17e93ee26713cb622985 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 20 Mar 2023 13:28:33 -0400 Subject: [PATCH 053/228] Make sure fullProfile is in the tests --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index f851bb68..1c2fa306 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -342,7 +342,7 @@ var _ = Describe("Frontend controller with service", func() { }, timeout, interval).Should(BeTrue()) Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ - "fed-modules.json": "{\"testFrontendService\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]}}", + "fed-modules.json": "{\"testFrontendService\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false}}", "test-env-service.json": "{\"id\":\"test-service-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test2\",\"href\":\"/test/href2\"}]}", })) From eab25cf58fce36af895407a6dfe14293585e69a0 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 20 Mar 2023 13:45:32 -0400 Subject: [PATCH 054/228] Explicit false --- controllers/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 960f658f..c46e75ea 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -505,7 +505,7 @@ func setupFedModules(feEnv *crd.FrontendEnvironment, frontendList *crd.FrontendL module := fedModules[modName] - if frontend.Spec.Module.FullProfile == nil { + if frontend.Spec.Module.FullProfile == nil || !*frontend.Spec.Module.FullProfile { module.FullProfile = crd.FalsePtr() } else { module.FullProfile = crd.TruePtr() From e3b8a2da93b2ec6bdd8d2b1783b91871da0d2aaa Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 20 Mar 2023 13:51:26 -0400 Subject: [PATCH 055/228] More fullprofile in tests --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 1c2fa306..94b5a41a 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -586,7 +586,7 @@ var _ = Describe("Frontend controller with chrome", func() { }, timeout, interval).Should(BeTrue()) Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ - "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"},\"fullProfile\":false},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"}}}", + "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"},\"fullProfile\":false},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"},\"fullProfile\":false}}", "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) From bee1a97531460bc8920dd62c75aeb94f1e99c853 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 20 Mar 2023 13:57:07 -0400 Subject: [PATCH 056/228] More fullProfile in tests --- controllers/frontend_controller_suite_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 94b5a41a..48df2aee 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -906,7 +906,7 @@ var _ = Describe("Dependencies", func() { Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ "test-dependencies-env.json": "{\"id\":\"test-dependencies-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", - "fed-modules.json": "{\"testDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}],\"dependencies\":[\"depstring\"]}]},\"testNoDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}]},\"testOptionalDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}],\"optionalDependencies\":[\"depstring-op\"]}]}}", + "fed-modules.json": "{\"testDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}],\"dependencies\":[\"depstring\"]}],\"fullProfile\":false},\"testNoDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false},\"testOptionalDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}],\"optionalDependencies\":[\"depstring-op\"]}],\"fullProfile\":false}}", })) Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) From 80ca83eb32641e92cb0b8a8e0eee9dfebf554dee Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 14:25:11 -0400 Subject: [PATCH 057/228] Rename FrontendReconciler to FrontendController --- controllers/frontend_controller.go | 16 ++++++++-------- controllers/reconcile.go | 2 +- controllers/suite_test.go | 2 +- main.go | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index 629ec927..0bf80c51 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -92,8 +92,8 @@ func (rm *ReconciliationMetrics) stop() { reconciliationTimeMetrics.With(prometheus.Labels{"app": rm.appName}).Observe(elapsedTime) } -// FrontendReconciler reconciles a Frontend object -type FrontendReconciler struct { +// FrontendController reconciles a Frontend object +type FrontendController struct { client.Client Log logr.Logger Scheme *runtime.Scheme @@ -122,7 +122,7 @@ type FrontendReconciler struct { // For more details, check Reconcile and its Result here: // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile -func (r *FrontendReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { +func (r *FrontendController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { r.Log = log.FromContext(ctx) qualifiedName := fmt.Sprintf("%s:%s", req.Namespace, req.Name) log := r.Log.WithValues("frontend", qualifiedName).WithValues("id", utils.RandString(5)) @@ -252,7 +252,7 @@ func (r *FrontendReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c } // SetupWithManager sets up the controller with the Manager. -func (r *FrontendReconciler) SetupWithManager(mgr ctrl.Manager) error { +func (r *FrontendController) SetupWithManager(mgr ctrl.Manager) error { cache := mgr.GetCache() @@ -315,7 +315,7 @@ func defaultPredicate(logr logr.Logger, ctrlName string) predicate.Funcs { } } -func (r *FrontendReconciler) appsToEnqueueUponBundleUpdate(a client.Object) []reconcile.Request { +func (r *FrontendController) appsToEnqueueUponBundleUpdate(a client.Object) []reconcile.Request { reqs := []reconcile.Request{} ctx := context.Background() obj := types.NamespacedName{ @@ -360,7 +360,7 @@ func (r *FrontendReconciler) appsToEnqueueUponBundleUpdate(a client.Object) []re return reqs } -func (r *FrontendReconciler) appsToEnqueueUponFrontendEnvironmentUpdate(a client.Object) []reconcile.Request { +func (r *FrontendController) appsToEnqueueUponFrontendEnvironmentUpdate(a client.Object) []reconcile.Request { reqs := []reconcile.Request{} ctx := context.Background() obj := types.NamespacedName{ @@ -404,7 +404,7 @@ func (r *FrontendReconciler) appsToEnqueueUponFrontendEnvironmentUpdate(a client return reqs } -func (r *FrontendReconciler) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) error { +func (r *FrontendController) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) error { delete(managedFrontends, a.GetIdent()) @@ -413,7 +413,7 @@ func (r *FrontendReconciler) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) return nil } -func (r *FrontendReconciler) addFinalizer(reqLogger logr.Logger, a *crd.Frontend) error { +func (r *FrontendController) addFinalizer(reqLogger logr.Logger, a *crd.Frontend) error { reqLogger.Info("Adding Finalizer for the ClowdApp") controllerutil.AddFinalizer(a, frontendFinalizer) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index c46e75ea..38d7f305 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -33,7 +33,7 @@ type FrontendReconciliation struct { Log logr.Logger Recorder record.EventRecorder Cache resCache.ObjectCache - FRE *FrontendReconciler + FRE *FrontendController FrontendEnvironment *crd.FrontendEnvironment Frontend *crd.Frontend Ctx context.Context diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 506e692e..e8811e3c 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -96,7 +96,7 @@ var _ = BeforeSuite(func() { }) Expect(err).ToNot(HaveOccurred()) - err = (&FrontendReconciler{ + err = (&FrontendController{ Client: k8sManager.GetClient(), Scheme: k8sManager.GetScheme(), Log: ctrl.Log.WithName("controllers").WithName("CronJob"), diff --git a/main.go b/main.go index d6f365e9..981b457c 100644 --- a/main.go +++ b/main.go @@ -92,7 +92,7 @@ func Run(metricsAddr, probeAddr string, enableLeaderElection bool) error { return fmt.Errorf("unable to start manager: %w", err) } - if err = (&controllers.FrontendReconciler{ + if err = (&controllers.FrontendController{ Log: ctrl.Log.WithName("controllers").WithName("Frontend"), Client: mgr.GetClient(), Scheme: mgr.GetScheme(), From b08d949f2f16c298e8a99236c9dee212df9e53d1 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 14:25:54 -0400 Subject: [PATCH 058/228] How about just controller. We know we are in the frontend operator --- controllers/frontend_controller.go | 16 ++++++++-------- controllers/reconcile.go | 2 +- controllers/suite_test.go | 2 +- main.go | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index 0bf80c51..09ea34c0 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -92,8 +92,8 @@ func (rm *ReconciliationMetrics) stop() { reconciliationTimeMetrics.With(prometheus.Labels{"app": rm.appName}).Observe(elapsedTime) } -// FrontendController reconciles a Frontend object -type FrontendController struct { +// Controller reconciles a Frontend object +type Controller struct { client.Client Log logr.Logger Scheme *runtime.Scheme @@ -122,7 +122,7 @@ type FrontendController struct { // For more details, check Reconcile and its Result here: // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile -func (r *FrontendController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { +func (r *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { r.Log = log.FromContext(ctx) qualifiedName := fmt.Sprintf("%s:%s", req.Namespace, req.Name) log := r.Log.WithValues("frontend", qualifiedName).WithValues("id", utils.RandString(5)) @@ -252,7 +252,7 @@ func (r *FrontendController) Reconcile(ctx context.Context, req ctrl.Request) (c } // SetupWithManager sets up the controller with the Manager. -func (r *FrontendController) SetupWithManager(mgr ctrl.Manager) error { +func (r *Controller) SetupWithManager(mgr ctrl.Manager) error { cache := mgr.GetCache() @@ -315,7 +315,7 @@ func defaultPredicate(logr logr.Logger, ctrlName string) predicate.Funcs { } } -func (r *FrontendController) appsToEnqueueUponBundleUpdate(a client.Object) []reconcile.Request { +func (r *Controller) appsToEnqueueUponBundleUpdate(a client.Object) []reconcile.Request { reqs := []reconcile.Request{} ctx := context.Background() obj := types.NamespacedName{ @@ -360,7 +360,7 @@ func (r *FrontendController) appsToEnqueueUponBundleUpdate(a client.Object) []re return reqs } -func (r *FrontendController) appsToEnqueueUponFrontendEnvironmentUpdate(a client.Object) []reconcile.Request { +func (r *Controller) appsToEnqueueUponFrontendEnvironmentUpdate(a client.Object) []reconcile.Request { reqs := []reconcile.Request{} ctx := context.Background() obj := types.NamespacedName{ @@ -404,7 +404,7 @@ func (r *FrontendController) appsToEnqueueUponFrontendEnvironmentUpdate(a client return reqs } -func (r *FrontendController) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) error { +func (r *Controller) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) error { delete(managedFrontends, a.GetIdent()) @@ -413,7 +413,7 @@ func (r *FrontendController) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) return nil } -func (r *FrontendController) addFinalizer(reqLogger logr.Logger, a *crd.Frontend) error { +func (r *Controller) addFinalizer(reqLogger logr.Logger, a *crd.Frontend) error { reqLogger.Info("Adding Finalizer for the ClowdApp") controllerutil.AddFinalizer(a, frontendFinalizer) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 38d7f305..2d398db3 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -33,7 +33,7 @@ type FrontendReconciliation struct { Log logr.Logger Recorder record.EventRecorder Cache resCache.ObjectCache - FRE *FrontendController + FRE *Controller FrontendEnvironment *crd.FrontendEnvironment Frontend *crd.Frontend Ctx context.Context diff --git a/controllers/suite_test.go b/controllers/suite_test.go index e8811e3c..363d0090 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -96,7 +96,7 @@ var _ = BeforeSuite(func() { }) Expect(err).ToNot(HaveOccurred()) - err = (&FrontendController{ + err = (&Controller{ Client: k8sManager.GetClient(), Scheme: k8sManager.GetScheme(), Log: ctrl.Log.WithName("controllers").WithName("CronJob"), diff --git a/main.go b/main.go index 981b457c..a641fa4a 100644 --- a/main.go +++ b/main.go @@ -92,7 +92,7 @@ func Run(metricsAddr, probeAddr string, enableLeaderElection bool) error { return fmt.Errorf("unable to start manager: %w", err) } - if err = (&controllers.FrontendController{ + if err = (&controllers.Controller{ Log: ctrl.Log.WithName("controllers").WithName("Frontend"), Client: mgr.GetClient(), Scheme: mgr.GetScheme(), From 0e9f618b848dfa669f9fa7f9b7bcba1173920831 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 14:26:24 -0400 Subject: [PATCH 059/228] FrontendReconcilization -> Reconciler --- controllers/frontend_controller.go | 2 +- controllers/reconcile.go | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index 09ea34c0..a6cb8554 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -193,7 +193,7 @@ func (r *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu MetricsServiceMonitor, ) - reconciliation := FrontendReconciliation{ + reconciliation := Reconciler{ Log: log, Recorder: r.Recorder, Cache: cache, diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 2d398db3..8733a13b 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -29,7 +29,7 @@ import ( const RoutePrefixDefault = "apps" -type FrontendReconciliation struct { +type Reconciler struct { Log logr.Logger Recorder record.EventRecorder Cache resCache.ObjectCache @@ -40,7 +40,7 @@ type FrontendReconciliation struct { Client client.Client } -func (r *FrontendReconciliation) run() error { +func (r *Reconciler) run() error { configMap, err := r.setupConfigMaps() if err != nil { @@ -181,7 +181,7 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnviron } // Add the SSL env vars if we SSL mode is set in the frontend environment -func (r *FrontendReconciliation) populateEnvVars(d *apps.Deployment, frontendEnvironment *crd.FrontendEnvironment) { +func (r *Reconciler) populateEnvVars(d *apps.Deployment, frontendEnvironment *crd.FrontendEnvironment) { if !frontendEnvironment.Spec.SSL { return } @@ -197,7 +197,7 @@ func (r *FrontendReconciliation) populateEnvVars(d *apps.Deployment, frontendEnv d.Spec.Template.Spec.Containers[0].Env = envVars } -func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map[string]string) error { +func (r *Reconciler) createFrontendDeployment(annotationHashes []map[string]string) error { // Create new empty struct d := &apps.Deployment{} @@ -267,7 +267,7 @@ func createPorts() []v1.ServicePort { } // Will need to create a service resource ident in provider like CoreDeployment -func (r *FrontendReconciliation) createFrontendService() error { +func (r *Reconciler) createFrontendService() error { // Create empty service s := &v1.Service{} @@ -309,7 +309,7 @@ func (r *FrontendReconciliation) createFrontendService() error { } -func (r *FrontendReconciliation) createFrontendIngress() error { +func (r *Reconciler) createFrontendIngress() error { netobj := &networking.Ingress{} nn := types.NamespacedName{ @@ -333,7 +333,7 @@ func (r *FrontendReconciliation) createFrontendIngress() error { return err } -func (r *FrontendReconciliation) createAnnotationsAndPopulate(nn types.NamespacedName, netobj *networking.Ingress) { +func (r *Reconciler) createAnnotationsAndPopulate(nn types.NamespacedName, netobj *networking.Ingress) { ingressClass := r.FrontendEnvironment.Spec.IngressClass if ingressClass == "" { ingressClass = "nginx" @@ -366,7 +366,7 @@ func (r *FrontendReconciliation) createAnnotationsAndPopulate(nn types.Namespace } } -func (r *FrontendReconciliation) getFrontendPaths() []string { +func (r *Reconciler) getFrontendPaths() []string { frontendPaths := r.Frontend.Spec.Frontend.Paths defaultPath := fmt.Sprintf("/apps/%s", r.Frontend.Name) defaultBetaPath := fmt.Sprintf("/beta/apps/%s", r.Frontend.Name) @@ -392,7 +392,7 @@ func (r *FrontendReconciliation) getFrontendPaths() []string { return frontendPaths } -func (r *FrontendReconciliation) populateConsoleDotIngress(netobj *networking.Ingress, ingressClass, serviceName string) { +func (r *Reconciler) populateConsoleDotIngress(netobj *networking.Ingress, ingressClass, serviceName string) { frontendPaths := r.getFrontendPaths() var ingressPaths []networking.HTTPIngressPath @@ -549,7 +549,7 @@ func setupFedModules(feEnv *crd.FrontendEnvironment, frontendList *crd.FrontendL return nil } -func (r *FrontendReconciliation) setupBundleData(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend) error { +func (r *Reconciler) setupBundleData(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend) error { bundleList := &crd.BundleList{} if err := r.FRE.Client.List(r.Ctx, bundleList, client.MatchingFields{"spec.envName": r.Frontend.Spec.EnvName}); err != nil { @@ -594,7 +594,7 @@ func createConfigmapHash(cfgMap *v1.ConfigMap) (string, error) { // setupConfigMaps will create configmaps for the various config json // files, including fed-modules.json and the various bundle json files -func (r *FrontendReconciliation) setupConfigMaps() (*v1.ConfigMap, error) { +func (r *Reconciler) setupConfigMaps() (*v1.ConfigMap, error) { // Will need to interact directly with the client here, and not the cache because // we need to read ALL the Frontend CRDs in the Env that we care about @@ -611,7 +611,7 @@ func (r *FrontendReconciliation) setupConfigMaps() (*v1.ConfigMap, error) { return cfgMap, err } -func (r *FrontendReconciliation) createConfigMap(frontendList *crd.FrontendList) (*v1.ConfigMap, error) { +func (r *Reconciler) createConfigMap(frontendList *crd.FrontendList) (*v1.ConfigMap, error) { cfgMap := &v1.ConfigMap{} // Create a map of frontend names to frontends objects @@ -643,7 +643,7 @@ func (r *FrontendReconciliation) createConfigMap(frontendList *crd.FrontendList) return cfgMap, nil } -func (r *FrontendReconciliation) populateConfigMap(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend, feList *crd.FrontendList) error { +func (r *Reconciler) populateConfigMap(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend, feList *crd.FrontendList) error { cfgMap.SetOwnerReferences([]metav1.OwnerReference{r.FrontendEnvironment.MakeOwnerReference()}) cfgMap.Data = map[string]string{} @@ -667,7 +667,7 @@ func (r *FrontendReconciliation) populateConfigMap(cfgMap *v1.ConfigMap, cacheMa return nil } -func (r *FrontendReconciliation) createServiceMonitor() error { +func (r *Reconciler) createServiceMonitor() error { // the monitor mode will default to "app-interface" ns := "openshift-customer-monitoring" From 5779aff340562c11281d0e932d95d83b23cd8406 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 14:27:49 -0400 Subject: [PATCH 060/228] RegisterWithControllerManager --- controllers/frontend_controller.go | 4 ++-- controllers/suite_test.go | 2 +- main.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index a6cb8554..61ac5806 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -251,8 +251,8 @@ func (r *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu return ctrl.Result{}, nil } -// SetupWithManager sets up the controller with the Manager. -func (r *Controller) SetupWithManager(mgr ctrl.Manager) error { +// RegisterWithControllerManager sets up the controller with the Manager. +func (r *Controller) RegisterWithControllerManager(mgr ctrl.Manager) error { cache := mgr.GetCache() diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 363d0090..02db7426 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -100,7 +100,7 @@ var _ = BeforeSuite(func() { Client: k8sManager.GetClient(), Scheme: k8sManager.GetScheme(), Log: ctrl.Log.WithName("controllers").WithName("CronJob"), - }).SetupWithManager(k8sManager) + }).RegisterWithControllerManager(k8sManager) Expect(err).ToNot(HaveOccurred()) ctx, cancel := context.WithCancel(context.Background()) diff --git a/main.go b/main.go index a641fa4a..fd49ee60 100644 --- a/main.go +++ b/main.go @@ -96,7 +96,7 @@ func Run(metricsAddr, probeAddr string, enableLeaderElection bool) error { Log: ctrl.Log.WithName("controllers").WithName("Frontend"), Client: mgr.GetClient(), Scheme: mgr.GetScheme(), - }).SetupWithManager(mgr); err != nil { + }).RegisterWithControllerManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "Frontend") return fmt.Errorf("unable to create manager: %w", err) } From a0be63d45a9333914a655d631a16240081480093 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 14:33:12 -0400 Subject: [PATCH 061/228] Factoring stuff out and renaming --- controllers/frontend_controller.go | 4 ++-- controllers/suite_test.go | 2 +- main.go | 18 +++++++++++++----- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index 61ac5806..b608bb59 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -251,8 +251,8 @@ func (r *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu return ctrl.Result{}, nil } -// RegisterWithControllerManager sets up the controller with the Manager. -func (r *Controller) RegisterWithControllerManager(mgr ctrl.Manager) error { +// RegisterWithManager sets up the controller with the Manager. +func (r *Controller) RegisterWithManager(mgr ctrl.Manager) error { cache := mgr.GetCache() diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 02db7426..1800ec7e 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -100,7 +100,7 @@ var _ = BeforeSuite(func() { Client: k8sManager.GetClient(), Scheme: k8sManager.GetScheme(), Log: ctrl.Log.WithName("controllers").WithName("CronJob"), - }).RegisterWithControllerManager(k8sManager) + }).RegisterWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) ctx, cancel := context.WithCancel(context.Background()) diff --git a/main.go b/main.go index fd49ee60..b0721f91 100644 --- a/main.go +++ b/main.go @@ -31,6 +31,7 @@ import ( clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/healthz" + "sigs.k8s.io/controller-runtime/pkg/manager" cloudredhatcomv1alpha1 "github.com/RedHatInsights/frontend-operator/api/v1alpha1" "github.com/RedHatInsights/frontend-operator/controllers" @@ -78,6 +79,16 @@ func main() { } } +func register(mgr manager.Manager) error { + controller := &controllers.Controller{ + Log: ctrl.Log.WithName("controllers").WithName("Frontend"), + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + } + + return controller.RegisterWithManager(mgr) +} + func Run(metricsAddr, probeAddr string, enableLeaderElection bool) error { mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ Scheme: scheme, @@ -92,11 +103,8 @@ func Run(metricsAddr, probeAddr string, enableLeaderElection bool) error { return fmt.Errorf("unable to start manager: %w", err) } - if err = (&controllers.Controller{ - Log: ctrl.Log.WithName("controllers").WithName("Frontend"), - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - }).RegisterWithControllerManager(mgr); err != nil { + err = register(mgr) + if err != nil { setupLog.Error(err, "unable to create controller", "controller", "Frontend") return fmt.Errorf("unable to create manager: %w", err) } From b11e77cb8a2f0deae8e4563ee4b78825f04034e3 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:02:11 -0400 Subject: [PATCH 062/228] Lots of renaming and reorganizing --- .../frontend_controller.go | 2 +- .../frontend_controller_suite_test.go | 0 {controllers => frontend_operator}/metrics.go | 0 .../reconcile.go | 0 {controllers => frontend_operator}/status.go | 0 .../suite_test.go | 0 .../utils/utils.go | 0 .../utils/utils_test.go | 0 main.go | 116 ++++++++++++------ 9 files changed, 79 insertions(+), 39 deletions(-) rename {controllers => frontend_operator}/frontend_controller.go (99%) rename {controllers => frontend_operator}/frontend_controller_suite_test.go (100%) rename {controllers => frontend_operator}/metrics.go (100%) rename {controllers => frontend_operator}/reconcile.go (100%) rename {controllers => frontend_operator}/status.go (100%) rename {controllers => frontend_operator}/suite_test.go (100%) rename {controllers => frontend_operator}/utils/utils.go (100%) rename {controllers => frontend_operator}/utils/utils_test.go (100%) diff --git a/controllers/frontend_controller.go b/frontend_operator/frontend_controller.go similarity index 99% rename from controllers/frontend_controller.go rename to frontend_operator/frontend_controller.go index b608bb59..c0a2fc07 100644 --- a/controllers/frontend_controller.go +++ b/frontend_operator/frontend_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controllers +package frontend_operator import ( "context" diff --git a/controllers/frontend_controller_suite_test.go b/frontend_operator/frontend_controller_suite_test.go similarity index 100% rename from controllers/frontend_controller_suite_test.go rename to frontend_operator/frontend_controller_suite_test.go diff --git a/controllers/metrics.go b/frontend_operator/metrics.go similarity index 100% rename from controllers/metrics.go rename to frontend_operator/metrics.go diff --git a/controllers/reconcile.go b/frontend_operator/reconcile.go similarity index 100% rename from controllers/reconcile.go rename to frontend_operator/reconcile.go diff --git a/controllers/status.go b/frontend_operator/status.go similarity index 100% rename from controllers/status.go rename to frontend_operator/status.go diff --git a/controllers/suite_test.go b/frontend_operator/suite_test.go similarity index 100% rename from controllers/suite_test.go rename to frontend_operator/suite_test.go diff --git a/controllers/utils/utils.go b/frontend_operator/utils/utils.go similarity index 100% rename from controllers/utils/utils.go rename to frontend_operator/utils/utils.go diff --git a/controllers/utils/utils_test.go b/frontend_operator/utils/utils_test.go similarity index 100% rename from controllers/utils/utils_test.go rename to frontend_operator/utils/utils_test.go diff --git a/main.go b/main.go index b0721f91..274ba705 100644 --- a/main.go +++ b/main.go @@ -21,10 +21,10 @@ import ( "fmt" "os" - // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) - // to ensure that exec-entrypoint and run can make use of them. + "go.uber.org/zap" _ "k8s.io/client-go/plugin/pkg/client/auth" + "github.com/go-logr/zapr" prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" @@ -34,9 +34,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" cloudredhatcomv1alpha1 "github.com/RedHatInsights/frontend-operator/api/v1alpha1" - "github.com/RedHatInsights/frontend-operator/controllers" + "github.com/RedHatInsights/frontend-operator/frontend_operator" "github.com/RedHatInsights/rhc-osdk-utils/logging" - "github.com/go-logr/zapr" //+kubebuilder:scaffold:imports ) @@ -45,42 +44,72 @@ var ( setupLog = ctrl.Log.WithName("setup") ) +// I know that gofmt says not to capitalize constants but I disagree +// All caps is a universal way to say "this is a constant" +// I value being idiomatic, but I feel the utility of strong +// visual cues outweighs the cost of being non-idiomatic +const ( + METRICS_ADDRESS = ":8080" + PROBE_ADDRESS = ":8081" + LEADER_ELECT = false + LEADER_ELECTION_ID = "1dd43857.cloud.redhat.com" +) + +// I don't know what this method does +// I assume something in the k8s land calls this considering the linter +// isn't mad about it func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(prom.AddToScheme(scheme)) - utilruntime.Must(cloudredhatcomv1alpha1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } +// main is the entrypoint into the operator func main() { - var metricsAddr string - var enableLeaderElection bool - var probeAddr string - flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.") - flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") - flag.BoolVar(&enableLeaderElection, "leader-elect", false, - "Enable leader election for controller manager. "+ - "Enabling this will ensure there is only one active controller manager.") - flag.Parse() + metricsAddr, probeAddr, enableLeaderElection := parseArguments() - logger, err := logging.SetupLogging(true) + logger := setupLogger() - if err != nil { - panic(err) - } - - ctrl.SetLogger(zapr.NewLogger(logger)) - - err = Run(metricsAddr, probeAddr, enableLeaderElection) + err := start(metricsAddr, probeAddr, enableLeaderElection) if err != nil { _ = logger.Sync() os.Exit(1) } } -func register(mgr manager.Manager) error { - controller := &controllers.Controller{ +// newManager sets up a new controller manager +func newManager(metricsAddr, probeAddr string, enableLeaderElection bool) (manager.Manager, error) { + return ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ + Scheme: scheme, + MetricsBindAddress: metricsAddr, + Port: 9443, + HealthProbeBindAddress: probeAddr, + LeaderElection: enableLeaderElection, + LeaderElectionID: LEADER_ELECTION_ID, + }) +} + +// parseArguments parses the command line arguments +func parseArguments() (string, string, bool) { + var ( + metricsAddr string + enableLeaderElection bool + probeAddr string + ) + flag.StringVar(&metricsAddr, "metrics-bind-address", METRICS_ADDRESS, "The address the metric endpoint binds to.") + flag.StringVar(&probeAddr, "health-probe-bind-address", PROBE_ADDRESS, "The address the probe endpoint binds to.") + flag.BoolVar(&enableLeaderElection, "leader-elect", LEADER_ELECT, + "Enable leader election for controller manager. "+ + "Enabling this will ensure there is only one active controller manager.") + flag.Parse() + + return metricsAddr, probeAddr, enableLeaderElection +} + +// register registers the frontend controller with the ControllerManager +func registerWithManager(mgr manager.Manager) error { + controller := &frontend_operator.Controller{ Log: ctrl.Log.WithName("controllers").WithName("Frontend"), Client: mgr.GetClient(), Scheme: mgr.GetScheme(), @@ -89,40 +118,51 @@ func register(mgr manager.Manager) error { return controller.RegisterWithManager(mgr) } -func Run(metricsAddr, probeAddr string, enableLeaderElection bool) error { - mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ - Scheme: scheme, - MetricsBindAddress: metricsAddr, - Port: 9443, - HealthProbeBindAddress: probeAddr, - LeaderElection: enableLeaderElection, - LeaderElectionID: "1dd43857.cloud.redhat.com", - }) +// start hooks the controller code up to the kubernetes API +func start(metricsAddr, probeAddr string, enableLeaderElection bool) error { + mgr, err := newManager(metricsAddr, probeAddr, enableLeaderElection) if err != nil { setupLog.Error(err, "unable to start manager") return fmt.Errorf("unable to start manager: %w", err) } - err = register(mgr) + err = registerWithManager(mgr) if err != nil { setupLog.Error(err, "unable to create controller", "controller", "Frontend") - return fmt.Errorf("unable to create manager: %w", err) + return fmt.Errorf("unable to create controller: %w", err) } //+kubebuilder:scaffold:builder - if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { + err = mgr.AddHealthzCheck("healthz", healthz.Ping) + if err != nil { setupLog.Error(err, "unable to set up health check") return fmt.Errorf("unable to setup health check: %w", err) } - if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil { + + err = mgr.AddReadyzCheck("readyz", healthz.Ping) + if err != nil { setupLog.Error(err, "unable to set up ready check") return fmt.Errorf("unable to setup ready check: %w", err) } setupLog.Info("starting manager") - if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { + err = mgr.Start(ctrl.SetupSignalHandler()) + if err != nil { setupLog.Error(err, "problem running manager") return fmt.Errorf("problem running manager: %w", err) } + return nil } + +// setupLogger sets up the logger for the operator +func setupLogger() *zap.Logger { + logger, err := logging.SetupLogging(true) + if err != nil { + panic(err) + } + + ctrl.SetLogger(zapr.NewLogger(logger)) + + return logger +} From fc59a698d89a13dd3cc861af5cc6306d8f18114e Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:02:46 -0400 Subject: [PATCH 063/228] A couple of small moves --- main.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/main.go b/main.go index 274ba705..606253bb 100644 --- a/main.go +++ b/main.go @@ -118,6 +118,18 @@ func registerWithManager(mgr manager.Manager) error { return controller.RegisterWithManager(mgr) } +// setupLogger sets up the logger for the operator +func setupLogger() *zap.Logger { + logger, err := logging.SetupLogging(true) + if err != nil { + panic(err) + } + + ctrl.SetLogger(zapr.NewLogger(logger)) + + return logger +} + // start hooks the controller code up to the kubernetes API func start(metricsAddr, probeAddr string, enableLeaderElection bool) error { mgr, err := newManager(metricsAddr, probeAddr, enableLeaderElection) @@ -154,15 +166,3 @@ func start(metricsAddr, probeAddr string, enableLeaderElection bool) error { return nil } - -// setupLogger sets up the logger for the operator -func setupLogger() *zap.Logger { - logger, err := logging.SetupLogging(true) - if err != nil { - panic(err) - } - - ctrl.SetLogger(zapr.NewLogger(logger)) - - return logger -} From b9e50a176e510b2e454f680904c0e685c535dfa9 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:17:57 -0400 Subject: [PATCH 064/228] Missed a couple --- frontend_operator/frontend_controller_suite_test.go | 2 +- frontend_operator/status.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend_operator/frontend_controller_suite_test.go b/frontend_operator/frontend_controller_suite_test.go index 48df2aee..6e665d36 100644 --- a/frontend_operator/frontend_controller_suite_test.go +++ b/frontend_operator/frontend_controller_suite_test.go @@ -1,4 +1,4 @@ -package controllers +package frontend_operator import ( "context" diff --git a/frontend_operator/status.go b/frontend_operator/status.go index 503d9b8d..48297dcf 100644 --- a/frontend_operator/status.go +++ b/frontend_operator/status.go @@ -1,4 +1,4 @@ -package controllers +package frontend_operator import ( "context" From 6a1fd9482279607ef8e891610fb9a89bc8800560 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:18:20 -0400 Subject: [PATCH 065/228] Missed a couple more. --- frontend_operator/reconcile.go | 4 ++-- frontend_operator/suite_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend_operator/reconcile.go b/frontend_operator/reconcile.go index 8733a13b..8839d43b 100644 --- a/frontend_operator/reconcile.go +++ b/frontend_operator/reconcile.go @@ -1,4 +1,4 @@ -package controllers +package frontend_operator import ( "context" @@ -9,7 +9,7 @@ import ( "strings" crd "github.com/RedHatInsights/frontend-operator/api/v1alpha1" - localUtil "github.com/RedHatInsights/frontend-operator/controllers/utils" + localUtil "github.com/RedHatInsights/frontend-operator/frontend_operator/utils" resCache "github.com/RedHatInsights/rhc-osdk-utils/resourceCache" "github.com/RedHatInsights/rhc-osdk-utils/utils" "github.com/go-logr/logr" diff --git a/frontend_operator/suite_test.go b/frontend_operator/suite_test.go index 1800ec7e..dffe42c5 100644 --- a/frontend_operator/suite_test.go +++ b/frontend_operator/suite_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controllers +package frontend_operator import ( "context" From f7812b76055c3ed582cd993e88f8fe3ca27fb152 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:24:04 -0400 Subject: [PATCH 066/228] Prevent collisions in jenkins a little more agressively --- pr_check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pr_check.sh b/pr_check.sh index f876fe8a..3a797ff1 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -10,7 +10,8 @@ mkdir -p "$DOCKER_CONF" export IMAGE_TAG=`git rev-parse --short HEAD` export IMAGE_NAME=quay.io/cloudservices/frontend-operator -CONTAINER_NAME="frontend-operator-pr-check-$ghprbPullId" +EPOCH=$(date +%s) +CONTAINER_NAME="frontend-operator-pr-check-$ghprbPullId-$EPOCH" # NOTE: Make sure this volume is mounted 'ro', otherwise Jenkins cannot clean up the workspace due to file permission errors set +e # Run the pr check container (stored in the build dir) and invoke the From 7cf1f41bf9e989afca415f8006a908b8734805db Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:27:04 -0400 Subject: [PATCH 067/228] prepush --- frontend_operator/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend_operator/metrics.go b/frontend_operator/metrics.go index bd98bab2..c7140af7 100644 --- a/frontend_operator/metrics.go +++ b/frontend_operator/metrics.go @@ -1,4 +1,4 @@ -package controllers +package frontend_operator import ( "github.com/prometheus/client_golang/prometheus" From 5371aa276e9065fecad3eb8f8b59f4cb63d07a9f Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:31:06 -0400 Subject: [PATCH 068/228] change package name to operator --- main.go | 4 ++-- {frontend_operator => operator}/frontend_controller.go | 2 +- .../frontend_controller_suite_test.go | 2 +- {frontend_operator => operator}/metrics.go | 2 +- {frontend_operator => operator}/reconcile.go | 4 ++-- {frontend_operator => operator}/status.go | 2 +- {frontend_operator => operator}/suite_test.go | 2 +- {frontend_operator => operator}/utils/utils.go | 0 {frontend_operator => operator}/utils/utils_test.go | 0 9 files changed, 9 insertions(+), 9 deletions(-) rename {frontend_operator => operator}/frontend_controller.go (99%) rename {frontend_operator => operator}/frontend_controller_suite_test.go (99%) rename {frontend_operator => operator}/metrics.go (97%) rename {frontend_operator => operator}/reconcile.go (99%) rename {frontend_operator => operator}/status.go (99%) rename {frontend_operator => operator}/suite_test.go (99%) rename {frontend_operator => operator}/utils/utils.go (100%) rename {frontend_operator => operator}/utils/utils_test.go (100%) diff --git a/main.go b/main.go index 606253bb..ab17b80e 100644 --- a/main.go +++ b/main.go @@ -34,7 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" cloudredhatcomv1alpha1 "github.com/RedHatInsights/frontend-operator/api/v1alpha1" - "github.com/RedHatInsights/frontend-operator/frontend_operator" + "github.com/RedHatInsights/frontend-operator/operator" "github.com/RedHatInsights/rhc-osdk-utils/logging" //+kubebuilder:scaffold:imports ) @@ -109,7 +109,7 @@ func parseArguments() (string, string, bool) { // register registers the frontend controller with the ControllerManager func registerWithManager(mgr manager.Manager) error { - controller := &frontend_operator.Controller{ + controller := &operator.Controller{ Log: ctrl.Log.WithName("controllers").WithName("Frontend"), Client: mgr.GetClient(), Scheme: mgr.GetScheme(), diff --git a/frontend_operator/frontend_controller.go b/operator/frontend_controller.go similarity index 99% rename from frontend_operator/frontend_controller.go rename to operator/frontend_controller.go index c0a2fc07..1896d704 100644 --- a/frontend_operator/frontend_controller.go +++ b/operator/frontend_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package frontend_operator +package operator import ( "context" diff --git a/frontend_operator/frontend_controller_suite_test.go b/operator/frontend_controller_suite_test.go similarity index 99% rename from frontend_operator/frontend_controller_suite_test.go rename to operator/frontend_controller_suite_test.go index 6e665d36..ed033e43 100644 --- a/frontend_operator/frontend_controller_suite_test.go +++ b/operator/frontend_controller_suite_test.go @@ -1,4 +1,4 @@ -package frontend_operator +package operator import ( "context" diff --git a/frontend_operator/metrics.go b/operator/metrics.go similarity index 97% rename from frontend_operator/metrics.go rename to operator/metrics.go index c7140af7..f2ccfe01 100644 --- a/frontend_operator/metrics.go +++ b/operator/metrics.go @@ -1,4 +1,4 @@ -package frontend_operator +package operator import ( "github.com/prometheus/client_golang/prometheus" diff --git a/frontend_operator/reconcile.go b/operator/reconcile.go similarity index 99% rename from frontend_operator/reconcile.go rename to operator/reconcile.go index 8839d43b..ef7cacd4 100644 --- a/frontend_operator/reconcile.go +++ b/operator/reconcile.go @@ -1,4 +1,4 @@ -package frontend_operator +package operator import ( "context" @@ -9,7 +9,7 @@ import ( "strings" crd "github.com/RedHatInsights/frontend-operator/api/v1alpha1" - localUtil "github.com/RedHatInsights/frontend-operator/frontend_operator/utils" + localUtil "github.com/RedHatInsights/frontend-operator/operator/utils" resCache "github.com/RedHatInsights/rhc-osdk-utils/resourceCache" "github.com/RedHatInsights/rhc-osdk-utils/utils" "github.com/go-logr/logr" diff --git a/frontend_operator/status.go b/operator/status.go similarity index 99% rename from frontend_operator/status.go rename to operator/status.go index 48297dcf..530737a4 100644 --- a/frontend_operator/status.go +++ b/operator/status.go @@ -1,4 +1,4 @@ -package frontend_operator +package operator import ( "context" diff --git a/frontend_operator/suite_test.go b/operator/suite_test.go similarity index 99% rename from frontend_operator/suite_test.go rename to operator/suite_test.go index dffe42c5..562508db 100644 --- a/frontend_operator/suite_test.go +++ b/operator/suite_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package frontend_operator +package operator import ( "context" diff --git a/frontend_operator/utils/utils.go b/operator/utils/utils.go similarity index 100% rename from frontend_operator/utils/utils.go rename to operator/utils/utils.go diff --git a/frontend_operator/utils/utils_test.go b/operator/utils/utils_test.go similarity index 100% rename from frontend_operator/utils/utils_test.go rename to operator/utils/utils_test.go From 47efac893132b5be3ac2eb12b8f18c6a13376149 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:32:15 -0400 Subject: [PATCH 069/228] Ugh --- main.go | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/main.go b/main.go index ab17b80e..2bff964f 100644 --- a/main.go +++ b/main.go @@ -44,15 +44,12 @@ var ( setupLog = ctrl.Log.WithName("setup") ) -// I know that gofmt says not to capitalize constants but I disagree -// All caps is a universal way to say "this is a constant" -// I value being idiomatic, but I feel the utility of strong -// visual cues outweighs the cost of being non-idiomatic +// Consts should be all caps. That's idiomatic accross langs. Go lint is wrong. const ( - METRICS_ADDRESS = ":8080" - PROBE_ADDRESS = ":8081" - LEADER_ELECT = false - LEADER_ELECTION_ID = "1dd43857.cloud.redhat.com" + MetricsAddress = ":8080" + ProbeAddress = ":8081" + LeaderElect = false + LeaderElectionId = "1dd43857.cloud.redhat.com" ) // I don't know what this method does @@ -86,7 +83,7 @@ func newManager(metricsAddr, probeAddr string, enableLeaderElection bool) (manag Port: 9443, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, - LeaderElectionID: LEADER_ELECTION_ID, + LeaderElectionID: LeaderElectionId, }) } @@ -97,9 +94,9 @@ func parseArguments() (string, string, bool) { enableLeaderElection bool probeAddr string ) - flag.StringVar(&metricsAddr, "metrics-bind-address", METRICS_ADDRESS, "The address the metric endpoint binds to.") - flag.StringVar(&probeAddr, "health-probe-bind-address", PROBE_ADDRESS, "The address the probe endpoint binds to.") - flag.BoolVar(&enableLeaderElection, "leader-elect", LEADER_ELECT, + flag.StringVar(&metricsAddr, "metrics-bind-address", MetricsAddress, "The address the metric endpoint binds to.") + flag.StringVar(&probeAddr, "health-probe-bind-address", ProbeAddress, "The address the probe endpoint binds to.") + flag.BoolVar(&enableLeaderElection, "leader-elect", LeaderElect, "Enable leader election for controller manager. "+ "Enabling this will ensure there is only one active controller manager.") flag.Parse() From 1d13247a64d93804f19a03b0327381953da36b85 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:33:50 -0400 Subject: [PATCH 070/228] Pedantic --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 2bff964f..c99f824c 100644 --- a/main.go +++ b/main.go @@ -49,7 +49,7 @@ const ( MetricsAddress = ":8080" ProbeAddress = ":8081" LeaderElect = false - LeaderElectionId = "1dd43857.cloud.redhat.com" + LeaderElectionID = "1dd43857.cloud.redhat.com" ) // I don't know what this method does From 0c9198b9ece72185d3719b7dc3dae9f38a81a49f Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 4 Apr 2023 15:34:29 -0400 Subject: [PATCH 071/228] Oops --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index c99f824c..14f4998b 100644 --- a/main.go +++ b/main.go @@ -83,7 +83,7 @@ func newManager(metricsAddr, probeAddr string, enableLeaderElection bool) (manag Port: 9443, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, - LeaderElectionID: LeaderElectionId, + LeaderElectionID: LeaderElectionID, }) } From d1ac50de5e8b9ec112fe8aa1262b6059168449d4 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 5 Apr 2023 08:21:36 -0400 Subject: [PATCH 072/228] Slightly less snarky snark --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 14f4998b..5f08a5fa 100644 --- a/main.go +++ b/main.go @@ -44,7 +44,7 @@ var ( setupLog = ctrl.Log.WithName("setup") ) -// Consts should be all caps. That's idiomatic accross langs. Go lint is wrong. +// Consts should be all caps. Go lint is wrong. const ( MetricsAddress = ":8080" ProbeAddress = ":8081" From 122c2db334368e9fa59fa2b04569e9efcfbc6672 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 5 Apr 2023 08:22:41 -0400 Subject: [PATCH 073/228] Correct a comment --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 5f08a5fa..ca292d8c 100644 --- a/main.go +++ b/main.go @@ -104,7 +104,7 @@ func parseArguments() (string, string, bool) { return metricsAddr, probeAddr, enableLeaderElection } -// register registers the frontend controller with the ControllerManager +// registerWithManager registers the frontend controller with the ControllerManager func registerWithManager(mgr manager.Manager) error { controller := &operator.Controller{ Log: ctrl.Log.WithName("controllers").WithName("Frontend"), From b13eb3ca0fb598bdf17f4f95b354833bab15bc2c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 5 Apr 2023 14:15:59 -0400 Subject: [PATCH 074/228] Revert "Frontend operator tidy-up" --- .../frontend_controller.go | 22 ++-- .../frontend_controller_suite_test.go | 2 +- {operator => controllers}/metrics.go | 2 +- {operator => controllers}/reconcile.go | 34 +++--- {operator => controllers}/status.go | 2 +- {operator => controllers}/suite_test.go | 6 +- {operator => controllers}/utils/utils.go | 0 {operator => controllers}/utils/utils_test.go | 0 main.go | 113 ++++++------------ pr_check.sh | 3 +- 10 files changed, 69 insertions(+), 115 deletions(-) rename {operator => controllers}/frontend_controller.go (94%) rename {operator => controllers}/frontend_controller_suite_test.go (99%) rename {operator => controllers}/metrics.go (97%) rename {operator => controllers}/reconcile.go (93%) rename {operator => controllers}/status.go (99%) rename {operator => controllers}/suite_test.go (97%) rename {operator => controllers}/utils/utils.go (100%) rename {operator => controllers}/utils/utils_test.go (100%) diff --git a/operator/frontend_controller.go b/controllers/frontend_controller.go similarity index 94% rename from operator/frontend_controller.go rename to controllers/frontend_controller.go index 1896d704..629ec927 100644 --- a/operator/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package operator +package controllers import ( "context" @@ -92,8 +92,8 @@ func (rm *ReconciliationMetrics) stop() { reconciliationTimeMetrics.With(prometheus.Labels{"app": rm.appName}).Observe(elapsedTime) } -// Controller reconciles a Frontend object -type Controller struct { +// FrontendReconciler reconciles a Frontend object +type FrontendReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme @@ -122,7 +122,7 @@ type Controller struct { // For more details, check Reconcile and its Result here: // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile -func (r *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { +func (r *FrontendReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { r.Log = log.FromContext(ctx) qualifiedName := fmt.Sprintf("%s:%s", req.Namespace, req.Name) log := r.Log.WithValues("frontend", qualifiedName).WithValues("id", utils.RandString(5)) @@ -193,7 +193,7 @@ func (r *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu MetricsServiceMonitor, ) - reconciliation := Reconciler{ + reconciliation := FrontendReconciliation{ Log: log, Recorder: r.Recorder, Cache: cache, @@ -251,8 +251,8 @@ func (r *Controller) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu return ctrl.Result{}, nil } -// RegisterWithManager sets up the controller with the Manager. -func (r *Controller) RegisterWithManager(mgr ctrl.Manager) error { +// SetupWithManager sets up the controller with the Manager. +func (r *FrontendReconciler) SetupWithManager(mgr ctrl.Manager) error { cache := mgr.GetCache() @@ -315,7 +315,7 @@ func defaultPredicate(logr logr.Logger, ctrlName string) predicate.Funcs { } } -func (r *Controller) appsToEnqueueUponBundleUpdate(a client.Object) []reconcile.Request { +func (r *FrontendReconciler) appsToEnqueueUponBundleUpdate(a client.Object) []reconcile.Request { reqs := []reconcile.Request{} ctx := context.Background() obj := types.NamespacedName{ @@ -360,7 +360,7 @@ func (r *Controller) appsToEnqueueUponBundleUpdate(a client.Object) []reconcile. return reqs } -func (r *Controller) appsToEnqueueUponFrontendEnvironmentUpdate(a client.Object) []reconcile.Request { +func (r *FrontendReconciler) appsToEnqueueUponFrontendEnvironmentUpdate(a client.Object) []reconcile.Request { reqs := []reconcile.Request{} ctx := context.Background() obj := types.NamespacedName{ @@ -404,7 +404,7 @@ func (r *Controller) appsToEnqueueUponFrontendEnvironmentUpdate(a client.Object) return reqs } -func (r *Controller) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) error { +func (r *FrontendReconciler) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) error { delete(managedFrontends, a.GetIdent()) @@ -413,7 +413,7 @@ func (r *Controller) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) error { return nil } -func (r *Controller) addFinalizer(reqLogger logr.Logger, a *crd.Frontend) error { +func (r *FrontendReconciler) addFinalizer(reqLogger logr.Logger, a *crd.Frontend) error { reqLogger.Info("Adding Finalizer for the ClowdApp") controllerutil.AddFinalizer(a, frontendFinalizer) diff --git a/operator/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go similarity index 99% rename from operator/frontend_controller_suite_test.go rename to controllers/frontend_controller_suite_test.go index ed033e43..48df2aee 100644 --- a/operator/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -1,4 +1,4 @@ -package operator +package controllers import ( "context" diff --git a/operator/metrics.go b/controllers/metrics.go similarity index 97% rename from operator/metrics.go rename to controllers/metrics.go index f2ccfe01..bd98bab2 100644 --- a/operator/metrics.go +++ b/controllers/metrics.go @@ -1,4 +1,4 @@ -package operator +package controllers import ( "github.com/prometheus/client_golang/prometheus" diff --git a/operator/reconcile.go b/controllers/reconcile.go similarity index 93% rename from operator/reconcile.go rename to controllers/reconcile.go index ef7cacd4..c46e75ea 100644 --- a/operator/reconcile.go +++ b/controllers/reconcile.go @@ -1,4 +1,4 @@ -package operator +package controllers import ( "context" @@ -9,7 +9,7 @@ import ( "strings" crd "github.com/RedHatInsights/frontend-operator/api/v1alpha1" - localUtil "github.com/RedHatInsights/frontend-operator/operator/utils" + localUtil "github.com/RedHatInsights/frontend-operator/controllers/utils" resCache "github.com/RedHatInsights/rhc-osdk-utils/resourceCache" "github.com/RedHatInsights/rhc-osdk-utils/utils" "github.com/go-logr/logr" @@ -29,18 +29,18 @@ import ( const RoutePrefixDefault = "apps" -type Reconciler struct { +type FrontendReconciliation struct { Log logr.Logger Recorder record.EventRecorder Cache resCache.ObjectCache - FRE *Controller + FRE *FrontendReconciler FrontendEnvironment *crd.FrontendEnvironment Frontend *crd.Frontend Ctx context.Context Client client.Client } -func (r *Reconciler) run() error { +func (r *FrontendReconciliation) run() error { configMap, err := r.setupConfigMaps() if err != nil { @@ -181,7 +181,7 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnviron } // Add the SSL env vars if we SSL mode is set in the frontend environment -func (r *Reconciler) populateEnvVars(d *apps.Deployment, frontendEnvironment *crd.FrontendEnvironment) { +func (r *FrontendReconciliation) populateEnvVars(d *apps.Deployment, frontendEnvironment *crd.FrontendEnvironment) { if !frontendEnvironment.Spec.SSL { return } @@ -197,7 +197,7 @@ func (r *Reconciler) populateEnvVars(d *apps.Deployment, frontendEnvironment *cr d.Spec.Template.Spec.Containers[0].Env = envVars } -func (r *Reconciler) createFrontendDeployment(annotationHashes []map[string]string) error { +func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map[string]string) error { // Create new empty struct d := &apps.Deployment{} @@ -267,7 +267,7 @@ func createPorts() []v1.ServicePort { } // Will need to create a service resource ident in provider like CoreDeployment -func (r *Reconciler) createFrontendService() error { +func (r *FrontendReconciliation) createFrontendService() error { // Create empty service s := &v1.Service{} @@ -309,7 +309,7 @@ func (r *Reconciler) createFrontendService() error { } -func (r *Reconciler) createFrontendIngress() error { +func (r *FrontendReconciliation) createFrontendIngress() error { netobj := &networking.Ingress{} nn := types.NamespacedName{ @@ -333,7 +333,7 @@ func (r *Reconciler) createFrontendIngress() error { return err } -func (r *Reconciler) createAnnotationsAndPopulate(nn types.NamespacedName, netobj *networking.Ingress) { +func (r *FrontendReconciliation) createAnnotationsAndPopulate(nn types.NamespacedName, netobj *networking.Ingress) { ingressClass := r.FrontendEnvironment.Spec.IngressClass if ingressClass == "" { ingressClass = "nginx" @@ -366,7 +366,7 @@ func (r *Reconciler) createAnnotationsAndPopulate(nn types.NamespacedName, netob } } -func (r *Reconciler) getFrontendPaths() []string { +func (r *FrontendReconciliation) getFrontendPaths() []string { frontendPaths := r.Frontend.Spec.Frontend.Paths defaultPath := fmt.Sprintf("/apps/%s", r.Frontend.Name) defaultBetaPath := fmt.Sprintf("/beta/apps/%s", r.Frontend.Name) @@ -392,7 +392,7 @@ func (r *Reconciler) getFrontendPaths() []string { return frontendPaths } -func (r *Reconciler) populateConsoleDotIngress(netobj *networking.Ingress, ingressClass, serviceName string) { +func (r *FrontendReconciliation) populateConsoleDotIngress(netobj *networking.Ingress, ingressClass, serviceName string) { frontendPaths := r.getFrontendPaths() var ingressPaths []networking.HTTPIngressPath @@ -549,7 +549,7 @@ func setupFedModules(feEnv *crd.FrontendEnvironment, frontendList *crd.FrontendL return nil } -func (r *Reconciler) setupBundleData(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend) error { +func (r *FrontendReconciliation) setupBundleData(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend) error { bundleList := &crd.BundleList{} if err := r.FRE.Client.List(r.Ctx, bundleList, client.MatchingFields{"spec.envName": r.Frontend.Spec.EnvName}); err != nil { @@ -594,7 +594,7 @@ func createConfigmapHash(cfgMap *v1.ConfigMap) (string, error) { // setupConfigMaps will create configmaps for the various config json // files, including fed-modules.json and the various bundle json files -func (r *Reconciler) setupConfigMaps() (*v1.ConfigMap, error) { +func (r *FrontendReconciliation) setupConfigMaps() (*v1.ConfigMap, error) { // Will need to interact directly with the client here, and not the cache because // we need to read ALL the Frontend CRDs in the Env that we care about @@ -611,7 +611,7 @@ func (r *Reconciler) setupConfigMaps() (*v1.ConfigMap, error) { return cfgMap, err } -func (r *Reconciler) createConfigMap(frontendList *crd.FrontendList) (*v1.ConfigMap, error) { +func (r *FrontendReconciliation) createConfigMap(frontendList *crd.FrontendList) (*v1.ConfigMap, error) { cfgMap := &v1.ConfigMap{} // Create a map of frontend names to frontends objects @@ -643,7 +643,7 @@ func (r *Reconciler) createConfigMap(frontendList *crd.FrontendList) (*v1.Config return cfgMap, nil } -func (r *Reconciler) populateConfigMap(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend, feList *crd.FrontendList) error { +func (r *FrontendReconciliation) populateConfigMap(cfgMap *v1.ConfigMap, cacheMap map[string]crd.Frontend, feList *crd.FrontendList) error { cfgMap.SetOwnerReferences([]metav1.OwnerReference{r.FrontendEnvironment.MakeOwnerReference()}) cfgMap.Data = map[string]string{} @@ -667,7 +667,7 @@ func (r *Reconciler) populateConfigMap(cfgMap *v1.ConfigMap, cacheMap map[string return nil } -func (r *Reconciler) createServiceMonitor() error { +func (r *FrontendReconciliation) createServiceMonitor() error { // the monitor mode will default to "app-interface" ns := "openshift-customer-monitoring" diff --git a/operator/status.go b/controllers/status.go similarity index 99% rename from operator/status.go rename to controllers/status.go index 530737a4..503d9b8d 100644 --- a/operator/status.go +++ b/controllers/status.go @@ -1,4 +1,4 @@ -package operator +package controllers import ( "context" diff --git a/operator/suite_test.go b/controllers/suite_test.go similarity index 97% rename from operator/suite_test.go rename to controllers/suite_test.go index 562508db..506e692e 100644 --- a/operator/suite_test.go +++ b/controllers/suite_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package operator +package controllers import ( "context" @@ -96,11 +96,11 @@ var _ = BeforeSuite(func() { }) Expect(err).ToNot(HaveOccurred()) - err = (&Controller{ + err = (&FrontendReconciler{ Client: k8sManager.GetClient(), Scheme: k8sManager.GetScheme(), Log: ctrl.Log.WithName("controllers").WithName("CronJob"), - }).RegisterWithManager(k8sManager) + }).SetupWithManager(k8sManager) Expect(err).ToNot(HaveOccurred()) ctx, cancel := context.WithCancel(context.Background()) diff --git a/operator/utils/utils.go b/controllers/utils/utils.go similarity index 100% rename from operator/utils/utils.go rename to controllers/utils/utils.go diff --git a/operator/utils/utils_test.go b/controllers/utils/utils_test.go similarity index 100% rename from operator/utils/utils_test.go rename to controllers/utils/utils_test.go diff --git a/main.go b/main.go index ca292d8c..d6f365e9 100644 --- a/main.go +++ b/main.go @@ -21,21 +21,21 @@ import ( "fmt" "os" - "go.uber.org/zap" + // Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.) + // to ensure that exec-entrypoint and run can make use of them. _ "k8s.io/client-go/plugin/pkg/client/auth" - "github.com/go-logr/zapr" prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "k8s.io/apimachinery/pkg/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/healthz" - "sigs.k8s.io/controller-runtime/pkg/manager" cloudredhatcomv1alpha1 "github.com/RedHatInsights/frontend-operator/api/v1alpha1" - "github.com/RedHatInsights/frontend-operator/operator" + "github.com/RedHatInsights/frontend-operator/controllers" "github.com/RedHatInsights/rhc-osdk-utils/logging" + "github.com/go-logr/zapr" //+kubebuilder:scaffold:imports ) @@ -44,122 +44,77 @@ var ( setupLog = ctrl.Log.WithName("setup") ) -// Consts should be all caps. Go lint is wrong. -const ( - MetricsAddress = ":8080" - ProbeAddress = ":8081" - LeaderElect = false - LeaderElectionID = "1dd43857.cloud.redhat.com" -) - -// I don't know what this method does -// I assume something in the k8s land calls this considering the linter -// isn't mad about it func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) utilruntime.Must(prom.AddToScheme(scheme)) + utilruntime.Must(cloudredhatcomv1alpha1.AddToScheme(scheme)) //+kubebuilder:scaffold:scheme } -// main is the entrypoint into the operator func main() { - metricsAddr, probeAddr, enableLeaderElection := parseArguments() + var metricsAddr string + var enableLeaderElection bool + var probeAddr string + flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.") + flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.") + flag.BoolVar(&enableLeaderElection, "leader-elect", false, + "Enable leader election for controller manager. "+ + "Enabling this will ensure there is only one active controller manager.") + flag.Parse() + + logger, err := logging.SetupLogging(true) + + if err != nil { + panic(err) + } - logger := setupLogger() + ctrl.SetLogger(zapr.NewLogger(logger)) - err := start(metricsAddr, probeAddr, enableLeaderElection) + err = Run(metricsAddr, probeAddr, enableLeaderElection) if err != nil { _ = logger.Sync() os.Exit(1) } } -// newManager sets up a new controller manager -func newManager(metricsAddr, probeAddr string, enableLeaderElection bool) (manager.Manager, error) { - return ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ +func Run(metricsAddr, probeAddr string, enableLeaderElection bool) error { + mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, Port: 9443, HealthProbeBindAddress: probeAddr, LeaderElection: enableLeaderElection, - LeaderElectionID: LeaderElectionID, + LeaderElectionID: "1dd43857.cloud.redhat.com", }) -} - -// parseArguments parses the command line arguments -func parseArguments() (string, string, bool) { - var ( - metricsAddr string - enableLeaderElection bool - probeAddr string - ) - flag.StringVar(&metricsAddr, "metrics-bind-address", MetricsAddress, "The address the metric endpoint binds to.") - flag.StringVar(&probeAddr, "health-probe-bind-address", ProbeAddress, "The address the probe endpoint binds to.") - flag.BoolVar(&enableLeaderElection, "leader-elect", LeaderElect, - "Enable leader election for controller manager. "+ - "Enabling this will ensure there is only one active controller manager.") - flag.Parse() - - return metricsAddr, probeAddr, enableLeaderElection -} - -// registerWithManager registers the frontend controller with the ControllerManager -func registerWithManager(mgr manager.Manager) error { - controller := &operator.Controller{ - Log: ctrl.Log.WithName("controllers").WithName("Frontend"), - Client: mgr.GetClient(), - Scheme: mgr.GetScheme(), - } - - return controller.RegisterWithManager(mgr) -} - -// setupLogger sets up the logger for the operator -func setupLogger() *zap.Logger { - logger, err := logging.SetupLogging(true) - if err != nil { - panic(err) - } - - ctrl.SetLogger(zapr.NewLogger(logger)) - - return logger -} - -// start hooks the controller code up to the kubernetes API -func start(metricsAddr, probeAddr string, enableLeaderElection bool) error { - mgr, err := newManager(metricsAddr, probeAddr, enableLeaderElection) if err != nil { setupLog.Error(err, "unable to start manager") return fmt.Errorf("unable to start manager: %w", err) } - err = registerWithManager(mgr) - if err != nil { + if err = (&controllers.FrontendReconciler{ + Log: ctrl.Log.WithName("controllers").WithName("Frontend"), + Client: mgr.GetClient(), + Scheme: mgr.GetScheme(), + }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "Frontend") - return fmt.Errorf("unable to create controller: %w", err) + return fmt.Errorf("unable to create manager: %w", err) } //+kubebuilder:scaffold:builder - err = mgr.AddHealthzCheck("healthz", healthz.Ping) - if err != nil { + if err := mgr.AddHealthzCheck("healthz", healthz.Ping); err != nil { setupLog.Error(err, "unable to set up health check") return fmt.Errorf("unable to setup health check: %w", err) } - - err = mgr.AddReadyzCheck("readyz", healthz.Ping) - if err != nil { + if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil { setupLog.Error(err, "unable to set up ready check") return fmt.Errorf("unable to setup ready check: %w", err) } setupLog.Info("starting manager") - err = mgr.Start(ctrl.SetupSignalHandler()) - if err != nil { + if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil { setupLog.Error(err, "problem running manager") return fmt.Errorf("problem running manager: %w", err) } - return nil } diff --git a/pr_check.sh b/pr_check.sh index 3a797ff1..f876fe8a 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -10,8 +10,7 @@ mkdir -p "$DOCKER_CONF" export IMAGE_TAG=`git rev-parse --short HEAD` export IMAGE_NAME=quay.io/cloudservices/frontend-operator -EPOCH=$(date +%s) -CONTAINER_NAME="frontend-operator-pr-check-$ghprbPullId-$EPOCH" +CONTAINER_NAME="frontend-operator-pr-check-$ghprbPullId" # NOTE: Make sure this volume is mounted 'ro', otherwise Jenkins cannot clean up the workspace due to file permission errors set +e # Run the pr check container (stored in the build dir) and invoke the From 4f1ef96e23d63606a35b06418b1bfb835df15f7c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 5 Apr 2023 15:34:49 -0400 Subject: [PATCH 075/228] Remove generating fed-modules.json in non generateNavJSON environments --- controllers/reconcile.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index c46e75ea..958d7262 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -87,14 +87,6 @@ func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) Name: "config", MountPath: "/opt/app-root/src/build/chrome", }) - } else { - // If we are not generating the nav JSON then we need to mount the fed-modules.json - // and leave the rest of the directory intact - volumeMounts = append(volumeMounts, v1.VolumeMount{ - Name: "config", - MountPath: "/opt/app-root/src/build/chrome/fed-modules.json", - SubPath: "fed-modules.json", - }) } // We generate SSL cert mounts conditionally From a8ef18f7ac1bdf5f63eb3b40487755a25b14b396 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 5 Apr 2023 16:15:12 -0400 Subject: [PATCH 076/228] Always mount generated config outside of the root chrome config --- controllers/reconcile.go | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 958d7262..7e5e07e7 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -89,6 +89,14 @@ func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) }) } + //We always want to mount the config map under the generated-config directory + //This will allow chrome to incorperate the generated nav and fed-modules.json + //at run time. This means chrome can merge the config in mixed environments + volumeMounts = append(volumeMounts, v1.VolumeMount{ + Name: "config", + MountPath: "/opt/app-root/src/build/generated-config", + }) + // We generate SSL cert mounts conditionally if frontendEnvironment.Spec.SSL { volumeMounts = append(volumeMounts, v1.VolumeMount{ @@ -138,23 +146,6 @@ func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnviron }, }, }) - } else { - volumes = append(volumes, v1.Volume{ - Name: "config", - VolumeSource: v1.VolumeSource{ - ConfigMap: &v1.ConfigMapVolumeSource{ - LocalObjectReference: v1.LocalObjectReference{ - Name: frontend.Spec.EnvName, - }, - Items: []v1.KeyToPath{ - { - Key: "fed-modules.json", - Path: "fed-modules.json", - }, - }, - }, - }, - }) } if frontendEnvironment.Spec.SSL { From c89806c78cc3446e2b3841c0dcff0eb478d1733a Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 5 Apr 2023 16:18:47 -0400 Subject: [PATCH 077/228] Fix name --- controllers/reconcile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 7e5e07e7..932c4c31 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -89,12 +89,12 @@ func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) }) } - //We always want to mount the config map under the generated-config directory + //We always want to mount the config map under the operator-generated directory //This will allow chrome to incorperate the generated nav and fed-modules.json //at run time. This means chrome can merge the config in mixed environments volumeMounts = append(volumeMounts, v1.VolumeMount{ Name: "config", - MountPath: "/opt/app-root/src/build/generated-config", + MountPath: "/opt/app-root/src/build/operator-generated", }) // We generate SSL cert mounts conditionally From 33a88f7d627e7d9ff7faa2a7c73f804a31565529 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 6 Apr 2023 06:15:31 -0400 Subject: [PATCH 078/228] make linter happy --- controllers/reconcile.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 932c4c31..655e6079 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -89,9 +89,9 @@ func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) }) } - //We always want to mount the config map under the operator-generated directory - //This will allow chrome to incorperate the generated nav and fed-modules.json - //at run time. This means chrome can merge the config in mixed environments + // We always want to mount the config map under the operator-generated directory + // This will allow chrome to incorperate the generated nav and fed-modules.json + // at run time. This means chrome can merge the config in mixed environments volumeMounts = append(volumeMounts, v1.VolumeMount{ Name: "config", MountPath: "/opt/app-root/src/build/operator-generated", From 1e86a890fc380e722239eff8eb589aebe64328dd Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 6 Apr 2023 09:28:50 -0400 Subject: [PATCH 079/228] Implement initcontaine --- api/v1alpha1/frontend_types.go | 4 + api/v1alpha1/frontendenvironment_types.go | 4 + api/v1alpha1/zz_generated.deepcopy.go | 5 + ...cloud.redhat.com_frontendenvironments.yaml | 6 + .../crd/bases/cloud.redhat.com_frontends.yaml | 8 ++ controllers/reconcile.go | 116 ++++++++++++++++++ deploy.yml | 14 +++ .../modules/ROOT/pages/api_reference.adoc | 4 + 8 files changed, 161 insertions(+) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 27714c7c..0c58ebaf 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -54,6 +54,10 @@ type FrontendSpec struct { Module *FedModule `json:"module,omitempty" yaml:"module,omitempty"` NavItems []*BundleNavItem `json:"navItems,omitempty" yaml:"navItems,omitempty"` AssetsPrefix string `json:"assetsPrefix,omitempty" yaml:"assetsPrefix,omitempty"` + // Akamai cache bust opt-out + AkamaiCacheBustOptOut bool `json:"akamaiCacheBustOptOut,omitempty" yaml:"akamaiCacheBustOptOut,omitempty"` + // Files to cache bust + AkamaiCacheBustFiles []string `json:"akamaiCacheBustFiles,omitempty" yaml:"akamaiCacheBustFiles,omitempty"` } var ReconciliationSuccessful clusterv1.ConditionType = "ReconciliationSuccessful" diff --git a/api/v1alpha1/frontendenvironment_types.go b/api/v1alpha1/frontendenvironment_types.go index 541bc7b0..72b0b1e1 100644 --- a/api/v1alpha1/frontendenvironment_types.go +++ b/api/v1alpha1/frontendenvironment_types.go @@ -54,6 +54,10 @@ type FrontendEnvironmentSpec struct { // parts should be generated for the bundles. We want to do // do this in epehemeral environments but not in production GenerateNavJSON bool `json:"generateNavJSON,omitempty"` + // Enable Akamai Cache Bust + EnableAkamaiCacheBust bool `json:"enableAkamaiCacheBust,omitempty"` + // Set Akamai Cache Bust Image + AkamaiCacheBustImage string `json:"akamaiCacheBustImage,omitempty"` } type MonitoringConfig struct { diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 3af634cc..420872d2 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -509,6 +509,11 @@ func (in *FrontendSpec) DeepCopyInto(out *FrontendSpec) { } } } + if in.AkamaiCacheBustFiles != nil { + in, out := &in.AkamaiCacheBustFiles, &out.AkamaiCacheBustFiles + *out = make([]string, len(*in)) + copy(*out, *in) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontendSpec. diff --git a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml index dffd9ab8..43061faa 100644 --- a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml +++ b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml @@ -45,6 +45,12 @@ spec: spec: description: FrontendEnvironmentSpec defines the desired state of FrontendEnvironment properties: + akamaiCacheBustImage: + description: Set Akamai Cache Bust Image + type: string + enableAkamaiCacheBust: + description: Enable Akamai Cache Bust + type: boolean generateNavJSON: description: GenerateNavJSON determines if the nav json configmap parts should be generated for the bundles. We want to do do this diff --git a/config/crd/bases/cloud.redhat.com_frontends.yaml b/config/crd/bases/cloud.redhat.com_frontends.yaml index e0a953c3..dcbc3dd7 100644 --- a/config/crd/bases/cloud.redhat.com_frontends.yaml +++ b/config/crd/bases/cloud.redhat.com_frontends.yaml @@ -59,6 +59,14 @@ spec: required: - versions type: object + akamaiCacheBustFiles: + description: Files to cache bust + items: + type: string + type: array + akamaiCacheBustOptOut: + description: Akamai cache bust opt-out + type: boolean assetsPrefix: type: string deploymentRepo: diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 655e6079..65f90ee5 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -132,6 +132,115 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir } } +// getAkamaiSecret gets the akamai secret from the cluster +func getAkamaiSecret(ctx context.Context, client client.Client, frontendEnvironment *crd.FrontendEnvironment) (*v1.Secret, error) { + secret := &v1.Secret{} + err := client.Get(ctx, types.NamespacedName{Name: "akamai", Namespace: frontendEnvironment.Namespace}, secret) + if err != nil { + return nil, err + } + return secret, nil +} + +// constructAkamaiEdgercFileFromSecret constructs the akamai edgerc file from the secret +func makeAkamaiEdgercFileFromSecret(secret *v1.Secret) string { + edgercFile := "[default]\n" + edgercFile += fmt.Sprintf("host = %s\n", string(secret.Data["host"])) + edgercFile += fmt.Sprintf("access_token = %s\n", string(secret.Data["access_token"])) + edgercFile += fmt.Sprintf("client_token = %s\n", string(secret.Data["client_token"])) + edgercFile += fmt.Sprintf("client_secret = %s\n", string(secret.Data["client_secret"])) + edgercFile += "[ccu]\n" + edgercFile += fmt.Sprintf("host = %s\n", string(secret.Data["host"])) + edgercFile += fmt.Sprintf("access_token = %s\n", string(secret.Data["access_token"])) + edgercFile += fmt.Sprintf("client_token = %s\n", string(secret.Data["client_token"])) + edgercFile += fmt.Sprintf("client_secret = %s\n", string(secret.Data["client_secret"])) + return edgercFile +} + +// makeConfigMapFromAkamaiEdgercFile makes a configmap from the akamai edgerc file +func makeConfigMapFromAkamaiEdgercFile(edgercFile string) *v1.ConfigMap { + return &v1.ConfigMap{ + ObjectMeta: metav1.ObjectMeta{ + Name: "akamai-edgerc", + }, + Data: map[string]string{ + "edgerc": edgercFile, + }, + } +} + +// getFilesToCacheBustForFrontend gets the files to cache bust for a frontend +func getFilesToCacheBustForFrontend(frontend *crd.Frontend) []string { + // Verify that the frontend has the akamai cache bust files + if frontend.Spec.AkamaiCacheBustFiles == nil { + // None there so set the default + return []string{"/fed-mods.json"} + } + filesToCacheBust := []string{} + filesToCacheBust = append(filesToCacheBust, frontend.Spec.AkamaiCacheBustFiles...) + return filesToCacheBust +} + +// populateInitContainer adds the akamai cache bust init container to the deployment +func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) error { + // Guard on frontend opting out of cache busting + if frontend.Spec.AkamaiCacheBustOptOut { + return nil + } + d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) + // Get the akamai secret + secret, err := getAkamaiSecret(context.Background(), r.Client, frontendEnvironment) + if err != nil { + return err + } + // Make the akamai file from the secret + edgercFile := makeAkamaiEdgercFileFromSecret(secret) + + // Make the configmap from the akamai file + configMap := makeConfigMapFromAkamaiEdgercFile(edgercFile) + // Create the configmap + err = r.Client.Create(context.Background(), configMap) + if err != nil { + return err + } + + // Get the files to cache bust + filesToCacheBust := getFilesToCacheBustForFrontend(frontend) + + // Construct the akamai cache bust command + command := fmt.Sprintf("/cli/.akamai-cli/src/cli-purge/bin/akamai-purge cache --edgerc invalidate %s", strings.Join(filesToCacheBust, " ")) + + // Modify the obejct to set the things we care about + d.Spec.Template.Spec.InitContainers = []v1.Container{{ + Name: "akamai-cache-bust", + Image: frontendEnvironment.Spec.AkamaiCacheBustImage, + // Mount the akamai edgerc file from the configmap + VolumeMounts: []v1.VolumeMount{ + { + Name: "akamai-edgerc", + MountPath: "/root/.edgerc", + SubPath: "edgerc", + }, + }, + // Run the akamai cache bust script + Command: []string{"/bin/bash", "-c", command}, + }, + } + // Add the akamai edgerc configmap to the deployment + d.Spec.Template.Spec.Volumes = []v1.Volume{{ + Name: "akamai-edgerc", + VolumeSource: v1.VolumeSource{ + ConfigMap: &v1.ConfigMapVolumeSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "akamai-edgerc", + }, + }, + }, + }, + } + return nil +} + func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { // By default we just want the config volume volumes := []v1.Volume{} @@ -208,6 +317,13 @@ func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map populateVolumes(d, r.Frontend, r.FrontendEnvironment) r.populateEnvVars(d, r.FrontendEnvironment) + // If cache busting is enabled for the environment, add the akamai cache bust init container + if r.FrontendEnvironment.Spec.EnableAkamaiCacheBust && r.FrontendEnvironment.Spec.AkamaiCacheBustImage != "" { + if err := r.populateInitContainer(d, r.Frontend, r.FrontendEnvironment); err != nil { + return err + } + } + d.Spec.Template.ObjectMeta.Labels = labels d.Spec.Selector = &metav1.LabelSelector{MatchLabels: labels} diff --git a/deploy.yml b/deploy.yml index c4d51012..575a80fc 100644 --- a/deploy.yml +++ b/deploy.yml @@ -346,6 +346,12 @@ objects: spec: description: FrontendEnvironmentSpec defines the desired state of FrontendEnvironment properties: + akamaiCacheBustImage: + description: Set Akamai Cache Bust Image + type: string + enableAkamaiCacheBust: + description: Enable Akamai Cache Bust + type: boolean generateNavJSON: description: GenerateNavJSON determines if the nav json configmap parts should be generated for the bundles. We want to do do this @@ -466,6 +472,14 @@ objects: required: - versions type: object + akamaiCacheBustFiles: + description: Files to cache bust + items: + type: string + type: array + akamaiCacheBustOptOut: + description: Akamai cache bust opt-out + type: boolean assetsPrefix: type: string deploymentRepo: diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index 410851b5..f739198c 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -314,6 +314,8 @@ FrontendEnvironmentSpec defines the desired state of FrontendEnvironment | *`monitoring`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-monitoringconfig[$$MonitoringConfig$$]__ | MonitorMode determines where a ServiceMonitor object will be placed local will add it to the frontend's namespace app-interface will add it to "openshift-customer-monitoring" | *`ssl`* __boolean__ | SSL mode requests SSL from the services in openshift and k8s and then applies them to the pod, the route is also set to reencrypt in the case of OpenShift | *`generateNavJSON`* __boolean__ | GenerateNavJSON determines if the nav json configmap parts should be generated for the bundles. We want to do do this in epehemeral environments but not in production +| *`enableAkamaiCacheBust`* __boolean__ | Enable Akamai Cache Bust +| *`akamaiCacheBustImage`* __string__ | Set Akamai Cache Bust Image |=== @@ -379,6 +381,8 @@ FrontendSpec defines the desired state of Frontend | *`module`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-fedmodule[$$FedModule$$]__ | | *`navItems`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$] array__ | | *`assetsPrefix`* __string__ | +| *`akamaiCacheBustOptOut`* __boolean__ | Akamai cache bust opt-out +| *`akamaiCacheBustFiles`* __string array__ | Files to cache bust |=== From 8989e4c183d1af516d03157a4229f3b3c34fb88a Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 6 Apr 2023 09:36:00 -0400 Subject: [PATCH 080/228] Another guard --- controllers/reconcile.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 65f90ee5..dfab63e4 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -187,6 +187,11 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front if frontend.Spec.AkamaiCacheBustOptOut { return nil } + // If the AkamaiCacheBustImage is not set then we should log and bail + if frontendEnvironment.Spec.AkamaiCacheBustImage == "" { + r.Log.Info("AkamaiCacheBustImage is not set. Skipping Akamai cache busting.") + return nil + } d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) // Get the akamai secret secret, err := getAkamaiSecret(context.Background(), r.Client, frontendEnvironment) From 49a175eac1b8afd614bf84a23d46fdaaa53d7ce6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 6 Apr 2023 12:25:37 -0400 Subject: [PATCH 081/228] Always bust fed-mods.json --- controllers/reconcile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index dfab63e4..efcf3b34 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -172,11 +172,11 @@ func makeConfigMapFromAkamaiEdgercFile(edgercFile string) *v1.ConfigMap { // getFilesToCacheBustForFrontend gets the files to cache bust for a frontend func getFilesToCacheBustForFrontend(frontend *crd.Frontend) []string { // Verify that the frontend has the akamai cache bust files + filesToCacheBust := []string{"/fed-mods.json"} if frontend.Spec.AkamaiCacheBustFiles == nil { // None there so set the default - return []string{"/fed-mods.json"} + return filesToCacheBust } - filesToCacheBust := []string{} filesToCacheBust = append(filesToCacheBust, frontend.Spec.AkamaiCacheBustFiles...) return filesToCacheBust } From d63c9e0419ec74ef541e782608c43107b8335a67 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 6 Apr 2023 12:34:13 -0400 Subject: [PATCH 082/228] Always bust fed-mods. Change some names to be more consistent. Remove a redundant guard. --- api/v1alpha1/frontend_types.go | 4 ++-- api/v1alpha1/zz_generated.deepcopy.go | 4 ++-- config/crd/bases/cloud.redhat.com_frontends.yaml | 8 ++++---- controllers/reconcile.go | 12 ++++-------- deploy.yml | 8 ++++---- docs/antora/modules/ROOT/pages/api_reference.adoc | 4 ++-- 6 files changed, 18 insertions(+), 22 deletions(-) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 0c58ebaf..08526acb 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -55,9 +55,9 @@ type FrontendSpec struct { NavItems []*BundleNavItem `json:"navItems,omitempty" yaml:"navItems,omitempty"` AssetsPrefix string `json:"assetsPrefix,omitempty" yaml:"assetsPrefix,omitempty"` // Akamai cache bust opt-out - AkamaiCacheBustOptOut bool `json:"akamaiCacheBustOptOut,omitempty" yaml:"akamaiCacheBustOptOut,omitempty"` + AkamaiCacheBustDisable bool `json:"akamaiCacheBustDisable,omitempty" yaml:"akamaiCacheBustDisable,omitempty"` // Files to cache bust - AkamaiCacheBustFiles []string `json:"akamaiCacheBustFiles,omitempty" yaml:"akamaiCacheBustFiles,omitempty"` + AkamaiCacheBustPaths []string `json:"akamaiCacheBustPaths,omitempty" yaml:"akamaiCacheBustPaths,omitempty"` } var ReconciliationSuccessful clusterv1.ConditionType = "ReconciliationSuccessful" diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 420872d2..f00cd488 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -509,8 +509,8 @@ func (in *FrontendSpec) DeepCopyInto(out *FrontendSpec) { } } } - if in.AkamaiCacheBustFiles != nil { - in, out := &in.AkamaiCacheBustFiles, &out.AkamaiCacheBustFiles + if in.AkamaiCacheBustPaths != nil { + in, out := &in.AkamaiCacheBustPaths, &out.AkamaiCacheBustPaths *out = make([]string, len(*in)) copy(*out, *in) } diff --git a/config/crd/bases/cloud.redhat.com_frontends.yaml b/config/crd/bases/cloud.redhat.com_frontends.yaml index dcbc3dd7..cbd020e2 100644 --- a/config/crd/bases/cloud.redhat.com_frontends.yaml +++ b/config/crd/bases/cloud.redhat.com_frontends.yaml @@ -59,14 +59,14 @@ spec: required: - versions type: object - akamaiCacheBustFiles: + akamaiCacheBustDisable: + description: Akamai cache bust opt-out + type: boolean + akamaiCacheBustPaths: description: Files to cache bust items: type: string type: array - akamaiCacheBustOptOut: - description: Akamai cache bust opt-out - type: boolean assetsPrefix: type: string deploymentRepo: diff --git a/controllers/reconcile.go b/controllers/reconcile.go index efcf3b34..73e895eb 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -173,25 +173,21 @@ func makeConfigMapFromAkamaiEdgercFile(edgercFile string) *v1.ConfigMap { func getFilesToCacheBustForFrontend(frontend *crd.Frontend) []string { // Verify that the frontend has the akamai cache bust files filesToCacheBust := []string{"/fed-mods.json"} - if frontend.Spec.AkamaiCacheBustFiles == nil { + if frontend.Spec.AkamaiCacheBustPaths == nil { // None there so set the default return filesToCacheBust } - filesToCacheBust = append(filesToCacheBust, frontend.Spec.AkamaiCacheBustFiles...) + filesToCacheBust = append(filesToCacheBust, frontend.Spec.AkamaiCacheBustPaths...) return filesToCacheBust } // populateInitContainer adds the akamai cache bust init container to the deployment func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) error { // Guard on frontend opting out of cache busting - if frontend.Spec.AkamaiCacheBustOptOut { - return nil - } - // If the AkamaiCacheBustImage is not set then we should log and bail - if frontendEnvironment.Spec.AkamaiCacheBustImage == "" { - r.Log.Info("AkamaiCacheBustImage is not set. Skipping Akamai cache busting.") + if frontend.Spec.AkamaiCacheBustDisable { return nil } + d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) // Get the akamai secret secret, err := getAkamaiSecret(context.Background(), r.Client, frontendEnvironment) diff --git a/deploy.yml b/deploy.yml index 575a80fc..258e3c4d 100644 --- a/deploy.yml +++ b/deploy.yml @@ -472,14 +472,14 @@ objects: required: - versions type: object - akamaiCacheBustFiles: + akamaiCacheBustDisable: + description: Akamai cache bust opt-out + type: boolean + akamaiCacheBustPaths: description: Files to cache bust items: type: string type: array - akamaiCacheBustOptOut: - description: Akamai cache bust opt-out - type: boolean assetsPrefix: type: string deploymentRepo: diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index f739198c..bc9c9672 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -381,8 +381,8 @@ FrontendSpec defines the desired state of Frontend | *`module`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-fedmodule[$$FedModule$$]__ | | *`navItems`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlenavitem[$$BundleNavItem$$] array__ | | *`assetsPrefix`* __string__ | -| *`akamaiCacheBustOptOut`* __boolean__ | Akamai cache bust opt-out -| *`akamaiCacheBustFiles`* __string array__ | Files to cache bust +| *`akamaiCacheBustDisable`* __boolean__ | Akamai cache bust opt-out +| *`akamaiCacheBustPaths`* __string array__ | Files to cache bust |=== From 71794bf8a89b9eb7fdb04c35fc1425f67167ef84 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Apr 2023 09:18:01 -0400 Subject: [PATCH 083/228] Getting going with kuttl --- kubeconfig | 17 ++++++++++++ kuttl-config.yml | 6 ++++ tests/e2e/basic-frontend/00-install.yaml | 8 ++++++ tests/e2e/basic-frontend/01-assert.yaml | 35 ++++++++++++++++++++++++ tests/e2e/basic-frontend/01-pods.yaml | 31 +++++++++++++++++++++ 5 files changed, 97 insertions(+) create mode 100644 kubeconfig create mode 100644 kuttl-config.yml create mode 100644 tests/e2e/basic-frontend/00-install.yaml create mode 100644 tests/e2e/basic-frontend/01-assert.yaml create mode 100644 tests/e2e/basic-frontend/01-pods.yaml diff --git a/kubeconfig b/kubeconfig new file mode 100644 index 00000000..d69af3c0 --- /dev/null +++ b/kubeconfig @@ -0,0 +1,17 @@ +clusters: +- cluster: + certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCakNDQWU2Z0F3SUJBZ0lCQVRBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwdGFXNXAKYTNWaVpVTkJNQjRYRFRJeU1EWXdOVEU1TVRZd04xb1hEVE15TURZd016RTVNVFl3TjFvd0ZURVRNQkVHQTFVRQpBeE1LYldsdWFXdDFZbVZEUVRDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTUdhCnAwS3ZZWGVSZE9GUitwZEVLZXlNQStSdk5ySUl3L3V4eFFFcm5meG1ZeXlrZDdaZGRSMlNQekJwWXRVRGFCeHcKME9BL3ZpTnZBTTArT1JjNW04blpwL3gxdWQ1bXY3WDdpT25RUGxyS0xUNHp6OFBaNUliTkprLzhaOExLVGdpNwp4dzdvbUhESjczSTRGK2NmTG5GbWtOZDMrWGZCemdxcW00cmduVjd5b0NxbTliVjY2c3hMZFkwM2hBNUtYa2tqCjRpWVIwU29KckRYUU1OWkdkZE9wZjNUUUdjK29DVEhxZjRKbWFlMit2MFdyRUd4L1U2enplOGJ2WWJqSzRKMUEKREc1anJRTklWYWFUUHNJZmthZDRGVEY3elcrek1pV0lvWWxXT3ZrNFNLKzg1MmtnRTVWRDFtMXpvZXBHL3dqZgp0dU9oM25yb1VBR1BJN2c2bzNzQ0F3RUFBYU5oTUY4d0RnWURWUjBQQVFIL0JBUURBZ0trTUIwR0ExVWRKUVFXCk1CUUdDQ3NHQVFVRkJ3TUNCZ2dyQmdFRkJRY0RBVEFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQjBHQTFVZERnUVcKQkJUQzZoUHA0SSt0U3M1QVNTaUhxYnp2NThTWlFEQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFwRHdVakVKWgpnangxWWpnMlZqNXVpeGNSYm5UUWExbzYvVmhTS1RNVHpZaGF2a3JhSXd0TnVkMEprTFNtWjZFR1YwL2ZMUTkxCmRxQ0I2dXk0bFJFdmlmNHpEMTY4ZFdyVjg3Y0RkSThiU0hRMnl6aHpTK1hrZVM1THZUYUZHeDBqR25pZFVES3EKWklqT1ozRVVCRmpSKy9XMkR3WVlMaTlhWmNySWZ6WmxUdDE0eXM3aC9vbDRDUFNRZ3RNSmlxeTNZZjlZWVo3cQoxcUl0cENHY2V2Q3RPRzcvKzdQbHhRUDNtSWYzc081bE5VZ3hyOHRxRVVGd2pPaklBVk5KZyt2UnNaMGVPbS9iCkx0aHhwT2tHQ25WbjRUS0FYNHJMTWNKOTYxL2t0ZExIYTNFSUhSb1lDWlV5RFZrZlhCaUIxdDgzOWQybUF6emgKeGtqRG1PUWJWdGx5anc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== + server: https://192.168.39.108:8443 + name: cluster +contexts: +- context: + cluster: cluster + user: user + name: cluster +current-context: cluster +preferences: {} +users: +- name: user + user: + client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lCQWpBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwdGFXNXAKYTNWaVpVTkJNQjRYRFRJek1EUXdOVEUzTURVd01sb1hEVEkyTURRd05URTNNRFV3TWxvd01URVhNQlVHQTFVRQpDaE1PYzNsemRHVnRPbTFoYzNSbGNuTXhGakFVQmdOVkJBTVREVzFwYm1scmRXSmxMWFZ6WlhJd2dnRWlNQTBHCkNTcUdTSWIzRFFFQkFRVUFBNElCRHdBd2dnRUtBb0lCQVFEQVBNdnhJWHAzK3hZN1paN2Z5Z3dOU0xteTJYSzMKSFMyc1lzcEhydk55dmxwWndGQUFOOWw4T2VNVkNTcENuT0QrRkc3OEVob3EvbzZiTjlCcnRoN0h0eS9zTkIzSQpYRkt5OEx3RjVWL2RDK0F2aFVsT0FwZzMyTmQrbzM4bW0yQWNPYVFlUEtvY3RkYUJiajdkTmJVaFRkWjI5eG90Ck5mYjdVYTVOY1M1a3I5NzNVSFhmYm00Zjlpbjd5aDhjdGRLODI4Tk1LejdhaEFxTUZXcHg3ZWt0TGM2OXdRcDAKTmtoLzlzTE11Y3M1WllRbXdDbXYrbFVNTHpVK01GUVEzYUUzbDV0ZGZ1MlVQRW03NmdZNmRheWhPbGtKYUk3bwpHZzh0V1dLby9HVkx0Z0xTRWpYOEtXY3J6VjZRWkF0cmxkcVl6WkZPdUlDUHhTMXBkWmdyRWcwVkFnTUJBQUdqCllEQmVNQTRHQTFVZER3RUIvd1FFQXdJRm9EQWRCZ05WSFNVRUZqQVVCZ2dyQmdFRkJRY0RBUVlJS3dZQkJRVUgKQXdJd0RBWURWUjBUQVFIL0JBSXdBREFmQmdOVkhTTUVHREFXZ0JUQzZoUHA0SSt0U3M1QVNTaUhxYnp2NThTWgpRREFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBQlRkdVhySThoWXUyOEUxblRIZzNha1BjMFV2cG1hMHB1MTZFCko2Q1lRenFHMUFhS0VwNDgycnN2WHh5dWQraTNpdjBjOTU2Smx0VFdBVEFXMjltQzB0LzF1Yy9MbDFvanJnclAKUVBVbXZYUU9QWWJqSFBMcVdESzF6VnFFWEQwQlpjbTJBVHZiQXd4SElKNzZadjlQN0g5LzdXRUcyZnd6VnZqSgpQRDdRcmVOdlBveGRGLzNPTDVSSEVwcmRZUWlud1RXcWxTcGwvWkxtQm1IU2VZM3Bwd1JtVE1UbVQ0Y1R4b3hMCnlGYkw1MGxBQkoyajR4S1FndDB5UVp5dFhMeE9SVFhkbjE3YmFYNFV4N0lwQ2U2ZmJZcWVTeDFBdjhGeS9wbGIKR0E5R2ZiakxtMEVDdDVTM2U0bUhCbE5zenVkYzF0L05jSDgwWk5wUGE5VzFCVnl2c2c9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== + client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcGdJQkFBS0NBUUVBd0R6TDhTRjZkL3NXTzJXZTM4b01EVWk1c3RseXR4MHRyR0xLUjY3emNyNWFXY0JRCkFEZlpmRG5qRlFrcVFwemcvaFJ1L0JJYUt2Nk9temZRYTdZZXg3Y3Y3RFFkeUZ4U3N2QzhCZVZmM1F2Z0w0VkoKVGdLWU45alhmcU4vSnB0Z0hEbWtIanlxSExYV2dXNCszVFcxSVUzV2R2Y2FMVFgyKzFHdVRYRXVaSy9lOTFCMQozMjV1SC9ZcCs4b2ZITFhTdk52RFRDcysyb1FLakJWcWNlM3BMUzNPdmNFS2REWklmL2JDekxuTE9XV0VKc0FwCnIvcFZEQzgxUGpCVUVOMmhONWViWFg3dGxEeEp1K29HT25Xc29UcFpDV2lPNkJvUExWbGlxUHhsUzdZQzBoSTEKL0Nsbks4MWVrR1FMYTVYYW1NMlJUcmlBajhVdGFYV1lLeElORlFJREFRQUJBb0lCQVFDNk9LcmZWYTBMbVVINgpIQUVCalBxTHk4MklBYmxzeFdrL094djB3UGU0U2NuQWM5bUx2STZFRnBkeUEwVGE3cG5OeUFHVFVmM2pkR0MwCjRDYVlrUDNVUGhMQVgrUVIrYzFxNW1WZDJNczZtSXg5dkVJOHZhcXpQdTNTRVpQVTFHTVFOSTVWZERMZVNSQVkKcGJGa0hPanY4RFUzWFR3UVc5eDdySzZLK244VXJOUENFSDEzbnI1WWNTMGk3enhXVmNJMzlWQUR2SEJpUmRlUwp5L01rQThPeUprODZ0UjRjdGlTWGx0QkpvdFBDalFKMUZCZk4xS2dGREJUNnhRV05VbUdJZm1OWEFsYWg3SGg1CkJXZk9obnY2R2RINTMwQktQRUJsQU14L09pV2drTDBacWNqdHdDUTY2NkExSERqNCsvTUFqWnlGbGZsaVNWZkwKNko2K0c0T0JBb0dCQU9lQU9GTmhxTTVCb2ttYXFDRFhUZUZBSlFpNHBUVU5kOVZoUjRGS1lPTitEaWhRRldpUwowQ2F1amIwSnJ4MFp0LzhiM3E0dlpuWXFSUjloa29Ncm1EZk1KMnhsZnBFVVVZWG1FaXpncDkvTzROSkFFcnd6CmlhNHRGS2xCeDBmbU01bHBIaEdKWFJ1VnZrbVNUeTcwZUF2UkxWekFLVkoxMEtPblZXM1VSaWFSQW9HQkFOU1UKM0Q5bEhmdDBqVkxUZlY2NlBXNkNKSzBLRXVuSDdQY2pjNEZEcHljNXppNnJwNlVobWYvYnZFekJGZWFVWTFnTQpmZFNnVjhmWHRra0hnVUhoc3Q4WTUxZFR5YkVTNkw5SDRTY0YyMFkzNHRBU2dJQk5OQ1hNOG8vM1hOYWtOQmFLCjk2SE5FQXduQ0NSSjFRYzRSN1JMQmNyNTVDM0pLdURTRFVoN2N5aEZBb0dCQU5ENmZWNC81WnV6d2lXQm1FNTEKTGRldUNRQnpkcWVLcmVlUXRuVHZTTUYwTktHTmtaWGlHa2NoQWRCcFlvdjVnSkNwZnY1c3lhallCYWdMYzdBMwpkV1RCUmNGamFicmJ4YkFDL2R0SFBpUWFZL2RJWWVGRkFQK2JzSEFPY2kva2ppWHByM3dUTFZyT2RZV0NyenBxCjg4ZHZIK3ovaHczcVR0cTlIckJUbExRUkFvR0JBSm9BSVRKWDJZbVJuTlBVM0d6a2RKNTY3NERmM0dXNTdPUDQKcmJPR1JEQjVndkZ5YnllRW1TQ3VtZEhzeXlYWWQ4T1FnUk9vK1E2UUtjRHNDK3FqUzhhdEx1S25rMlNSTTBWbgpHQ2dCNlNFTVdXYXRFS1JoeVpaY3k1Z1o5Z3FVdUJ0Z254WjdETllRN0tnRlNLdExUVDdDWHJiMW95UzhLRERvCldyRVlwWXNWQW9HQkFLWEQ1T0lVdk9ySkZDRUZRQ0dtYXp0VHkxZm9OTDRZR3Fhb3Bydm9ONnBNZGxXZmFGYXIKRTI2S3FNT0RPbnJHUlZrWjY0WUpyYVJPeUw4Yk85R0RydkFKekh0ZlcxR3Q5bVZGdndZM0VCdllMenJaSVBEeAptcERmeURieDMwR3RsaFMvSnd1dktJQ1hvdi9TNEFmTUlWNldrRHNkbzhsUnBDUnBRQnROZ0FuNgotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= diff --git a/kuttl-config.yml b/kuttl-config.yml new file mode 100644 index 00000000..68864ac3 --- /dev/null +++ b/kuttl-config.yml @@ -0,0 +1,6 @@ +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +startKIND: false +testDirs: +- tests/e2e/ +timeout: 600 diff --git a/tests/e2e/basic-frontend/00-install.yaml b/tests/e2e/basic-frontend/00-install.yaml new file mode 100644 index 00000000..2d4a4317 --- /dev/null +++ b/tests/e2e/basic-frontend/00-install.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-basic-frontend +spec: + finalizers: + - kubernetes \ No newline at end of file diff --git a/tests/e2e/basic-frontend/01-assert.yaml b/tests/e2e/basic-frontend/01-assert.yaml new file mode 100644 index 00000000..667b7477 --- /dev/null +++ b/tests/e2e/basic-frontend/01-assert.yaml @@ -0,0 +1,35 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-frontend + labels: + frontend: chrome +spec: + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-basic-frontend-environment + items: + - key: fed-modules.json + path: fed-modules.json + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/chrome/fed-modules.json + subPath: fed-modules.json diff --git a/tests/e2e/basic-frontend/01-pods.yaml b/tests/e2e/basic-frontend/01-pods.yaml new file mode 100644 index 00000000..92deaa31 --- /dev/null +++ b/tests/e2e/basic-frontend/01-pods.yaml @@ -0,0 +1,31 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-basic-frontend-environment +spec: + generateNavJSON: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-basic-frontend +spec: + API: + versions: + - v1 + frontend: + paths: + - / + - /config/chrome + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-basic-frontend-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome From 677fa7683a448a6c25a22a1170c73cb37c8f748d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Apr 2023 09:22:00 -0400 Subject: [PATCH 084/228] switch order of populating containers and volumes --- controllers/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 655e6079..02b5b96d 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -204,8 +204,8 @@ func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map labeler := utils.GetCustomLabeler(labels, nn, r.Frontend) labeler(d) - populateContainer(d, r.Frontend, r.FrontendEnvironment) populateVolumes(d, r.Frontend, r.FrontendEnvironment) + populateContainer(d, r.Frontend, r.FrontendEnvironment) r.populateEnvVars(d, r.FrontendEnvironment) d.Spec.Template.ObjectMeta.Labels = labels From ce9688cc34fe5d4fce067e6295be9a4dc83a1376 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Apr 2023 10:31:18 -0400 Subject: [PATCH 085/228] We always need to generate the config volume now --- controllers/reconcile.go | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 02b5b96d..6fbd9db2 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -135,18 +135,16 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir func populateVolumes(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { // By default we just want the config volume volumes := []v1.Volume{} - if frontendEnvironment.Spec.GenerateNavJSON { - volumes = append(volumes, v1.Volume{ - Name: "config", - VolumeSource: v1.VolumeSource{ - ConfigMap: &v1.ConfigMapVolumeSource{ - LocalObjectReference: v1.LocalObjectReference{ - Name: frontend.Spec.EnvName, - }, + volumes = append(volumes, v1.Volume{ + Name: "config", + VolumeSource: v1.VolumeSource{ + ConfigMap: &v1.ConfigMapVolumeSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: frontend.Spec.EnvName, }, }, - }) - } + }, + }) if frontendEnvironment.Spec.SSL { volumes = append(volumes, v1.Volume{ From 9593b1f3b17ad5f83475f45585cca837f744aa62 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Apr 2023 14:45:15 -0400 Subject: [PATCH 086/228] Working kuttl setup! --- kubeconfig | 6 +-- kuttl-config.yml | 3 +- ...-install.yaml => 00-create-namespace.yaml} | 0 ...{01-pods.yaml => 01-create-resources.yaml} | 0 .../{01-assert.yaml => 02-assert.yaml} | 11 +++--- tests/e2e/basic-frontend/03-delete.yaml | 13 +++++++ .../00-create-namespace.yaml | 8 ++++ .../01-create-resources.yaml | 31 +++++++++++++++ tests/e2e/generate-nav-json/02-assert.yaml | 38 +++++++++++++++++++ tests/e2e/generate-nav-json/03-delete.yaml | 13 +++++++ 10 files changed, 114 insertions(+), 9 deletions(-) rename tests/e2e/basic-frontend/{00-install.yaml => 00-create-namespace.yaml} (100%) rename tests/e2e/basic-frontend/{01-pods.yaml => 01-create-resources.yaml} (100%) rename tests/e2e/basic-frontend/{01-assert.yaml => 02-assert.yaml} (76%) create mode 100644 tests/e2e/basic-frontend/03-delete.yaml create mode 100644 tests/e2e/generate-nav-json/00-create-namespace.yaml create mode 100644 tests/e2e/generate-nav-json/01-create-resources.yaml create mode 100644 tests/e2e/generate-nav-json/02-assert.yaml create mode 100644 tests/e2e/generate-nav-json/03-delete.yaml diff --git a/kubeconfig b/kubeconfig index d69af3c0..8d9d2f43 100644 --- a/kubeconfig +++ b/kubeconfig @@ -1,7 +1,7 @@ clusters: - cluster: certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCakNDQWU2Z0F3SUJBZ0lCQVRBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwdGFXNXAKYTNWaVpVTkJNQjRYRFRJeU1EWXdOVEU1TVRZd04xb1hEVE15TURZd016RTVNVFl3TjFvd0ZURVRNQkVHQTFVRQpBeE1LYldsdWFXdDFZbVZEUVRDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTUdhCnAwS3ZZWGVSZE9GUitwZEVLZXlNQStSdk5ySUl3L3V4eFFFcm5meG1ZeXlrZDdaZGRSMlNQekJwWXRVRGFCeHcKME9BL3ZpTnZBTTArT1JjNW04blpwL3gxdWQ1bXY3WDdpT25RUGxyS0xUNHp6OFBaNUliTkprLzhaOExLVGdpNwp4dzdvbUhESjczSTRGK2NmTG5GbWtOZDMrWGZCemdxcW00cmduVjd5b0NxbTliVjY2c3hMZFkwM2hBNUtYa2tqCjRpWVIwU29KckRYUU1OWkdkZE9wZjNUUUdjK29DVEhxZjRKbWFlMit2MFdyRUd4L1U2enplOGJ2WWJqSzRKMUEKREc1anJRTklWYWFUUHNJZmthZDRGVEY3elcrek1pV0lvWWxXT3ZrNFNLKzg1MmtnRTVWRDFtMXpvZXBHL3dqZgp0dU9oM25yb1VBR1BJN2c2bzNzQ0F3RUFBYU5oTUY4d0RnWURWUjBQQVFIL0JBUURBZ0trTUIwR0ExVWRKUVFXCk1CUUdDQ3NHQVFVRkJ3TUNCZ2dyQmdFRkJRY0RBVEFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQjBHQTFVZERnUVcKQkJUQzZoUHA0SSt0U3M1QVNTaUhxYnp2NThTWlFEQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFwRHdVakVKWgpnangxWWpnMlZqNXVpeGNSYm5UUWExbzYvVmhTS1RNVHpZaGF2a3JhSXd0TnVkMEprTFNtWjZFR1YwL2ZMUTkxCmRxQ0I2dXk0bFJFdmlmNHpEMTY4ZFdyVjg3Y0RkSThiU0hRMnl6aHpTK1hrZVM1THZUYUZHeDBqR25pZFVES3EKWklqT1ozRVVCRmpSKy9XMkR3WVlMaTlhWmNySWZ6WmxUdDE0eXM3aC9vbDRDUFNRZ3RNSmlxeTNZZjlZWVo3cQoxcUl0cENHY2V2Q3RPRzcvKzdQbHhRUDNtSWYzc081bE5VZ3hyOHRxRVVGd2pPaklBVk5KZyt2UnNaMGVPbS9iCkx0aHhwT2tHQ25WbjRUS0FYNHJMTWNKOTYxL2t0ZExIYTNFSUhSb1lDWlV5RFZrZlhCaUIxdDgzOWQybUF6emgKeGtqRG1PUWJWdGx5anc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== - server: https://192.168.39.108:8443 + server: https://192.168.39.238:8443 name: cluster contexts: - context: @@ -13,5 +13,5 @@ preferences: {} users: - name: user user: - client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lCQWpBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwdGFXNXAKYTNWaVpVTkJNQjRYRFRJek1EUXdOVEUzTURVd01sb1hEVEkyTURRd05URTNNRFV3TWxvd01URVhNQlVHQTFVRQpDaE1PYzNsemRHVnRPbTFoYzNSbGNuTXhGakFVQmdOVkJBTVREVzFwYm1scmRXSmxMWFZ6WlhJd2dnRWlNQTBHCkNTcUdTSWIzRFFFQkFRVUFBNElCRHdBd2dnRUtBb0lCQVFEQVBNdnhJWHAzK3hZN1paN2Z5Z3dOU0xteTJYSzMKSFMyc1lzcEhydk55dmxwWndGQUFOOWw4T2VNVkNTcENuT0QrRkc3OEVob3EvbzZiTjlCcnRoN0h0eS9zTkIzSQpYRkt5OEx3RjVWL2RDK0F2aFVsT0FwZzMyTmQrbzM4bW0yQWNPYVFlUEtvY3RkYUJiajdkTmJVaFRkWjI5eG90Ck5mYjdVYTVOY1M1a3I5NzNVSFhmYm00Zjlpbjd5aDhjdGRLODI4Tk1LejdhaEFxTUZXcHg3ZWt0TGM2OXdRcDAKTmtoLzlzTE11Y3M1WllRbXdDbXYrbFVNTHpVK01GUVEzYUUzbDV0ZGZ1MlVQRW03NmdZNmRheWhPbGtKYUk3bwpHZzh0V1dLby9HVkx0Z0xTRWpYOEtXY3J6VjZRWkF0cmxkcVl6WkZPdUlDUHhTMXBkWmdyRWcwVkFnTUJBQUdqCllEQmVNQTRHQTFVZER3RUIvd1FFQXdJRm9EQWRCZ05WSFNVRUZqQVVCZ2dyQmdFRkJRY0RBUVlJS3dZQkJRVUgKQXdJd0RBWURWUjBUQVFIL0JBSXdBREFmQmdOVkhTTUVHREFXZ0JUQzZoUHA0SSt0U3M1QVNTaUhxYnp2NThTWgpRREFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBQlRkdVhySThoWXUyOEUxblRIZzNha1BjMFV2cG1hMHB1MTZFCko2Q1lRenFHMUFhS0VwNDgycnN2WHh5dWQraTNpdjBjOTU2Smx0VFdBVEFXMjltQzB0LzF1Yy9MbDFvanJnclAKUVBVbXZYUU9QWWJqSFBMcVdESzF6VnFFWEQwQlpjbTJBVHZiQXd4SElKNzZadjlQN0g5LzdXRUcyZnd6VnZqSgpQRDdRcmVOdlBveGRGLzNPTDVSSEVwcmRZUWlud1RXcWxTcGwvWkxtQm1IU2VZM3Bwd1JtVE1UbVQ0Y1R4b3hMCnlGYkw1MGxBQkoyajR4S1FndDB5UVp5dFhMeE9SVFhkbjE3YmFYNFV4N0lwQ2U2ZmJZcWVTeDFBdjhGeS9wbGIKR0E5R2ZiakxtMEVDdDVTM2U0bUhCbE5zenVkYzF0L05jSDgwWk5wUGE5VzFCVnl2c2c9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== - client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFcGdJQkFBS0NBUUVBd0R6TDhTRjZkL3NXTzJXZTM4b01EVWk1c3RseXR4MHRyR0xLUjY3emNyNWFXY0JRCkFEZlpmRG5qRlFrcVFwemcvaFJ1L0JJYUt2Nk9temZRYTdZZXg3Y3Y3RFFkeUZ4U3N2QzhCZVZmM1F2Z0w0VkoKVGdLWU45alhmcU4vSnB0Z0hEbWtIanlxSExYV2dXNCszVFcxSVUzV2R2Y2FMVFgyKzFHdVRYRXVaSy9lOTFCMQozMjV1SC9ZcCs4b2ZITFhTdk52RFRDcysyb1FLakJWcWNlM3BMUzNPdmNFS2REWklmL2JDekxuTE9XV0VKc0FwCnIvcFZEQzgxUGpCVUVOMmhONWViWFg3dGxEeEp1K29HT25Xc29UcFpDV2lPNkJvUExWbGlxUHhsUzdZQzBoSTEKL0Nsbks4MWVrR1FMYTVYYW1NMlJUcmlBajhVdGFYV1lLeElORlFJREFRQUJBb0lCQVFDNk9LcmZWYTBMbVVINgpIQUVCalBxTHk4MklBYmxzeFdrL094djB3UGU0U2NuQWM5bUx2STZFRnBkeUEwVGE3cG5OeUFHVFVmM2pkR0MwCjRDYVlrUDNVUGhMQVgrUVIrYzFxNW1WZDJNczZtSXg5dkVJOHZhcXpQdTNTRVpQVTFHTVFOSTVWZERMZVNSQVkKcGJGa0hPanY4RFUzWFR3UVc5eDdySzZLK244VXJOUENFSDEzbnI1WWNTMGk3enhXVmNJMzlWQUR2SEJpUmRlUwp5L01rQThPeUprODZ0UjRjdGlTWGx0QkpvdFBDalFKMUZCZk4xS2dGREJUNnhRV05VbUdJZm1OWEFsYWg3SGg1CkJXZk9obnY2R2RINTMwQktQRUJsQU14L09pV2drTDBacWNqdHdDUTY2NkExSERqNCsvTUFqWnlGbGZsaVNWZkwKNko2K0c0T0JBb0dCQU9lQU9GTmhxTTVCb2ttYXFDRFhUZUZBSlFpNHBUVU5kOVZoUjRGS1lPTitEaWhRRldpUwowQ2F1amIwSnJ4MFp0LzhiM3E0dlpuWXFSUjloa29Ncm1EZk1KMnhsZnBFVVVZWG1FaXpncDkvTzROSkFFcnd6CmlhNHRGS2xCeDBmbU01bHBIaEdKWFJ1VnZrbVNUeTcwZUF2UkxWekFLVkoxMEtPblZXM1VSaWFSQW9HQkFOU1UKM0Q5bEhmdDBqVkxUZlY2NlBXNkNKSzBLRXVuSDdQY2pjNEZEcHljNXppNnJwNlVobWYvYnZFekJGZWFVWTFnTQpmZFNnVjhmWHRra0hnVUhoc3Q4WTUxZFR5YkVTNkw5SDRTY0YyMFkzNHRBU2dJQk5OQ1hNOG8vM1hOYWtOQmFLCjk2SE5FQXduQ0NSSjFRYzRSN1JMQmNyNTVDM0pLdURTRFVoN2N5aEZBb0dCQU5ENmZWNC81WnV6d2lXQm1FNTEKTGRldUNRQnpkcWVLcmVlUXRuVHZTTUYwTktHTmtaWGlHa2NoQWRCcFlvdjVnSkNwZnY1c3lhallCYWdMYzdBMwpkV1RCUmNGamFicmJ4YkFDL2R0SFBpUWFZL2RJWWVGRkFQK2JzSEFPY2kva2ppWHByM3dUTFZyT2RZV0NyenBxCjg4ZHZIK3ovaHczcVR0cTlIckJUbExRUkFvR0JBSm9BSVRKWDJZbVJuTlBVM0d6a2RKNTY3NERmM0dXNTdPUDQKcmJPR1JEQjVndkZ5YnllRW1TQ3VtZEhzeXlYWWQ4T1FnUk9vK1E2UUtjRHNDK3FqUzhhdEx1S25rMlNSTTBWbgpHQ2dCNlNFTVdXYXRFS1JoeVpaY3k1Z1o5Z3FVdUJ0Z254WjdETllRN0tnRlNLdExUVDdDWHJiMW95UzhLRERvCldyRVlwWXNWQW9HQkFLWEQ1T0lVdk9ySkZDRUZRQ0dtYXp0VHkxZm9OTDRZR3Fhb3Bydm9ONnBNZGxXZmFGYXIKRTI2S3FNT0RPbnJHUlZrWjY0WUpyYVJPeUw4Yk85R0RydkFKekh0ZlcxR3Q5bVZGdndZM0VCdllMenJaSVBEeAptcERmeURieDMwR3RsaFMvSnd1dktJQ1hvdi9TNEFmTUlWNldrRHNkbzhsUnBDUnBRQnROZ0FuNgotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo= + client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lCQWpBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwdGFXNXAKYTNWaVpVTkJNQjRYRFRJek1EUXdPVEUxTVRNek1sb1hEVEkyTURRd09URTFNVE16TWxvd01URVhNQlVHQTFVRQpDaE1PYzNsemRHVnRPbTFoYzNSbGNuTXhGakFVQmdOVkJBTVREVzFwYm1scmRXSmxMWFZ6WlhJd2dnRWlNQTBHCkNTcUdTSWIzRFFFQkFRVUFBNElCRHdBd2dnRUtBb0lCQVFEQmdqbXJBemhqRUZ6S3FmRGNDMWlhTXU3am10RTEKd0hDdlpKM2xNL3ZxbzBBZGN3cjVpdjVqMEFGeHloTldrY0ZrN0UzNDdtc3RIMnZBU1pPeG11b25LUzNKbWdMawp2c0lOcThoa3oxNExmR0QrY0o2VUs1VkpidTVDWExnN3ZJV0xEYXBoWmNCaE9ES3orMHJqaEJHTTZ6YW5jL3JNCkFtY3RYNHNvMmNQdVAvazdQazgxZFFFZmU3T1dsWTF4QW52TG9ReXowYSsrT2txTG5YTHp6ZEJ5S0NHaFJyV3gKbzloSVB2cUowZTNaQURXMVdkS05xYmtsdzZpanlFdE9sblk4SWVWL3NhcDN5TFdCUnd5WW5OdzVBN3hmRFVSZQpNZmRqZGF5N05mNk5SRlN4K0luNTlkTVMxakQwbjdneGNtQzVubndWZi83Qk1hSEQ5S0lMdzJQTEFnTUJBQUdqCllEQmVNQTRHQTFVZER3RUIvd1FFQXdJRm9EQWRCZ05WSFNVRUZqQVVCZ2dyQmdFRkJRY0RBUVlJS3dZQkJRVUgKQXdJd0RBWURWUjBUQVFIL0JBSXdBREFmQmdOVkhTTUVHREFXZ0JUQzZoUHA0SSt0U3M1QVNTaUhxYnp2NThTWgpRREFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBVHJDU3ZhZW9iNWwzaHhEU1hXOHB4bFBYeG1FY1pESVZWbmpyCnBSMUhmUDQ2ZXYzMGI3UVZ2Y0c3V0FvcG1kYXBnL1M2RFAzYlVaWndvS0RTOWpaZ050MkY0U1RKMDR1OUlBR3EKNnNpbTBuK1NPN0MwdzVlU3NIdHJQc1JVdnhsQzlnRUJaQlNoMUpRREoxWWk0T0pFVmMzQUdWQUZEUXpORHBqbQppNEVNaDF5UUZwcDhYRU5JRk90dzNiMEUzeVJIbWVORmlSSXpqeFFxbjVDdlVMVUJQVGJuNU5pVXZvZXZtRE55CldVNmpuTmpwUm55MXNVQURCVzcvYjRRTWZIUkJjYmpnYzhOdnVmNkNPeXRiVVFqVUJiR2RzTGdxU05DYUZEdFAKSTlIOXMrOENxeHZLNmY0ZXpLYlN3SXdxWC9Pby9sbTFTSVVOTFd1RTUwVHdSOC9IR0E9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== + client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb2dJQkFBS0NBUUVBd1lJNXF3TTRZeEJjeXFudzNBdFltakx1NDVyUk5jQndyMlNkNVRQNzZxTkFIWE1LCitZcitZOUFCY2NvVFZwSEJaT3hOK081ckxSOXJ3RW1Uc1pycUp5a3R5Wm9DNUw3Q0RhdklaTTllQzN4Zy9uQ2UKbEN1VlNXN3VRbHk0Tzd5Rml3MnFZV1hBWVRneXMvdEs0NFFSak9zMnAzUDZ6QUpuTFYrTEtObkQ3ai81T3o1UApOWFVCSDN1emxwV05jUUo3eTZFTXM5R3Z2anBLaTUxeTg4M1FjaWdob1VhMXNhUFlTRDc2aWRIdDJRQTF0Vm5TCmphbTVKY09vbzhoTFRwWjJQQ0hsZjdHcWQ4aTFnVWNNbUp6Y09RTzhYdzFFWGpIM1kzV3N1elgralVSVXNmaUoKK2ZYVEV0WXc5Sis0TVhKZ3VaNThGWC8rd1RHaHcvU2lDOE5qeXdJREFRQUJBb0lCQUQ0dTN1RTVrN0VoM08regpWSmNoZmtOdkFwMVpic2xiSWRyNjlsSmxOaHJjZ3duem9oODJyekRiOHRyaUdQekVzZVVBbXIzWHY5RXNPNi82CjlOOHA3UHpRbXNvaUY3UHlLT0hEeGcyL0pYV0RicGZWRU9DRWNPQzhLUXhpUjBISy93OEVRVEF6Um5MM1lETysKR1A2cnZnZ092ZTFwczdwRE8yeTFPejdSVzhqL2JreXpMTFMzQ1h1R0NlUXUzYVR1Tyt0Z0dvQTYvS2EvWWdRWApTRGIvd294b1BYUWVSdFM3aDdKeERzblNhRUVLSjF0S2p6Y1FPbm5kbndMeEZ6Q0VWUk1DWE1wWU9zTDExTGhECm11WlQ1eEw3ZVZxRzFkc1Y2NEl5VmVBOTJ1NGdnYkJyc1NSZDVHRmcxQytFT1VNcDVVb0xLd0pLRlZkQjUzQVAKODhZZnVZRUNnWUVBelE5cGszQUp0MnVWNkdPZ0VpV25ZanVwYUEybFhkdVdUSmZObFpadlkwalZWT2hoZUhvVQpiQWh2SmpURUNwWERTWHBCdVpQUE5QTVE0ZmM1eEt4QjNJOGFXNHlYWWdwZ1A0cHhEZEhBU1lCYWNSdU45N250ClBnYUhhVzdHQXVoV2hkeDhCeFBKdlFNa1ZlVzBGZkovbTUycVBBZ3NKd3dySXRVWmhQenI5L0VDZ1lFQThaUTAKNUlUQTcxU0JVa3VaLytSRzBGRU1oenBvRVJreDlqcE1yUnBkMzJ4anBqVmZvczF2cXJTeE93bWdIdFVnVStDaAowT1dpR0ZPcDNnNExhWll1TjZqenMvLzVzU3ZPOWtFNW9rVzd5TUZKQkROL2ZUM0dJSDJ1SU5lWmhGOU93N0FnCmk5aFRqeGZBWC8xRDdITzI2TmtMRnhnQzQ4eEd2aDUzR1JnaWMzc0NnWUJzanRjK2xaYWZRdGFHdzQ4dmJEMnoKMUkvM3BSbkJtWWwxSFB4YVQ5ekNQQUdzUktXdFNUdmNnWTZPTkdzQWk0NXFMTTMwdDlwL1ZwcStkY3BnWXkwdQozWmQvbGV0aW5NbWRlZVltQWNBQmFYRDM1alYvU3kvY29VbzR0OHNlS08vOVI5OWxROFdPU2NhSHJ1WnFwQW1JClVheVl3VjdXZ1N1bzhoWGpnSjVQa1FLQmdFbFJRNlEvTGhiMHZMTHZRdlBJb2oxQys5eG11NExFOU1iWDlzRnEKaVNidnpHWjdPR1UrbUM5azI0MGhaTGsyMGJMakwva29XRU90MEpZV0NSeW9lYXBtMmwrOHhsa2hCSlQwUXJ1ZgpFbGpoWUhtbjczOWhLaXBlT21TNVNseEVXTEZIV1BsWVZEUFBiNUV5V2xUKzRYcFZ0T256WFowcE9DY25NOW9uCjJ2elZBb0dBRlVxMnpWNXVhT2pYNHZwb05zaHhFMUdYb1dScVVSUjdRbCs3b1ltMmJiRk95SnBPYldmQ0c4V2UKb2ttQWdqUmtkRW9oakRZNHlJR285Zml5clJtbGVkbEZYd3NjdENQZXFTSXE3am9Sd1JZbVJlMmx2Y0lGbkRWaQo0VHZDL1ZheWhBbHZMcXJoS3hxNUl6MWN0NDhhNHVybTlYR081K1lGVDZCcjE3RUFUb289Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg== diff --git a/kuttl-config.yml b/kuttl-config.yml index 68864ac3..14c445c2 100644 --- a/kuttl-config.yml +++ b/kuttl-config.yml @@ -3,4 +3,5 @@ kind: TestSuite startKIND: false testDirs: - tests/e2e/ -timeout: 600 +timeout: 60 +parallel: 1 diff --git a/tests/e2e/basic-frontend/00-install.yaml b/tests/e2e/basic-frontend/00-create-namespace.yaml similarity index 100% rename from tests/e2e/basic-frontend/00-install.yaml rename to tests/e2e/basic-frontend/00-create-namespace.yaml diff --git a/tests/e2e/basic-frontend/01-pods.yaml b/tests/e2e/basic-frontend/01-create-resources.yaml similarity index 100% rename from tests/e2e/basic-frontend/01-pods.yaml rename to tests/e2e/basic-frontend/01-create-resources.yaml diff --git a/tests/e2e/basic-frontend/01-assert.yaml b/tests/e2e/basic-frontend/02-assert.yaml similarity index 76% rename from tests/e2e/basic-frontend/01-assert.yaml rename to tests/e2e/basic-frontend/02-assert.yaml index 667b7477..15457894 100644 --- a/tests/e2e/basic-frontend/01-assert.yaml +++ b/tests/e2e/basic-frontend/02-assert.yaml @@ -3,8 +3,13 @@ kind: Deployment apiVersion: apps/v1 metadata: name: chrome-frontend + namespace: test-basic-frontend labels: frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome spec: selector: matchLabels: @@ -15,9 +20,6 @@ spec: - name: config configMap: name: test-basic-frontend-environment - items: - - key: fed-modules.json - path: fed-modules.json defaultMode: 420 containers: - name: fe-image @@ -31,5 +33,4 @@ spec: protocol: TCP volumeMounts: - name: config - mountPath: /opt/app-root/src/build/chrome/fed-modules.json - subPath: fed-modules.json + mountPath: /opt/app-root/src/build/operator-generated diff --git a/tests/e2e/basic-frontend/03-delete.yaml b/tests/e2e/basic-frontend/03-delete.yaml new file mode 100644 index 00000000..194acd3e --- /dev/null +++ b/tests/e2e/basic-frontend/03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-basic-frontend-environment +- apiVersion: v1 + kind: Namespace + name: test-basic-frontend diff --git a/tests/e2e/generate-nav-json/00-create-namespace.yaml b/tests/e2e/generate-nav-json/00-create-namespace.yaml new file mode 100644 index 00000000..6b805b1b --- /dev/null +++ b/tests/e2e/generate-nav-json/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-generate-nav-json +spec: + finalizers: + - kubernetes \ No newline at end of file diff --git a/tests/e2e/generate-nav-json/01-create-resources.yaml b/tests/e2e/generate-nav-json/01-create-resources.yaml new file mode 100644 index 00000000..582c004f --- /dev/null +++ b/tests/e2e/generate-nav-json/01-create-resources.yaml @@ -0,0 +1,31 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-generate-nav-json-environment +spec: + generateNavJSON: true + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-generate-nav-json +spec: + API: + versions: + - v1 + frontend: + paths: + - / + - /config/chrome + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-generate-nav-json-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome diff --git a/tests/e2e/generate-nav-json/02-assert.yaml b/tests/e2e/generate-nav-json/02-assert.yaml new file mode 100644 index 00000000..25ffcc90 --- /dev/null +++ b/tests/e2e/generate-nav-json/02-assert.yaml @@ -0,0 +1,38 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-frontend + namespace: test-generate-nav-json + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-generate-nav-json-environment + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/chrome + - name: config + mountPath: /opt/app-root/src/build/operator-generated diff --git a/tests/e2e/generate-nav-json/03-delete.yaml b/tests/e2e/generate-nav-json/03-delete.yaml new file mode 100644 index 00000000..7b1647ef --- /dev/null +++ b/tests/e2e/generate-nav-json/03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-generate-nav-json-environment +- apiVersion: v1 + kind: Namespace + name: test-generate-nav-json \ No newline at end of file From 6b1dfee4a5ff3e9e21e4725a115e2f557bee0ec0 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Apr 2023 15:01:45 -0400 Subject: [PATCH 087/228] paths test! --- controllers/reconcile.go | 1 + .../basic-frontend/00-create-namespace.yaml | 8 ----- .../basic-frontend/01-create-resources.yaml | 31 ---------------- tests/e2e/basic-frontend/02-assert.yaml | 36 ------------------- tests/e2e/basic-frontend/03-delete.yaml | 13 ------- .../01-create-resources.yaml | 1 - 6 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 tests/e2e/basic-frontend/00-create-namespace.yaml delete mode 100644 tests/e2e/basic-frontend/01-create-resources.yaml delete mode 100644 tests/e2e/basic-frontend/02-assert.yaml delete mode 100644 tests/e2e/basic-frontend/03-delete.yaml diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 6fbd9db2..5b4948b0 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -352,6 +352,7 @@ func (r *FrontendReconciliation) getFrontendPaths() []string { defaultPath := fmt.Sprintf("/apps/%s", r.Frontend.Name) defaultBetaPath := fmt.Sprintf("/beta/apps/%s", r.Frontend.Name) defaultPreviewPath := fmt.Sprintf("/preview/apps/%s", r.Frontend.Name) + if r.Frontend.Spec.AssetsPrefix != "" { defaultPath = fmt.Sprintf("/%s/%s", r.Frontend.Spec.AssetsPrefix, r.Frontend.Name) defaultBetaPath = fmt.Sprintf("/beta/%s/%s", r.Frontend.Spec.AssetsPrefix, r.Frontend.Name) diff --git a/tests/e2e/basic-frontend/00-create-namespace.yaml b/tests/e2e/basic-frontend/00-create-namespace.yaml deleted file mode 100644 index 2d4a4317..00000000 --- a/tests/e2e/basic-frontend/00-create-namespace.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -apiVersion: v1 -kind: Namespace -metadata: - name: test-basic-frontend -spec: - finalizers: - - kubernetes \ No newline at end of file diff --git a/tests/e2e/basic-frontend/01-create-resources.yaml b/tests/e2e/basic-frontend/01-create-resources.yaml deleted file mode 100644 index 92deaa31..00000000 --- a/tests/e2e/basic-frontend/01-create-resources.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -apiVersion: cloud.redhat.com/v1alpha1 -kind: FrontendEnvironment -metadata: - name: test-basic-frontend-environment -spec: - generateNavJSON: false - hostname: foo.redhat.com - sso: https://sso.foo.redhat.com ---- -apiVersion: cloud.redhat.com/v1alpha1 -kind: Frontend -metadata: - name: chrome - namespace: test-basic-frontend -spec: - API: - versions: - - v1 - frontend: - paths: - - / - - /config/chrome - deploymentRepo: https://github.com/RedHatInsights/insights-chrome - envName: test-basic-frontend-environment - image: quay.io/cloudservices/insights-chrome-frontend:720317c - module: - config: - ssoUrl: 'https://' - manifestLocation: /apps/chrome/js/fed-mods.json - title: Chrome diff --git a/tests/e2e/basic-frontend/02-assert.yaml b/tests/e2e/basic-frontend/02-assert.yaml deleted file mode 100644 index 15457894..00000000 --- a/tests/e2e/basic-frontend/02-assert.yaml +++ /dev/null @@ -1,36 +0,0 @@ ---- -kind: Deployment -apiVersion: apps/v1 -metadata: - name: chrome-frontend - namespace: test-basic-frontend - labels: - frontend: chrome - ownerReferences: - - apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -spec: - selector: - matchLabels: - frontend: chrome - template: - spec: - volumes: - - name: config - configMap: - name: test-basic-frontend-environment - defaultMode: 420 - containers: - - name: fe-image - image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' - ports: - - name: web - containerPort: 80 - protocol: TCP - - name: metrics - containerPort: 9000 - protocol: TCP - volumeMounts: - - name: config - mountPath: /opt/app-root/src/build/operator-generated diff --git a/tests/e2e/basic-frontend/03-delete.yaml b/tests/e2e/basic-frontend/03-delete.yaml deleted file mode 100644 index 194acd3e..00000000 --- a/tests/e2e/basic-frontend/03-delete.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-basic-frontend-environment -- apiVersion: v1 - kind: Namespace - name: test-basic-frontend diff --git a/tests/e2e/generate-nav-json/01-create-resources.yaml b/tests/e2e/generate-nav-json/01-create-resources.yaml index 582c004f..b8d633a4 100644 --- a/tests/e2e/generate-nav-json/01-create-resources.yaml +++ b/tests/e2e/generate-nav-json/01-create-resources.yaml @@ -20,7 +20,6 @@ spec: frontend: paths: - / - - /config/chrome deploymentRepo: https://github.com/RedHatInsights/insights-chrome envName: test-generate-nav-json-environment image: quay.io/cloudservices/insights-chrome-frontend:720317c From 50a0a020cf62cafcfa6946fb7a3ddec55d1ab11b Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Apr 2023 15:34:45 -0400 Subject: [PATCH 088/228] Lost an hour to a dumb mistake! --- .../basic-frontend/00-create-namespace.yaml | 8 +++ .../basic-frontend/01-create-resources.yaml | 30 ++++++++++++ tests/e2e/basic-frontend/02-assert.yaml | 36 ++++++++++++++ tests/e2e/basic-frontend/03-delete.yaml | 13 +++++ .../frontend-paths/00-create-namespace.yaml | 8 +++ .../frontend-paths/01-create-resources.yaml | 31 ++++++++++++ tests/e2e/frontend-paths/02-assert.yaml | 49 +++++++++++++++++++ tests/e2e/frontend-paths/03-delete.yaml | 13 +++++ 8 files changed, 188 insertions(+) create mode 100644 tests/e2e/basic-frontend/00-create-namespace.yaml create mode 100644 tests/e2e/basic-frontend/01-create-resources.yaml create mode 100644 tests/e2e/basic-frontend/02-assert.yaml create mode 100644 tests/e2e/basic-frontend/03-delete.yaml create mode 100644 tests/e2e/frontend-paths/00-create-namespace.yaml create mode 100644 tests/e2e/frontend-paths/01-create-resources.yaml create mode 100644 tests/e2e/frontend-paths/02-assert.yaml create mode 100644 tests/e2e/frontend-paths/03-delete.yaml diff --git a/tests/e2e/basic-frontend/00-create-namespace.yaml b/tests/e2e/basic-frontend/00-create-namespace.yaml new file mode 100644 index 00000000..6839982a --- /dev/null +++ b/tests/e2e/basic-frontend/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-basic-app +spec: + finalizers: + - kubernetes \ No newline at end of file diff --git a/tests/e2e/basic-frontend/01-create-resources.yaml b/tests/e2e/basic-frontend/01-create-resources.yaml new file mode 100644 index 00000000..3e4658b6 --- /dev/null +++ b/tests/e2e/basic-frontend/01-create-resources.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-basic-app-environment +spec: + generateNavJSON: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-basic-app +spec: + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-basic-app-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome diff --git a/tests/e2e/basic-frontend/02-assert.yaml b/tests/e2e/basic-frontend/02-assert.yaml new file mode 100644 index 00000000..c22814ae --- /dev/null +++ b/tests/e2e/basic-frontend/02-assert.yaml @@ -0,0 +1,36 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-frontend + namespace: test-basic-app + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-basic-app-environment + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated diff --git a/tests/e2e/basic-frontend/03-delete.yaml b/tests/e2e/basic-frontend/03-delete.yaml new file mode 100644 index 00000000..9611f5b2 --- /dev/null +++ b/tests/e2e/basic-frontend/03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-basic-app-environment +- apiVersion: v1 + kind: Namespace + name: test-basic-app \ No newline at end of file diff --git a/tests/e2e/frontend-paths/00-create-namespace.yaml b/tests/e2e/frontend-paths/00-create-namespace.yaml new file mode 100644 index 00000000..2d4a4317 --- /dev/null +++ b/tests/e2e/frontend-paths/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-basic-frontend +spec: + finalizers: + - kubernetes \ No newline at end of file diff --git a/tests/e2e/frontend-paths/01-create-resources.yaml b/tests/e2e/frontend-paths/01-create-resources.yaml new file mode 100644 index 00000000..922150d2 --- /dev/null +++ b/tests/e2e/frontend-paths/01-create-resources.yaml @@ -0,0 +1,31 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-basic-frontend-environment +spec: + generateNavJSON: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-basic-frontend +spec: + API: + versions: + - v1 + frontend: + paths: + - /apps/chrome + - /config/chrome + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-basic-frontend-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome diff --git a/tests/e2e/frontend-paths/02-assert.yaml b/tests/e2e/frontend-paths/02-assert.yaml new file mode 100644 index 00000000..c77e8232 --- /dev/null +++ b/tests/e2e/frontend-paths/02-assert.yaml @@ -0,0 +1,49 @@ +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: chrome + namespace: test-basic-frontend + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome + controller: true +spec: + ingressClassName: nginx + tls: + - {} + rules: + - host: foo.redhat.com + http: + paths: + - path: /apps/chrome + pathType: Prefix + backend: + service: + name: chrome + port: + number: 8000 + - path: /config/chrome + pathType: Prefix + backend: + service: + name: chrome + port: + number: 8000 + - path: /beta/apps/chrome + pathType: Prefix + backend: + service: + name: chrome + port: + number: 8000 + - path: /preview/apps/chrome + pathType: Prefix + backend: + service: + name: chrome + port: + number: 8000 diff --git a/tests/e2e/frontend-paths/03-delete.yaml b/tests/e2e/frontend-paths/03-delete.yaml new file mode 100644 index 00000000..194acd3e --- /dev/null +++ b/tests/e2e/frontend-paths/03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-basic-frontend-environment +- apiVersion: v1 + kind: Namespace + name: test-basic-frontend From 0f44a51f2fbffcc276bec706bd81d938ae7e072b Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Apr 2023 16:25:40 -0400 Subject: [PATCH 089/228] SSL test. all tests passing --- kuttl-config.yml | 2 +- .../basic-frontend/01-create-resources.yaml | 1 + .../frontend-paths/01-create-resources.yaml | 1 + .../01-create-resources.yaml | 1 + tests/e2e/ssl/00-create-namespace.yaml | 8 ++++ tests/e2e/ssl/01-create-resources.yaml | 40 ++++++++++++++++ tests/e2e/ssl/02-assert.yaml | 47 +++++++++++++++++++ tests/e2e/ssl/03-delete.yaml | 13 +++++ 8 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 tests/e2e/ssl/00-create-namespace.yaml create mode 100644 tests/e2e/ssl/01-create-resources.yaml create mode 100644 tests/e2e/ssl/02-assert.yaml create mode 100644 tests/e2e/ssl/03-delete.yaml diff --git a/kuttl-config.yml b/kuttl-config.yml index 14c445c2..b4350f00 100644 --- a/kuttl-config.yml +++ b/kuttl-config.yml @@ -3,5 +3,5 @@ kind: TestSuite startKIND: false testDirs: - tests/e2e/ -timeout: 60 +timeout: 600 parallel: 1 diff --git a/tests/e2e/basic-frontend/01-create-resources.yaml b/tests/e2e/basic-frontend/01-create-resources.yaml index 3e4658b6..ab8f78ab 100644 --- a/tests/e2e/basic-frontend/01-create-resources.yaml +++ b/tests/e2e/basic-frontend/01-create-resources.yaml @@ -5,6 +5,7 @@ metadata: name: test-basic-app-environment spec: generateNavJSON: false + ssl: false hostname: foo.redhat.com sso: https://sso.foo.redhat.com --- diff --git a/tests/e2e/frontend-paths/01-create-resources.yaml b/tests/e2e/frontend-paths/01-create-resources.yaml index 922150d2..cdefd32c 100644 --- a/tests/e2e/frontend-paths/01-create-resources.yaml +++ b/tests/e2e/frontend-paths/01-create-resources.yaml @@ -7,6 +7,7 @@ spec: generateNavJSON: false hostname: foo.redhat.com sso: https://sso.foo.redhat.com + ssl: false --- apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend diff --git a/tests/e2e/generate-nav-json/01-create-resources.yaml b/tests/e2e/generate-nav-json/01-create-resources.yaml index b8d633a4..d9497cfe 100644 --- a/tests/e2e/generate-nav-json/01-create-resources.yaml +++ b/tests/e2e/generate-nav-json/01-create-resources.yaml @@ -5,6 +5,7 @@ metadata: name: test-generate-nav-json-environment spec: generateNavJSON: true + ssl: false hostname: foo.redhat.com sso: https://sso.foo.redhat.com --- diff --git a/tests/e2e/ssl/00-create-namespace.yaml b/tests/e2e/ssl/00-create-namespace.yaml new file mode 100644 index 00000000..8afaf3fe --- /dev/null +++ b/tests/e2e/ssl/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-ssl +spec: + finalizers: + - kubernetes \ No newline at end of file diff --git a/tests/e2e/ssl/01-create-resources.yaml b/tests/e2e/ssl/01-create-resources.yaml new file mode 100644 index 00000000..6a16d54b --- /dev/null +++ b/tests/e2e/ssl/01-create-resources.yaml @@ -0,0 +1,40 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-ssl-environment +spec: + generateNavJSON: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com + ssl: true +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-ssl +spec: + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-ssl-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome +--- +kind: Secret +apiVersion: v1 +metadata: + name: chrome-certs + namespace: test-ssl +data: + test: test +type: Opaque diff --git a/tests/e2e/ssl/02-assert.yaml b/tests/e2e/ssl/02-assert.yaml new file mode 100644 index 00000000..afdcf6ad --- /dev/null +++ b/tests/e2e/ssl/02-assert.yaml @@ -0,0 +1,47 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-frontend + namespace: test-ssl + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-ssl-environment + defaultMode: 420 + - name: certs + secret: + secretName: chrome-cert + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + env: + - name: CADDY_TLS_MODE + value: https_port 8000 + - name: CADDY_TLS_CERT + value: tls /opt/certs/tls.crt /opt/certs/tls.key + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated + - name: certs + mountPath: /opt/certs \ No newline at end of file diff --git a/tests/e2e/ssl/03-delete.yaml b/tests/e2e/ssl/03-delete.yaml new file mode 100644 index 00000000..7e2acb35 --- /dev/null +++ b/tests/e2e/ssl/03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-ssl-environment +- apiVersion: v1 + kind: Namespace + name: test-ssl \ No newline at end of file From af2c71828392b644cb07ab85d2f9a6a7c0ea180b Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 11 Apr 2023 06:54:34 -0400 Subject: [PATCH 090/228] ignore kubeconfig if it shows up --- .gitignore | 2 ++ kubeconfig | 17 ----------------- 2 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 kubeconfig diff --git a/.gitignore b/.gitignore index ab6b6bd8..fc928885 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ bin testbin/* __debug_bin +kubeconfig + # Test binary, build with `go test -c` *.test diff --git a/kubeconfig b/kubeconfig deleted file mode 100644 index 8d9d2f43..00000000 --- a/kubeconfig +++ /dev/null @@ -1,17 +0,0 @@ -clusters: -- cluster: - certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCakNDQWU2Z0F3SUJBZ0lCQVRBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwdGFXNXAKYTNWaVpVTkJNQjRYRFRJeU1EWXdOVEU1TVRZd04xb1hEVE15TURZd016RTVNVFl3TjFvd0ZURVRNQkVHQTFVRQpBeE1LYldsdWFXdDFZbVZEUVRDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTUdhCnAwS3ZZWGVSZE9GUitwZEVLZXlNQStSdk5ySUl3L3V4eFFFcm5meG1ZeXlrZDdaZGRSMlNQekJwWXRVRGFCeHcKME9BL3ZpTnZBTTArT1JjNW04blpwL3gxdWQ1bXY3WDdpT25RUGxyS0xUNHp6OFBaNUliTkprLzhaOExLVGdpNwp4dzdvbUhESjczSTRGK2NmTG5GbWtOZDMrWGZCemdxcW00cmduVjd5b0NxbTliVjY2c3hMZFkwM2hBNUtYa2tqCjRpWVIwU29KckRYUU1OWkdkZE9wZjNUUUdjK29DVEhxZjRKbWFlMit2MFdyRUd4L1U2enplOGJ2WWJqSzRKMUEKREc1anJRTklWYWFUUHNJZmthZDRGVEY3elcrek1pV0lvWWxXT3ZrNFNLKzg1MmtnRTVWRDFtMXpvZXBHL3dqZgp0dU9oM25yb1VBR1BJN2c2bzNzQ0F3RUFBYU5oTUY4d0RnWURWUjBQQVFIL0JBUURBZ0trTUIwR0ExVWRKUVFXCk1CUUdDQ3NHQVFVRkJ3TUNCZ2dyQmdFRkJRY0RBVEFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQjBHQTFVZERnUVcKQkJUQzZoUHA0SSt0U3M1QVNTaUhxYnp2NThTWlFEQU5CZ2txaGtpRzl3MEJBUXNGQUFPQ0FRRUFwRHdVakVKWgpnangxWWpnMlZqNXVpeGNSYm5UUWExbzYvVmhTS1RNVHpZaGF2a3JhSXd0TnVkMEprTFNtWjZFR1YwL2ZMUTkxCmRxQ0I2dXk0bFJFdmlmNHpEMTY4ZFdyVjg3Y0RkSThiU0hRMnl6aHpTK1hrZVM1THZUYUZHeDBqR25pZFVES3EKWklqT1ozRVVCRmpSKy9XMkR3WVlMaTlhWmNySWZ6WmxUdDE0eXM3aC9vbDRDUFNRZ3RNSmlxeTNZZjlZWVo3cQoxcUl0cENHY2V2Q3RPRzcvKzdQbHhRUDNtSWYzc081bE5VZ3hyOHRxRVVGd2pPaklBVk5KZyt2UnNaMGVPbS9iCkx0aHhwT2tHQ25WbjRUS0FYNHJMTWNKOTYxL2t0ZExIYTNFSUhSb1lDWlV5RFZrZlhCaUIxdDgzOWQybUF6emgKeGtqRG1PUWJWdGx5anc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== - server: https://192.168.39.238:8443 - name: cluster -contexts: -- context: - cluster: cluster - user: user - name: cluster -current-context: cluster -preferences: {} -users: -- name: user - user: - client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lCQWpBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwdGFXNXAKYTNWaVpVTkJNQjRYRFRJek1EUXdPVEUxTVRNek1sb1hEVEkyTURRd09URTFNVE16TWxvd01URVhNQlVHQTFVRQpDaE1PYzNsemRHVnRPbTFoYzNSbGNuTXhGakFVQmdOVkJBTVREVzFwYm1scmRXSmxMWFZ6WlhJd2dnRWlNQTBHCkNTcUdTSWIzRFFFQkFRVUFBNElCRHdBd2dnRUtBb0lCQVFEQmdqbXJBemhqRUZ6S3FmRGNDMWlhTXU3am10RTEKd0hDdlpKM2xNL3ZxbzBBZGN3cjVpdjVqMEFGeHloTldrY0ZrN0UzNDdtc3RIMnZBU1pPeG11b25LUzNKbWdMawp2c0lOcThoa3oxNExmR0QrY0o2VUs1VkpidTVDWExnN3ZJV0xEYXBoWmNCaE9ES3orMHJqaEJHTTZ6YW5jL3JNCkFtY3RYNHNvMmNQdVAvazdQazgxZFFFZmU3T1dsWTF4QW52TG9ReXowYSsrT2txTG5YTHp6ZEJ5S0NHaFJyV3gKbzloSVB2cUowZTNaQURXMVdkS05xYmtsdzZpanlFdE9sblk4SWVWL3NhcDN5TFdCUnd5WW5OdzVBN3hmRFVSZQpNZmRqZGF5N05mNk5SRlN4K0luNTlkTVMxakQwbjdneGNtQzVubndWZi83Qk1hSEQ5S0lMdzJQTEFnTUJBQUdqCllEQmVNQTRHQTFVZER3RUIvd1FFQXdJRm9EQWRCZ05WSFNVRUZqQVVCZ2dyQmdFRkJRY0RBUVlJS3dZQkJRVUgKQXdJd0RBWURWUjBUQVFIL0JBSXdBREFmQmdOVkhTTUVHREFXZ0JUQzZoUHA0SSt0U3M1QVNTaUhxYnp2NThTWgpRREFOQmdrcWhraUc5dzBCQVFzRkFBT0NBUUVBVHJDU3ZhZW9iNWwzaHhEU1hXOHB4bFBYeG1FY1pESVZWbmpyCnBSMUhmUDQ2ZXYzMGI3UVZ2Y0c3V0FvcG1kYXBnL1M2RFAzYlVaWndvS0RTOWpaZ050MkY0U1RKMDR1OUlBR3EKNnNpbTBuK1NPN0MwdzVlU3NIdHJQc1JVdnhsQzlnRUJaQlNoMUpRREoxWWk0T0pFVmMzQUdWQUZEUXpORHBqbQppNEVNaDF5UUZwcDhYRU5JRk90dzNiMEUzeVJIbWVORmlSSXpqeFFxbjVDdlVMVUJQVGJuNU5pVXZvZXZtRE55CldVNmpuTmpwUm55MXNVQURCVzcvYjRRTWZIUkJjYmpnYzhOdnVmNkNPeXRiVVFqVUJiR2RzTGdxU05DYUZEdFAKSTlIOXMrOENxeHZLNmY0ZXpLYlN3SXdxWC9Pby9sbTFTSVVOTFd1RTUwVHdSOC9IR0E9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== - client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUlFb2dJQkFBS0NBUUVBd1lJNXF3TTRZeEJjeXFudzNBdFltakx1NDVyUk5jQndyMlNkNVRQNzZxTkFIWE1LCitZcitZOUFCY2NvVFZwSEJaT3hOK081ckxSOXJ3RW1Uc1pycUp5a3R5Wm9DNUw3Q0RhdklaTTllQzN4Zy9uQ2UKbEN1VlNXN3VRbHk0Tzd5Rml3MnFZV1hBWVRneXMvdEs0NFFSak9zMnAzUDZ6QUpuTFYrTEtObkQ3ai81T3o1UApOWFVCSDN1emxwV05jUUo3eTZFTXM5R3Z2anBLaTUxeTg4M1FjaWdob1VhMXNhUFlTRDc2aWRIdDJRQTF0Vm5TCmphbTVKY09vbzhoTFRwWjJQQ0hsZjdHcWQ4aTFnVWNNbUp6Y09RTzhYdzFFWGpIM1kzV3N1elgralVSVXNmaUoKK2ZYVEV0WXc5Sis0TVhKZ3VaNThGWC8rd1RHaHcvU2lDOE5qeXdJREFRQUJBb0lCQUQ0dTN1RTVrN0VoM08regpWSmNoZmtOdkFwMVpic2xiSWRyNjlsSmxOaHJjZ3duem9oODJyekRiOHRyaUdQekVzZVVBbXIzWHY5RXNPNi82CjlOOHA3UHpRbXNvaUY3UHlLT0hEeGcyL0pYV0RicGZWRU9DRWNPQzhLUXhpUjBISy93OEVRVEF6Um5MM1lETysKR1A2cnZnZ092ZTFwczdwRE8yeTFPejdSVzhqL2JreXpMTFMzQ1h1R0NlUXUzYVR1Tyt0Z0dvQTYvS2EvWWdRWApTRGIvd294b1BYUWVSdFM3aDdKeERzblNhRUVLSjF0S2p6Y1FPbm5kbndMeEZ6Q0VWUk1DWE1wWU9zTDExTGhECm11WlQ1eEw3ZVZxRzFkc1Y2NEl5VmVBOTJ1NGdnYkJyc1NSZDVHRmcxQytFT1VNcDVVb0xLd0pLRlZkQjUzQVAKODhZZnVZRUNnWUVBelE5cGszQUp0MnVWNkdPZ0VpV25ZanVwYUEybFhkdVdUSmZObFpadlkwalZWT2hoZUhvVQpiQWh2SmpURUNwWERTWHBCdVpQUE5QTVE0ZmM1eEt4QjNJOGFXNHlYWWdwZ1A0cHhEZEhBU1lCYWNSdU45N250ClBnYUhhVzdHQXVoV2hkeDhCeFBKdlFNa1ZlVzBGZkovbTUycVBBZ3NKd3dySXRVWmhQenI5L0VDZ1lFQThaUTAKNUlUQTcxU0JVa3VaLytSRzBGRU1oenBvRVJreDlqcE1yUnBkMzJ4anBqVmZvczF2cXJTeE93bWdIdFVnVStDaAowT1dpR0ZPcDNnNExhWll1TjZqenMvLzVzU3ZPOWtFNW9rVzd5TUZKQkROL2ZUM0dJSDJ1SU5lWmhGOU93N0FnCmk5aFRqeGZBWC8xRDdITzI2TmtMRnhnQzQ4eEd2aDUzR1JnaWMzc0NnWUJzanRjK2xaYWZRdGFHdzQ4dmJEMnoKMUkvM3BSbkJtWWwxSFB4YVQ5ekNQQUdzUktXdFNUdmNnWTZPTkdzQWk0NXFMTTMwdDlwL1ZwcStkY3BnWXkwdQozWmQvbGV0aW5NbWRlZVltQWNBQmFYRDM1alYvU3kvY29VbzR0OHNlS08vOVI5OWxROFdPU2NhSHJ1WnFwQW1JClVheVl3VjdXZ1N1bzhoWGpnSjVQa1FLQmdFbFJRNlEvTGhiMHZMTHZRdlBJb2oxQys5eG11NExFOU1iWDlzRnEKaVNidnpHWjdPR1UrbUM5azI0MGhaTGsyMGJMakwva29XRU90MEpZV0NSeW9lYXBtMmwrOHhsa2hCSlQwUXJ1ZgpFbGpoWUhtbjczOWhLaXBlT21TNVNseEVXTEZIV1BsWVZEUFBiNUV5V2xUKzRYcFZ0T256WFowcE9DY25NOW9uCjJ2elZBb0dBRlVxMnpWNXVhT2pYNHZwb05zaHhFMUdYb1dScVVSUjdRbCs3b1ltMmJiRk95SnBPYldmQ0c4V2UKb2ttQWdqUmtkRW9oakRZNHlJR285Zml5clJtbGVkbEZYd3NjdENQZXFTSXE3am9Sd1JZbVJlMmx2Y0lGbkRWaQo0VHZDL1ZheWhBbHZMcXJoS3hxNUl6MWN0NDhhNHVybTlYR081K1lGVDZCcjE3RUFUb289Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg== From f59b94ffee615313845ee9ec4647fde8321decc9 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 11 Apr 2023 07:04:14 -0400 Subject: [PATCH 091/228] Makefile and README updates for kuttl --- Makefile | 3 +++ README.md | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/Makefile b/Makefile index 10b28f0e..a729a098 100644 --- a/Makefile +++ b/Makefile @@ -114,6 +114,9 @@ test: manifests envtest generate fmt vet junit: gotestsum manifests envtest generate fmt vet KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" $(PROJECT_DIR)/testbin/bin/gotestsum --junitfile artifacts/junit-ginko.xml -- ./... -coverprofile cover.out +kuttl: manifests envtest generate fmt vet + kubectl kuttl test --config kuttl-config.yml ./tests/e2e + ##@ Build build: generate fmt vet ## Build manager binary. diff --git a/README.md b/README.md index 603581a7..a391c122 100644 --- a/README.md +++ b/README.md @@ -83,3 +83,17 @@ If you want to access the app from your computer, you have to update /etc/hosts ``` Once you update it you can access the app from `https://env-boot/insights/inventory` + +## E2E testing with kuttl + +[Kuttl](https://kuttl.dev/) is an end to end testing framework for Kubernetes operators. We hope to provide full test coverage for the Frontend Operator with kuttl. + +To run the kuttl tests you'll need to be running the operator and Clowder in minikube as shown in the directions above. You also need to make sure you [have kuttl installed on your machine](https://kuttl.dev/docs/cli.html#setup-the-kuttl-kubectl-plugin). + +Once all that is in place you can run the kuttl tests: + +```bash +$ make kuttl +``` +Friendly reminder: make sure you have the frontend operator runnning (`make run-local`) before you run the tests or they will never work and you'll go nuts trying to figure out why. + From 4147d09e40ca333322f949b7ae520cbf00606344 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 11 Apr 2023 07:34:31 -0400 Subject: [PATCH 092/228] readme fixes and adding bundle test. --- README.md | 8 +++++ tests/e2e/bundles/00-create-namespace.yaml | 8 +++++ tests/e2e/bundles/01-create-resources.yaml | 42 ++++++++++++++++++++++ tests/e2e/bundles/02-assert.yaml | 36 +++++++++++++++++++ tests/e2e/bundles/03-delete.yaml | 13 +++++++ 5 files changed, 107 insertions(+) create mode 100644 tests/e2e/bundles/00-create-namespace.yaml create mode 100644 tests/e2e/bundles/01-create-resources.yaml create mode 100644 tests/e2e/bundles/02-assert.yaml create mode 100644 tests/e2e/bundles/03-delete.yaml diff --git a/README.md b/README.md index a391c122..a20ac0df 100644 --- a/README.md +++ b/README.md @@ -97,3 +97,11 @@ $ make kuttl ``` Friendly reminder: make sure you have the frontend operator runnning (`make run-local`) before you run the tests or they will never work and you'll go nuts trying to figure out why. +If you want to run a single test you can do this: +```bash +$ kubectl kuttl test --config kuttl-config.yml ./tests/e2e --test bundles +``` +where `bundles` is the name of the directory that contains the test you want to run. + + + diff --git a/tests/e2e/bundles/00-create-namespace.yaml b/tests/e2e/bundles/00-create-namespace.yaml new file mode 100644 index 00000000..da799068 --- /dev/null +++ b/tests/e2e/bundles/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-bundles +spec: + finalizers: + - kubernetes \ No newline at end of file diff --git a/tests/e2e/bundles/01-create-resources.yaml b/tests/e2e/bundles/01-create-resources.yaml new file mode 100644 index 00000000..c6a468fd --- /dev/null +++ b/tests/e2e/bundles/01-create-resources.yaml @@ -0,0 +1,42 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-bundles-environment +spec: + generateNavJSON: false + ssl: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-bundles +spec: + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-bundles-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Bundle +metadata: + name: test-bundles-navigation +spec: + id: test + title: FEO Test Bundle + appList: + - chrome + envName: test-bundles-environment diff --git a/tests/e2e/bundles/02-assert.yaml b/tests/e2e/bundles/02-assert.yaml new file mode 100644 index 00000000..5d88434b --- /dev/null +++ b/tests/e2e/bundles/02-assert.yaml @@ -0,0 +1,36 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-frontend + namespace: test-bundles + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-bundles-environment + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated diff --git a/tests/e2e/bundles/03-delete.yaml b/tests/e2e/bundles/03-delete.yaml new file mode 100644 index 00000000..57b7b33e --- /dev/null +++ b/tests/e2e/bundles/03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-bundles-environment +- apiVersion: v1 + kind: Namespace + name: test-bundles \ No newline at end of file From 42d4e34deeb72bdb8830548ab2d9ae09d8821098 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Apr 2023 10:53:08 -0400 Subject: [PATCH 093/228] Add more test stuff --- tests/e2e/bundles/01-create-resources.yaml | 86 +++++++++++++++++++--- tests/e2e/bundles/02-assert.yaml | 26 +++++-- 2 files changed, 95 insertions(+), 17 deletions(-) diff --git a/tests/e2e/bundles/01-create-resources.yaml b/tests/e2e/bundles/01-create-resources.yaml index c6a468fd..65f76b9c 100644 --- a/tests/e2e/bundles/01-create-resources.yaml +++ b/tests/e2e/bundles/01-create-resources.yaml @@ -4,7 +4,7 @@ kind: FrontendEnvironment metadata: name: test-bundles-environment spec: - generateNavJSON: false + generateNavJSON: true ssl: false hostname: foo.redhat.com sso: https://sso.foo.redhat.com @@ -12,31 +12,95 @@ spec: apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend metadata: - name: chrome + name: edge namespace: test-bundles spec: + envName: test-bundles-environment + title: Edge + deploymentRepo: https://github.com/RedHatInsights/edge-frontend API: versions: - v1 frontend: paths: - - / - deploymentRepo: https://github.com/RedHatInsights/insights-chrome - envName: test-bundles-environment - image: quay.io/cloudservices/insights-chrome-frontend:720317c + - /apps/edge + image: "quay.io/cloudservices/edge-frontend:3244a17" + navItems: + - title: Inventory + expandable: true + routes: + - title: "Groups" + appId: "edge" + filterable: false + href: /edge/fleet-management + permissions: + - method: withEmail + args: + - "@redhat.com" + - "@sbb.ch" + - title: "Systems" + appId: "edge" + filterable: false + href: /edge/inventory + permissions: + - method: withEmail + args: + - "@redhat.com" + - "@sbb.ch" + permissions: + - method: withEmail + args: + - "@redhat.com" + - title: Manage Images + expandable: true + routes: + - title: "Images" + appId: "edge" + filterable: false + href: /edge/manage-images + permissions: + - method: withEmail + args: + - "@redhat.com" + - "@sbb.ch" + - title: "Custom Repositories" + appId: "edge" + filterable: false + href: /edge/repositories + permissions: + - method: withEmail + args: + - "@redhat.com" + - "@sbb.ch" + permissions: + - method: withEmail + args: + - "@redhat.com" + - "@sbb.ch" + - title: Learning Resources + href: /edge/learning-resources + permissions: + - method: withEmail + args: + - "@redhat.com" + - "@sbb.ch" module: - config: - ssoUrl: 'https://' - manifestLocation: /apps/chrome/js/fed-mods.json - title: Chrome + manifestLocation: /apps/edge/fed-mods.json + modules: + - id: edge + module: ./RootApp + routes: + - pathname: /edge + moduleID: edge --- apiVersion: cloud.redhat.com/v1alpha1 kind: Bundle metadata: name: test-bundles-navigation + namespace: test-bundles spec: id: test title: FEO Test Bundle appList: - - chrome + - edge envName: test-bundles-environment diff --git a/tests/e2e/bundles/02-assert.yaml b/tests/e2e/bundles/02-assert.yaml index 5d88434b..37d8247d 100644 --- a/tests/e2e/bundles/02-assert.yaml +++ b/tests/e2e/bundles/02-assert.yaml @@ -2,28 +2,28 @@ kind: Deployment apiVersion: apps/v1 metadata: - name: chrome-frontend + name: edge-frontend namespace: test-bundles labels: - frontend: chrome + frontend: edge ownerReferences: - apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend - name: chrome + name: edge spec: selector: matchLabels: - frontend: chrome + frontend: edge template: spec: volumes: - name: config configMap: - name: test-bundles-environment + name: test-bundles-environment defaultMode: 420 containers: - name: fe-image - image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + image: quay.io/cloudservices/edge-frontend:3244a17 ports: - name: web containerPort: 80 @@ -32,5 +32,19 @@ spec: containerPort: 9000 protocol: TCP volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/chrome - name: config mountPath: /opt/app-root/src/build/operator-generated +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Bundle +metadata: + name: test-bundles-navigation + namespace: test-bundles +spec: + appList: + - edge + envName: test-bundles-environment + id: test + title: FEO Test Bundle From 0037afb55739f9595b6bea8d2218e522e338ae0a Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Apr 2023 11:05:11 -0400 Subject: [PATCH 094/228] Assert bundles --- tests/e2e/bundles/02-assert.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/e2e/bundles/02-assert.yaml b/tests/e2e/bundles/02-assert.yaml index 37d8247d..e965f986 100644 --- a/tests/e2e/bundles/02-assert.yaml +++ b/tests/e2e/bundles/02-assert.yaml @@ -48,3 +48,24 @@ spec: envName: test-bundles-environment id: test title: FEO Test Bundle +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: test-bundles-environment + namespace: test-bundles + labels: + frontendenv: test-bundles-environment + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + name: test-bundles-environment +data: + fed-modules.json: >- + {"edge":{"manifestLocation":"/apps/edge/fed-mods.json","modules":[{"id":"edge","module":"./RootApp","routes":[{"pathname":"/edge"}]}],"moduleID":"edge","fullProfile":false}} + test-bundles-navigation.json: >- + {"id":"test","title":"FEO Test + Bundle","navItems":[{"title":"Inventory","permissions":[{"method":"withEmail","args":["@redhat.com"]}],"routes":[{"title":"Groups","appId":"edge","href":"/edge/fleet-management"},{"title":"Systems","appId":"edge","href":"/edge/inventory"}],"expandable":true},{"title":"Manage + Images","permissions":[{"method":"withEmail","args":["@redhat.com","@sbb.ch"]}],"routes":[{"title":"Images","appId":"edge","href":"/edge/manage-images"},{"title":"Custom + Repositories","appId":"edge","href":"/edge/repositories"}],"expandable":true},{"title":"Learning + Resources","href":"/edge/learning-resources","permissions":[{"method":"withEmail","args":["@redhat.com","@sbb.ch"]}]}]} + From 9cb37f82c073767cdd5548028dfb593e11619493 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Apr 2023 11:13:03 -0400 Subject: [PATCH 095/228] Getting more tests going --- tests/e2e/networking/00-create-namespace.yaml | 8 +++ tests/e2e/networking/01-create-resources.yaml | 31 +++++++++++ tests/e2e/networking/02-assert.yaml | 36 +++++++++++++ tests/e2e/networking/xx03-delete.yaml | 13 +++++ tests/e2e/whitelist/00-create-namespace.yaml | 8 +++ tests/e2e/whitelist/01-create-resources.yaml | 36 +++++++++++++ tests/e2e/whitelist/02-assert.yaml | 51 +++++++++++++++++++ tests/e2e/whitelist/03-delete.yaml | 13 +++++ 8 files changed, 196 insertions(+) create mode 100644 tests/e2e/networking/00-create-namespace.yaml create mode 100644 tests/e2e/networking/01-create-resources.yaml create mode 100644 tests/e2e/networking/02-assert.yaml create mode 100644 tests/e2e/networking/xx03-delete.yaml create mode 100644 tests/e2e/whitelist/00-create-namespace.yaml create mode 100644 tests/e2e/whitelist/01-create-resources.yaml create mode 100644 tests/e2e/whitelist/02-assert.yaml create mode 100644 tests/e2e/whitelist/03-delete.yaml diff --git a/tests/e2e/networking/00-create-namespace.yaml b/tests/e2e/networking/00-create-namespace.yaml new file mode 100644 index 00000000..71c97c45 --- /dev/null +++ b/tests/e2e/networking/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-networking +spec: + finalizers: + - kubernetes \ No newline at end of file diff --git a/tests/e2e/networking/01-create-resources.yaml b/tests/e2e/networking/01-create-resources.yaml new file mode 100644 index 00000000..381f627b --- /dev/null +++ b/tests/e2e/networking/01-create-resources.yaml @@ -0,0 +1,31 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-networking-environment +spec: + generateNavJSON: false + ssl: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-networking +spec: + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-networking-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome diff --git a/tests/e2e/networking/02-assert.yaml b/tests/e2e/networking/02-assert.yaml new file mode 100644 index 00000000..8379bed6 --- /dev/null +++ b/tests/e2e/networking/02-assert.yaml @@ -0,0 +1,36 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-frontend + namespace: test-networking + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-networking-environment + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated diff --git a/tests/e2e/networking/xx03-delete.yaml b/tests/e2e/networking/xx03-delete.yaml new file mode 100644 index 00000000..bdd1cd1b --- /dev/null +++ b/tests/e2e/networking/xx03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-networking-environment +- apiVersion: v1 + kind: Namespace + name: test-networking \ No newline at end of file diff --git a/tests/e2e/whitelist/00-create-namespace.yaml b/tests/e2e/whitelist/00-create-namespace.yaml new file mode 100644 index 00000000..af5b89af --- /dev/null +++ b/tests/e2e/whitelist/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-whitelist +spec: + finalizers: + - kubernetes \ No newline at end of file diff --git a/tests/e2e/whitelist/01-create-resources.yaml b/tests/e2e/whitelist/01-create-resources.yaml new file mode 100644 index 00000000..3e13f29b --- /dev/null +++ b/tests/e2e/whitelist/01-create-resources.yaml @@ -0,0 +1,36 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-whitelist-environment +spec: + whitelist: + - test1 + - test2 + - test3 + - test4 + generateNavJSON: false + ssl: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-whitelist +spec: + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-whitelist-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome diff --git a/tests/e2e/whitelist/02-assert.yaml b/tests/e2e/whitelist/02-assert.yaml new file mode 100644 index 00000000..9f9fb4bb --- /dev/null +++ b/tests/e2e/whitelist/02-assert.yaml @@ -0,0 +1,51 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-frontend + namespace: test-whitelist + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + selector: + matchLabels: + frontend: chrome + template: + spec: + volumes: + - name: config + configMap: + name: test-whitelist-environment + defaultMode: 420 + containers: + - name: fe-image + image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated +--- +kind: Ingress +apiVersion: networking.k8s.io/v1 +metadata: + name: chrome + namespace: test-whitelist + labels: + frontend: chrome + annotations: + haproxy.router.openshift.io/ip_whitelist: test1 test2 test3 test4 + nginx.ingress.kubernetes.io/whitelist-source-range: test1,test2,test3,test4 + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome diff --git a/tests/e2e/whitelist/03-delete.yaml b/tests/e2e/whitelist/03-delete.yaml new file mode 100644 index 00000000..597dd292 --- /dev/null +++ b/tests/e2e/whitelist/03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-whitelist-environment +- apiVersion: v1 + kind: Namespace + name: test-whitelist \ No newline at end of file From 129a57f94170daecb868e19ece9fc3bafbc4619c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Apr 2023 11:17:10 -0400 Subject: [PATCH 096/228] Networking tests --- tests/e2e/networking/02-assert.yaml | 97 ++++++++++++++----- .../{xx03-delete.yaml => 03-delete.yaml} | 0 2 files changed, 72 insertions(+), 25 deletions(-) rename tests/e2e/networking/{xx03-delete.yaml => 03-delete.yaml} (100%) diff --git a/tests/e2e/networking/02-assert.yaml b/tests/e2e/networking/02-assert.yaml index 8379bed6..4d9bf5ef 100644 --- a/tests/e2e/networking/02-assert.yaml +++ b/tests/e2e/networking/02-assert.yaml @@ -1,8 +1,8 @@ --- -kind: Deployment -apiVersion: apps/v1 +kind: Ingress +apiVersion: networking.k8s.io/v1 metadata: - name: chrome-frontend + name: chrome namespace: test-networking labels: frontend: chrome @@ -11,26 +11,73 @@ metadata: kind: Frontend name: chrome spec: + ingressClassName: nginx + tls: + - {} + rules: + - host: foo.redhat.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: chrome + port: + number: 8000 + - path: /apps/chrome + pathType: Prefix + backend: + service: + name: chrome + port: + number: 8000 + - path: /beta/apps/chrome + pathType: Prefix + backend: + service: + name: chrome + port: + number: 8000 + - path: /preview/apps/chrome + pathType: Prefix + backend: + service: + name: chrome + port: + number: 8000 +--- +kind: Service +apiVersion: v1 +metadata: + name: chrome + namespace: test-networking + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + ports: + - name: public + protocol: TCP + appProtocol: http + port: 8000 + targetPort: 8000 + - name: metrics + protocol: TCP + appProtocol: http + port: 9000 + targetPort: 9000 selector: - matchLabels: - frontend: chrome - template: - spec: - volumes: - - name: config - configMap: - name: test-networking-environment - defaultMode: 420 - containers: - - name: fe-image - image: 'quay.io/cloudservices/insights-chrome-frontend:720317c' - ports: - - name: web - containerPort: 80 - protocol: TCP - - name: metrics - containerPort: 9000 - protocol: TCP - volumeMounts: - - name: config - mountPath: /opt/app-root/src/build/operator-generated + frontend: chrome + type: ClusterIP + sessionAffinity: None + ipFamilies: + - IPv4 + ipFamilyPolicy: SingleStack + internalTrafficPolicy: Cluster +status: + loadBalancer: {} + diff --git a/tests/e2e/networking/xx03-delete.yaml b/tests/e2e/networking/03-delete.yaml similarity index 100% rename from tests/e2e/networking/xx03-delete.yaml rename to tests/e2e/networking/03-delete.yaml From f718028cdbb08511e8c229b7a1aa7438b44cf592 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Apr 2023 11:50:43 -0400 Subject: [PATCH 097/228] Volumes / Volume mounts test --- tests/e2e/storage/00-create-namespace.yaml | 8 +++++ tests/e2e/storage/01-create-resources.yaml | 31 ++++++++++++++++++ tests/e2e/storage/02-assert.yaml | 38 ++++++++++++++++++++++ tests/e2e/storage/03-delete.yaml | 13 ++++++++ 4 files changed, 90 insertions(+) create mode 100644 tests/e2e/storage/00-create-namespace.yaml create mode 100644 tests/e2e/storage/01-create-resources.yaml create mode 100644 tests/e2e/storage/02-assert.yaml create mode 100644 tests/e2e/storage/03-delete.yaml diff --git a/tests/e2e/storage/00-create-namespace.yaml b/tests/e2e/storage/00-create-namespace.yaml new file mode 100644 index 00000000..be858594 --- /dev/null +++ b/tests/e2e/storage/00-create-namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-storage +spec: + finalizers: + - kubernetes \ No newline at end of file diff --git a/tests/e2e/storage/01-create-resources.yaml b/tests/e2e/storage/01-create-resources.yaml new file mode 100644 index 00000000..048a7ff2 --- /dev/null +++ b/tests/e2e/storage/01-create-resources.yaml @@ -0,0 +1,31 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-storage-environment +spec: + generateNavJSON: false + ssl: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-storage +spec: + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-storage-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome diff --git a/tests/e2e/storage/02-assert.yaml b/tests/e2e/storage/02-assert.yaml new file mode 100644 index 00000000..cc6e8866 --- /dev/null +++ b/tests/e2e/storage/02-assert.yaml @@ -0,0 +1,38 @@ +--- +kind: Pod +apiVersion: v1 +metadata: + namespace: test-storage + labels: + frontend: chrome +spec: + volumes: + - name: config + configMap: + name: test-storage-environment + defaultMode: 420 + - projected: + defaultMode: 420 + containers: + - name: fe-image + image: quay.io/cloudservices/insights-chrome-frontend:720317c + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated + - mountPath: /var/run/secrets/kubernetes.io/serviceaccount +--- +kind: ConfigMap +apiVersion: v1 +metadata: + name: test-storage-environment + namespace: test-storage + labels: + frontendenv: test-storage-environment + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-storage-environment +data: + fed-modules.json: >- + {"chrome":{"manifestLocation":"/apps/chrome/js/fed-mods.json","config":{"ssoUrl":"https://sso.foo.redhat.com"},"fullProfile":false}} + diff --git a/tests/e2e/storage/03-delete.yaml b/tests/e2e/storage/03-delete.yaml new file mode 100644 index 00000000..104d1e1e --- /dev/null +++ b/tests/e2e/storage/03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-storage-environment +- apiVersion: v1 + kind: Namespace + name: test-storage \ No newline at end of file From bae35a720b036489c8bd81e053eff26189b3bdb3 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 13 Apr 2023 14:45:35 -0400 Subject: [PATCH 098/228] We have the feature and it is passing testsgit add -A! --- controllers/reconcile.go | 89 ++++++++-------- tests/e2e/cachebust/00-create-namespace.yaml | 20 ++++ tests/e2e/cachebust/01-create-resources.yaml | 55 ++++++++++ tests/e2e/cachebust/02-assert.yaml | 102 +++++++++++++++++++ tests/e2e/cachebust/xx03-delete.yaml | 13 +++ 5 files changed, 239 insertions(+), 40 deletions(-) create mode 100644 tests/e2e/cachebust/00-create-namespace.yaml create mode 100644 tests/e2e/cachebust/01-create-resources.yaml create mode 100644 tests/e2e/cachebust/02-assert.yaml create mode 100644 tests/e2e/cachebust/xx03-delete.yaml diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 4f2704ef..c9b7d710 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -133,9 +133,9 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir } // getAkamaiSecret gets the akamai secret from the cluster -func getAkamaiSecret(ctx context.Context, client client.Client, frontendEnvironment *crd.FrontendEnvironment) (*v1.Secret, error) { +func getAkamaiSecret(ctx context.Context, client client.Client, frontend *crd.Frontend) (*v1.Secret, error) { secret := &v1.Secret{} - err := client.Get(ctx, types.NamespacedName{Name: "akamai", Namespace: frontendEnvironment.Namespace}, secret) + err := client.Get(ctx, types.NamespacedName{Name: "akamai", Namespace: frontend.Namespace}, secret) if err != nil { return nil, err } @@ -145,30 +145,18 @@ func getAkamaiSecret(ctx context.Context, client client.Client, frontendEnvironm // constructAkamaiEdgercFileFromSecret constructs the akamai edgerc file from the secret func makeAkamaiEdgercFileFromSecret(secret *v1.Secret) string { edgercFile := "[default]\n" - edgercFile += fmt.Sprintf("host = %s\n", string(secret.Data["host"])) - edgercFile += fmt.Sprintf("access_token = %s\n", string(secret.Data["access_token"])) - edgercFile += fmt.Sprintf("client_token = %s\n", string(secret.Data["client_token"])) - edgercFile += fmt.Sprintf("client_secret = %s\n", string(secret.Data["client_secret"])) + edgercFile += fmt.Sprintf("host = %s\n", secret.Data["host"]) + edgercFile += fmt.Sprintf("access_token = %s\n", secret.Data["access_token"]) + edgercFile += fmt.Sprintf("client_token = %s\n", secret.Data["client_token"]) + edgercFile += fmt.Sprintf("client_secret = %s\n", secret.Data["client_secret"]) edgercFile += "[ccu]\n" - edgercFile += fmt.Sprintf("host = %s\n", string(secret.Data["host"])) - edgercFile += fmt.Sprintf("access_token = %s\n", string(secret.Data["access_token"])) - edgercFile += fmt.Sprintf("client_token = %s\n", string(secret.Data["client_token"])) - edgercFile += fmt.Sprintf("client_secret = %s\n", string(secret.Data["client_secret"])) + edgercFile += fmt.Sprintf("host = %s\n", secret.Data["host"]) + edgercFile += fmt.Sprintf("access_token = %s\n", secret.Data["access_token"]) + edgercFile += fmt.Sprintf("client_token = %s\n", secret.Data["client_token"]) + edgercFile += fmt.Sprintf("client_secret = %s\n", secret.Data["client_secret"]) return edgercFile } -// makeConfigMapFromAkamaiEdgercFile makes a configmap from the akamai edgerc file -func makeConfigMapFromAkamaiEdgercFile(edgercFile string) *v1.ConfigMap { - return &v1.ConfigMap{ - ObjectMeta: metav1.ObjectMeta{ - Name: "akamai-edgerc", - }, - Data: map[string]string{ - "edgerc": edgercFile, - }, - } -} - // getFilesToCacheBustForFrontend gets the files to cache bust for a frontend func getFilesToCacheBustForFrontend(frontend *crd.Frontend) []string { // Verify that the frontend has the akamai cache bust files @@ -188,23 +176,52 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front return nil } - d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) + //d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) // Get the akamai secret - secret, err := getAkamaiSecret(context.Background(), r.Client, frontendEnvironment) + secret, err := getAkamaiSecret(r.Ctx, r.Client, frontend) if err != nil { return err } // Make the akamai file from the secret edgercFile := makeAkamaiEdgercFileFromSecret(secret) - // Make the configmap from the akamai file - configMap := makeConfigMapFromAkamaiEdgercFile(edgercFile) - // Create the configmap - err = r.Client.Create(context.Background(), configMap) - if err != nil { + configMap := &v1.ConfigMap{} + nn := types.NamespacedName{ + Name: "akamai-edgerc", + Namespace: r.Frontend.Namespace, + } + if err := r.Cache.Create(CoreConfig, nn, configMap); err != nil { return err } + labels := r.FrontendEnvironment.GetLabels() + labler := utils.GetCustomLabeler(labels, nn, r.FrontendEnvironment) + labler(configMap) + + configMap.SetOwnerReferences([]metav1.OwnerReference{r.FrontendEnvironment.MakeOwnerReference()}) + + // Add the akamai edgerc file to the configmap + configMap.Data = map[string]string{ + "edgerc": edgercFile, + } + + if err := r.Cache.Update(CoreConfig, configMap); err != nil { + return err + } + + akamaiVolume := v1.Volume{ + Name: "akamai-edgerc", + VolumeSource: v1.VolumeSource{ + ConfigMap: &v1.ConfigMapVolumeSource{ + LocalObjectReference: v1.LocalObjectReference{ + Name: "akamai-edgerc", + }, + }, + }, + } + + d.Spec.Template.Spec.Volumes = append(d.Spec.Template.Spec.Volumes, akamaiVolume) + // Get the files to cache bust filesToCacheBust := getFilesToCacheBustForFrontend(frontend) @@ -228,17 +245,9 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front }, } // Add the akamai edgerc configmap to the deployment - d.Spec.Template.Spec.Volumes = []v1.Volume{{ - Name: "akamai-edgerc", - VolumeSource: v1.VolumeSource{ - ConfigMap: &v1.ConfigMapVolumeSource{ - LocalObjectReference: v1.LocalObjectReference{ - Name: "akamai-edgerc", - }, - }, - }, - }, - } + + //d.Spec.Template.Spec.Volumes + return nil } diff --git a/tests/e2e/cachebust/00-create-namespace.yaml b/tests/e2e/cachebust/00-create-namespace.yaml new file mode 100644 index 00000000..2c2e0af8 --- /dev/null +++ b/tests/e2e/cachebust/00-create-namespace.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: test-cachebust +spec: + finalizers: + - kubernetes +--- +kind: Secret +apiVersion: v1 +metadata: + name: akamai + namespace: test-cachebust +data: + access_token: "YWNjZXNzX3Rva2Vu" + client_secret: "Y2xpZW50X3NlY3JldA==" + client_token: "Y2xpZW50X3Rva2Vu" + host: "aG9zdA==" +type: Opaque diff --git a/tests/e2e/cachebust/01-create-resources.yaml b/tests/e2e/cachebust/01-create-resources.yaml new file mode 100644 index 00000000..0d3e9d24 --- /dev/null +++ b/tests/e2e/cachebust/01-create-resources.yaml @@ -0,0 +1,55 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-cachebust-environment +spec: + generateNavJSON: false + ssl: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com + enableAkamaiCacheBust: true + akamaiCacheBustImage: "quay.io/rh_ee_addrew/hi_true_bye:add_alias" +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome + namespace: test-cachebust +spec: + API: + versions: + - v1 + frontend: + paths: + - / + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-cachebust-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome-two + namespace: test-cachebust +spec: + akamaiCacheBustDisable: true + API: + versions: + - v1 + frontend: + paths: + - /chrome2 + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-cachebust-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome \ No newline at end of file diff --git a/tests/e2e/cachebust/02-assert.yaml b/tests/e2e/cachebust/02-assert.yaml new file mode 100644 index 00000000..f54df28d --- /dev/null +++ b/tests/e2e/cachebust/02-assert.yaml @@ -0,0 +1,102 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-frontend + namespace: test-cachebust + labels: + frontend: chrome + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +spec: + selector: + matchLabels: + frontend: chrome + template: + metadata: + labels: + frontend: chrome + spec: + volumes: + - name: config + configMap: + name: test-cachebust-environment + defaultMode: 420 + - name: akamai-edgerc + configMap: + name: akamai-edgerc + defaultMode: 420 + initContainers: + - name: akamai-cache-bust + image: quay.io/rh_ee_addrew/hi_true_bye:add_alias + command: + - /bin/bash + - '-c' + - >- + /cli/.akamai-cli/src/cli-purge/bin/akamai-purge cache --edgerc + invalidate /fed-mods.json + resources: {} + volumeMounts: + - name: akamai-edgerc + mountPath: /root/.edgerc + subPath: edgerc + containers: + - name: fe-image + image: quay.io/cloudservices/insights-chrome-frontend:720317c + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + resources: {} + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: IfNotPresent +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-two-frontend + namespace: test-cachebust + labels: + frontend: chrome-two + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-two +spec: + replicas: 1 + selector: + matchLabels: + frontend: chrome-two + template: + metadata: + labels: + frontend: chrome-two + spec: + volumes: + - name: config + configMap: + name: test-cachebust-environment + defaultMode: 420 + containers: + - name: fe-image + image: quay.io/cloudservices/insights-chrome-frontend:720317c + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + resources: {} + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated + diff --git a/tests/e2e/cachebust/xx03-delete.yaml b/tests/e2e/cachebust/xx03-delete.yaml new file mode 100644 index 00000000..0b750deb --- /dev/null +++ b/tests/e2e/cachebust/xx03-delete.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +delete: +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: FrontendEnvironment + name: test-cachebust-environment +- apiVersion: v1 + kind: Namespace + name: test-cachebust \ No newline at end of file From 3ae84bf5c515d87a2722105368e3533ce2fbf8b6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 13 Apr 2023 14:48:58 -0400 Subject: [PATCH 099/228] Forgot to put delete step back --- tests/e2e/cachebust/{xx03-delete.yaml => 03-delete.yaml} | 3 +++ 1 file changed, 3 insertions(+) rename tests/e2e/cachebust/{xx03-delete.yaml => 03-delete.yaml} (79%) diff --git a/tests/e2e/cachebust/xx03-delete.yaml b/tests/e2e/cachebust/03-delete.yaml similarity index 79% rename from tests/e2e/cachebust/xx03-delete.yaml rename to tests/e2e/cachebust/03-delete.yaml index 0b750deb..8c16a1dc 100644 --- a/tests/e2e/cachebust/xx03-delete.yaml +++ b/tests/e2e/cachebust/03-delete.yaml @@ -5,6 +5,9 @@ delete: - apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend name: chrome +- apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-two - apiVersion: cloud.redhat.com/v1alpha1 kind: FrontendEnvironment name: test-cachebust-environment From d9bf1ed61788f5417566869aab7d4434b3182d0e Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 13 Apr 2023 15:03:14 -0400 Subject: [PATCH 100/228] Make linter happy --- controllers/reconcile.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index c9b7d710..386f5994 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -176,7 +176,6 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front return nil } - //d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) // Get the akamai secret secret, err := getAkamaiSecret(r.Ctx, r.Client, frontend) if err != nil { @@ -246,8 +245,6 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front } // Add the akamai edgerc configmap to the deployment - //d.Spec.Template.Spec.Volumes - return nil } From 745a00030842a58f37ad20ea7a0e1fdcd00cb94d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 14 Apr 2023 11:01:07 -0400 Subject: [PATCH 101/228] Improved paths. Fix edgerc mount. Fixed defaults. Better tests --- api/v1alpha1/frontendenvironment_types.go | 2 + ...cloud.redhat.com_frontendenvironments.yaml | 4 + controllers/reconcile.go | 48 +++++++--- deploy.yml | 4 + .../modules/ROOT/pages/api_reference.adoc | 1 + kuttl-config.yml | 2 +- tests/e2e/cachebust/01-create-resources.yaml | 29 +++++- tests/e2e/cachebust/02-assert.yaml | 88 ++++++++++++++++--- 8 files changed, 150 insertions(+), 28 deletions(-) diff --git a/api/v1alpha1/frontendenvironment_types.go b/api/v1alpha1/frontendenvironment_types.go index 72b0b1e1..223eecda 100644 --- a/api/v1alpha1/frontendenvironment_types.go +++ b/api/v1alpha1/frontendenvironment_types.go @@ -58,6 +58,8 @@ type FrontendEnvironmentSpec struct { EnableAkamaiCacheBust bool `json:"enableAkamaiCacheBust,omitempty"` // Set Akamai Cache Bust Image AkamaiCacheBustImage string `json:"akamaiCacheBustImage,omitempty"` + // Set Akamai Cache Bust URL that the files will hang off of + AkamaiCacheBustURL string `json:"akamaiCacheBustURL,omitempty"` } type MonitoringConfig struct { diff --git a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml index 43061faa..d9685a0a 100644 --- a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml +++ b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml @@ -48,6 +48,10 @@ spec: akamaiCacheBustImage: description: Set Akamai Cache Bust Image type: string + akamaiCacheBustURL: + description: Set Akamai Cache Bust URL that the files will hang off + of + type: string enableAkamaiCacheBust: description: Enable Akamai Cache Bust type: boolean diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 386f5994..e27fa234 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -157,16 +157,40 @@ func makeAkamaiEdgercFileFromSecret(secret *v1.Secret) string { return edgercFile } -// getFilesToCacheBustForFrontend gets the files to cache bust for a frontend -func getFilesToCacheBustForFrontend(frontend *crd.Frontend) []string { - // Verify that the frontend has the akamai cache bust files - filesToCacheBust := []string{"/fed-mods.json"} +func createCachePurgePathList(frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) []string { + var purgeHost string + // If the cache bust URL doesn't begin with https:// then add it + if strings.HasPrefix(frontendEnvironment.Spec.AkamaiCacheBustURL, "https://") { + purgeHost = frontendEnvironment.Spec.AkamaiCacheBustURL + } else { + purgeHost = fmt.Sprintf("https://%s", frontendEnvironment.Spec.AkamaiCacheBustURL) + } + + // If purgeHost ends with a / then remove it + purgeHost = strings.TrimSuffix(purgeHost, "/") + + frontendName := frontend.Name + purgePaths := []string{} + + // If there is no purge list return the default if frontend.Spec.AkamaiCacheBustPaths == nil { - // None there so set the default - return filesToCacheBust + defaultPurgePath := fmt.Sprintf("%s/apps/%s/fed-mods.json", purgeHost, frontendName) + purgePaths = append(purgePaths, defaultPurgePath) + return purgePaths + } + + // Loop through the frontend purge paths and append them to the purge host + for _, path := range frontend.Spec.AkamaiCacheBustPaths { + var purgePath string + // If the path doesn't begin with a / then add it + if strings.HasPrefix(path, "/") { + purgePath = fmt.Sprintf("%s%s", purgeHost, path) + } else { + purgePath = fmt.Sprintf("%s/%s", purgeHost, path) + } + purgePaths = append(purgePaths, purgePath) } - filesToCacheBust = append(filesToCacheBust, frontend.Spec.AkamaiCacheBustPaths...) - return filesToCacheBust + return purgePaths } // populateInitContainer adds the akamai cache bust init container to the deployment @@ -221,11 +245,11 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front d.Spec.Template.Spec.Volumes = append(d.Spec.Template.Spec.Volumes, akamaiVolume) - // Get the files to cache bust - filesToCacheBust := getFilesToCacheBustForFrontend(frontend) + // Get the paths to cache bust + pathsToCacheBust := createCachePurgePathList(frontend, frontendEnvironment) // Construct the akamai cache bust command - command := fmt.Sprintf("/cli/.akamai-cli/src/cli-purge/bin/akamai-purge cache --edgerc invalidate %s", strings.Join(filesToCacheBust, " ")) + command := fmt.Sprintf("/cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc invalidate %s", strings.Join(pathsToCacheBust, " ")) // Modify the obejct to set the things we care about d.Spec.Template.Spec.InitContainers = []v1.Container{{ @@ -235,7 +259,7 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front VolumeMounts: []v1.VolumeMount{ { Name: "akamai-edgerc", - MountPath: "/root/.edgerc", + MountPath: "/opt/app-root/", SubPath: "edgerc", }, }, diff --git a/deploy.yml b/deploy.yml index 258e3c4d..05b8c6a7 100644 --- a/deploy.yml +++ b/deploy.yml @@ -349,6 +349,10 @@ objects: akamaiCacheBustImage: description: Set Akamai Cache Bust Image type: string + akamaiCacheBustURL: + description: Set Akamai Cache Bust URL that the files will hang + off of + type: string enableAkamaiCacheBust: description: Enable Akamai Cache Bust type: boolean diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index bc9c9672..4cf5e0b7 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -316,6 +316,7 @@ FrontendEnvironmentSpec defines the desired state of FrontendEnvironment | *`generateNavJSON`* __boolean__ | GenerateNavJSON determines if the nav json configmap parts should be generated for the bundles. We want to do do this in epehemeral environments but not in production | *`enableAkamaiCacheBust`* __boolean__ | Enable Akamai Cache Bust | *`akamaiCacheBustImage`* __string__ | Set Akamai Cache Bust Image +| *`akamaiCacheBustURL`* __string__ | Set Akamai Cache Bust URL that the files will hang off of |=== diff --git a/kuttl-config.yml b/kuttl-config.yml index b4350f00..14c445c2 100644 --- a/kuttl-config.yml +++ b/kuttl-config.yml @@ -3,5 +3,5 @@ kind: TestSuite startKIND: false testDirs: - tests/e2e/ -timeout: 600 +timeout: 60 parallel: 1 diff --git a/tests/e2e/cachebust/01-create-resources.yaml b/tests/e2e/cachebust/01-create-resources.yaml index 0d3e9d24..bf408d4a 100644 --- a/tests/e2e/cachebust/01-create-resources.yaml +++ b/tests/e2e/cachebust/01-create-resources.yaml @@ -10,11 +10,12 @@ spec: sso: https://sso.foo.redhat.com enableAkamaiCacheBust: true akamaiCacheBustImage: "quay.io/rh_ee_addrew/hi_true_bye:add_alias" + akamaiCacheBustURL: "console.doesntexist.redhat.com" --- apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend metadata: - name: chrome + name: chrome-test-filelist namespace: test-cachebust spec: API: @@ -23,6 +24,9 @@ spec: frontend: paths: - / + akamaiCacheBustPaths: + - /config/chrome/fed-modules.json + - apps/chrome/index.html deploymentRepo: https://github.com/RedHatInsights/insights-chrome envName: test-cachebust-environment image: quay.io/cloudservices/insights-chrome-frontend:720317c @@ -35,7 +39,28 @@ spec: apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend metadata: - name: chrome-two + name: chrome-test-defaults + namespace: test-cachebust +spec: + API: + versions: + - v1 + frontend: + paths: + - /chrome/defaults + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-cachebust-environment + image: quay.io/cloudservices/insights-chrome-frontend:720317c + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome-test-optout namespace: test-cachebust spec: akamaiCacheBustDisable: true diff --git a/tests/e2e/cachebust/02-assert.yaml b/tests/e2e/cachebust/02-assert.yaml index f54df28d..dd5de6ce 100644 --- a/tests/e2e/cachebust/02-assert.yaml +++ b/tests/e2e/cachebust/02-assert.yaml @@ -1,22 +1,22 @@ kind: Deployment apiVersion: apps/v1 metadata: - name: chrome-frontend + name: chrome-test-filelist-frontend namespace: test-cachebust labels: - frontend: chrome + frontend: chrome-test-filelist ownerReferences: - apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend - name: chrome + name: chrome-test-filelist spec: selector: matchLabels: - frontend: chrome + frontend: chrome-test-filelist template: metadata: labels: - frontend: chrome + frontend: chrome-test-filelist spec: volumes: - name: config @@ -34,12 +34,13 @@ spec: - /bin/bash - '-c' - >- - /cli/.akamai-cli/src/cli-purge/bin/akamai-purge cache --edgerc - invalidate /fed-mods.json + /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc + invalidate https://console.doesntexist.redhat.com/config/chrome/fed-modules.json + https://console.doesntexist.redhat.com/apps/chrome/index.html resources: {} volumeMounts: - name: akamai-edgerc - mountPath: /root/.edgerc + mountPath: /opt/app-root/ subPath: edgerc containers: - name: fe-image @@ -62,23 +63,84 @@ spec: kind: Deployment apiVersion: apps/v1 metadata: - name: chrome-two-frontend + name: chrome-test-defaults-frontend namespace: test-cachebust labels: - frontend: chrome-two + frontend: chrome-test-defaults ownerReferences: - apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend - name: chrome-two + name: chrome-test-defaults +spec: + selector: + matchLabels: + frontend: chrome-test-defaults + template: + metadata: + labels: + frontend: chrome-test-defaults + spec: + volumes: + - name: config + configMap: + name: test-cachebust-environment + defaultMode: 420 + - name: akamai-edgerc + configMap: + name: akamai-edgerc + defaultMode: 420 + initContainers: + - name: akamai-cache-bust + image: quay.io/rh_ee_addrew/hi_true_bye:add_alias + command: + - /bin/bash + - '-c' + - >- + /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc + invalidate https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json + resources: {} + volumeMounts: + - name: akamai-edgerc + mountPath: /opt/app-root/ + subPath: edgerc + containers: + - name: fe-image + image: quay.io/cloudservices/insights-chrome-frontend:720317c + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + resources: {} + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: IfNotPresent +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-test-optout-frontend + namespace: test-cachebust + labels: + frontend: chrome-test-optout + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-test-optout spec: replicas: 1 selector: matchLabels: - frontend: chrome-two + frontend: chrome-test-optout template: metadata: labels: - frontend: chrome-two + frontend: chrome-test-optout spec: volumes: - name: config From fcf18c5766229e375bfbc04fc0677167616b8c78 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 19 Apr 2023 13:14:33 -0400 Subject: [PATCH 102/228] Improve the ssl test a little --- kuttl-config.yml | 2 +- tests/e2e/ssl/03-delete.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kuttl-config.yml b/kuttl-config.yml index 14c445c2..45d76c5c 100644 --- a/kuttl-config.yml +++ b/kuttl-config.yml @@ -3,5 +3,5 @@ kind: TestSuite startKIND: false testDirs: - tests/e2e/ -timeout: 60 +timeout: 320 parallel: 1 diff --git a/tests/e2e/ssl/03-delete.yaml b/tests/e2e/ssl/03-delete.yaml index 7e2acb35..9b838f81 100644 --- a/tests/e2e/ssl/03-delete.yaml +++ b/tests/e2e/ssl/03-delete.yaml @@ -8,6 +8,9 @@ delete: - apiVersion: cloud.redhat.com/v1alpha1 kind: FrontendEnvironment name: test-ssl-environment +- apiVersion: v1 + kind: Secret + name: chrome-certs - apiVersion: v1 kind: Namespace name: test-ssl \ No newline at end of file From 8d22eae2a24f0c1ebb6f22eb12dda1e992982d4a Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 19 Apr 2023 13:14:43 -0400 Subject: [PATCH 103/228] Make the akamai secret configurable --- api/v1alpha1/frontendenvironment_types.go | 2 ++ ...cloud.redhat.com_frontendenvironments.yaml | 4 ++++ controllers/reconcile.go | 19 +++++++++++++++---- deploy.yml | 4 ++++ .../modules/ROOT/pages/api_reference.adoc | 1 + 5 files changed, 26 insertions(+), 4 deletions(-) diff --git a/api/v1alpha1/frontendenvironment_types.go b/api/v1alpha1/frontendenvironment_types.go index 223eecda..8a3429db 100644 --- a/api/v1alpha1/frontendenvironment_types.go +++ b/api/v1alpha1/frontendenvironment_types.go @@ -60,6 +60,8 @@ type FrontendEnvironmentSpec struct { AkamaiCacheBustImage string `json:"akamaiCacheBustImage,omitempty"` // Set Akamai Cache Bust URL that the files will hang off of AkamaiCacheBustURL string `json:"akamaiCacheBustURL,omitempty"` + // The name of the secret we will use to get the akamai credentials + AkamaiSecretName string `json:"akamaiSecretName,omitempty"` } type MonitoringConfig struct { diff --git a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml index d9685a0a..21b666f7 100644 --- a/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml +++ b/config/crd/bases/cloud.redhat.com_frontendenvironments.yaml @@ -52,6 +52,10 @@ spec: description: Set Akamai Cache Bust URL that the files will hang off of type: string + akamaiSecretName: + description: The name of the secret we will use to get the akamai + credentials + type: string enableAkamaiCacheBust: description: Enable Akamai Cache Bust type: boolean diff --git a/controllers/reconcile.go b/controllers/reconcile.go index e27fa234..b015f3c2 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -27,7 +27,10 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) -const RoutePrefixDefault = "apps" +const ( + RoutePrefixDefault = "apps" + AkamaiSecretNameDefault = "akamai" +) type FrontendReconciliation struct { Log logr.Logger @@ -132,10 +135,17 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir } } +func getAkamaiSecretName(frontendEnvironment *crd.FrontendEnvironment) string { + if frontendEnvironment.Spec.AkamaiSecretName == "" { + return AkamaiSecretNameDefault + } + return frontendEnvironment.Spec.AkamaiSecretName +} + // getAkamaiSecret gets the akamai secret from the cluster -func getAkamaiSecret(ctx context.Context, client client.Client, frontend *crd.Frontend) (*v1.Secret, error) { +func getAkamaiSecret(ctx context.Context, client client.Client, frontend *crd.Frontend, secretName string) (*v1.Secret, error) { secret := &v1.Secret{} - err := client.Get(ctx, types.NamespacedName{Name: "akamai", Namespace: frontend.Namespace}, secret) + err := client.Get(ctx, types.NamespacedName{Name: secretName, Namespace: frontend.Namespace}, secret) if err != nil { return nil, err } @@ -201,7 +211,8 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front } // Get the akamai secret - secret, err := getAkamaiSecret(r.Ctx, r.Client, frontend) + akamaiSecretName := getAkamaiSecretName(frontendEnvironment) + secret, err := getAkamaiSecret(r.Ctx, r.Client, frontend, akamaiSecretName) if err != nil { return err } diff --git a/deploy.yml b/deploy.yml index 05b8c6a7..e1e8cbb8 100644 --- a/deploy.yml +++ b/deploy.yml @@ -353,6 +353,10 @@ objects: description: Set Akamai Cache Bust URL that the files will hang off of type: string + akamaiSecretName: + description: The name of the secret we will use to get the akamai + credentials + type: string enableAkamaiCacheBust: description: Enable Akamai Cache Bust type: boolean diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index 4cf5e0b7..ebbf8551 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -317,6 +317,7 @@ FrontendEnvironmentSpec defines the desired state of FrontendEnvironment | *`enableAkamaiCacheBust`* __boolean__ | Enable Akamai Cache Bust | *`akamaiCacheBustImage`* __string__ | Set Akamai Cache Bust Image | *`akamaiCacheBustURL`* __string__ | Set Akamai Cache Bust URL that the files will hang off of +| *`akamaiSecretName`* __string__ | The name of the secret we will use to get the akamai credentials |=== From 7996f556e9cab7b909fcc546f1b07ddeef1cb2d8 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 19 Apr 2023 13:27:29 -0400 Subject: [PATCH 104/228] Recast if --- controllers/reconcile.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index b015f3c2..2dfe1360 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -145,8 +145,7 @@ func getAkamaiSecretName(frontendEnvironment *crd.FrontendEnvironment) string { // getAkamaiSecret gets the akamai secret from the cluster func getAkamaiSecret(ctx context.Context, client client.Client, frontend *crd.Frontend, secretName string) (*v1.Secret, error) { secret := &v1.Secret{} - err := client.Get(ctx, types.NamespacedName{Name: secretName, Namespace: frontend.Namespace}, secret) - if err != nil { + if err := client.Get(ctx, types.NamespacedName{Name: secretName, Namespace: frontend.Namespace}, secret); err != nil { return nil, err } return secret, nil From 005469cc2c6135ced4386cfc3d8bd2695ec7d3fa Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 19 Apr 2023 13:46:18 -0400 Subject: [PATCH 105/228] Remove single use var --- controllers/reconcile.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 2dfe1360..5f729dbb 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -178,12 +178,11 @@ func createCachePurgePathList(frontend *crd.Frontend, frontendEnvironment *crd.F // If purgeHost ends with a / then remove it purgeHost = strings.TrimSuffix(purgeHost, "/") - frontendName := frontend.Name purgePaths := []string{} // If there is no purge list return the default if frontend.Spec.AkamaiCacheBustPaths == nil { - defaultPurgePath := fmt.Sprintf("%s/apps/%s/fed-mods.json", purgeHost, frontendName) + defaultPurgePath := fmt.Sprintf("%s/apps/%s/fed-mods.json", purgeHost, frontend.Name) purgePaths = append(purgePaths, defaultPurgePath) return purgePaths } From b891c4e8959a2c78d978147dd3cfefb90ab723d4 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 19 Apr 2023 13:58:04 -0400 Subject: [PATCH 106/228] Make default purge paths a little cleaner --- controllers/reconcile.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 5f729dbb..5a34108c 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -178,15 +178,12 @@ func createCachePurgePathList(frontend *crd.Frontend, frontendEnvironment *crd.F // If purgeHost ends with a / then remove it purgeHost = strings.TrimSuffix(purgeHost, "/") - purgePaths := []string{} - // If there is no purge list return the default if frontend.Spec.AkamaiCacheBustPaths == nil { - defaultPurgePath := fmt.Sprintf("%s/apps/%s/fed-mods.json", purgeHost, frontend.Name) - purgePaths = append(purgePaths, defaultPurgePath) - return purgePaths + return []string{fmt.Sprintf("%s/apps/%s/fed-mods.json", purgeHost, frontend.Name)} } + purgePaths := []string{} // Loop through the frontend purge paths and append them to the purge host for _, path := range frontend.Spec.AkamaiCacheBustPaths { var purgePath string From e2b35ec63ece4cc730a112e8ef4bf8d579130231 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 19 Apr 2023 14:10:52 -0400 Subject: [PATCH 107/228] Add whitespace at EOF in all YAML --- tests/e2e/basic-frontend/00-create-namespace.yaml | 2 +- tests/e2e/basic-frontend/01-create-resources.yaml | 1 + tests/e2e/basic-frontend/02-assert.yaml | 1 + tests/e2e/basic-frontend/03-delete.yaml | 2 +- tests/e2e/bundles/00-create-namespace.yaml | 2 +- tests/e2e/bundles/01-create-resources.yaml | 1 + tests/e2e/bundles/02-assert.yaml | 1 + tests/e2e/bundles/03-delete.yaml | 2 +- tests/e2e/cachebust/00-create-namespace.yaml | 1 + tests/e2e/cachebust/01-create-resources.yaml | 2 +- tests/e2e/cachebust/03-delete.yaml | 2 +- tests/e2e/frontend-paths/00-create-namespace.yaml | 2 +- tests/e2e/frontend-paths/01-create-resources.yaml | 1 + tests/e2e/frontend-paths/02-assert.yaml | 1 + tests/e2e/frontend-paths/03-delete.yaml | 1 + tests/e2e/generate-nav-json/00-create-namespace.yaml | 2 +- tests/e2e/generate-nav-json/01-create-resources.yaml | 1 + tests/e2e/generate-nav-json/02-assert.yaml | 1 + tests/e2e/generate-nav-json/03-delete.yaml | 2 +- tests/e2e/networking/00-create-namespace.yaml | 2 +- tests/e2e/networking/01-create-resources.yaml | 1 + tests/e2e/networking/02-assert.yaml | 1 + tests/e2e/networking/03-delete.yaml | 2 +- tests/e2e/ssl/00-create-namespace.yaml | 2 +- tests/e2e/ssl/01-create-resources.yaml | 1 + tests/e2e/ssl/02-assert.yaml | 2 +- tests/e2e/ssl/03-delete.yaml | 2 +- tests/e2e/storage/00-create-namespace.yaml | 2 +- tests/e2e/storage/01-create-resources.yaml | 1 + tests/e2e/storage/02-assert.yaml | 1 + tests/e2e/storage/03-delete.yaml | 2 +- tests/e2e/whitelist/00-create-namespace.yaml | 2 +- tests/e2e/whitelist/01-create-resources.yaml | 1 + tests/e2e/whitelist/02-assert.yaml | 1 + tests/e2e/whitelist/03-delete.yaml | 2 +- 35 files changed, 35 insertions(+), 18 deletions(-) diff --git a/tests/e2e/basic-frontend/00-create-namespace.yaml b/tests/e2e/basic-frontend/00-create-namespace.yaml index 6839982a..b421aee2 100644 --- a/tests/e2e/basic-frontend/00-create-namespace.yaml +++ b/tests/e2e/basic-frontend/00-create-namespace.yaml @@ -5,4 +5,4 @@ metadata: name: test-basic-app spec: finalizers: - - kubernetes \ No newline at end of file + - kubernetes diff --git a/tests/e2e/basic-frontend/01-create-resources.yaml b/tests/e2e/basic-frontend/01-create-resources.yaml index ab8f78ab..c31934d9 100644 --- a/tests/e2e/basic-frontend/01-create-resources.yaml +++ b/tests/e2e/basic-frontend/01-create-resources.yaml @@ -29,3 +29,4 @@ spec: ssoUrl: 'https://' manifestLocation: /apps/chrome/js/fed-mods.json title: Chrome + diff --git a/tests/e2e/basic-frontend/02-assert.yaml b/tests/e2e/basic-frontend/02-assert.yaml index c22814ae..5e3dd90f 100644 --- a/tests/e2e/basic-frontend/02-assert.yaml +++ b/tests/e2e/basic-frontend/02-assert.yaml @@ -34,3 +34,4 @@ spec: volumeMounts: - name: config mountPath: /opt/app-root/src/build/operator-generated + diff --git a/tests/e2e/basic-frontend/03-delete.yaml b/tests/e2e/basic-frontend/03-delete.yaml index 9611f5b2..02f46fa6 100644 --- a/tests/e2e/basic-frontend/03-delete.yaml +++ b/tests/e2e/basic-frontend/03-delete.yaml @@ -10,4 +10,4 @@ delete: name: test-basic-app-environment - apiVersion: v1 kind: Namespace - name: test-basic-app \ No newline at end of file + name: test-basic-app diff --git a/tests/e2e/bundles/00-create-namespace.yaml b/tests/e2e/bundles/00-create-namespace.yaml index da799068..80258881 100644 --- a/tests/e2e/bundles/00-create-namespace.yaml +++ b/tests/e2e/bundles/00-create-namespace.yaml @@ -5,4 +5,4 @@ metadata: name: test-bundles spec: finalizers: - - kubernetes \ No newline at end of file + - kubernetes diff --git a/tests/e2e/bundles/01-create-resources.yaml b/tests/e2e/bundles/01-create-resources.yaml index 65f76b9c..dbeacd20 100644 --- a/tests/e2e/bundles/01-create-resources.yaml +++ b/tests/e2e/bundles/01-create-resources.yaml @@ -104,3 +104,4 @@ spec: appList: - edge envName: test-bundles-environment + diff --git a/tests/e2e/bundles/02-assert.yaml b/tests/e2e/bundles/02-assert.yaml index e965f986..b7584572 100644 --- a/tests/e2e/bundles/02-assert.yaml +++ b/tests/e2e/bundles/02-assert.yaml @@ -69,3 +69,4 @@ data: Repositories","appId":"edge","href":"/edge/repositories"}],"expandable":true},{"title":"Learning Resources","href":"/edge/learning-resources","permissions":[{"method":"withEmail","args":["@redhat.com","@sbb.ch"]}]}]} + diff --git a/tests/e2e/bundles/03-delete.yaml b/tests/e2e/bundles/03-delete.yaml index 57b7b33e..902384c7 100644 --- a/tests/e2e/bundles/03-delete.yaml +++ b/tests/e2e/bundles/03-delete.yaml @@ -10,4 +10,4 @@ delete: name: test-bundles-environment - apiVersion: v1 kind: Namespace - name: test-bundles \ No newline at end of file + name: test-bundles diff --git a/tests/e2e/cachebust/00-create-namespace.yaml b/tests/e2e/cachebust/00-create-namespace.yaml index 2c2e0af8..b1fbeeb2 100644 --- a/tests/e2e/cachebust/00-create-namespace.yaml +++ b/tests/e2e/cachebust/00-create-namespace.yaml @@ -18,3 +18,4 @@ data: client_token: "Y2xpZW50X3Rva2Vu" host: "aG9zdA==" type: Opaque + diff --git a/tests/e2e/cachebust/01-create-resources.yaml b/tests/e2e/cachebust/01-create-resources.yaml index bf408d4a..45becf03 100644 --- a/tests/e2e/cachebust/01-create-resources.yaml +++ b/tests/e2e/cachebust/01-create-resources.yaml @@ -77,4 +77,4 @@ spec: config: ssoUrl: 'https://' manifestLocation: /apps/chrome/js/fed-mods.json - title: Chrome \ No newline at end of file + title: Chrome diff --git a/tests/e2e/cachebust/03-delete.yaml b/tests/e2e/cachebust/03-delete.yaml index 8c16a1dc..352b8145 100644 --- a/tests/e2e/cachebust/03-delete.yaml +++ b/tests/e2e/cachebust/03-delete.yaml @@ -13,4 +13,4 @@ delete: name: test-cachebust-environment - apiVersion: v1 kind: Namespace - name: test-cachebust \ No newline at end of file + name: test-cachebust diff --git a/tests/e2e/frontend-paths/00-create-namespace.yaml b/tests/e2e/frontend-paths/00-create-namespace.yaml index 2d4a4317..de6cebd5 100644 --- a/tests/e2e/frontend-paths/00-create-namespace.yaml +++ b/tests/e2e/frontend-paths/00-create-namespace.yaml @@ -5,4 +5,4 @@ metadata: name: test-basic-frontend spec: finalizers: - - kubernetes \ No newline at end of file + - kubernetes diff --git a/tests/e2e/frontend-paths/01-create-resources.yaml b/tests/e2e/frontend-paths/01-create-resources.yaml index cdefd32c..a1ed3371 100644 --- a/tests/e2e/frontend-paths/01-create-resources.yaml +++ b/tests/e2e/frontend-paths/01-create-resources.yaml @@ -30,3 +30,4 @@ spec: ssoUrl: 'https://' manifestLocation: /apps/chrome/js/fed-mods.json title: Chrome + diff --git a/tests/e2e/frontend-paths/02-assert.yaml b/tests/e2e/frontend-paths/02-assert.yaml index c77e8232..d755beaf 100644 --- a/tests/e2e/frontend-paths/02-assert.yaml +++ b/tests/e2e/frontend-paths/02-assert.yaml @@ -47,3 +47,4 @@ spec: name: chrome port: number: 8000 + diff --git a/tests/e2e/frontend-paths/03-delete.yaml b/tests/e2e/frontend-paths/03-delete.yaml index 194acd3e..a563e540 100644 --- a/tests/e2e/frontend-paths/03-delete.yaml +++ b/tests/e2e/frontend-paths/03-delete.yaml @@ -11,3 +11,4 @@ delete: - apiVersion: v1 kind: Namespace name: test-basic-frontend + diff --git a/tests/e2e/generate-nav-json/00-create-namespace.yaml b/tests/e2e/generate-nav-json/00-create-namespace.yaml index 6b805b1b..2811069d 100644 --- a/tests/e2e/generate-nav-json/00-create-namespace.yaml +++ b/tests/e2e/generate-nav-json/00-create-namespace.yaml @@ -5,4 +5,4 @@ metadata: name: test-generate-nav-json spec: finalizers: - - kubernetes \ No newline at end of file + - kubernetes diff --git a/tests/e2e/generate-nav-json/01-create-resources.yaml b/tests/e2e/generate-nav-json/01-create-resources.yaml index d9497cfe..bdab497b 100644 --- a/tests/e2e/generate-nav-json/01-create-resources.yaml +++ b/tests/e2e/generate-nav-json/01-create-resources.yaml @@ -29,3 +29,4 @@ spec: ssoUrl: 'https://' manifestLocation: /apps/chrome/js/fed-mods.json title: Chrome + diff --git a/tests/e2e/generate-nav-json/02-assert.yaml b/tests/e2e/generate-nav-json/02-assert.yaml index 25ffcc90..c67b5d24 100644 --- a/tests/e2e/generate-nav-json/02-assert.yaml +++ b/tests/e2e/generate-nav-json/02-assert.yaml @@ -36,3 +36,4 @@ spec: mountPath: /opt/app-root/src/build/chrome - name: config mountPath: /opt/app-root/src/build/operator-generated + diff --git a/tests/e2e/generate-nav-json/03-delete.yaml b/tests/e2e/generate-nav-json/03-delete.yaml index 7b1647ef..9bda5451 100644 --- a/tests/e2e/generate-nav-json/03-delete.yaml +++ b/tests/e2e/generate-nav-json/03-delete.yaml @@ -10,4 +10,4 @@ delete: name: test-generate-nav-json-environment - apiVersion: v1 kind: Namespace - name: test-generate-nav-json \ No newline at end of file + name: test-generate-nav-json diff --git a/tests/e2e/networking/00-create-namespace.yaml b/tests/e2e/networking/00-create-namespace.yaml index 71c97c45..de03b127 100644 --- a/tests/e2e/networking/00-create-namespace.yaml +++ b/tests/e2e/networking/00-create-namespace.yaml @@ -5,4 +5,4 @@ metadata: name: test-networking spec: finalizers: - - kubernetes \ No newline at end of file + - kubernetes diff --git a/tests/e2e/networking/01-create-resources.yaml b/tests/e2e/networking/01-create-resources.yaml index 381f627b..b22d20e4 100644 --- a/tests/e2e/networking/01-create-resources.yaml +++ b/tests/e2e/networking/01-create-resources.yaml @@ -29,3 +29,4 @@ spec: ssoUrl: 'https://' manifestLocation: /apps/chrome/js/fed-mods.json title: Chrome + diff --git a/tests/e2e/networking/02-assert.yaml b/tests/e2e/networking/02-assert.yaml index 4d9bf5ef..daba07ba 100644 --- a/tests/e2e/networking/02-assert.yaml +++ b/tests/e2e/networking/02-assert.yaml @@ -81,3 +81,4 @@ spec: status: loadBalancer: {} + diff --git a/tests/e2e/networking/03-delete.yaml b/tests/e2e/networking/03-delete.yaml index bdd1cd1b..19cc6d59 100644 --- a/tests/e2e/networking/03-delete.yaml +++ b/tests/e2e/networking/03-delete.yaml @@ -10,4 +10,4 @@ delete: name: test-networking-environment - apiVersion: v1 kind: Namespace - name: test-networking \ No newline at end of file + name: test-networking diff --git a/tests/e2e/ssl/00-create-namespace.yaml b/tests/e2e/ssl/00-create-namespace.yaml index 8afaf3fe..98cd638d 100644 --- a/tests/e2e/ssl/00-create-namespace.yaml +++ b/tests/e2e/ssl/00-create-namespace.yaml @@ -5,4 +5,4 @@ metadata: name: test-ssl spec: finalizers: - - kubernetes \ No newline at end of file + - kubernetes diff --git a/tests/e2e/ssl/01-create-resources.yaml b/tests/e2e/ssl/01-create-resources.yaml index 6a16d54b..3a5d3682 100644 --- a/tests/e2e/ssl/01-create-resources.yaml +++ b/tests/e2e/ssl/01-create-resources.yaml @@ -38,3 +38,4 @@ metadata: data: test: test type: Opaque + diff --git a/tests/e2e/ssl/02-assert.yaml b/tests/e2e/ssl/02-assert.yaml index afdcf6ad..7b9c6e02 100644 --- a/tests/e2e/ssl/02-assert.yaml +++ b/tests/e2e/ssl/02-assert.yaml @@ -44,4 +44,4 @@ spec: - name: config mountPath: /opt/app-root/src/build/operator-generated - name: certs - mountPath: /opt/certs \ No newline at end of file + mountPath: /opt/certs diff --git a/tests/e2e/ssl/03-delete.yaml b/tests/e2e/ssl/03-delete.yaml index 9b838f81..d6b8e0b5 100644 --- a/tests/e2e/ssl/03-delete.yaml +++ b/tests/e2e/ssl/03-delete.yaml @@ -13,4 +13,4 @@ delete: name: chrome-certs - apiVersion: v1 kind: Namespace - name: test-ssl \ No newline at end of file + name: test-ssl diff --git a/tests/e2e/storage/00-create-namespace.yaml b/tests/e2e/storage/00-create-namespace.yaml index be858594..04289af5 100644 --- a/tests/e2e/storage/00-create-namespace.yaml +++ b/tests/e2e/storage/00-create-namespace.yaml @@ -5,4 +5,4 @@ metadata: name: test-storage spec: finalizers: - - kubernetes \ No newline at end of file + - kubernetes diff --git a/tests/e2e/storage/01-create-resources.yaml b/tests/e2e/storage/01-create-resources.yaml index 048a7ff2..064c9766 100644 --- a/tests/e2e/storage/01-create-resources.yaml +++ b/tests/e2e/storage/01-create-resources.yaml @@ -29,3 +29,4 @@ spec: ssoUrl: 'https://' manifestLocation: /apps/chrome/js/fed-mods.json title: Chrome + diff --git a/tests/e2e/storage/02-assert.yaml b/tests/e2e/storage/02-assert.yaml index cc6e8866..600c40de 100644 --- a/tests/e2e/storage/02-assert.yaml +++ b/tests/e2e/storage/02-assert.yaml @@ -36,3 +36,4 @@ data: fed-modules.json: >- {"chrome":{"manifestLocation":"/apps/chrome/js/fed-mods.json","config":{"ssoUrl":"https://sso.foo.redhat.com"},"fullProfile":false}} + diff --git a/tests/e2e/storage/03-delete.yaml b/tests/e2e/storage/03-delete.yaml index 104d1e1e..6f9cc066 100644 --- a/tests/e2e/storage/03-delete.yaml +++ b/tests/e2e/storage/03-delete.yaml @@ -10,4 +10,4 @@ delete: name: test-storage-environment - apiVersion: v1 kind: Namespace - name: test-storage \ No newline at end of file + name: test-storage diff --git a/tests/e2e/whitelist/00-create-namespace.yaml b/tests/e2e/whitelist/00-create-namespace.yaml index af5b89af..d9133974 100644 --- a/tests/e2e/whitelist/00-create-namespace.yaml +++ b/tests/e2e/whitelist/00-create-namespace.yaml @@ -5,4 +5,4 @@ metadata: name: test-whitelist spec: finalizers: - - kubernetes \ No newline at end of file + - kubernetes diff --git a/tests/e2e/whitelist/01-create-resources.yaml b/tests/e2e/whitelist/01-create-resources.yaml index 3e13f29b..7fb82880 100644 --- a/tests/e2e/whitelist/01-create-resources.yaml +++ b/tests/e2e/whitelist/01-create-resources.yaml @@ -34,3 +34,4 @@ spec: ssoUrl: 'https://' manifestLocation: /apps/chrome/js/fed-mods.json title: Chrome + diff --git a/tests/e2e/whitelist/02-assert.yaml b/tests/e2e/whitelist/02-assert.yaml index 9f9fb4bb..512ea597 100644 --- a/tests/e2e/whitelist/02-assert.yaml +++ b/tests/e2e/whitelist/02-assert.yaml @@ -49,3 +49,4 @@ metadata: - apiVersion: cloud.redhat.com/v1alpha1 kind: Frontend name: chrome + diff --git a/tests/e2e/whitelist/03-delete.yaml b/tests/e2e/whitelist/03-delete.yaml index 597dd292..5d65dd9a 100644 --- a/tests/e2e/whitelist/03-delete.yaml +++ b/tests/e2e/whitelist/03-delete.yaml @@ -10,4 +10,4 @@ delete: name: test-whitelist-environment - apiVersion: v1 kind: Namespace - name: test-whitelist \ No newline at end of file + name: test-whitelist From 7be1d0af3a568e363627e52f698edcea8419bcb1 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 24 Apr 2023 12:37:37 -0400 Subject: [PATCH 108/228] Fix subPath for edgerc mount --- controllers/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 5a34108c..4810f58f 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -265,7 +265,7 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front VolumeMounts: []v1.VolumeMount{ { Name: "akamai-edgerc", - MountPath: "/opt/app-root/", + MountPath: "/opt/app-root/edgerc", SubPath: "edgerc", }, }, From fb509966687f39463dc33917f191446eb7424f09 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 24 Apr 2023 12:47:04 -0400 Subject: [PATCH 109/228] Make sure asserts match the change --- tests/e2e/cachebust/02-assert.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/cachebust/02-assert.yaml b/tests/e2e/cachebust/02-assert.yaml index dd5de6ce..95f70901 100644 --- a/tests/e2e/cachebust/02-assert.yaml +++ b/tests/e2e/cachebust/02-assert.yaml @@ -40,7 +40,7 @@ spec: resources: {} volumeMounts: - name: akamai-edgerc - mountPath: /opt/app-root/ + mountPath: /opt/app-root/edgerc subPath: edgerc containers: - name: fe-image @@ -101,7 +101,7 @@ spec: resources: {} volumeMounts: - name: akamai-edgerc - mountPath: /opt/app-root/ + mountPath: /opt/app-root/edgerc subPath: edgerc containers: - name: fe-image From 8a8e37f68a7270a9c3a52a5b90233e6ae0bbff01 Mon Sep 17 00:00:00 2001 From: Pete Savage Date: Tue, 25 Apr 2023 15:46:17 +0100 Subject: [PATCH 110/228] Update perms --- api/v1alpha1/groupversion_info.go | 4 ++-- config/rbac/role.yaml | 1 + controllers/frontend_controller.go | 2 +- deploy.yml | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index 333b97d5..87aa821a 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -15,8 +15,8 @@ limitations under the License. */ // Package v1alpha1 contains API Schema definitions for the v1alpha1 API group -//+kubebuilder:object:generate=true -//+groupName=cloud.redhat.com +// +kubebuilder:object:generate=true +// +groupName=cloud.redhat.com package v1alpha1 import ( diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index d8de1250..c842e776 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -12,6 +12,7 @@ rules: - events - namespaces - persistentvolumeclaims + - secrets - serviceaccounts - services verbs: diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index 629ec927..a46f38da 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -113,7 +113,7 @@ type FrontendReconciler struct { //+kubebuilder:rbac:groups=cloud.redhat.com,resources=bundles/status,verbs=get;update;patch //+kubebuilder:rbac:groups=cloud.redhat.com,resources=bundles/finalizers,verbs=update -// +kubebuilder:rbac:groups="",resources=serviceaccounts;configmaps;services;persistentvolumeclaims;events;namespaces,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups="",resources=serviceaccounts;configmaps;services;secrets;persistentvolumeclaims;events;namespaces,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete diff --git a/deploy.yml b/deploy.yml index e1e8cbb8..3120f388 100644 --- a/deploy.yml +++ b/deploy.yml @@ -950,6 +950,7 @@ objects: - events - namespaces - persistentvolumeclaims + - secrets - serviceaccounts - services verbs: From 8b65391abfc94fbc0e39c3a6bd4bf8e9893b1e90 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Apr 2023 08:43:17 -0400 Subject: [PATCH 111/228] Make cache bust a container instead of an init container --- controllers/reconcile.go | 16 +++++---- tests/e2e/cachebust/02-assert.yaml | 56 ++++++++++++++---------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 4810f58f..0869a9d9 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -198,8 +198,8 @@ func createCachePurgePathList(frontend *crd.Frontend, frontendEnvironment *crd.F return purgePaths } -// populateInitContainer adds the akamai cache bust init container to the deployment -func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) error { +// populateCacheBustContainer adds the akamai cache bust container to the deployment +func (r *FrontendReconciliation) populateCacheBustContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) error { // Guard on frontend opting out of cache busting if frontend.Spec.AkamaiCacheBustDisable { return nil @@ -255,10 +255,10 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front pathsToCacheBust := createCachePurgePathList(frontend, frontendEnvironment) // Construct the akamai cache bust command - command := fmt.Sprintf("/cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc invalidate %s", strings.Join(pathsToCacheBust, " ")) + command := fmt.Sprintf("sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc invalidate %s", strings.Join(pathsToCacheBust, " ")) // Modify the obejct to set the things we care about - d.Spec.Template.Spec.InitContainers = []v1.Container{{ + cacheBustContainer := v1.Container{ Name: "akamai-cache-bust", Image: frontendEnvironment.Spec.AkamaiCacheBustImage, // Mount the akamai edgerc file from the configmap @@ -271,8 +271,10 @@ func (r *FrontendReconciliation) populateInitContainer(d *apps.Deployment, front }, // Run the akamai cache bust script Command: []string{"/bin/bash", "-c", command}, - }, } + // add the container to the spec containers + d.Spec.Template.Spec.Containers = append(d.Spec.Template.Spec.Containers, cacheBustContainer) + // Add the akamai edgerc configmap to the deployment return nil @@ -352,9 +354,9 @@ func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map populateContainer(d, r.Frontend, r.FrontendEnvironment) r.populateEnvVars(d, r.FrontendEnvironment) - // If cache busting is enabled for the environment, add the akamai cache bust init container + // If cache busting is enabled for the environment, add the akamai cache bust container if r.FrontendEnvironment.Spec.EnableAkamaiCacheBust && r.FrontendEnvironment.Spec.AkamaiCacheBustImage != "" { - if err := r.populateInitContainer(d, r.Frontend, r.FrontendEnvironment); err != nil { + if err := r.populateCacheBustContainer(d, r.Frontend, r.FrontendEnvironment); err != nil { return err } } diff --git a/tests/e2e/cachebust/02-assert.yaml b/tests/e2e/cachebust/02-assert.yaml index 95f70901..4bd6979f 100644 --- a/tests/e2e/cachebust/02-assert.yaml +++ b/tests/e2e/cachebust/02-assert.yaml @@ -27,21 +27,6 @@ spec: configMap: name: akamai-edgerc defaultMode: 420 - initContainers: - - name: akamai-cache-bust - image: quay.io/rh_ee_addrew/hi_true_bye:add_alias - command: - - /bin/bash - - '-c' - - >- - /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc - invalidate https://console.doesntexist.redhat.com/config/chrome/fed-modules.json - https://console.doesntexist.redhat.com/apps/chrome/index.html - resources: {} - volumeMounts: - - name: akamai-edgerc - mountPath: /opt/app-root/edgerc - subPath: edgerc containers: - name: fe-image image: quay.io/cloudservices/insights-chrome-frontend:720317c @@ -59,6 +44,20 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent + - name: akamai-cache-bust + image: quay.io/rh_ee_addrew/hi_true_bye:add_alias + command: + - /bin/bash + - '-c' + - >- + sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc + invalidate https://console.doesntexist.redhat.com/config/chrome/fed-modules.json + https://console.doesntexist.redhat.com/apps/chrome/index.html + resources: {} + volumeMounts: + - name: akamai-edgerc + mountPath: /opt/app-root/edgerc + subPath: edgerc --- kind: Deployment apiVersion: apps/v1 @@ -89,20 +88,6 @@ spec: configMap: name: akamai-edgerc defaultMode: 420 - initContainers: - - name: akamai-cache-bust - image: quay.io/rh_ee_addrew/hi_true_bye:add_alias - command: - - /bin/bash - - '-c' - - >- - /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc - invalidate https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json - resources: {} - volumeMounts: - - name: akamai-edgerc - mountPath: /opt/app-root/edgerc - subPath: edgerc containers: - name: fe-image image: quay.io/cloudservices/insights-chrome-frontend:720317c @@ -120,6 +105,19 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent + - name: akamai-cache-bust + image: quay.io/rh_ee_addrew/hi_true_bye:add_alias + command: + - /bin/bash + - '-c' + - >- + sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc + invalidate https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json + resources: {} + volumeMounts: + - name: akamai-edgerc + mountPath: /opt/app-root/edgerc + subPath: edgerc --- kind: Deployment apiVersion: apps/v1 From 7f51f49c249028917ea46203f359bcaf08ce3792 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Apr 2023 09:35:06 -0400 Subject: [PATCH 112/228] delete instead of invalidate --- controllers/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 0869a9d9..f6fbc5f6 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -255,7 +255,7 @@ func (r *FrontendReconciliation) populateCacheBustContainer(d *apps.Deployment, pathsToCacheBust := createCachePurgePathList(frontend, frontendEnvironment) // Construct the akamai cache bust command - command := fmt.Sprintf("sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc invalidate %s", strings.Join(pathsToCacheBust, " ")) + command := fmt.Sprintf("sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete %s", strings.Join(pathsToCacheBust, " ")) // Modify the obejct to set the things we care about cacheBustContainer := v1.Container{ From 9e034d4743602c00ebd483b8382191a0a4b23ca6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Apr 2023 14:26:42 -0400 Subject: [PATCH 113/228] Add a long running process to the cache bust. I kind of hate this. We need to talk about improving it. --- controllers/reconcile.go | 2 +- tests/e2e/cachebust/02-assert.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index f6fbc5f6..faa61d65 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -255,7 +255,7 @@ func (r *FrontendReconciliation) populateCacheBustContainer(d *apps.Deployment, pathsToCacheBust := createCachePurgePathList(frontend, frontendEnvironment) // Construct the akamai cache bust command - command := fmt.Sprintf("sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete %s", strings.Join(pathsToCacheBust, " ")) + command := fmt.Sprintf("sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete %s ; while :; do sleep 1d; done", strings.Join(pathsToCacheBust, " ")) // Modify the obejct to set the things we care about cacheBustContainer := v1.Container{ diff --git a/tests/e2e/cachebust/02-assert.yaml b/tests/e2e/cachebust/02-assert.yaml index 4bd6979f..4d72165d 100644 --- a/tests/e2e/cachebust/02-assert.yaml +++ b/tests/e2e/cachebust/02-assert.yaml @@ -51,8 +51,9 @@ spec: - '-c' - >- sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc - invalidate https://console.doesntexist.redhat.com/config/chrome/fed-modules.json + delete https://console.doesntexist.redhat.com/config/chrome/fed-modules.json https://console.doesntexist.redhat.com/apps/chrome/index.html + ; while :; do sleep 1d; done resources: {} volumeMounts: - name: akamai-edgerc @@ -112,7 +113,8 @@ spec: - '-c' - >- sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc - invalidate https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json + delete https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json + ; while :; do sleep 1d; done resources: {} volumeMounts: - name: akamai-edgerc From b34ebd0ecadaea1087d0a14c60d051b144f18099 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Apr 2023 14:46:31 -0400 Subject: [PATCH 114/228] Modify test --- controllers/frontend_controller_suite_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 48df2aee..d581cf28 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -253,7 +253,7 @@ var _ = Describe("Frontend controller with service", func() { Monitoring: &crd.MonitoringConfig{ Mode: "local", }, - GenerateNavJSON: true, + GenerateNavJSON: false, }, } Expect(k8sClient.Create(ctx, &frontendEnvironment)).Should(Succeed()) @@ -342,8 +342,8 @@ var _ = Describe("Frontend controller with service", func() { }, timeout, interval).Should(BeTrue()) Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ - "fed-modules.json": "{\"testFrontendService\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false}}", - "test-env-service.json": "{\"id\":\"test-service-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test2\",\"href\":\"/test/href2\"}]}", + "fed-modules.json": "{\"testFrontendService\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false}}", + //"test-env-service.json": "{\"id\":\"test-service-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test2\",\"href\":\"/test/href2\"}]}", })) Eventually(func() bool { From 4cedce292750f430fe6bbdfe7dad22b64f9947a5 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Apr 2023 14:51:01 -0400 Subject: [PATCH 115/228] Make linter happy --- controllers/frontend_controller_suite_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index d581cf28..85486bce 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -343,7 +343,6 @@ var _ = Describe("Frontend controller with service", func() { Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) Expect(createdConfigMap.Data).Should(Equal(map[string]string{ "fed-modules.json": "{\"testFrontendService\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false}}", - //"test-env-service.json": "{\"id\":\"test-service-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test2\",\"href\":\"/test/href2\"}]}", })) Eventually(func() bool { From d4754c2a948d6fc53cce168ea3db94d6e3e57388 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 27 Apr 2023 10:02:17 -0400 Subject: [PATCH 116/228] Move from deployment to job for cache bust --- controllers/frontend_controller.go | 2 + controllers/reconcile.go | 73 ++++++++++++++++++++++-------- tests/e2e/cachebust/02-assert.yaml | 60 ++++++++++++++++++------ 3 files changed, 103 insertions(+), 32 deletions(-) diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index a46f38da..95f88e7c 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -21,6 +21,7 @@ import ( "fmt" apps "k8s.io/api/apps/v1" + batchv1 "k8s.io/api/batch/v1" v1 "k8s.io/api/core/v1" networking "k8s.io/api/networking/v1" k8serr "k8s.io/apimachinery/pkg/api/errors" @@ -68,6 +69,7 @@ func createNewScheme() *runtime.Scheme { var scheme = createNewScheme() var CoreDeployment = resCache.NewSingleResourceIdent("main", "deployment", &apps.Deployment{}) +var CoreJob = resCache.NewSingleResourceIdent("main", "job", &batchv1.Job{}) var CoreService = resCache.NewSingleResourceIdent("main", "service", &v1.Service{}) var CoreConfig = resCache.NewSingleResourceIdent("main", "config", &v1.ConfigMap{}) var SSOConfig = resCache.NewSingleResourceIdent("main", "sso_config", &v1.ConfigMap{}) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index faa61d65..7f6e8f08 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -24,6 +24,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" + batchv1 "k8s.io/api/batch/v1" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -65,6 +66,12 @@ func (r *FrontendReconciliation) run() error { if err := r.createFrontendService(); err != nil { return err } + // If cache busting is enabled for the environment, add the akamai cache bust container + if r.FrontendEnvironment.Spec.EnableAkamaiCacheBust && r.FrontendEnvironment.Spec.AkamaiCacheBustImage != "" { + if err := r.createCacheBustJob(); err != nil { + return err + } + } } if err := r.createFrontendIngress(); err != nil { @@ -199,15 +206,11 @@ func createCachePurgePathList(frontend *crd.Frontend, frontendEnvironment *crd.F } // populateCacheBustContainer adds the akamai cache bust container to the deployment -func (r *FrontendReconciliation) populateCacheBustContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) error { - // Guard on frontend opting out of cache busting - if frontend.Spec.AkamaiCacheBustDisable { - return nil - } +func (r *FrontendReconciliation) populateCacheBustContainer(j *batchv1.Job) error { // Get the akamai secret - akamaiSecretName := getAkamaiSecretName(frontendEnvironment) - secret, err := getAkamaiSecret(r.Ctx, r.Client, frontend, akamaiSecretName) + akamaiSecretName := getAkamaiSecretName(r.FrontendEnvironment) + secret, err := getAkamaiSecret(r.Ctx, r.Client, r.Frontend, akamaiSecretName) if err != nil { return err } @@ -249,18 +252,18 @@ func (r *FrontendReconciliation) populateCacheBustContainer(d *apps.Deployment, }, } - d.Spec.Template.Spec.Volumes = append(d.Spec.Template.Spec.Volumes, akamaiVolume) + j.Spec.Template.Spec.Volumes = append(j.Spec.Template.Spec.Volumes, akamaiVolume) // Get the paths to cache bust - pathsToCacheBust := createCachePurgePathList(frontend, frontendEnvironment) + pathsToCacheBust := createCachePurgePathList(r.Frontend, r.FrontendEnvironment) // Construct the akamai cache bust command - command := fmt.Sprintf("sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete %s ; while :; do sleep 1d; done", strings.Join(pathsToCacheBust, " ")) + command := fmt.Sprintf("sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete %s ", strings.Join(pathsToCacheBust, " ")) // Modify the obejct to set the things we care about cacheBustContainer := v1.Container{ Name: "akamai-cache-bust", - Image: frontendEnvironment.Spec.AkamaiCacheBustImage, + Image: r.FrontendEnvironment.Spec.AkamaiCacheBustImage, // Mount the akamai edgerc file from the configmap VolumeMounts: []v1.VolumeMount{ { @@ -273,7 +276,7 @@ func (r *FrontendReconciliation) populateCacheBustContainer(d *apps.Deployment, Command: []string{"/bin/bash", "-c", command}, } // add the container to the spec containers - d.Spec.Template.Spec.Containers = append(d.Spec.Template.Spec.Containers, cacheBustContainer) + j.Spec.Template.Spec.Containers = append(j.Spec.Template.Spec.Containers, cacheBustContainer) // Add the akamai edgerc configmap to the deployment @@ -354,13 +357,6 @@ func (r *FrontendReconciliation) createFrontendDeployment(annotationHashes []map populateContainer(d, r.Frontend, r.FrontendEnvironment) r.populateEnvVars(d, r.FrontendEnvironment) - // If cache busting is enabled for the environment, add the akamai cache bust container - if r.FrontendEnvironment.Spec.EnableAkamaiCacheBust && r.FrontendEnvironment.Spec.AkamaiCacheBustImage != "" { - if err := r.populateCacheBustContainer(d, r.Frontend, r.FrontendEnvironment); err != nil { - return err - } - } - d.Spec.Template.ObjectMeta.Labels = labels d.Spec.Selector = &metav1.LabelSelector{MatchLabels: labels} @@ -402,6 +398,45 @@ func createPorts() []v1.ServicePort { } } +func (r *FrontendReconciliation) createCacheBustJob() error { + // Guard on frontend opting out of cache busting + if r.Frontend.Spec.AkamaiCacheBustDisable { + return nil + } + + // Create job + j := &batchv1.Job{} + + jobName := r.Frontend.Name + "-frontend-cachebust" + + // Define name of resource + nn := types.NamespacedName{ + Name: jobName, + Namespace: r.Frontend.Namespace, + } + + // Create object in cache (will populate cache if exists) + if err := r.Cache.Create(CoreJob, nn, j); err != nil { + return err + } + + // Label with the right labels + labels := r.Frontend.GetLabels() + + labeler := utils.GetCustomLabeler(labels, nn, r.Frontend) + labeler(j) + + j.Spec.Template.Spec.RestartPolicy = v1.RestartPolicyNever + + j.Spec.Completions = utils.Int32Ptr(1) + + r.populateCacheBustContainer(j) + + // Inform the cache that our updates are complete + err := r.Cache.Update(CoreJob, j) + return err +} + // Will need to create a service resource ident in provider like CoreDeployment func (r *FrontendReconciliation) createFrontendService() error { // Create empty service diff --git a/tests/e2e/cachebust/02-assert.yaml b/tests/e2e/cachebust/02-assert.yaml index 4d72165d..764a2d22 100644 --- a/tests/e2e/cachebust/02-assert.yaml +++ b/tests/e2e/cachebust/02-assert.yaml @@ -23,10 +23,6 @@ spec: configMap: name: test-cachebust-environment defaultMode: 420 - - name: akamai-edgerc - configMap: - name: akamai-edgerc - defaultMode: 420 containers: - name: fe-image image: quay.io/cloudservices/insights-chrome-frontend:720317c @@ -44,21 +40,42 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: chrome-test-filelist-frontend-cachebust + namespace: test-cachebust + labels: + frontend: chrome-test-filelist + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-test-filelist +spec: + template: + spec: + volumes: + - name: akamai-edgerc + configMap: + name: akamai-edgerc + defaultMode: 420 + containers: - name: akamai-cache-bust image: quay.io/rh_ee_addrew/hi_true_bye:add_alias command: - /bin/bash - '-c' - >- - sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc + echo 'Starting' ; sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete https://console.doesntexist.redhat.com/config/chrome/fed-modules.json - https://console.doesntexist.redhat.com/apps/chrome/index.html - ; while :; do sleep 1d; done + https://console.doesntexist.redhat.com/apps/chrome/index.html resources: {} volumeMounts: - name: akamai-edgerc mountPath: /opt/app-root/edgerc subPath: edgerc + restartPolicy: Never --- kind: Deployment apiVersion: apps/v1 @@ -85,10 +102,6 @@ spec: configMap: name: test-cachebust-environment defaultMode: 420 - - name: akamai-edgerc - configMap: - name: akamai-edgerc - defaultMode: 420 containers: - name: fe-image image: quay.io/cloudservices/insights-chrome-frontend:720317c @@ -106,6 +119,27 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: chrome-test-defaults-frontend-cachebust + namespace: test-cachebust + labels: + frontend: chrome-test-defaults + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-test-defaults +spec: + template: + spec: + volumes: + - name: akamai-edgerc + configMap: + name: akamai-edgerc + defaultMode: 420 + containers: - name: akamai-cache-bust image: quay.io/rh_ee_addrew/hi_true_bye:add_alias command: @@ -113,13 +147,13 @@ spec: - '-c' - >- sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc - delete https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json - ; while :; do sleep 1d; done + delete https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json resources: {} volumeMounts: - name: akamai-edgerc mountPath: /opt/app-root/edgerc subPath: edgerc + restartPolicy: Never --- kind: Deployment apiVersion: apps/v1 From 69677df91926b15932c587bc9a8fe8fdd0b39136 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 27 Apr 2023 10:09:39 -0400 Subject: [PATCH 117/228] Try to make linter happy --- controllers/reconcile.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 7f6e8f08..fd0c8ad2 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -430,11 +430,12 @@ func (r *FrontendReconciliation) createCacheBustJob() error { j.Spec.Completions = utils.Int32Ptr(1) - r.populateCacheBustContainer(j) + err := r.populateCacheBustContainer(j) + if err != nil { + return err + } - // Inform the cache that our updates are complete - err := r.Cache.Update(CoreJob, j) - return err + return r.Cache.Update(CoreJob, j) } // Will need to create a service resource ident in provider like CoreDeployment From 2535bbb471eb68b7d6d01abfbd254399e07084b4 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 27 Apr 2023 13:06:07 -0400 Subject: [PATCH 118/228] Jobs rbac --- config/rbac/role.yaml | 13 +++++++++++++ controllers/frontend_controller.go | 1 + deploy.yml | 13 +++++++++++++ 3 files changed, 27 insertions(+) diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index c842e776..090fe2dc 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -56,6 +56,19 @@ rules: - patch - update - watch +- apiGroups: + - batch + resources: + - cronjobs + - jobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - cloud.redhat.com resources: diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index 95f88e7c..fed2b89a 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -116,6 +116,7 @@ type FrontendReconciler struct { //+kubebuilder:rbac:groups=cloud.redhat.com,resources=bundles/finalizers,verbs=update // +kubebuilder:rbac:groups="",resources=serviceaccounts;configmaps;services;secrets;persistentvolumeclaims;events;namespaces,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=batch,resources=cronjobs;jobs,verbs=get;list;create;update;watch;patch;delete // +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete // +kubebuilder:rbac:groups=networking.k8s.io,resources=ingresses,verbs=get;list;watch;create;update;patch;delete diff --git a/deploy.yml b/deploy.yml index 3120f388..2d021f05 100644 --- a/deploy.yml +++ b/deploy.yml @@ -994,6 +994,19 @@ objects: - patch - update - watch + - apiGroups: + - batch + resources: + - cronjobs + - jobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - cloud.redhat.com resources: From 6eedfe3067390a6b5c4e36560ddd2401332b9fc7 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 27 Apr 2023 15:57:19 -0400 Subject: [PATCH 119/228] Set owner reference on job --- controllers/reconcile.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index fd0c8ad2..bf2746d8 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -426,6 +426,8 @@ func (r *FrontendReconciliation) createCacheBustJob() error { labeler := utils.GetCustomLabeler(labels, nn, r.Frontend) labeler(j) + j.SetOwnerReferences([]metav1.OwnerReference{r.FrontendEnvironment.MakeOwnerReference()}) + j.Spec.Template.Spec.RestartPolicy = v1.RestartPolicyNever j.Spec.Completions = utils.Int32Ptr(1) From f423f04eaf4a7a762d2c110ff68a797537b1be19 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 27 Apr 2023 16:33:43 -0400 Subject: [PATCH 120/228] Dont append volume in reconciliation because duplicates --- controllers/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index bf2746d8..48cd5261 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -252,7 +252,7 @@ func (r *FrontendReconciliation) populateCacheBustContainer(j *batchv1.Job) erro }, } - j.Spec.Template.Spec.Volumes = append(j.Spec.Template.Spec.Volumes, akamaiVolume) + j.Spec.Template.Spec.Volumes = []v1.Volume{akamaiVolume} // Get the paths to cache bust pathsToCacheBust := createCachePurgePathList(r.Frontend, r.FrontendEnvironment) From 6fc6edc782a418c1164f3f639754e5d785d14fe5 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 27 Apr 2023 18:42:39 -0400 Subject: [PATCH 121/228] Don't append container --- controllers/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 48cd5261..091fe6dc 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -276,7 +276,7 @@ func (r *FrontendReconciliation) populateCacheBustContainer(j *batchv1.Job) erro Command: []string{"/bin/bash", "-c", command}, } // add the container to the spec containers - j.Spec.Template.Spec.Containers = append(j.Spec.Template.Spec.Containers, cacheBustContainer) + j.Spec.Template.Spec.Containers = []v1.Container{cacheBustContainer} // Add the akamai edgerc configmap to the deployment From 2a865a0f0c8bb890c1983e735cd172a82bdd7775 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 28 Apr 2023 12:22:22 -0400 Subject: [PATCH 122/228] Refactor job handling --- controllers/reconcile.go | 134 ++++++++++-- tests/e2e/cachebust/02-assert.yaml | 15 +- tests/e2e/cachebust/03-update-resources.yaml | 80 +++++++ tests/e2e/cachebust/04-assert.yaml | 199 ++++++++++++++++++ .../{03-delete.yaml => 05-delete.yaml} | 0 5 files changed, 398 insertions(+), 30 deletions(-) create mode 100644 tests/e2e/cachebust/03-update-resources.yaml create mode 100644 tests/e2e/cachebust/04-assert.yaml rename tests/e2e/cachebust/{03-delete.yaml => 05-delete.yaml} (100%) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 091fe6dc..e1be8ef3 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -19,6 +19,7 @@ import ( v1 "k8s.io/api/core/v1" networking "k8s.io/api/networking/v1" apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + k8serr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" @@ -68,7 +69,7 @@ func (r *FrontendReconciliation) run() error { } // If cache busting is enabled for the environment, add the akamai cache bust container if r.FrontendEnvironment.Spec.EnableAkamaiCacheBust && r.FrontendEnvironment.Spec.AkamaiCacheBustImage != "" { - if err := r.createCacheBustJob(); err != nil { + if err := r.createOrUpdateCacheBustJob(); err != nil { return err } } @@ -218,27 +219,29 @@ func (r *FrontendReconciliation) populateCacheBustContainer(j *batchv1.Job) erro edgercFile := makeAkamaiEdgercFileFromSecret(secret) configMap := &v1.ConfigMap{} + configMap.SetName("akamai-edgerc") + configMap.SetNamespace(r.Frontend.Namespace) + nn := types.NamespacedName{ Name: "akamai-edgerc", Namespace: r.Frontend.Namespace, } - if err := r.Cache.Create(CoreConfig, nn, configMap); err != nil { - return err - } - labels := r.FrontendEnvironment.GetLabels() labler := utils.GetCustomLabeler(labels, nn, r.FrontendEnvironment) labler(configMap) - configMap.SetOwnerReferences([]metav1.OwnerReference{r.FrontendEnvironment.MakeOwnerReference()}) + configMap.SetOwnerReferences([]metav1.OwnerReference{r.Frontend.MakeOwnerReference()}) // Add the akamai edgerc file to the configmap configMap.Data = map[string]string{ "edgerc": edgercFile, } - if err := r.Cache.Update(CoreConfig, configMap); err != nil { - return err + // Create the configmap with the Client if it doesn't already exist + if err := r.Client.Create(r.Ctx, configMap); err != nil { + if !k8serr.IsAlreadyExists(err) { + return err + } } akamaiVolume := v1.Volume{ @@ -258,7 +261,7 @@ func (r *FrontendReconciliation) populateCacheBustContainer(j *batchv1.Job) erro pathsToCacheBust := createCachePurgePathList(r.Frontend, r.FrontendEnvironment) // Construct the akamai cache bust command - command := fmt.Sprintf("sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete %s ", strings.Join(pathsToCacheBust, " ")) + command := fmt.Sprintf("sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete %s", strings.Join(pathsToCacheBust, " ")) // Modify the obejct to set the things we care about cacheBustContainer := v1.Container{ @@ -278,6 +281,9 @@ func (r *FrontendReconciliation) populateCacheBustContainer(j *batchv1.Job) erro // add the container to the spec containers j.Spec.Template.Spec.Containers = []v1.Container{cacheBustContainer} + // Add the restart policy + j.Spec.Template.Spec.RestartPolicy = v1.RestartPolicyNever + // Add the akamai edgerc configmap to the deployment return nil @@ -398,16 +404,17 @@ func createPorts() []v1.ServicePort { } } -func (r *FrontendReconciliation) createCacheBustJob() error { - // Guard on frontend opting out of cache busting - if r.Frontend.Spec.AkamaiCacheBustDisable { - return nil - } +func (r *FrontendReconciliation) generateJobName() string { + return r.Frontend.Name + "-frontend-cachebust" +} - // Create job +// getExistingJob returns the existing job if it exists +// and a bool indicating if it exists or not +func (r *FrontendReconciliation) getExistingJob() (*batchv1.Job, bool, error) { + // Job we'll fill up j := &batchv1.Job{} - jobName := r.Frontend.Name + "-frontend-cachebust" + jobName := r.generateJobName() // Define name of resource nn := types.NamespacedName{ @@ -415,29 +422,110 @@ func (r *FrontendReconciliation) createCacheBustJob() error { Namespace: r.Frontend.Namespace, } - // Create object in cache (will populate cache if exists) - if err := r.Cache.Create(CoreJob, nn, j); err != nil { + // Try and get the job + err := r.Client.Get(r.Ctx, nn, j) + if err != nil { + if k8serr.IsNotFound(err) { + // It doesn't exist so we can return false and no error + return j, false, nil + } + // Something is wrong so we return the error + return j, false, err + } + + // It exists so we return true and no error + return j, true, nil + +} + +func (r *FrontendReconciliation) isJobFromCurrentFrontendImage(j *batchv1.Job) bool { + return j.Spec.Template.ObjectMeta.Annotations["frontend-image"] == r.Frontend.Spec.Image +} + +// manageExistingJob will delete the existing job if it exists and is not from the current frontend image +// It will return true if the job exists and is from the current frontend image +func (r *FrontendReconciliation) manageExistingJob() (bool, error) { + j, exists, err := r.getExistingJob() + if err != nil { + return false, err + } + + // If it doesn't exist we can return false and no error + if !exists { + return false, nil + } + + // If it exists but is not from the current frontend image we delete it + if !r.isJobFromCurrentFrontendImage(j) { + return false, r.Client.Delete(r.Ctx, j) + } + + // If it exists and is from the current frontend image we return true and no error + return true, nil +} + +// createOrUpdateCacheBustJob will create a new job if it doesn't exist +// If it does exist and is from the current frontend image it will return +// If it does exist and is not from the current frontend image it will delete it and create a new one +func (r *FrontendReconciliation) createOrUpdateCacheBustJob() error { + // Guard on frontend opting out of cache busting + if r.Frontend.Spec.AkamaiCacheBustDisable { + return nil + } + + // If the job exists and is from the current frontend image we can return + // If the job exists and is not from the current frontend image we delete it + // If the job doesn't exist we create it + existsAndMatchesCurrentFrontendImage, err := r.manageExistingJob() + if err != nil { return err } + if existsAndMatchesCurrentFrontendImage { + return nil + } + + // Create job + j := &batchv1.Job{} + + jobName := r.generateJobName() + + // Set name + j.SetName(jobName) + // Set namespace + j.SetNamespace(r.Frontend.Namespace) // Label with the right labels labels := r.Frontend.GetLabels() + // Define name of resource + nn := types.NamespacedName{ + Name: jobName, + Namespace: r.Frontend.Namespace, + } + labeler := utils.GetCustomLabeler(labels, nn, r.Frontend) labeler(j) - j.SetOwnerReferences([]metav1.OwnerReference{r.FrontendEnvironment.MakeOwnerReference()}) + j.SetOwnerReferences([]metav1.OwnerReference{r.Frontend.MakeOwnerReference()}) j.Spec.Template.Spec.RestartPolicy = v1.RestartPolicyNever j.Spec.Completions = utils.Int32Ptr(1) - err := r.populateCacheBustContainer(j) - if err != nil { - return err + //Set the image frontend image annotation + annotations := j.Spec.Template.ObjectMeta.Annotations + if annotations == nil { + annotations = make(map[string]string) + } + annotations["frontend-image"] = r.Frontend.Spec.Image + j.Spec.Template.ObjectMeta.SetAnnotations(annotations) + + errr := r.populateCacheBustContainer(j) + if errr != nil { + return errr } - return r.Cache.Update(CoreJob, j) + return r.Client.Create(r.Ctx, j) } // Will need to create a service resource ident in provider like CoreDeployment diff --git a/tests/e2e/cachebust/02-assert.yaml b/tests/e2e/cachebust/02-assert.yaml index 764a2d22..746c43d7 100644 --- a/tests/e2e/cachebust/02-assert.yaml +++ b/tests/e2e/cachebust/02-assert.yaml @@ -54,6 +54,9 @@ metadata: name: chrome-test-filelist spec: template: + metadata: + annotations: + frontend-image: quay.io/cloudservices/insights-chrome-frontend:720317c spec: volumes: - name: akamai-edgerc @@ -66,10 +69,7 @@ spec: command: - /bin/bash - '-c' - - >- - echo 'Starting' ; sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc - delete https://console.doesntexist.redhat.com/config/chrome/fed-modules.json - https://console.doesntexist.redhat.com/apps/chrome/index.html + - 'sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete https://console.doesntexist.redhat.com/config/chrome/fed-modules.json https://console.doesntexist.redhat.com/apps/chrome/index.html' resources: {} volumeMounts: - name: akamai-edgerc @@ -133,6 +133,9 @@ metadata: name: chrome-test-defaults spec: template: + metadata: + annotations: + frontend-image: quay.io/cloudservices/insights-chrome-frontend:720317c spec: volumes: - name: akamai-edgerc @@ -145,9 +148,7 @@ spec: command: - /bin/bash - '-c' - - >- - sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc - delete https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json + - 'sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json' resources: {} volumeMounts: - name: akamai-edgerc diff --git a/tests/e2e/cachebust/03-update-resources.yaml b/tests/e2e/cachebust/03-update-resources.yaml new file mode 100644 index 00000000..e2ac0d0a --- /dev/null +++ b/tests/e2e/cachebust/03-update-resources.yaml @@ -0,0 +1,80 @@ +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: FrontendEnvironment +metadata: + name: test-cachebust-environment +spec: + generateNavJSON: false + ssl: false + hostname: foo.redhat.com + sso: https://sso.foo.redhat.com + enableAkamaiCacheBust: true + akamaiCacheBustImage: "quay.io/rh_ee_addrew/hi_true_bye:add_alias" + akamaiCacheBustURL: "console.doesntexist.redhat.com" +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome-test-filelist + namespace: test-cachebust +spec: + API: + versions: + - v1 + frontend: + paths: + - / + akamaiCacheBustPaths: + - /config/chrome/fed-modules.json + - apps/chrome/index.html + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-cachebust-environment + image: quay.io/cloudservices/insights-chrome-frontend:a4ed168 + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome-test-defaults + namespace: test-cachebust +spec: + API: + versions: + - v1 + frontend: + paths: + - /chrome/defaults + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-cachebust-environment + image: quay.io/cloudservices/insights-chrome-frontend:a4ed168 + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome +--- +apiVersion: cloud.redhat.com/v1alpha1 +kind: Frontend +metadata: + name: chrome-test-optout + namespace: test-cachebust +spec: + akamaiCacheBustDisable: true + API: + versions: + - v1 + frontend: + paths: + - /chrome2 + deploymentRepo: https://github.com/RedHatInsights/insights-chrome + envName: test-cachebust-environment + image: quay.io/cloudservices/insights-chrome-frontend:a4ed168 + module: + config: + ssoUrl: 'https://' + manifestLocation: /apps/chrome/js/fed-mods.json + title: Chrome diff --git a/tests/e2e/cachebust/04-assert.yaml b/tests/e2e/cachebust/04-assert.yaml new file mode 100644 index 00000000..b20607da --- /dev/null +++ b/tests/e2e/cachebust/04-assert.yaml @@ -0,0 +1,199 @@ +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-test-filelist-frontend + namespace: test-cachebust + labels: + frontend: chrome-test-filelist + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-test-filelist +spec: + selector: + matchLabels: + frontend: chrome-test-filelist + template: + metadata: + labels: + frontend: chrome-test-filelist + spec: + volumes: + - name: config + configMap: + name: test-cachebust-environment + defaultMode: 420 + containers: + - name: fe-image + image: quay.io/cloudservices/insights-chrome-frontend:a4ed168 + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + resources: {} + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: IfNotPresent +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: chrome-test-filelist-frontend-cachebust + namespace: test-cachebust + labels: + frontend: chrome-test-filelist + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-test-filelist +spec: + template: + metadata: + annotations: + frontend-image: quay.io/cloudservices/insights-chrome-frontend:a4ed168 + spec: + volumes: + - name: akamai-edgerc + configMap: + name: akamai-edgerc + defaultMode: 420 + containers: + - name: akamai-cache-bust + image: quay.io/rh_ee_addrew/hi_true_bye:add_alias + command: + - /bin/bash + - '-c' + - 'sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete https://console.doesntexist.redhat.com/config/chrome/fed-modules.json https://console.doesntexist.redhat.com/apps/chrome/index.html' + resources: {} + volumeMounts: + - name: akamai-edgerc + mountPath: /opt/app-root/edgerc + subPath: edgerc + restartPolicy: Never +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-test-defaults-frontend + namespace: test-cachebust + labels: + frontend: chrome-test-defaults + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-test-defaults +spec: + selector: + matchLabels: + frontend: chrome-test-defaults + template: + metadata: + labels: + frontend: chrome-test-defaults + spec: + volumes: + - name: config + configMap: + name: test-cachebust-environment + defaultMode: 420 + containers: + - name: fe-image + image: quay.io/cloudservices/insights-chrome-frontend:a4ed168 + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + resources: {} + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + imagePullPolicy: IfNotPresent +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: chrome-test-defaults-frontend-cachebust + namespace: test-cachebust + labels: + frontend: chrome-test-defaults + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-test-defaults +spec: + template: + metadata: + annotations: + frontend-image: quay.io/cloudservices/insights-chrome-frontend:a4ed168 + spec: + volumes: + - name: akamai-edgerc + configMap: + name: akamai-edgerc + defaultMode: 420 + containers: + - name: akamai-cache-bust + image: quay.io/rh_ee_addrew/hi_true_bye:add_alias + command: + - /bin/bash + - '-c' + - 'sleep 60; /cli/.akamai-cli/src/cli-purge/bin/akamai-purge --edgerc /opt/app-root/edgerc delete https://console.doesntexist.redhat.com/apps/chrome-test-defaults/fed-mods.json' + resources: {} + volumeMounts: + - name: akamai-edgerc + mountPath: /opt/app-root/edgerc + subPath: edgerc + restartPolicy: Never +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: chrome-test-optout-frontend + namespace: test-cachebust + labels: + frontend: chrome-test-optout + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + kind: Frontend + name: chrome-test-optout +spec: + replicas: 1 + selector: + matchLabels: + frontend: chrome-test-optout + template: + metadata: + labels: + frontend: chrome-test-optout + spec: + volumes: + - name: config + configMap: + name: test-cachebust-environment + defaultMode: 420 + containers: + - name: fe-image + image: quay.io/cloudservices/insights-chrome-frontend:a4ed168 + ports: + - name: web + containerPort: 80 + protocol: TCP + - name: metrics + containerPort: 9000 + protocol: TCP + resources: {} + volumeMounts: + - name: config + mountPath: /opt/app-root/src/build/operator-generated + diff --git a/tests/e2e/cachebust/03-delete.yaml b/tests/e2e/cachebust/05-delete.yaml similarity index 100% rename from tests/e2e/cachebust/03-delete.yaml rename to tests/e2e/cachebust/05-delete.yaml From e10b82afd51bbb9eb96305b25b4975f54f21337c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 28 Apr 2023 12:28:03 -0400 Subject: [PATCH 123/228] Make the linter happy --- controllers/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index e1be8ef3..99fe3443 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -512,7 +512,7 @@ func (r *FrontendReconciliation) createOrUpdateCacheBustJob() error { j.Spec.Completions = utils.Int32Ptr(1) - //Set the image frontend image annotation + // Set the image frontend image annotation annotations := j.Spec.Template.ObjectMeta.Annotations if annotations == nil { annotations = make(map[string]string) From 45cd67e43895ac15648a903b572adf8a4463d2d1 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 2 May 2023 09:32:00 -0400 Subject: [PATCH 124/228] Add deletion policy for job deletes --- controllers/reconcile.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 99fe3443..20fe5fca 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -21,6 +21,7 @@ import ( apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" k8serr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/client-go/tools/record" @@ -457,7 +458,10 @@ func (r *FrontendReconciliation) manageExistingJob() (bool, error) { // If it exists but is not from the current frontend image we delete it if !r.isJobFromCurrentFrontendImage(j) { - return false, r.Client.Delete(r.Ctx, j) + backgroundDeletion := metav1.DeletePropagationBackground + return false, r.Client.Delete(r.Ctx, j, &client.DeleteOptions{ + PropagationPolicy: &backgroundDeletion, + }) } // If it exists and is from the current frontend image we return true and no error From 1d23f8f7e36a42e83370287ecb681619b069071c Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Mon, 8 May 2023 09:44:14 -0400 Subject: [PATCH 125/228] add new jenkinsfile for PR checks --- Jenkinsfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..3600e7ad --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,32 @@ +def secrets = [ + [path: params.VAULT_PATH_SVC_ACCOUNT_EPHEMERAL, engineVersion: 1, secretValues: [ + [envVar: 'OC_LOGIN_TOKEN_DEV', vaultKey: 'oc-login-token-dev'], + [envVar: 'OC_LOGIN_SERVER_DEV', vaultKey: 'oc-login-server-dev']]], + [path: params.VAULT_PATH_QUAY_PUSH, engineVersion: 1, secretValues: [ + [envVar: 'QUAY_USER', vaultKey: 'user'], + [envVar: 'QUAY_TOKEN', vaultKey: 'token']]], + [path: params.VAULT_PATH_RHR_PULL, engineVersion: 1, secretValues: [ + [envVar: 'RH_REGISTRY_USER', vaultKey: 'user'], + [envVar: 'RH_REGISTRY_TOKEN', vaultKey: 'token']]] +] + +def configuration = [vaultUrl: params.VAULT_ADDRESS, vaultCredentialId: params.VAULT_CREDS_ID, engineVersion: 1] + +pipeline { + agent { label 'insights' } + options { + timestamps() + } + + stages { + stage('PR Checks') { + steps { + withVault([configuration: configuration, vaultSecrets: secrets]) { + sh ''' + source ./pr_check.sh + ''' + } + } + } + } +} From fabc6a8d080c49ff7a5f8fd78d7824c25c832c64 Mon Sep 17 00:00:00 2001 From: Matt Knop Date: Mon, 8 May 2023 13:10:49 -0600 Subject: [PATCH 126/228] Fixing container names --- Jenkinsfile | 4 ++++ pr_check.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3600e7ad..dcba964c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,6 +18,10 @@ pipeline { timestamps() } + environment { + FEO_CONTAINER_NAME="frontend-operator-pr-check-pipeline-$ghprbPullId" + } + stages { stage('PR Checks') { steps { diff --git a/pr_check.sh b/pr_check.sh index f876fe8a..48fa9a21 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -10,7 +10,7 @@ mkdir -p "$DOCKER_CONF" export IMAGE_TAG=`git rev-parse --short HEAD` export IMAGE_NAME=quay.io/cloudservices/frontend-operator -CONTAINER_NAME="frontend-operator-pr-check-$ghprbPullId" +CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}" # NOTE: Make sure this volume is mounted 'ro', otherwise Jenkins cannot clean up the workspace due to file permission errors set +e # Run the pr check container (stored in the build dir) and invoke the From 11b1c7ff03573efc5a4182484e9d8f791fe895f0 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Mon, 22 May 2023 08:42:49 -0400 Subject: [PATCH 127/228] config now spins up kind cluster for kuttl tests --- kuttl-config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kuttl-config.yml b/kuttl-config.yml index 45d76c5c..e3c982f3 100644 --- a/kuttl-config.yml +++ b/kuttl-config.yml @@ -1,7 +1,13 @@ apiVersion: kuttl.dev/v1beta1 kind: TestSuite -startKIND: false +startKIND: true +kindContainers: +- frontend-operator:8263b653 +crdDir: config/crd/kuttl-required/ testDirs: - tests/e2e/ timeout: 320 parallel: 1 +commands: +- command: make kuttl-release +- command: oc apply -f manifest.yaml From 68e683dfb08c33374e3d4136f62c3a7d84727fdd Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Mon, 22 May 2023 08:43:34 -0400 Subject: [PATCH 128/228] kind config added --- kind.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 kind.yml diff --git a/kind.yml b/kind.yml new file mode 100644 index 00000000..eaa1e935 --- /dev/null +++ b/kind.yml @@ -0,0 +1,4 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane \ No newline at end of file From 378b75feef3a6c535665e7883bfb881cc9260ee1 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Mon, 22 May 2023 09:42:46 -0400 Subject: [PATCH 129/228] adding makefile targets to auto build/tag/refer feo image for kuttl --- Makefile | 21 ++++++++++++++++++--- kuttl-config.yml | 4 ++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a729a098..0e0ab702 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,6 @@ ENVTEST_K8S_VERSION = 1.23 # For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both # cloud.redhat.com/frontend-operator-bundle:$VERSION and cloud.redhat.com/frontend-operator-catalog:$VERSION. IMAGE_TAG_BASE ?= cloud.redhat.com/frontend-operator - # BUNDLE_IMG defines the image:tag used for the bundle. # You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=/:) BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION) @@ -83,6 +82,7 @@ release: manifests kustomize controller-gen cd ../.. $(KUSTOMIZE) build config/default >> manifest.yaml + ##@ Development pre-push: manifests generate fmt vet build-template api-docs @@ -107,15 +107,30 @@ ENVTEST = $(shell pwd)/testbin/bin/setup-envtest envtest: ## Download envtest-setup locally if necessary. $(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest) -test: manifests envtest generate fmt vet +test: manifests envtest generate fmt vet KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out # gotestsum is used to generate xml for the tests. Embedded in the Dockerfile.pr junit: gotestsum manifests envtest generate fmt vet KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" $(PROJECT_DIR)/testbin/bin/gotestsum --junitfile artifacts/junit-ginko.xml -- ./... -coverprofile cover.out -kuttl: manifests envtest generate fmt vet +FEO_BUILD_TAG ?= $(shell git rev-parse --short=8 HEAD) +kuttl-release: manifests kustomize controller-gen + echo "---" > manifest.yaml + cd config/manager && $(KUSTOMIZE) edit set image controller=frontend-operator:${FEO_BUILD_TAG} + cd ../.. + $(KUSTOMIZE) build config/default >> manifest.yaml + +kuttl-build: + docker build -t frontend-operator:${FEO_BUILD_TAG} . + sed -i "s/controller/frontend-operator:${FEO_BUILD_TAG}/" kuttl-config.yml + +kuttl-teardown: + sed -i "s/frontend-operator:${FEO_BUILD_TAG}/controller/" kuttl-config.yml + +kuttl: manifests envtest generate fmt vet kuttl-build kubectl kuttl test --config kuttl-config.yml ./tests/e2e + make kuttl-teardown ##@ Build diff --git a/kuttl-config.yml b/kuttl-config.yml index e3c982f3..09c1a124 100644 --- a/kuttl-config.yml +++ b/kuttl-config.yml @@ -2,8 +2,8 @@ apiVersion: kuttl.dev/v1beta1 kind: TestSuite startKIND: true kindContainers: -- frontend-operator:8263b653 -crdDir: config/crd/kuttl-required/ +- controller +crdDir: config/crd/test-resources/ testDirs: - tests/e2e/ timeout: 320 From 4f61fd8d24cb8bc9926a58ecb8f4ab853c658997 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Mon, 22 May 2023 09:47:27 -0400 Subject: [PATCH 130/228] adding comments --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 0e0ab702..5f0941a7 100644 --- a/Makefile +++ b/Makefile @@ -114,20 +114,25 @@ test: manifests envtest generate fmt vet junit: gotestsum manifests envtest generate fmt vet KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" $(PROJECT_DIR)/testbin/bin/gotestsum --junitfile artifacts/junit-ginko.xml -- ./... -coverprofile cover.out +# Set tag to current commit hash FEO_BUILD_TAG ?= $(shell git rev-parse --short=8 HEAD) +# This gets called during kind cluster creation kuttl-release: manifests kustomize controller-gen echo "---" > manifest.yaml cd config/manager && $(KUSTOMIZE) edit set image controller=frontend-operator:${FEO_BUILD_TAG} cd ../.. $(KUSTOMIZE) build config/default >> manifest.yaml +# Responsible for building FEO image that will run in kind, and is the image we are testing kuttl-build: docker build -t frontend-operator:${FEO_BUILD_TAG} . sed -i "s/controller/frontend-operator:${FEO_BUILD_TAG}/" kuttl-config.yml +# undo kuttl-config changes kuttl-teardown: sed -i "s/frontend-operator:${FEO_BUILD_TAG}/controller/" kuttl-config.yml +# entry point for testing kuttl with kind kuttl: manifests envtest generate fmt vet kuttl-build kubectl kuttl test --config kuttl-config.yml ./tests/e2e make kuttl-teardown From b9a14f7447313ef3c0c45d24ead7f4a3363f4fd1 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Mon, 22 May 2023 11:47:04 -0400 Subject: [PATCH 131/228] add test stage for kuttl tests --- Jenkinsfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index dcba964c..e7396019 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,5 +32,15 @@ pipeline { } } } + + stage('KUTTL Tests'){ + steps { + withVault([configuration: configuration, vaultSecrets: secrets]) { + sh ''' + make kuttl + ''' + } + } + } } } From 8d27f1a643e6849abf3c57c9d61743c27621146b Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Mon, 22 May 2023 13:15:03 -0400 Subject: [PATCH 132/228] updated instructions for new kind based kuttl tests --- README.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a20ac0df..4197bb05 100644 --- a/README.md +++ b/README.md @@ -95,13 +95,37 @@ Once all that is in place you can run the kuttl tests: ```bash $ make kuttl ``` -Friendly reminder: make sure you have the frontend operator runnning (`make run-local`) before you run the tests or they will never work and you'll go nuts trying to figure out why. - If you want to run a single test you can do this: + +First build the frontend operator and don't tag it with it's current commit hash: +```bash +$ git rev-parse --short=8 HEAD # get commit hash +# Copy the output from above +$ docker build -t frontend-operator: . # commit hash used as tag +``` + +Update `kuttl-config.yml` so that `kindContainers` is referencing the built image (frontend-operator:(commit sha256)): +```yaml +apiVersion: kuttl.dev/v1beta1 +kind: TestSuite +startKIND: true +kindContainers: +- frontend-operator: +crdDir: config/crd/test-resources/ +testDirs: +- tests/e2e/ +timeout: 320 +parallel: 1 +commands: +- command: make kuttl-release +- command: oc apply -f manifest.yaml +``` +Once those are in place we can run any specific test. ```bash $ kubectl kuttl test --config kuttl-config.yml ./tests/e2e --test bundles ``` where `bundles` is the name of the directory that contains the test you want to run. +Note: you need to rebuild after committing more changes. From 87e48ea64dd03584484932becf8be1bea92fe3f0 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Tue, 23 May 2023 07:55:28 -0400 Subject: [PATCH 133/228] can we install kuttl with krew in jenkins --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e7396019..2b678116 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,7 +37,7 @@ pipeline { steps { withVault([configuration: configuration, vaultSecrets: secrets]) { sh ''' - make kuttl + kubectl krew install kuttl && make kuttl ''' } } From 77608dc816fae2fd81fe51966263163624336cb5 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Wed, 24 May 2023 07:34:39 -0400 Subject: [PATCH 134/228] install krew and kuttl for kuttl tests --- Jenkinsfile | 2 +- kuttl_test.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 kuttl_test.sh diff --git a/Jenkinsfile b/Jenkinsfile index 2b678116..d34b0a91 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,7 +37,7 @@ pipeline { steps { withVault([configuration: configuration, vaultSecrets: secrets]) { sh ''' - kubectl krew install kuttl && make kuttl + source ./kuttle_test.sh ''' } } diff --git a/kuttl_test.sh b/kuttl_test.sh new file mode 100644 index 00000000..f3ca0930 --- /dev/null +++ b/kuttl_test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -exv + +# Install krew for kubectl +( + set -x; cd "$(mktemp -d)" && + OS="$(uname | tr '[:upper:]' '[:lower:]')" && + ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" && + KREW="krew-${OS}_${ARCH}" && + curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" && + tar zxvf "${KREW}.tar.gz" && + ./"${KREW}" install krew +) +export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" +export PATH="/bins:$PATH" + +# Install kuttl with krew +kubectl krew install kuttl + +# Run kuttl tests +make kuttl \ No newline at end of file From 0541b928c3292e9cffd3587aa09d8638522cda39 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Wed, 24 May 2023 07:40:47 -0400 Subject: [PATCH 135/228] there is no E in kuttl --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d34b0a91..c6a4d01a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,7 +37,7 @@ pipeline { steps { withVault([configuration: configuration, vaultSecrets: secrets]) { sh ''' - source ./kuttle_test.sh + source ./kuttl_test.sh ''' } } From fb0705818fc8b84533bf96a799a2186c1e03a289 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Wed, 24 May 2023 13:20:55 -0400 Subject: [PATCH 136/228] grab kind-node imagine from quay repo instead of docker.io --- kind.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kind.yml b/kind.yml index eaa1e935..cabd5a76 100644 --- a/kind.yml +++ b/kind.yml @@ -1,4 +1,5 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: -- role: control-plane \ No newline at end of file +- role: control-plane + image: quay.io/rh_ee_maholder/kind-node:v1.27.2 \ No newline at end of file From 98b1c9df971faa044168ded9a37069701465eae3 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Wed, 24 May 2023 13:21:25 -0400 Subject: [PATCH 137/228] return kuttl result as status --- kuttl_test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kuttl_test.sh b/kuttl_test.sh index f3ca0930..63cb5f0b 100644 --- a/kuttl_test.sh +++ b/kuttl_test.sh @@ -19,4 +19,7 @@ export PATH="/bins:$PATH" kubectl krew install kuttl # Run kuttl tests -make kuttl \ No newline at end of file +make kuttl +KUTTL_RESULT=$? + +exit $KUTTL_RESULT From 52a6037fd0e10f51ab6d06dacf984e2bf096636a Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Thu, 25 May 2023 09:01:44 -0400 Subject: [PATCH 138/228] going back to a mocked control plane --- Makefile | 25 +++---------------------- README.md | 30 +++--------------------------- kind.yml | 5 ----- kuttl-config.yml | 12 +++++++----- 4 files changed, 13 insertions(+), 59 deletions(-) delete mode 100644 kind.yml diff --git a/Makefile b/Makefile index 5f0941a7..976051bf 100644 --- a/Makefile +++ b/Makefile @@ -114,28 +114,9 @@ test: manifests envtest generate fmt vet junit: gotestsum manifests envtest generate fmt vet KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" $(PROJECT_DIR)/testbin/bin/gotestsum --junitfile artifacts/junit-ginko.xml -- ./... -coverprofile cover.out -# Set tag to current commit hash -FEO_BUILD_TAG ?= $(shell git rev-parse --short=8 HEAD) -# This gets called during kind cluster creation -kuttl-release: manifests kustomize controller-gen - echo "---" > manifest.yaml - cd config/manager && $(KUSTOMIZE) edit set image controller=frontend-operator:${FEO_BUILD_TAG} - cd ../.. - $(KUSTOMIZE) build config/default >> manifest.yaml - -# Responsible for building FEO image that will run in kind, and is the image we are testing -kuttl-build: - docker build -t frontend-operator:${FEO_BUILD_TAG} . - sed -i "s/controller/frontend-operator:${FEO_BUILD_TAG}/" kuttl-config.yml - -# undo kuttl-config changes -kuttl-teardown: - sed -i "s/frontend-operator:${FEO_BUILD_TAG}/controller/" kuttl-config.yml - # entry point for testing kuttl with kind -kuttl: manifests envtest generate fmt vet kuttl-build - kubectl kuttl test --config kuttl-config.yml ./tests/e2e - make kuttl-teardown +kuttl: manifests envtest generate fmt vet + kubectl kuttl test --config kuttl-config.yml ./tests/e2e --test bundles ##@ Build @@ -146,7 +127,7 @@ run: manifests generate fmt vet ## Run a controller from your host. go run ./main.go docker-build: test ## Build docker image with the manager. - docker build -t ${IMG} . + docker build -t ${IMG} . docker-push: ## Push docker image with the manager. docker push ${IMG} diff --git a/README.md b/README.md index 4197bb05..ae6ee9e1 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ If you want to access the app from your computer, you have to update /etc/hosts Once you update it you can access the app from `https://env-boot/insights/inventory` + ## E2E testing with kuttl [Kuttl](https://kuttl.dev/) is an end to end testing framework for Kubernetes operators. We hope to provide full test coverage for the Frontend Operator with kuttl. @@ -95,37 +96,12 @@ Once all that is in place you can run the kuttl tests: ```bash $ make kuttl ``` -If you want to run a single test you can do this: - -First build the frontend operator and don't tag it with it's current commit hash: -```bash -$ git rev-parse --short=8 HEAD # get commit hash -# Copy the output from above -$ docker build -t frontend-operator: . # commit hash used as tag -``` +Friendly reminder: make sure you have the frontend operator runnning (`make run-local`) before you run the tests or they will never work and you'll go nuts trying to figure out why. -Update `kuttl-config.yml` so that `kindContainers` is referencing the built image (frontend-operator:(commit sha256)): -```yaml -apiVersion: kuttl.dev/v1beta1 -kind: TestSuite -startKIND: true -kindContainers: -- frontend-operator: -crdDir: config/crd/test-resources/ -testDirs: -- tests/e2e/ -timeout: 320 -parallel: 1 -commands: -- command: make kuttl-release -- command: oc apply -f manifest.yaml -``` -Once those are in place we can run any specific test. +If you want to run a single test you can do this: ```bash $ kubectl kuttl test --config kuttl-config.yml ./tests/e2e --test bundles ``` where `bundles` is the name of the directory that contains the test you want to run. -Note: you need to rebuild after committing more changes. - diff --git a/kind.yml b/kind.yml deleted file mode 100644 index cabd5a76..00000000 --- a/kind.yml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: -- role: control-plane - image: quay.io/rh_ee_maholder/kind-node:v1.27.2 \ No newline at end of file diff --git a/kuttl-config.yml b/kuttl-config.yml index 09c1a124..e65b97dc 100644 --- a/kuttl-config.yml +++ b/kuttl-config.yml @@ -1,13 +1,15 @@ apiVersion: kuttl.dev/v1beta1 kind: TestSuite -startKIND: true -kindContainers: -- controller +startKIND: false +startControlPlane: true crdDir: config/crd/test-resources/ testDirs: - tests/e2e/ timeout: 320 parallel: 1 + commands: -- command: make kuttl-release -- command: oc apply -f manifest.yaml +- command: make release +- command: kubectl apply -f manifest.yaml +- command: make run + background: true \ No newline at end of file From 24956889edef7736ac2288b7a6f71a652e87894b Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Thu, 25 May 2023 14:02:20 -0400 Subject: [PATCH 139/228] removed delete jobs due to kuttls tendency to hang on deleting steps --- tests/e2e/basic-frontend/03-delete.yaml | 13 ------------- tests/e2e/bundles/03-delete.yaml | 13 ------------- tests/e2e/cachebust/05-delete.yaml | 16 ---------------- tests/e2e/frontend-paths/03-delete.yaml | 14 -------------- tests/e2e/generate-nav-json/03-delete.yaml | 13 ------------- tests/e2e/networking/03-delete.yaml | 13 ------------- tests/e2e/ssl/03-delete.yaml | 16 ---------------- tests/e2e/storage/03-delete.yaml | 13 ------------- tests/e2e/whitelist/03-delete.yaml | 13 ------------- 9 files changed, 124 deletions(-) delete mode 100644 tests/e2e/basic-frontend/03-delete.yaml delete mode 100644 tests/e2e/bundles/03-delete.yaml delete mode 100644 tests/e2e/cachebust/05-delete.yaml delete mode 100644 tests/e2e/frontend-paths/03-delete.yaml delete mode 100644 tests/e2e/generate-nav-json/03-delete.yaml delete mode 100644 tests/e2e/networking/03-delete.yaml delete mode 100644 tests/e2e/ssl/03-delete.yaml delete mode 100644 tests/e2e/storage/03-delete.yaml delete mode 100644 tests/e2e/whitelist/03-delete.yaml diff --git a/tests/e2e/basic-frontend/03-delete.yaml b/tests/e2e/basic-frontend/03-delete.yaml deleted file mode 100644 index 02f46fa6..00000000 --- a/tests/e2e/basic-frontend/03-delete.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-basic-app-environment -- apiVersion: v1 - kind: Namespace - name: test-basic-app diff --git a/tests/e2e/bundles/03-delete.yaml b/tests/e2e/bundles/03-delete.yaml deleted file mode 100644 index 902384c7..00000000 --- a/tests/e2e/bundles/03-delete.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-bundles-environment -- apiVersion: v1 - kind: Namespace - name: test-bundles diff --git a/tests/e2e/cachebust/05-delete.yaml b/tests/e2e/cachebust/05-delete.yaml deleted file mode 100644 index 352b8145..00000000 --- a/tests/e2e/cachebust/05-delete.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome-two -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-cachebust-environment -- apiVersion: v1 - kind: Namespace - name: test-cachebust diff --git a/tests/e2e/frontend-paths/03-delete.yaml b/tests/e2e/frontend-paths/03-delete.yaml deleted file mode 100644 index a563e540..00000000 --- a/tests/e2e/frontend-paths/03-delete.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-basic-frontend-environment -- apiVersion: v1 - kind: Namespace - name: test-basic-frontend - diff --git a/tests/e2e/generate-nav-json/03-delete.yaml b/tests/e2e/generate-nav-json/03-delete.yaml deleted file mode 100644 index 9bda5451..00000000 --- a/tests/e2e/generate-nav-json/03-delete.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-generate-nav-json-environment -- apiVersion: v1 - kind: Namespace - name: test-generate-nav-json diff --git a/tests/e2e/networking/03-delete.yaml b/tests/e2e/networking/03-delete.yaml deleted file mode 100644 index 19cc6d59..00000000 --- a/tests/e2e/networking/03-delete.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-networking-environment -- apiVersion: v1 - kind: Namespace - name: test-networking diff --git a/tests/e2e/ssl/03-delete.yaml b/tests/e2e/ssl/03-delete.yaml deleted file mode 100644 index d6b8e0b5..00000000 --- a/tests/e2e/ssl/03-delete.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-ssl-environment -- apiVersion: v1 - kind: Secret - name: chrome-certs -- apiVersion: v1 - kind: Namespace - name: test-ssl diff --git a/tests/e2e/storage/03-delete.yaml b/tests/e2e/storage/03-delete.yaml deleted file mode 100644 index 6f9cc066..00000000 --- a/tests/e2e/storage/03-delete.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-storage-environment -- apiVersion: v1 - kind: Namespace - name: test-storage diff --git a/tests/e2e/whitelist/03-delete.yaml b/tests/e2e/whitelist/03-delete.yaml deleted file mode 100644 index 5d65dd9a..00000000 --- a/tests/e2e/whitelist/03-delete.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -apiVersion: kuttl.dev/v1beta1 -kind: TestStep -delete: -- apiVersion: cloud.redhat.com/v1alpha1 - kind: Frontend - name: chrome -- apiVersion: cloud.redhat.com/v1alpha1 - kind: FrontendEnvironment - name: test-whitelist-environment -- apiVersion: v1 - kind: Namespace - name: test-whitelist From e4c19168b7053049d1629579fe80c70cf358f53e Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Thu, 25 May 2023 14:02:42 -0400 Subject: [PATCH 140/228] updated test to validate off deloyment not pod --- tests/e2e/storage/02-assert.yaml | 55 ++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/tests/e2e/storage/02-assert.yaml b/tests/e2e/storage/02-assert.yaml index 600c40de..41e436ac 100644 --- a/tests/e2e/storage/02-assert.yaml +++ b/tests/e2e/storage/02-assert.yaml @@ -1,25 +1,46 @@ --- -kind: Pod -apiVersion: v1 +kind: Deployment +apiVersion: apps/v1 metadata: - namespace: test-storage labels: frontend: chrome + name: chrome-frontend + namespace: test-storage + ownerReferences: + - apiVersion: cloud.redhat.com/v1alpha1 + controller: true + kind: Frontend + name: chrome spec: - volumes: - - name: config - configMap: - name: test-storage-environment - defaultMode: 420 - - projected: - defaultMode: 420 - containers: - - name: fe-image - image: quay.io/cloudservices/insights-chrome-frontend:720317c - volumeMounts: - - name: config - mountPath: /opt/app-root/src/build/operator-generated - - mountPath: /var/run/secrets/kubernetes.io/serviceaccount + template: + metadata: + labels: + frontend: chrome + spec: + containers: + - image: quay.io/cloudservices/insights-chrome-frontend:720317c + imagePullPolicy: IfNotPresent + name: fe-image + ports: + - containerPort: 80 + name: web + protocol: TCP + - containerPort: 9000 + name: metrics + protocol: TCP + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /opt/app-root/src/build/operator-generated + name: config + securityContext: {} + terminationGracePeriodSeconds: 30 + volumes: + - configMap: + defaultMode: 420 + name: test-storage-environment + name: config --- kind: ConfigMap apiVersion: v1 From 4a705a2cb052e6e455ae896514d0ae299e301172 Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Thu, 25 May 2023 14:03:53 -0400 Subject: [PATCH 141/228] get assets for testing kuttl in jenkins --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 976051bf..a96632a1 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ junit: gotestsum manifests envtest generate fmt vet # entry point for testing kuttl with kind kuttl: manifests envtest generate fmt vet - kubectl kuttl test --config kuttl-config.yml ./tests/e2e --test bundles + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" kubectl kuttl test --config kuttl-config.yml ./tests/e2e ##@ Build From 5d8527b69b951b3e61a49557ca90e8695bd6876a Mon Sep 17 00:00:00 2001 From: Matt Holder Date: Thu, 25 May 2023 14:05:18 -0400 Subject: [PATCH 142/228] run kuttl as mocked control plane with smarter make targets --- kuttl-config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kuttl-config.yml b/kuttl-config.yml index e65b97dc..a2076604 100644 --- a/kuttl-config.yml +++ b/kuttl-config.yml @@ -7,9 +7,8 @@ testDirs: - tests/e2e/ timeout: 320 parallel: 1 - commands: -- command: make release -- command: kubectl apply -f manifest.yaml -- command: make run +- command: make install +- command: make build +- command: ./bin/manager background: true \ No newline at end of file From 83124dfbdce5341ef0f266dbd8d8eeca4f4b172d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 5 Jul 2023 08:21:18 -0400 Subject: [PATCH 143/228] Add optional route configs. --- api/v1alpha1/frontend_types.go | 7 ++++--- api/v1alpha1/zz_generated.deepcopy.go | 9 ++++++++- config/crd/bases/cloud.redhat.com_frontends.yaml | 2 ++ deploy.yml | 2 ++ docs/antora/modules/ROOT/pages/api_reference.adoc | 1 + 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/api/v1alpha1/frontend_types.go b/api/v1alpha1/frontend_types.go index 08526acb..f598ec92 100644 --- a/api/v1alpha1/frontend_types.go +++ b/api/v1alpha1/frontend_types.go @@ -93,9 +93,10 @@ type Module struct { } type Route struct { - Pathname string `json:"pathname" yaml:"pathname"` - Dynamic bool `json:"dynamic,omitempty" yaml:"dynamic,omitempty"` - Exact bool `json:"exact,omitempty" yaml:"exact,omitempty"` + Pathname string `json:"pathname" yaml:"pathname"` + Dynamic bool `json:"dynamic,omitempty" yaml:"dynamic,omitempty"` + Exact bool `json:"exact,omitempty" yaml:"exact,omitempty"` + Props *apiextensions.JSON `json:"props,omitempty" yaml:"props,omitempty"` } // +kubebuilder:object:root=true diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index f00cd488..abc2c815 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -582,7 +582,9 @@ func (in *Module) DeepCopyInto(out *Module) { if in.Routes != nil { in, out := &in.Routes, &out.Routes *out = make([]Route, len(*in)) - copy(*out, *in) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.Dependencies != nil { in, out := &in.Dependencies, &out.Dependencies @@ -624,6 +626,11 @@ func (in *MonitoringConfig) DeepCopy() *MonitoringConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Route) DeepCopyInto(out *Route) { *out = *in + if in.Props != nil { + in, out := &in.Props, &out.Props + *out = new(v1.JSON) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route. diff --git a/config/crd/bases/cloud.redhat.com_frontends.yaml b/config/crd/bases/cloud.redhat.com_frontends.yaml index cbd020e2..2e978404 100644 --- a/config/crd/bases/cloud.redhat.com_frontends.yaml +++ b/config/crd/bases/cloud.redhat.com_frontends.yaml @@ -120,6 +120,8 @@ spec: type: boolean pathname: type: string + props: + x-kubernetes-preserve-unknown-fields: true required: - pathname type: object diff --git a/deploy.yml b/deploy.yml index 2d021f05..89543c75 100644 --- a/deploy.yml +++ b/deploy.yml @@ -541,6 +541,8 @@ objects: type: boolean pathname: type: string + props: + x-kubernetes-preserve-unknown-fields: true required: - pathname type: object diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index ebbf8551..5c5b7309 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -472,6 +472,7 @@ FrontendSpec defines the desired state of Frontend | *`pathname`* __string__ | | *`dynamic`* __boolean__ | | *`exact`* __boolean__ | +| *`props`* __JSON__ | |=== From f07ec967e6efe62b7fb3ad0f2f431087ab0bad77 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Jul 2023 13:50:02 -0400 Subject: [PATCH 144/228] Add limits and requests. These values though, are totally made up. --- controllers/reconcile.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 20fe5fca..b1725911 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -20,6 +20,7 @@ import ( networking "k8s.io/api/networking/v1" apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" k8serr "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -140,6 +141,16 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir }, }, VolumeMounts: populateContainerVolumeMounts(frontendEnvironment), + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("100m"), + v1.ResourceMemory: resource.MustParse("128Mi"), + }, + Limits: v1.ResourceList{ + v1.ResourceCPU: resource.MustParse("500m"), + v1.ResourceMemory: resource.MustParse("512Mi"), + }, + }, }, } } From f7597f77ddb22ef76e871940c8313955166d3359 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Jul 2023 14:00:11 -0400 Subject: [PATCH 145/228] Better numbers, I think, based on observations on stage and prod. We should always be well under these. --- controllers/reconcile.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index b1725911..2c5ea9b4 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -143,12 +143,12 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir VolumeMounts: populateContainerVolumeMounts(frontendEnvironment), Resources: v1.ResourceRequirements{ Requests: v1.ResourceList{ - v1.ResourceCPU: resource.MustParse("100m"), - v1.ResourceMemory: resource.MustParse("128Mi"), + v1.ResourceCPU: resource.MustParse("1m"), + v1.ResourceMemory: resource.MustParse("64Mi"), }, Limits: v1.ResourceList{ - v1.ResourceCPU: resource.MustParse("500m"), - v1.ResourceMemory: resource.MustParse("512Mi"), + v1.ResourceCPU: resource.MustParse("10m"), + v1.ResourceMemory: resource.MustParse("128Mi"), }, }, }, From 8508d5e73ecca80707473cd28b6a30a85a446a7a Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Jul 2023 14:07:30 -0400 Subject: [PATCH 146/228] Another change --- controllers/reconcile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 2c5ea9b4..7f231608 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -144,11 +144,11 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir Resources: v1.ResourceRequirements{ Requests: v1.ResourceList{ v1.ResourceCPU: resource.MustParse("1m"), - v1.ResourceMemory: resource.MustParse("64Mi"), + v1.ResourceMemory: resource.MustParse("128Mi"), }, Limits: v1.ResourceList{ v1.ResourceCPU: resource.MustParse("10m"), - v1.ResourceMemory: resource.MustParse("128Mi"), + v1.ResourceMemory: resource.MustParse("256Mi"), }, }, }, From d484a9ef9a95d8e97108a2c5c4c1c6e9f03d2cf7 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 10 Jul 2023 14:34:11 -0400 Subject: [PATCH 147/228] Add livliness and readiness probes --- controllers/reconcile.go | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 20fe5fca..d2f904d8 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -140,8 +140,21 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir }, }, VolumeMounts: populateContainerVolumeMounts(frontendEnvironment), - }, - } + LivenessProbe: &v1.Probe{ + ProbeHandler: v1.ProbeHandler{ + HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(80)}, + }, + InitialDelaySeconds: 60, + PeriodSeconds: 500, + FailureThreshold: 3, + }, + ReadinessProbe: &v1.Probe{ + ProbeHandler: v1.ProbeHandler{ + HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(80)}, + }, + InitialDelaySeconds: 60, + }, + }} } func getAkamaiSecretName(frontendEnvironment *crd.FrontendEnvironment) string { From c95cde5edfdd06f6837a5b15bf3b10ae6c69cb72 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 11 Jul 2023 09:18:55 -0400 Subject: [PATCH 148/228] Update limits and requests based on resource-limits in limit ranges on our cluster --- controllers/reconcile.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 7f231608..597b0a7f 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -143,12 +143,12 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir VolumeMounts: populateContainerVolumeMounts(frontendEnvironment), Resources: v1.ResourceRequirements{ Requests: v1.ResourceList{ - v1.ResourceCPU: resource.MustParse("1m"), - v1.ResourceMemory: resource.MustParse("128Mi"), + v1.ResourceCPU: resource.MustParse("100m"), + v1.ResourceMemory: resource.MustParse("256Mi"), }, Limits: v1.ResourceList{ - v1.ResourceCPU: resource.MustParse("10m"), - v1.ResourceMemory: resource.MustParse("256Mi"), + v1.ResourceCPU: resource.MustParse("1"), + v1.ResourceMemory: resource.MustParse("512Mi"), }, }, }, From 6735c72cd93ebb506c708642bbcd680a1a82652b Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 11 Jul 2023 13:10:25 -0400 Subject: [PATCH 149/228] periodSeconds to 60 --- controllers/reconcile.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index d2f904d8..9cfb1d17 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -144,15 +144,15 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir ProbeHandler: v1.ProbeHandler{ HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(80)}, }, - InitialDelaySeconds: 60, - PeriodSeconds: 500, + InitialDelaySeconds: 10, + PeriodSeconds: 60, FailureThreshold: 3, }, ReadinessProbe: &v1.Probe{ ProbeHandler: v1.ProbeHandler{ HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(80)}, }, - InitialDelaySeconds: 60, + InitialDelaySeconds: 10, }, }} } From 7fc775421cadded9bec6dc9df46f3467d0435815 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Jul 2023 08:30:42 -0400 Subject: [PATCH 150/228] Update probe port --- controllers/reconcile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index ac237a4a..da0f12a5 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -153,7 +153,7 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir }, LivenessProbe: &v1.Probe{ ProbeHandler: v1.ProbeHandler{ - HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(80)}, + HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(8000)}, }, InitialDelaySeconds: 10, PeriodSeconds: 60, @@ -161,7 +161,7 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir }, ReadinessProbe: &v1.Probe{ ProbeHandler: v1.ProbeHandler{ - HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(80)}, + HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(8000)}, }, InitialDelaySeconds: 10, }, From ca60c192d61e957d070440706bc4a16236be3534 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Jul 2023 11:46:24 -0400 Subject: [PATCH 151/228] Add conditional probeScheme to support HTTPS --- controllers/reconcile.go | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index da0f12a5..c529e70a 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -122,6 +122,13 @@ func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) } func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvironment *crd.FrontendEnvironment) { + + // set the URI Scheme for the probe + probeScheme := v1.URISchemeHTTP + if !frontendEnvironment.Spec.SSL { + probeScheme = v1.URISchemeHTTPS + } + d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) // Modify the obejct to set the things we care about @@ -153,7 +160,11 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir }, LivenessProbe: &v1.Probe{ ProbeHandler: v1.ProbeHandler{ - HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(8000)}, + HTTPGet: &v1.HTTPGetAction{ + Path: "/", + Port: intstr.FromInt(80), + Scheme: probeScheme, + }, }, InitialDelaySeconds: 10, PeriodSeconds: 60, @@ -161,7 +172,11 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir }, ReadinessProbe: &v1.Probe{ ProbeHandler: v1.ProbeHandler{ - HTTPGet: &v1.HTTPGetAction{Path: "/", Port: intstr.FromInt(8000)}, + HTTPGet: &v1.HTTPGetAction{ + Path: "/", + Port: intstr.FromInt(80) + Scheme: probeScheme + }, }, InitialDelaySeconds: 10, }, From de8abf60f34361c028ac232b2186df9cd9731a12 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Jul 2023 11:47:27 -0400 Subject: [PATCH 152/228] git push --set-upstream origin probe_scheme --- controllers/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index c529e70a..781fdffd 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -125,7 +125,7 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir // set the URI Scheme for the probe probeScheme := v1.URISchemeHTTP - if !frontendEnvironment.Spec.SSL { + if frontendEnvironment.Spec.SSL { probeScheme = v1.URISchemeHTTPS } From 8a9b61454dd7b5eb5f322e8ad978f06c91709628 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Jul 2023 11:50:03 -0400 Subject: [PATCH 153/228] lame --- controllers/reconcile.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 781fdffd..aff42142 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -173,9 +173,9 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir ReadinessProbe: &v1.Probe{ ProbeHandler: v1.ProbeHandler{ HTTPGet: &v1.HTTPGetAction{ - Path: "/", - Port: intstr.FromInt(80) - Scheme: probeScheme + Path: "/", + Port: intstr.FromInt(80), + Scheme: probeScheme, }, }, InitialDelaySeconds: 10, From d7c48144e3ea917f4abbe354554432374f027e27 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 12 Jul 2023 12:00:11 -0400 Subject: [PATCH 154/228] Wrong port --- controllers/reconcile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index aff42142..e705bfd5 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -162,7 +162,7 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir ProbeHandler: v1.ProbeHandler{ HTTPGet: &v1.HTTPGetAction{ Path: "/", - Port: intstr.FromInt(80), + Port: intstr.FromInt(8000), Scheme: probeScheme, }, }, @@ -174,7 +174,7 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir ProbeHandler: v1.ProbeHandler{ HTTPGet: &v1.HTTPGetAction{ Path: "/", - Port: intstr.FromInt(80), + Port: intstr.FromInt(8000), Scheme: probeScheme, }, }, From 3e2f8456fa61599649832f6316a62d4d4aa82f90 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 21 Jul 2023 12:45:14 -0400 Subject: [PATCH 155/228] Add base Dockerfile. Update main dockerfile to use Go 1.19 --- Dockerfile | 2 +- Dockerfile.base | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.base diff --git a/Dockerfile b/Dockerfile index 74973633..4d8ad467 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM registry.access.redhat.com/ubi8/go-toolset:1.18.4-8.1669838000 as builder +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 as builder WORKDIR /workspace # Copy the Go Modules manifests diff --git a/Dockerfile.base b/Dockerfile.base new file mode 100644 index 00000000..e5d0a2c2 --- /dev/null +++ b/Dockerfile.base @@ -0,0 +1,22 @@ +# Build the manager binary +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 as builder + +WORKDIR /workspace + +COPY go.mod go.mod +COPY go.sum go.sum + +RUN go mod download + +COPY main.go main.go +COPY api/ api/ +COPY controllers/ controllers/ + +USER 0 + +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager main.go + +RUN rm main.go +RUN rm -rf api +RUN rm -rf controllers + From 9652dcece3c259b2e02210dd25b88d7c38092530 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 21 Jul 2023 12:54:43 -0400 Subject: [PATCH 156/228] Make sure go version is the same everywhere --- Dockerfile | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d8ad467..3f0003ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 as builder +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 as buildergo WORKDIR /workspace # Copy the Go Modules manifests diff --git a/go.mod b/go.mod index 701a9f8f..47567dbe 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/RedHatInsights/frontend-operator -go 1.17 +go 1.19 require ( github.com/RedHatInsights/clowder v0.50.0 From 1240f7e660a52488c6ed16484bf034b6ffaa9b8e Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 21 Jul 2023 13:29:14 -0400 Subject: [PATCH 157/228] go mod tidy --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index ecc1e7f6..bb89d36f 100644 --- a/go.sum +++ b/go.sum @@ -77,8 +77,6 @@ github.com/RedHatInsights/clowder v0.50.0 h1:Jrzpo5uY9ghsrR4DeMsDnyR7EGZYAVjXBt4 github.com/RedHatInsights/clowder v0.50.0/go.mod h1:sY0IIuVDz/PN7l+R/8MfH51V0t72IKVEwxU+DwluG14= github.com/RedHatInsights/go-difflib v1.0.0 h1:BoruyjZfxO81sEynhkG6c4SMAQOjuBWezcJxtGK8dyw= github.com/RedHatInsights/go-difflib v1.0.0/go.mod h1:UMKOFdypYfrKT1B1nbGodM09nhOiAmcjes8qWP7Myrs= -github.com/RedHatInsights/rhc-osdk-utils v0.6.2 h1:VXTqk6VHrsaEPSw3N95rCq+g0y2LR7t9Za0wBS2/RyA= -github.com/RedHatInsights/rhc-osdk-utils v0.6.2/go.mod h1:MQoUQGaVjM25JsownEKKa2Tef0qnJOm1ljocaQ0nx40= github.com/RedHatInsights/rhc-osdk-utils v0.7.0 h1:KgOiw2nKS26RuiSRVWVHtXNPx23VMspuB0bLCLIAlTs= github.com/RedHatInsights/rhc-osdk-utils v0.7.0/go.mod h1:MQoUQGaVjM25JsownEKKa2Tef0qnJOm1ljocaQ0nx40= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= From e6a4821d2a00712059f10e2341c751dcd378a839 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 21 Jul 2023 13:32:20 -0400 Subject: [PATCH 158/228] Fix Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3f0003ef..4d8ad467 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 as buildergo +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 as builder WORKDIR /workspace # Copy the Go Modules manifests From fd2181c7d32c34aff6b89fff61c541779338e7c3 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 24 Jul 2023 13:48:47 -0400 Subject: [PATCH 159/228] Update build script to support base builds --- build_deploy.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/build_deploy.sh b/build_deploy.sh index 94be6845..a615788a 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -17,7 +17,28 @@ fi DOCKER_CONF="$PWD/.docker" mkdir -p "$DOCKER_CONF" + docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io -docker --config="$DOCKER_CONF" build -t "${IMAGE}:${IMAGE_TAG}" . + + +### Start base image build and push +BASE_TAG=`cat go.mod go.sum Dockerfile.base | sha256sum | head -c 8` +BASE_IMG=quay.io/cloudservices/frontend-operator-build-base:$BASE_TAG +RESPONSE=$( \ + curl -Ls -H "Authorization: Bearer $QUAY_TOKEN" \ + "https://quay.io/api/v1/repository/cloudservices/frontend-operator-build-base/tag/?specificTag=$BASE_TAG" \ + ) +echo "received HTTP response: $RESPONSE" +# find all non-expired tags +VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length') + +if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then + docker --config="$DOCKER_CONF" build -f Dockerfile.base . -t "$BASE_IMG" + docker --config="$DOCKER_CONF" push "$BASE_IMG" +fi +docker --config="$DOCKER_CONF" build --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" +#### End + +docker --config="$DOCKER_CONF" build --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" . docker --config="$DOCKER_CONF" push "${IMAGE}:${IMAGE_TAG}" From b174781ce3844a27d96411deec9ca9e047681a74 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 09:50:06 -0400 Subject: [PATCH 160/228] Update Dockerfile to use the new base image --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d8ad467..4a43cb8c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ # Build the manager binary -FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 as builder +ARG BASE_IMAGE= +FROM $BASE_IMAGE as builder WORKDIR /workspace # Copy the Go Modules manifests @@ -14,12 +15,10 @@ COPY main.go main.go COPY api/ api/ COPY controllers/ controllers/ -USER 0 - # Build RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager main.go -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.7-1031 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1014 WORKDIR / COPY --from=builder /workspace/manager . USER 65534:65534 From a2134106d8a09b396a072e33004085ad29fae293 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 13:15:35 -0400 Subject: [PATCH 161/228] Bump go in Dockerfile.pr. Slim down the pr check script to see if I can get a handle on it --- build/Dockerfile.pr | 2 +- pr_check.sh | 24 +++++------------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/build/Dockerfile.pr b/build/Dockerfile.pr index 9bd39a83..11796a2c 100644 --- a/build/Dockerfile.pr +++ b/build/Dockerfile.pr @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8/go-toolset:1.17.7 +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 USER 0 RUN dnf install -y openssh-clients git podman make which go jq RUN mkdir /root/go -p diff --git a/pr_check.sh b/pr_check.sh index 48fa9a21..92a5caab 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -2,32 +2,18 @@ set -exv -# Note, this does not currently work with podman. pr_check_inner.sh has insufficient permissions -RUNTIME="docker" -DOCKER_CONF="$PWD/.docker" -mkdir -p "$DOCKER_CONF" - -export IMAGE_TAG=`git rev-parse --short HEAD` -export IMAGE_NAME=quay.io/cloudservices/frontend-operator +mkdir -p "$PWD/.docker" CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}" -# NOTE: Make sure this volume is mounted 'ro', otherwise Jenkins cannot clean up the workspace due to file permission errors -set +e -# Run the pr check container (stored in the build dir) and invoke the -# pr_check_inner as its command -$RUNTIME run -i \ ---name $CONTAINER_NAME \ --v $PWD:/workspace:ro \ -quay.io/bholifie/frontend-op-pr-check:v0.0.8 \ -/workspace/build/pr_check_inner.sh + +docker run -i --name $CONTAINER_NAME -v $PWD:/workspace:ro quay.io/bholifie/frontend-op-pr-check:v0.0.8 /workspace/build/pr_check_inner.sh TEST_RESULT=$? mkdir -p artifacts -$RUNTIME cp $CONTAINER_NAME:/container_workspace/artifacts/ $PWD +docker cp $CONTAINER_NAME:/container_workspace/artifacts/ $PWD -$RUNTIME rm -f $CONTAINER_NAME -set -e +docker rm -f $CONTAINER_NAME exit $TEST_RESULT From 36fcfde55ba09e6376c2be56623047bff801bc3c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 14:14:03 -0400 Subject: [PATCH 162/228] I think this is a rough approximation of what clowder does. --- Dockerfile | 2 +- build/Dockerfile.pr | 3 +-- pr_check.sh | 8 +++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4a43cb8c..6908288c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ COPY controllers/ controllers/ # Build RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager main.go -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1014 +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 WORKDIR / COPY --from=builder /workspace/manager . USER 65534:65534 diff --git a/build/Dockerfile.pr b/build/Dockerfile.pr index 11796a2c..293bf2a3 100644 --- a/build/Dockerfile.pr +++ b/build/Dockerfile.pr @@ -9,5 +9,4 @@ RUN GOBIN=/root/go go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0 && rm -rf /root/go/pkg ENV GOBIN="/root/go" RUN ln -s /usr/bin/podman /usr/bin/docker -COPY pr_check_inner.sh . -RUN chmod 775 pr_check_inner.sh + diff --git a/pr_check.sh b/pr_check.sh index 92a5caab..beb5c33e 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -6,7 +6,13 @@ mkdir -p "$PWD/.docker" CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}" -docker run -i --name $CONTAINER_NAME -v $PWD:/workspace:ro quay.io/bholifie/frontend-op-pr-check:v0.0.8 /workspace/build/pr_check_inner.sh +# We're mounting the jenkins workspace over the root of the container +# This means that the pr_check_inner.sh script will be run in the context of the jenkins workspace +# This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time +# but the template_check.sh isn't. I couldn't figure out how it was sourcing it +#docker run -i --name $CONTAINER_NAME -v $PWD:/workspace:ro quay.io/bholifie/frontend-op-pr-check:v0.0.8 /workspace/build/pr_check_inner.sh + +docker build -t $CONTAINER_NAME -f build/Dockerfile.pr TEST_RESULT=$? From f05b83e2e1ee4f3ad55185d658f85003b89e17fd Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 14:23:42 -0400 Subject: [PATCH 163/228] This should change the pr script --- pr_check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pr_check.sh b/pr_check.sh index beb5c33e..baa6d5d2 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -10,10 +10,11 @@ CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}" # This means that the pr_check_inner.sh script will be run in the context of the jenkins workspace # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it -#docker run -i --name $CONTAINER_NAME -v $PWD:/workspace:ro quay.io/bholifie/frontend-op-pr-check:v0.0.8 /workspace/build/pr_check_inner.sh docker build -t $CONTAINER_NAME -f build/Dockerfile.pr +docker run -i --name $CONTAINER_NAME -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh + TEST_RESULT=$? mkdir -p artifacts From ca434590cda5d145dfa6279b8e2fe0027c8fc93e Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 14:25:04 -0400 Subject: [PATCH 164/228] lil dot --- pr_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_check.sh b/pr_check.sh index baa6d5d2..4a3cce54 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -11,7 +11,7 @@ CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}" # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it -docker build -t $CONTAINER_NAME -f build/Dockerfile.pr +docker build -t $CONTAINER_NAME -f build/Dockerfile.pr . docker run -i --name $CONTAINER_NAME -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh From afdcad41a3a7c76ef1a940098d993280fed03225 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 14:30:50 -0400 Subject: [PATCH 165/228] Add python to pr check container. --- build/Dockerfile.pr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile.pr b/build/Dockerfile.pr index 293bf2a3..f1c76418 100644 --- a/build/Dockerfile.pr +++ b/build/Dockerfile.pr @@ -1,6 +1,6 @@ FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 USER 0 -RUN dnf install -y openssh-clients git podman make which go jq +RUN dnf install -y openssh-clients git podman make which go jq python RUN mkdir /root/go -p RUN GOBIN=/root/go go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 \ && GOBIN=/root/go go install sigs.k8s.io/kustomize/kustomize/v4@v4.5.2 \ From a93f12f45e4956ca0d181e324b9b8f31b08fa05c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 14:31:43 -0400 Subject: [PATCH 166/228] Maybe this? --- build/Dockerfile.pr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Dockerfile.pr b/build/Dockerfile.pr index f1c76418..498d8b45 100644 --- a/build/Dockerfile.pr +++ b/build/Dockerfile.pr @@ -1,6 +1,6 @@ FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 USER 0 -RUN dnf install -y openssh-clients git podman make which go jq python +RUN dnf install -y openssh-clients git podman make which go jq python3 RUN mkdir /root/go -p RUN GOBIN=/root/go go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0 \ && GOBIN=/root/go go install sigs.k8s.io/kustomize/kustomize/v4@v4.5.2 \ From 5546a6433f154b3f272bd0cbac590749aebf7e12 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 14:33:51 -0400 Subject: [PATCH 167/228] Different container name? --- pr_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_check.sh b/pr_check.sh index 4a3cce54..a2b8a13f 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -13,7 +13,7 @@ CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}" docker build -t $CONTAINER_NAME -f build/Dockerfile.pr . -docker run -i --name $CONTAINER_NAME -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh +docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh TEST_RESULT=$? From b410c554dbfbac9d6f74657e71be62216aa96c14 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 14:43:23 -0400 Subject: [PATCH 168/228] Maybe this? --- pr_check.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pr_check.sh b/pr_check.sh index a2b8a13f..cf37efa1 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -22,5 +22,6 @@ mkdir -p artifacts docker cp $CONTAINER_NAME:/container_workspace/artifacts/ $PWD docker rm -f $CONTAINER_NAME +docker rm -f $CONTAINER_NAME-run exit $TEST_RESULT From 61fb24ef159727fe83d6cefb9fe5b3abf749238d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 14:57:38 -0400 Subject: [PATCH 169/228] This is temporary --- pr_check.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pr_check.sh b/pr_check.sh index cf37efa1..a90d985c 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -5,6 +5,9 @@ set -exv mkdir -p "$PWD/.docker" CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}" +docker rm -f $CONTAINER_NAME +docker rm -f $CONTAINER_NAME-run + # We're mounting the jenkins workspace over the root of the container # This means that the pr_check_inner.sh script will be run in the context of the jenkins workspace @@ -19,7 +22,7 @@ TEST_RESULT=$? mkdir -p artifacts -docker cp $CONTAINER_NAME:/container_workspace/artifacts/ $PWD +docker cp $CONTAINER_NAME:/workspace/artifacts/ $PWD docker rm -f $CONTAINER_NAME docker rm -f $CONTAINER_NAME-run From d07a6fc365b8a4ff72a1e5ce5678fb13dd9bff9c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 15:07:42 -0400 Subject: [PATCH 170/228] Copy from correct container --- pr_check.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pr_check.sh b/pr_check.sh index a90d985c..955cf6cb 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -5,9 +5,6 @@ set -exv mkdir -p "$PWD/.docker" CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}" -docker rm -f $CONTAINER_NAME -docker rm -f $CONTAINER_NAME-run - # We're mounting the jenkins workspace over the root of the container # This means that the pr_check_inner.sh script will be run in the context of the jenkins workspace @@ -22,7 +19,7 @@ TEST_RESULT=$? mkdir -p artifacts -docker cp $CONTAINER_NAME:/workspace/artifacts/ $PWD +docker cp $CONTAINER_NAME-run:/workspace/artifacts/ $PWD docker rm -f $CONTAINER_NAME docker rm -f $CONTAINER_NAME-run From 0ab806d200a54d049bd971c1afe0c42b439894eb Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 15:08:55 -0400 Subject: [PATCH 171/228] Maybe it isn't temporary --- pr_check.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pr_check.sh b/pr_check.sh index 955cf6cb..ffb11427 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -5,6 +5,9 @@ set -exv mkdir -p "$PWD/.docker" CONTAINER_NAME="${FEO_CONTAINER_NAME:-frontend-operator-pr-check-$ghprbPullId}" +docker rm -f $CONTAINER_NAME +docker rm -f $CONTAINER_NAME-run + # We're mounting the jenkins workspace over the root of the container # This means that the pr_check_inner.sh script will be run in the context of the jenkins workspace From a978847c8f7bc14d550b0d203a88e721f6cdf623 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 15:17:06 -0400 Subject: [PATCH 172/228] Maybe this? --- pr_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_check.sh b/pr_check.sh index ffb11427..7a9cdfd0 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -22,7 +22,7 @@ TEST_RESULT=$? mkdir -p artifacts -docker cp $CONTAINER_NAME-run:/workspace/artifacts/ $PWD +docker cp $CONTAINER_NAME-run:/workspace/artifacts/ $PWD/artifacts/ docker rm -f $CONTAINER_NAME docker rm -f $CONTAINER_NAME-run From c30e38fe766603d3abc3b0e3f9c03e37626fd67b Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 26 Jul 2023 15:25:44 -0400 Subject: [PATCH 173/228] I'm thrashing --- pr_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pr_check.sh b/pr_check.sh index 7a9cdfd0..e163655c 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -22,7 +22,7 @@ TEST_RESULT=$? mkdir -p artifacts -docker cp $CONTAINER_NAME-run:/workspace/artifacts/ $PWD/artifacts/ +docker cp $CONTAINER_NAME-run:/container_workspace/artifacts/ $PWD docker rm -f $CONTAINER_NAME docker rm -f $CONTAINER_NAME-run From 4ba1595b313478e257016f42c7d335a94a36026f Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 27 Jul 2023 09:25:34 -0400 Subject: [PATCH 174/228] forgot dot in build --- build_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_deploy.sh b/build_deploy.sh index a615788a..da1c886b 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -37,7 +37,7 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then docker --config="$DOCKER_CONF" build -f Dockerfile.base . -t "$BASE_IMG" docker --config="$DOCKER_CONF" push "$BASE_IMG" fi -docker --config="$DOCKER_CONF" build --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" +docker --config="$DOCKER_CONF" build --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" . #### End docker --config="$DOCKER_CONF" build --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" . From 63565e89ec85af2b677f1ba723bc192ec1b9b50d Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Thu, 27 Jul 2023 09:26:58 -0400 Subject: [PATCH 175/228] Actually, its a duplicate statement --- build_deploy.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build_deploy.sh b/build_deploy.sh index da1c886b..be7e0f92 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -37,7 +37,6 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then docker --config="$DOCKER_CONF" build -f Dockerfile.base . -t "$BASE_IMG" docker --config="$DOCKER_CONF" push "$BASE_IMG" fi -docker --config="$DOCKER_CONF" build --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" . #### End docker --config="$DOCKER_CONF" build --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" . From fe77ffd5a7539c1e7b54a333799af696d48adf8c Mon Sep 17 00:00:00 2001 From: Gabor Burges Date: Thu, 10 Aug 2023 16:07:43 +0200 Subject: [PATCH 176/228] Adding platsec workflow --- .github/workflows/platsec.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/platsec.yml diff --git a/.github/workflows/platsec.yml b/.github/workflows/platsec.yml new file mode 100644 index 00000000..1e918723 --- /dev/null +++ b/.github/workflows/platsec.yml @@ -0,0 +1,44 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# The default values used in the docker build commands are the root +# directory '.' and the dockerfile name of 'Dockerfile'. If there is +# a need to change these do so in your local workflow template (this file) and +# change them there. HINT: Look at the bottom of this file. + +# This workflow checks out code, builds an image, performs a container image +# vulnerability scan with Anchore's Grype tool, and generates an +# SBOM via Anchore's Syft tool + +# For more information on Anchore's container image scanning tool Grype, see +# https://github.com/anchore/grype + +# For more information about the Anchore SBOM tool, Syft, see +# https://github.com/anchore/syft + +name: ConsoleDot Platform Security Scan + +on: + push: + branches: [ "main", "security-compliance" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "main", "security-compliance" ] + +jobs: + PlatSec-Security-Workflow: + uses: RedHatInsights/platform-security-gh-workflow/.github/workflows/platsec-security-scan-reusable-workflow.yml@master + ## The optional parameters below are used if you are using something other than the + ## the defaults of root '.' for the path and 'Dockerfile' for the Dockerfile name. + ## Additionally, if you have a Dockerfile you use as your BASE_IMG or you need to + ## use '--build-arg', those can be define below as well. + + with: + # dockerfile_path: './test' + # dockerfile_name: 'Dockerfile.main' + base_image_build: true + # base_dockerfile_path: './test' + base_dockerfile_name: 'Dockerfile.base' + build_arg: '--build-arg BASE_IMAGE="localbuild/baseimage:latest"' From 5229f6a29023430ad28115a1615a2d16265953e0 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 14 Aug 2023 11:30:43 -0400 Subject: [PATCH 177/228] Bump UBI8 go-toolset deps --- Dockerfile | 2 +- Dockerfile.base | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6908288c..9328f77d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ COPY controllers/ controllers/ # Build RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager main.go -FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.10-10 WORKDIR / COPY --from=builder /workspace/manager . USER 65534:65534 diff --git a/Dockerfile.base b/Dockerfile.base index e5d0a2c2..5baa9e7e 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,5 +1,5 @@ # Build the manager binary -FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 as builder +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.10-10 as builder WORKDIR /workspace From d5604df384b574f300a880c7dff070ff8587f255 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 14 Aug 2023 13:46:05 -0400 Subject: [PATCH 178/228] Update deps and refactor to support new deps --- controllers/frontend_controller.go | 145 ++++++++++++------------- controllers/suite_test.go | 8 +- go.mod | 110 ++++++++++--------- go.sum | 167 +++++++++++++++++++++++++++++ 4 files changed, 303 insertions(+), 127 deletions(-) diff --git a/controllers/frontend_controller.go b/controllers/frontend_controller.go index fed2b89a..fd702bb3 100644 --- a/controllers/frontend_controller.go +++ b/controllers/frontend_controller.go @@ -37,7 +37,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/reconcile" - "sigs.k8s.io/controller-runtime/pkg/source" crd "github.com/RedHatInsights/frontend-operator/api/v1alpha1" resCache "github.com/RedHatInsights/rhc-osdk-utils/resourceCache" @@ -276,12 +275,12 @@ func (r *FrontendReconciler) SetupWithManager(mgr ctrl.Manager) error { return ctrl.NewControllerManagedBy(mgr). For(&crd.Frontend{}, builder.WithPredicates(defaultPredicate(r.Log, "frontend"))). Watches( - &source.Kind{Type: &crd.Bundle{}}, - handler.EnqueueRequestsFromMapFunc(r.appsToEnqueueUponBundleUpdate), + &crd.Bundle{}, + handler.EnqueueRequestsFromMapFunc(r.appsToEnqueueUponBundleUpdate()), ). Watches( - &source.Kind{Type: &crd.FrontendEnvironment{}}, - handler.EnqueueRequestsFromMapFunc(r.appsToEnqueueUponFrontendEnvironmentUpdate), + &crd.FrontendEnvironment{}, + handler.EnqueueRequestsFromMapFunc(r.appsToEnqueueUponFrontendEnvironmentUpdate()), ). Owns(&apps.Deployment{}). Owns(&networking.Ingress{}). @@ -318,93 +317,95 @@ func defaultPredicate(logr logr.Logger, ctrlName string) predicate.Funcs { } } -func (r *FrontendReconciler) appsToEnqueueUponBundleUpdate(a client.Object) []reconcile.Request { - reqs := []reconcile.Request{} - ctx := context.Background() - obj := types.NamespacedName{ - Name: a.GetName(), - Namespace: a.GetNamespace(), - } +func (r *FrontendReconciler) appsToEnqueueUponBundleUpdate() handler.MapFunc { + return func(ctx context.Context, clientObject client.Object) []reconcile.Request { + reqs := []reconcile.Request{} + obj := types.NamespacedName{ + Name: clientObject.GetName(), + Namespace: clientObject.GetNamespace(), + } - // Get the Bundle resource + // Get the Bundle resource - bundle := crd.Bundle{} - err := r.Client.Get(ctx, obj, &bundle) + bundle := crd.Bundle{} + err := r.Client.Get(ctx, obj, &bundle) - if err != nil { - if k8serr.IsNotFound(err) { - // Must have been deleted - return reqs + if err != nil { + if k8serr.IsNotFound(err) { + // Must have been deleted + return reqs + } + r.Log.Error(err, "Failed to fetch Bundle") + return nil } - r.Log.Error(err, "Failed to fetch Bundle") - return nil - } - // Get all the ClowdApp resources + // Get all the ClowdApp resources - frontendList := crd.FrontendList{} - err = r.Client.List(ctx, &frontendList, client.MatchingFields{"spec.envName": bundle.Spec.EnvName}) - if err != nil { - r.Log.Error(err, "Failed to List Frontends") - return nil - } + frontendList := crd.FrontendList{} + err = r.Client.List(ctx, &frontendList, client.MatchingFields{"spec.envName": bundle.Spec.EnvName}) + if err != nil { + r.Log.Error(err, "Failed to List Frontends") + return nil + } - // Filter based on base attribute + // Filter based on base attribute - for _, frontend := range frontendList.Items { - reqs = append(reqs, reconcile.Request{ - NamespacedName: types.NamespacedName{ - Name: frontend.Name, - Namespace: frontend.Namespace, - }, - }) - } + for _, frontend := range frontendList.Items { + reqs = append(reqs, reconcile.Request{ + NamespacedName: types.NamespacedName{ + Name: frontend.Name, + Namespace: frontend.Namespace, + }, + }) + } - return reqs + return reqs + } } -func (r *FrontendReconciler) appsToEnqueueUponFrontendEnvironmentUpdate(a client.Object) []reconcile.Request { - reqs := []reconcile.Request{} - ctx := context.Background() - obj := types.NamespacedName{ - Name: a.GetName(), - Namespace: a.GetNamespace(), - } +func (r *FrontendReconciler) appsToEnqueueUponFrontendEnvironmentUpdate() handler.MapFunc { + return func(ctx context.Context, clientObject client.Object) []reconcile.Request { + reqs := []reconcile.Request{} + obj := types.NamespacedName{ + Name: clientObject.GetName(), + Namespace: clientObject.GetNamespace(), + } - // Get the Bundle resource + // Get the Bundle resource - fe := crd.FrontendEnvironment{} - err := r.Client.Get(ctx, obj, &fe) + fe := crd.FrontendEnvironment{} + err := r.Client.Get(ctx, obj, &fe) - if err != nil { - if k8serr.IsNotFound(err) { - // Must have been deleted - return reqs + if err != nil { + if k8serr.IsNotFound(err) { + // Must have been deleted + return reqs + } + r.Log.Error(err, "Failed to fetch Bundle") + return nil } - r.Log.Error(err, "Failed to fetch Bundle") - return nil - } - // Get all the ClowdApp resources + // Get all the ClowdApp resources - frontendList := crd.FrontendList{} - if err := r.Client.List(ctx, &frontendList, client.MatchingFields{"spec.envName": fe.Name}); err != nil { - r.Log.Error(err, "Failed to List Frontends") - return nil - } + frontendList := crd.FrontendList{} + if err := r.Client.List(ctx, &frontendList, client.MatchingFields{"spec.envName": fe.Name}); err != nil { + r.Log.Error(err, "Failed to List Frontends") + return nil + } - // Filter based on base attribute + // Filter based on base attribute - for _, frontend := range frontendList.Items { - reqs = append(reqs, reconcile.Request{ - NamespacedName: types.NamespacedName{ - Name: frontend.Name, - Namespace: frontend.Namespace, - }, - }) - } + for _, frontend := range frontendList.Items { + reqs = append(reqs, reconcile.Request{ + NamespacedName: types.NamespacedName{ + Name: frontend.Name, + Namespace: frontend.Namespace, + }, + }) + } - return reqs + return reqs + } } func (r *FrontendReconciler) finalizeApp(reqLogger logr.Logger, a *crd.Frontend) error { diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 506e692e..417c441d 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -26,13 +26,11 @@ import ( prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + utilruntime "k8s.io/apimachinery/pkg/util/runtime" clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" - - utilruntime "k8s.io/apimachinery/pkg/util/runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/envtest" - "sigs.k8s.io/controller-runtime/pkg/envtest/printer" logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" @@ -54,9 +52,7 @@ var MonitoringNamespace = "openshift-customer-monitoring" func TestAPIs(t *testing.T) { RegisterFailHandler(Fail) - RunSpecsWithDefaultAndCustomReporters(t, - "Controller Suite", - []Reporter{printer.NewlineReporter{}}) + RunSpecs(t, "Controller Suite") } var _ = BeforeSuite(func() { diff --git a/go.mod b/go.mod index 47567dbe..d6a3a82c 100644 --- a/go.mod +++ b/go.mod @@ -3,83 +3,95 @@ module github.com/RedHatInsights/frontend-operator go 1.19 require ( - github.com/RedHatInsights/clowder v0.50.0 - github.com/RedHatInsights/rhc-osdk-utils v0.7.0 - github.com/go-logr/logr v1.2.0 - github.com/go-logr/zapr v1.2.0 + github.com/RedHatInsights/clowder v0.61.0 + github.com/RedHatInsights/rhc-osdk-utils v0.10.0 + github.com/go-logr/logr v1.2.4 + github.com/go-logr/zapr v1.2.4 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.17.0 - github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.56.0 - github.com/prometheus/client_golang v1.11.0 - k8s.io/api v0.23.6 - k8s.io/apiextensions-apiserver v0.23.6 - k8s.io/apimachinery v0.23.6 - k8s.io/client-go v0.23.6 - sigs.k8s.io/cluster-api v1.0.1 - sigs.k8s.io/controller-runtime v0.11.0 + github.com/onsi/gomega v1.27.10 + github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 + github.com/prometheus/client_golang v1.16.0 + k8s.io/api v0.27.4 + k8s.io/apiextensions-apiserver v0.27.4 + k8s.io/apimachinery v0.27.4 + k8s.io/client-go v0.27.4 + sigs.k8s.io/cluster-api v1.5.0 + sigs.k8s.io/controller-runtime v0.15.1 ) require ( cloud.google.com/go v0.97.0 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.22 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.14 // indirect + github.com/Azure/go-autorest/autorest v0.11.29 // indirect + github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect github.com/Azure/go-autorest/logger v0.2.1 // indirect github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/RedHatInsights/go-difflib v1.0.0 // indirect - github.com/aws/aws-sdk-go v1.42.16 // indirect + github.com/aws/aws-sdk-go v1.44.322 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver v3.5.1+incompatible // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect - github.com/gobuffalo/flect v0.2.4 // indirect + github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.4 // indirect + github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.6 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic v0.6.9 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.32.1 // indirect - github.com/prometheus/procfs v0.6.0 // indirect - github.com/redhatinsights/platform-go-middlewares v0.10.0 // indirect - github.com/sirupsen/logrus v1.8.1 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.11.1 // indirect + github.com/redhatinsights/platform-go-middlewares v0.20.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.uber.org/atomic v1.9.0 // indirect - go.uber.org/multierr v1.6.0 // indirect - go.uber.org/zap v1.19.1 // indirect - golang.org/x/crypto v0.0.0-20211115234514-b4de73f9ece8 // indirect - golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect - golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5 // indirect - golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c // indirect - golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + go.uber.org/atomic v1.11.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.25.0 // indirect + golang.org/x/crypto v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/oauth2 v0.11.0 // indirect + golang.org/x/sys v0.11.0 // indirect + golang.org/x/term v0.11.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/time v0.3.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect - k8s.io/component-base v0.23.6 // indirect - k8s.io/klog/v2 v2.30.0 // indirect - k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect - k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect - sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/component-base v0.27.4 // indirect + k8s.io/klog/v2 v2.100.1 // indirect + k8s.io/kube-openapi v0.0.0-20230811205723-7ac0aad8c58d // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index bb89d36f..ea7977c0 100644 --- a/go.sum +++ b/go.sum @@ -32,6 +32,8 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -53,13 +55,19 @@ github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSW github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest v0.11.22 h1:bXiQwDjrRmBQOE67bwlvUKAC1EU1yZTPQ38c+bstZws= github.com/Azure/go-autorest/autorest v0.11.22/go.mod h1:BAWYUWGPEtKPzjVkp0Q6an0MJcJDsoh5Z1BFAEFs4Xs= +github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= +github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/adal v0.9.14 h1:G8hexQdV5D4khOXrWG2YuLCFKhWYmWD8bHYaXN5ophk= github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= +github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= +github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= +github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= @@ -75,10 +83,14 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/RedHatInsights/clowder v0.50.0 h1:Jrzpo5uY9ghsrR4DeMsDnyR7EGZYAVjXBt4Cdfm+C6g= github.com/RedHatInsights/clowder v0.50.0/go.mod h1:sY0IIuVDz/PN7l+R/8MfH51V0t72IKVEwxU+DwluG14= +github.com/RedHatInsights/clowder v0.61.0 h1:ZiuN4B2Oq9ZMT/cy3MBAsLnNofMFiI00KpOjr7vmwnY= +github.com/RedHatInsights/clowder v0.61.0/go.mod h1:1vrCX1ejfLtaIvxA3QOkNc9b6o+KjpXvrwKEChndXHo= github.com/RedHatInsights/go-difflib v1.0.0 h1:BoruyjZfxO81sEynhkG6c4SMAQOjuBWezcJxtGK8dyw= github.com/RedHatInsights/go-difflib v1.0.0/go.mod h1:UMKOFdypYfrKT1B1nbGodM09nhOiAmcjes8qWP7Myrs= github.com/RedHatInsights/rhc-osdk-utils v0.7.0 h1:KgOiw2nKS26RuiSRVWVHtXNPx23VMspuB0bLCLIAlTs= github.com/RedHatInsights/rhc-osdk-utils v0.7.0/go.mod h1:MQoUQGaVjM25JsownEKKa2Tef0qnJOm1ljocaQ0nx40= +github.com/RedHatInsights/rhc-osdk-utils v0.10.0 h1:mgT4Bg8SaRExWt3XSgwZADV/5Br0aKuZSkZmmOF9ezE= +github.com/RedHatInsights/rhc-osdk-utils v0.10.0/go.mod h1:rOa+TLogFCKOKH4i++ehOqqUWECTRcWS7/tOicKEqFo= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -91,10 +103,13 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.38.51/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.42.16 h1:jOUmYYpC77NZYQVHTOTFT4lwFBT1u3s8ETKciU4l6gQ= github.com/aws/aws-sdk-go v1.42.16/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= +github.com/aws/aws-sdk-go v1.44.322 h1:7JfwifGRGQMHd99PvfXqxBaZsjuRaOF6e3X9zRx2uYo= +github.com/aws/aws-sdk-go v1.44.322/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -107,13 +122,19 @@ github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJm github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -153,6 +174,8 @@ github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25Kn github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= +github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -165,20 +188,29 @@ github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMi github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= +github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= @@ -194,31 +226,48 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobuffalo/flect v0.2.3/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= github.com/gobuffalo/flect v0.2.4 h1:BSYA8+T60cdyq+vynaSUjqSVI9mDEg9ZfQUXKmfjo4I= github.com/gobuffalo/flect v0.2.4/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= +github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= +github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -254,6 +303,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -261,6 +312,10 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= +github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= +github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -274,6 +329,8 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v33 v33.0.0/go.mod h1:GMdDnVZY/2TsWgp/lkYnpSAh6TrzhANBBwm6k6TTEXg= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -355,6 +412,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1: github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -363,6 +422,7 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -386,6 +446,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -399,6 +460,8 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -414,6 +477,8 @@ github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -439,6 +504,7 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -465,6 +531,8 @@ github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+t github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= +github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -484,17 +552,23 @@ github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSg github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.56.0 h1:/6D2AT0Z+1299Xij2d+bcNmw4k6TMs6cwAhbtqdjTqQ= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.56.0/go.mod h1:/xf16Bu3krDP6G5WhrJL9avDnLW/AN0g7hAIK63mbes= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 h1:u1Mw9irznvsBPxQxjUmCel1ufP3UgzA1CILj7/2tpNw= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -503,21 +577,28 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9 github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= +github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/redhatinsights/platform-go-middlewares v0.10.0 h1:VVuWvPL7xHYnmVMz6jK9lUqyPc1vOEWdpo6eVu7e9iQ= github.com/redhatinsights/platform-go-middlewares v0.10.0/go.mod h1:i5gVDZJ/quCQhs5AW5CwkRPXlz1HfDBvyNtXHnlXZfM= +github.com/redhatinsights/platform-go-middlewares v0.20.0 h1:qwK9ArGYRlORsZ56PXXLJrGvzTsMe3bk2lR+WN5aIjM= +github.com/redhatinsights/platform-go-middlewares v0.20.0/go.mod h1:i5gVDZJ/quCQhs5AW5CwkRPXlz1HfDBvyNtXHnlXZfM= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -529,6 +610,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -557,6 +640,8 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -564,10 +649,17 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= @@ -577,6 +669,7 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -610,17 +703,25 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= +go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -636,6 +737,10 @@ golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211115234514-b4de73f9ece8 h1:5QRxNnVsaJP6NAse0UdkRgL3zHMvCRRkrDVLNdNpdy4= golang.org/x/crypto v0.0.0-20211115234514-b4de73f9ece8/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -671,6 +776,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -723,8 +829,14 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -743,6 +855,8 @@ golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5 h1:v79phzBz03tsVCUTbvTBmmC3CUXF5mKYt7DA4ZVldpM= golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -754,6 +868,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -833,11 +948,24 @@ golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c h1:DHcbWVXeY+0Y8HHKR+rbLwnoh2F4tNCY7rTiHJ30RmA= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= +golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -848,12 +976,18 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -917,6 +1051,7 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -924,6 +1059,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1N golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1020,6 +1157,7 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1061,12 +1199,15 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -1093,6 +1234,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1105,24 +1248,34 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 k8s.io/api v0.22.2/go.mod h1:y3ydYpLJAaDI+BbSe2xmGcqxiWHmWjkEeIbiwHvnPR8= k8s.io/api v0.23.6 h1:yOK34wbYECH4RsJbQ9sfkFK3O7f/DUHRlzFehkqZyVw= k8s.io/api v0.23.6/go.mod h1:1kFaYxGCFHYp3qd6a85DAj/yW8aVD6XLZMqJclkoi9g= +k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= +k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= k8s.io/apiextensions-apiserver v0.22.2/go.mod h1:2E0Ve/isxNl7tWLSUDgi6+cmwHi5fQRdwGVCxbC+KFA= k8s.io/apiextensions-apiserver v0.23.6 h1:v58cQ6Z0/GK1IXYr+oW0fnYl52o9LTY0WgoWvI8uv5Q= k8s.io/apiextensions-apiserver v0.23.6/go.mod h1:YVh17Mphv183THQJA5spNFp9XfoidFyL3WoDgZxQIZU= +k8s.io/apiextensions-apiserver v0.27.4 h1:ie1yZG4nY/wvFMIR2hXBeSVq+HfNzib60FjnBYtPGSs= +k8s.io/apiextensions-apiserver v0.27.4/go.mod h1:KHZaDr5H9IbGEnSskEUp/DsdXe1hMQ7uzpQcYUFt2bM= k8s.io/apimachinery v0.22.2/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apimachinery v0.23.6 h1:RH1UweWJkWNTlFx0D8uxOpaU1tjIOvVVWV/bu5b3/NQ= k8s.io/apimachinery v0.23.6/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= +k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= +k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/apiserver v0.22.2/go.mod h1:vrpMmbyjWrgdyOvZTSpsusQq5iigKNWv9o9KlDAbBHI= k8s.io/apiserver v0.23.6/go.mod h1:5PU32F82tfErXPmf7FXhd/UcuLfh97tGepjKUgJ2atg= k8s.io/cli-runtime v0.22.2/go.mod h1:tkm2YeORFpbgQHEK/igqttvPTRIHFRz5kATlw53zlMI= k8s.io/client-go v0.22.2/go.mod h1:sAlhrkVDf50ZHx6z4K0S40wISNTarf1r800F+RlCF6U= k8s.io/client-go v0.23.6 h1:7h4SctDVQAQbkHQnR4Kzi7EyUyvla5G1pFWf4+Od7hQ= k8s.io/client-go v0.23.6/go.mod h1:Umt5icFOMLV/+qbtZ3PR0D+JA6lvvb3syzodv4irpK4= +k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= +k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= k8s.io/cluster-bootstrap v0.22.2/go.mod h1:ZkmQKprEqvrUccMnbRHISsMscA1dsQ8SffM9nHq6CgE= k8s.io/code-generator v0.22.2/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/code-generator v0.23.6/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= k8s.io/component-base v0.22.2/go.mod h1:5Br2QhI9OTe79p+TzPe9JKNQYvEKbq9rTJDWllunGug= k8s.io/component-base v0.23.6 h1:8dhVZ4VrRcNdV2EGjl8tj8YOHwX6ysgCGMJ2Oyy0NW8= k8s.io/component-base v0.23.6/go.mod h1:FGMPeMrjYu0UZBSAFcfloVDplj9IvU+uRMTOdE23Fj0= +k8s.io/component-base v0.27.4 h1:Wqc0jMKEDGjKXdae8hBXeskRP//vu1m6ypC+gwErj4c= +k8s.io/component-base v0.27.4/go.mod h1:hoiEETnLc0ioLv6WPeDt8vD34DDeB35MfQnxCARq3kY= k8s.io/component-helpers v0.22.2/go.mod h1:+N61JAR9aKYSWbnLA88YcFr9K/6ISYvRNybX7QW7Rs8= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= @@ -1132,9 +1285,13 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= +k8s.io/kube-openapi v0.0.0-20230811205723-7ac0aad8c58d h1:lGN9colvFFZIY0Guxkzdd73CoDXHIbhlQkfi7n/26Ak= +k8s.io/kube-openapi v0.0.0-20230811205723-7ac0aad8c58d/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= k8s.io/kubectl v0.22.2/go.mod h1:BApg2j0edxLArCOfO0ievI27EeTQqBDMNU9VQH734iQ= k8s.io/metrics v0.22.2/go.mod h1:GUcsBtpsqQD1tKFS/2wCKu4ZBowwRncLOJH1rgWs3uw= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1142,6 +1299,8 @@ k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -1149,11 +1308,17 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyz sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= sigs.k8s.io/cluster-api v1.0.1 h1:0YXQoemI4WnZF8RzT9T2vCtnXAi22rD4Fx1Tj2hhCEM= sigs.k8s.io/cluster-api v1.0.1/go.mod h1:/LkJXtsvhxTV4U0z1Y2Y1Gr2xebJ0/ce09Ab2M0XU/U= +sigs.k8s.io/cluster-api v1.5.0 h1:pwXvzScbAwnrB7EWHTApzW+VQfrj2OSrWAQDC9+bcbU= +sigs.k8s.io/cluster-api v1.5.0/go.mod h1:ZSEP01t8oT6104gB4ljsOwwp5uJcI8SWy8IFp2HUvrc= sigs.k8s.io/controller-runtime v0.10.3/go.mod h1:CQp8eyUQZ/Q7PJvnIrB6/hgfTC1kBkGylwsLgOQi1WY= sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= +sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= +sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= @@ -1162,6 +1327,8 @@ sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= +sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From 8b50debabd5dd5cf30b58d7a114f5437722f54a8 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 15 Aug 2023 15:22:10 -0400 Subject: [PATCH 179/228] Mount operator-generated in new places. --- controllers/reconcile.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index e705bfd5..2a4b09b6 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -105,9 +105,16 @@ func populateContainerVolumeMounts(frontendEnvironment *crd.FrontendEnvironment) // We always want to mount the config map under the operator-generated directory // This will allow chrome to incorperate the generated nav and fed-modules.json // at run time. This means chrome can merge the config in mixed environments + + // We need to have the config mounted in 2 places because of the preview/stable + // split. We need to have the config mounted in the preview and stable directories + volumeMounts = append(volumeMounts, v1.VolumeMount{ + Name: "config", + MountPath: "/opt/app-root/src/build/stable/operator-generated", + }) volumeMounts = append(volumeMounts, v1.VolumeMount{ Name: "config", - MountPath: "/opt/app-root/src/build/operator-generated", + MountPath: "/opt/app-root/src/build/preview/operator-generated", }) // We generate SSL cert mounts conditionally From 82df59db8e3344310f9de5eb3f68e809d1ef3741 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 15 Aug 2023 15:25:06 -0400 Subject: [PATCH 180/228] Update asserts in frontend operator tests --- tests/e2e/basic-frontend/02-assert.yaml | 5 +++-- tests/e2e/cachebust/02-assert.yaml | 15 +++++++++------ tests/e2e/cachebust/04-assert.yaml | 15 +++++++++------ tests/e2e/ssl/02-assert.yaml | 5 +++-- tests/e2e/whitelist/02-assert.yaml | 5 +++-- 5 files changed, 27 insertions(+), 18 deletions(-) diff --git a/tests/e2e/basic-frontend/02-assert.yaml b/tests/e2e/basic-frontend/02-assert.yaml index 5e3dd90f..e25c5e85 100644 --- a/tests/e2e/basic-frontend/02-assert.yaml +++ b/tests/e2e/basic-frontend/02-assert.yaml @@ -33,5 +33,6 @@ spec: protocol: TCP volumeMounts: - name: config - mountPath: /opt/app-root/src/build/operator-generated - + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated diff --git a/tests/e2e/cachebust/02-assert.yaml b/tests/e2e/cachebust/02-assert.yaml index 746c43d7..54423c03 100644 --- a/tests/e2e/cachebust/02-assert.yaml +++ b/tests/e2e/cachebust/02-assert.yaml @@ -36,8 +36,9 @@ spec: resources: {} volumeMounts: - name: config - mountPath: /opt/app-root/src/build/operator-generated - terminationMessagePath: /dev/termination-log + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent --- @@ -115,8 +116,9 @@ spec: resources: {} volumeMounts: - name: config - mountPath: /opt/app-root/src/build/operator-generated - terminationMessagePath: /dev/termination-log + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent --- @@ -195,5 +197,6 @@ spec: resources: {} volumeMounts: - name: config - mountPath: /opt/app-root/src/build/operator-generated - + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated diff --git a/tests/e2e/cachebust/04-assert.yaml b/tests/e2e/cachebust/04-assert.yaml index b20607da..25a466a9 100644 --- a/tests/e2e/cachebust/04-assert.yaml +++ b/tests/e2e/cachebust/04-assert.yaml @@ -36,8 +36,9 @@ spec: resources: {} volumeMounts: - name: config - mountPath: /opt/app-root/src/build/operator-generated - terminationMessagePath: /dev/termination-log + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent --- @@ -115,8 +116,9 @@ spec: resources: {} volumeMounts: - name: config - mountPath: /opt/app-root/src/build/operator-generated - terminationMessagePath: /dev/termination-log + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent --- @@ -195,5 +197,6 @@ spec: resources: {} volumeMounts: - name: config - mountPath: /opt/app-root/src/build/operator-generated - + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated diff --git a/tests/e2e/ssl/02-assert.yaml b/tests/e2e/ssl/02-assert.yaml index 7b9c6e02..ade2ef30 100644 --- a/tests/e2e/ssl/02-assert.yaml +++ b/tests/e2e/ssl/02-assert.yaml @@ -42,6 +42,7 @@ spec: value: tls /opt/certs/tls.crt /opt/certs/tls.key volumeMounts: - name: config - mountPath: /opt/app-root/src/build/operator-generated - - name: certs + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated - name: certs mountPath: /opt/certs diff --git a/tests/e2e/whitelist/02-assert.yaml b/tests/e2e/whitelist/02-assert.yaml index 512ea597..128d0037 100644 --- a/tests/e2e/whitelist/02-assert.yaml +++ b/tests/e2e/whitelist/02-assert.yaml @@ -33,8 +33,9 @@ spec: protocol: TCP volumeMounts: - name: config - mountPath: /opt/app-root/src/build/operator-generated ---- + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated--- kind: Ingress apiVersion: networking.k8s.io/v1 metadata: From 771ac128f21d913c36551de3a7c574998b4d707a Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 15 Aug 2023 16:33:36 -0400 Subject: [PATCH 181/228] Doc update and make kuttl script executable --- docs/antora/modules/ROOT/pages/api_reference.adoc | 14 +++++++++++++- kuttl_test.sh | 0 2 files changed, 13 insertions(+), 1 deletion(-) mode change 100644 => 100755 kuttl_test.sh diff --git a/docs/antora/modules/ROOT/pages/api_reference.adoc b/docs/antora/modules/ROOT/pages/api_reference.adoc index 5c5b7309..d585e0d4 100644 --- a/docs/antora/modules/ROOT/pages/api_reference.adoc +++ b/docs/antora/modules/ROOT/pages/api_reference.adoc @@ -126,10 +126,22 @@ BundleList contains a list of Bundle |=== | Field | Description | *`method`* __string__ | -| *`args`* __BundlePermissionArg array__ | +| *`args`* __xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermissionarg[$$BundlePermissionArg$$] array__ | |=== +[id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermissionarg"] +==== BundlePermissionArg (string) + + + +.Appears In: +**** +- xref:{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlepermission[$$BundlePermission$$] +**** + + + [id="{anchor_prefix}-github-com-redhatinsights-frontend-operator-api-v1alpha1-bundlespec"] ==== BundleSpec diff --git a/kuttl_test.sh b/kuttl_test.sh old mode 100644 new mode 100755 From b2bb3d7038a00662df04e476c747a2f9b0053fd6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 15 Aug 2023 16:35:42 -0400 Subject: [PATCH 182/228] Fix some errors in the asserts --- tests/e2e/cachebust/02-assert.yaml | 6 ++++-- tests/e2e/cachebust/04-assert.yaml | 6 ++++-- tests/e2e/ssl/02-assert.yaml | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/e2e/cachebust/02-assert.yaml b/tests/e2e/cachebust/02-assert.yaml index 54423c03..2e85c388 100644 --- a/tests/e2e/cachebust/02-assert.yaml +++ b/tests/e2e/cachebust/02-assert.yaml @@ -38,7 +38,8 @@ spec: - name: config mountPath: /opt/app-root/src/build/stable/operator-generated - name: config - mountPath: /opt/app-root/src/build/preview/operator-generated terminationMessagePath: /dev/termination-log + mountPath: /opt/app-root/src/build/preview/operator-generated + terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent --- @@ -118,7 +119,8 @@ spec: - name: config mountPath: /opt/app-root/src/build/stable/operator-generated - name: config - mountPath: /opt/app-root/src/build/preview/operator-generated terminationMessagePath: /dev/termination-log + mountPath: /opt/app-root/src/build/preview/operator-generated + terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent --- diff --git a/tests/e2e/cachebust/04-assert.yaml b/tests/e2e/cachebust/04-assert.yaml index 25a466a9..b992c0b3 100644 --- a/tests/e2e/cachebust/04-assert.yaml +++ b/tests/e2e/cachebust/04-assert.yaml @@ -38,7 +38,8 @@ spec: - name: config mountPath: /opt/app-root/src/build/stable/operator-generated - name: config - mountPath: /opt/app-root/src/build/preview/operator-generated terminationMessagePath: /dev/termination-log + mountPath: /opt/app-root/src/build/preview/operator-generated + terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent --- @@ -118,7 +119,8 @@ spec: - name: config mountPath: /opt/app-root/src/build/stable/operator-generated - name: config - mountPath: /opt/app-root/src/build/preview/operator-generated terminationMessagePath: /dev/termination-log + mountPath: /opt/app-root/src/build/preview/operator-generated + terminationMessagePath: /dev/termination-log terminationMessagePolicy: File imagePullPolicy: IfNotPresent --- diff --git a/tests/e2e/ssl/02-assert.yaml b/tests/e2e/ssl/02-assert.yaml index ade2ef30..5504e539 100644 --- a/tests/e2e/ssl/02-assert.yaml +++ b/tests/e2e/ssl/02-assert.yaml @@ -44,5 +44,6 @@ spec: - name: config mountPath: /opt/app-root/src/build/stable/operator-generated - name: config - mountPath: /opt/app-root/src/build/preview/operator-generated - name: certs + mountPath: /opt/app-root/src/build/preview/operator-generated + - name: certs mountPath: /opt/certs From 52977741dd95a975e918f496f003d995b937acdb Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 15 Aug 2023 16:39:19 -0400 Subject: [PATCH 183/228] Another assert fix --- tests/e2e/whitelist/02-assert.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/e2e/whitelist/02-assert.yaml b/tests/e2e/whitelist/02-assert.yaml index 128d0037..6c2ade30 100644 --- a/tests/e2e/whitelist/02-assert.yaml +++ b/tests/e2e/whitelist/02-assert.yaml @@ -35,7 +35,8 @@ spec: - name: config mountPath: /opt/app-root/src/build/stable/operator-generated - name: config - mountPath: /opt/app-root/src/build/preview/operator-generated--- + mountPath: /opt/app-root/src/build/preview/operator-generated +--- kind: Ingress apiVersion: networking.k8s.io/v1 metadata: From cc623c7cf28242a99de4173cce9c6bba2a3e88b7 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Aug 2023 08:24:17 -0400 Subject: [PATCH 184/228] Update more libs --- go.mod | 26 +- go.sum | 1061 ++------------------------------------------------------ 2 files changed, 27 insertions(+), 1060 deletions(-) diff --git a/go.mod b/go.mod index d6a3a82c..a18cffaa 100644 --- a/go.mod +++ b/go.mod @@ -11,34 +11,24 @@ require ( github.com/onsi/gomega v1.27.10 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 github.com/prometheus/client_golang v1.16.0 - k8s.io/api v0.27.4 - k8s.io/apiextensions-apiserver v0.27.4 - k8s.io/apimachinery v0.27.4 - k8s.io/client-go v0.27.4 + k8s.io/api v0.28.0 + k8s.io/apiextensions-apiserver v0.28.0 + k8s.io/apimachinery v0.28.0 + k8s.io/client-go v0.28.0 sigs.k8s.io/cluster-api v1.5.0 sigs.k8s.io/controller-runtime v0.15.1 ) require ( - cloud.google.com/go v0.97.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest v0.11.29 // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/RedHatInsights/go-difflib v1.0.0 // indirect - github.com/aws/aws-sdk-go v1.44.322 // indirect + github.com/aws/aws-sdk-go v1.44.324 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver v3.5.1+incompatible // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.10.2 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect @@ -47,12 +37,10 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/gnostic v0.6.9 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/gnostic v0.5.5 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -70,10 +58,8 @@ require ( github.com/redhatinsights/platform-go-middlewares v0.20.0 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.25.0 // indirect - golang.org/x/crypto v0.12.0 // indirect golang.org/x/net v0.14.0 // indirect golang.org/x/oauth2 v0.11.0 // indirect golang.org/x/sys v0.11.0 // indirect @@ -87,7 +73,7 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/component-base v0.27.4 // indirect + k8s.io/component-base v0.28.0 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230811205723-7ac0aad8c58d // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect diff --git a/go.sum b/go.sum index ea7977c0..28cda140 100644 --- a/go.sum +++ b/go.sum @@ -1,1334 +1,315 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0 h1:3DXvAyifywvq64LfkKaMOmkWPS1CikIQdMe2lY9vxU8= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= -cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= -cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= -cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= -cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= -cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.22 h1:bXiQwDjrRmBQOE67bwlvUKAC1EU1yZTPQ38c+bstZws= -github.com/Azure/go-autorest/autorest v0.11.22/go.mod h1:BAWYUWGPEtKPzjVkp0Q6an0MJcJDsoh5Z1BFAEFs4Xs= -github.com/Azure/go-autorest/autorest v0.11.29 h1:I4+HL/JDvErx2LjyzaVxllw2lRDB5/BT2Bm4g20iqYw= -github.com/Azure/go-autorest/autorest v0.11.29/go.mod h1:ZtEzC4Jy2JDrZLxvWs8LrBWEBycl1hbT1eknI8MtfAs= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.14 h1:G8hexQdV5D4khOXrWG2YuLCFKhWYmWD8bHYaXN5ophk= -github.com/Azure/go-autorest/autorest/adal v0.9.14/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= -github.com/Azure/go-autorest/autorest/adal v0.9.23 h1:Yepx8CvFxwNKpH6ja7RZ+sKX+DWYNldbLiALMC3BTz8= -github.com/Azure/go-autorest/autorest/adal v0.9.23/go.mod h1:5pcMqFkdPhviJdlEy3kC/v1ZLnQl0MH6XA5YCcMhy4c= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1 h1:K0laFcLE6VLTOwNgSxaGbUcLPuGXlNkbVvq4cW4nIHk= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= -github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/RedHatInsights/clowder v0.50.0 h1:Jrzpo5uY9ghsrR4DeMsDnyR7EGZYAVjXBt4Cdfm+C6g= -github.com/RedHatInsights/clowder v0.50.0/go.mod h1:sY0IIuVDz/PN7l+R/8MfH51V0t72IKVEwxU+DwluG14= github.com/RedHatInsights/clowder v0.61.0 h1:ZiuN4B2Oq9ZMT/cy3MBAsLnNofMFiI00KpOjr7vmwnY= github.com/RedHatInsights/clowder v0.61.0/go.mod h1:1vrCX1ejfLtaIvxA3QOkNc9b6o+KjpXvrwKEChndXHo= github.com/RedHatInsights/go-difflib v1.0.0 h1:BoruyjZfxO81sEynhkG6c4SMAQOjuBWezcJxtGK8dyw= github.com/RedHatInsights/go-difflib v1.0.0/go.mod h1:UMKOFdypYfrKT1B1nbGodM09nhOiAmcjes8qWP7Myrs= -github.com/RedHatInsights/rhc-osdk-utils v0.7.0 h1:KgOiw2nKS26RuiSRVWVHtXNPx23VMspuB0bLCLIAlTs= -github.com/RedHatInsights/rhc-osdk-utils v0.7.0/go.mod h1:MQoUQGaVjM25JsownEKKa2Tef0qnJOm1ljocaQ0nx40= github.com/RedHatInsights/rhc-osdk-utils v0.10.0 h1:mgT4Bg8SaRExWt3XSgwZADV/5Br0aKuZSkZmmOF9ezE= github.com/RedHatInsights/rhc-osdk-utils v0.10.0/go.mod h1:rOa+TLogFCKOKH4i++ehOqqUWECTRcWS7/tOicKEqFo= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.38.51/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.42.16 h1:jOUmYYpC77NZYQVHTOTFT4lwFBT1u3s8ETKciU4l6gQ= -github.com/aws/aws-sdk-go v1.42.16/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= -github.com/aws/aws-sdk-go v1.44.322 h1:7JfwifGRGQMHd99PvfXqxBaZsjuRaOF6e3X9zRx2uYo= -github.com/aws/aws-sdk-go v1.44.322/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/aws/aws-sdk-go v1.44.324 h1:/uja9PtgeeqrZCPOJTenjMLNpciIMuzaRKooq+erG4A= +github.com/aws/aws-sdk-go v1.44.324/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chai2010/gettext-go v0.0.0-20160711120539-c6fed771bfd5/go.mod h1:/iP1qXHoty45bqomnu2LM+VVyAEdWN+vtSHGlQgyxbw= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/coredns/caddy v1.1.0/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= -github.com/coredns/corefile-migration v1.0.13/go.mod h1:XnhgULOEouimnzgn0t4WPuFDN2/PJQcTxdWKC5eXNGE= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/drone/envsubst/v2 v2.0.0-20210615175204-7bf45dbf5372/go.mod h1:esf2rsHFNlZlxsqsZDojNBcnNs5REqIvRrWRHqX0vEU= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= -github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible h1:7ZaBxOI7TMoYBfyA3cQHErNNyAWIKUMIwqxEtgHOs5c= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= -github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gobuffalo/flect v0.2.3/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= -github.com/gobuffalo/flect v0.2.4 h1:BSYA8+T60cdyq+vynaSUjqSVI9mDEg9ZfQUXKmfjo4I= -github.com/gobuffalo/flect v0.2.4/go.mod h1:1ZyCLIbg0YD7sDkzvFdPoOydPtD8y9JQnrOROolUcM8= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.9.0/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-github/v33 v33.0.0/go.mod h1:GMdDnVZY/2TsWgp/lkYnpSAh6TrzhANBBwm6k6TTEXg= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gosuri/uitable v0.0.4/go.mod h1:tKR86bXuXPZazfOTG1FIzvjIdXzd0mo4Vtn16vt0PJo= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= -github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= -github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.56.0 h1:/6D2AT0Z+1299Xij2d+bcNmw4k6TMs6cwAhbtqdjTqQ= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.56.0/go.mod h1:/xf16Bu3krDP6G5WhrJL9avDnLW/AN0g7hAIK63mbes= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1 h1:u1Mw9irznvsBPxQxjUmCel1ufP3UgzA1CILj7/2tpNw= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.67.1/go.mod h1:KZHvrby65G+rA4V/vMTUXDV22TI+GgLIrCigYClpjzk= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/redhatinsights/platform-go-middlewares v0.10.0 h1:VVuWvPL7xHYnmVMz6jK9lUqyPc1vOEWdpo6eVu7e9iQ= -github.com/redhatinsights/platform-go-middlewares v0.10.0/go.mod h1:i5gVDZJ/quCQhs5AW5CwkRPXlz1HfDBvyNtXHnlXZfM= github.com/redhatinsights/platform-go-middlewares v0.20.0 h1:qwK9ArGYRlORsZ56PXXLJrGvzTsMe3bk2lR+WN5aIjM= github.com/redhatinsights/platform-go-middlewares v0.20.0/go.mod h1:i5gVDZJ/quCQhs5AW5CwkRPXlz1HfDBvyNtXHnlXZfM= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211115234514-b4de73f9ece8 h1:5QRxNnVsaJP6NAse0UdkRgL3zHMvCRRkrDVLNdNpdy4= -golang.org/x/crypto v0.0.0-20211115234514-b4de73f9ece8/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY= -golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5 h1:v79phzBz03tsVCUTbvTBmmC3CUXF5mKYt7DA4ZVldpM= -golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c h1:DHcbWVXeY+0Y8HHKR+rbLwnoh2F4tNCY7rTiHJ30RmA= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= -google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= -google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.63.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.22.2/go.mod h1:y3ydYpLJAaDI+BbSe2xmGcqxiWHmWjkEeIbiwHvnPR8= -k8s.io/api v0.23.6 h1:yOK34wbYECH4RsJbQ9sfkFK3O7f/DUHRlzFehkqZyVw= -k8s.io/api v0.23.6/go.mod h1:1kFaYxGCFHYp3qd6a85DAj/yW8aVD6XLZMqJclkoi9g= -k8s.io/api v0.27.4 h1:0pCo/AN9hONazBKlNUdhQymmnfLRbSZjd5H5H3f0bSs= -k8s.io/api v0.27.4/go.mod h1:O3smaaX15NfxjzILfiln1D8Z3+gEYpjEpiNA/1EVK1Y= -k8s.io/apiextensions-apiserver v0.22.2/go.mod h1:2E0Ve/isxNl7tWLSUDgi6+cmwHi5fQRdwGVCxbC+KFA= -k8s.io/apiextensions-apiserver v0.23.6 h1:v58cQ6Z0/GK1IXYr+oW0fnYl52o9LTY0WgoWvI8uv5Q= -k8s.io/apiextensions-apiserver v0.23.6/go.mod h1:YVh17Mphv183THQJA5spNFp9XfoidFyL3WoDgZxQIZU= -k8s.io/apiextensions-apiserver v0.27.4 h1:ie1yZG4nY/wvFMIR2hXBeSVq+HfNzib60FjnBYtPGSs= -k8s.io/apiextensions-apiserver v0.27.4/go.mod h1:KHZaDr5H9IbGEnSskEUp/DsdXe1hMQ7uzpQcYUFt2bM= -k8s.io/apimachinery v0.22.2/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= -k8s.io/apimachinery v0.23.6 h1:RH1UweWJkWNTlFx0D8uxOpaU1tjIOvVVWV/bu5b3/NQ= -k8s.io/apimachinery v0.23.6/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apimachinery v0.27.4 h1:CdxflD4AF61yewuid0fLl6bM4a3q04jWel0IlP+aYjs= -k8s.io/apimachinery v0.27.4/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/apiserver v0.22.2/go.mod h1:vrpMmbyjWrgdyOvZTSpsusQq5iigKNWv9o9KlDAbBHI= -k8s.io/apiserver v0.23.6/go.mod h1:5PU32F82tfErXPmf7FXhd/UcuLfh97tGepjKUgJ2atg= -k8s.io/cli-runtime v0.22.2/go.mod h1:tkm2YeORFpbgQHEK/igqttvPTRIHFRz5kATlw53zlMI= -k8s.io/client-go v0.22.2/go.mod h1:sAlhrkVDf50ZHx6z4K0S40wISNTarf1r800F+RlCF6U= -k8s.io/client-go v0.23.6 h1:7h4SctDVQAQbkHQnR4Kzi7EyUyvla5G1pFWf4+Od7hQ= -k8s.io/client-go v0.23.6/go.mod h1:Umt5icFOMLV/+qbtZ3PR0D+JA6lvvb3syzodv4irpK4= -k8s.io/client-go v0.27.4 h1:vj2YTtSJ6J4KxaC88P4pMPEQECWMY8gqPqsTgUKzvjk= -k8s.io/client-go v0.27.4/go.mod h1:ragcly7lUlN0SRPk5/ZkGnDjPknzb37TICq07WhI6Xc= -k8s.io/cluster-bootstrap v0.22.2/go.mod h1:ZkmQKprEqvrUccMnbRHISsMscA1dsQ8SffM9nHq6CgE= -k8s.io/code-generator v0.22.2/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= -k8s.io/code-generator v0.23.6/go.mod h1:S0Q1JVA+kSzTI1oUvbKAxZY/DYbA/ZUb4Uknog12ETk= -k8s.io/component-base v0.22.2/go.mod h1:5Br2QhI9OTe79p+TzPe9JKNQYvEKbq9rTJDWllunGug= -k8s.io/component-base v0.23.6 h1:8dhVZ4VrRcNdV2EGjl8tj8YOHwX6ysgCGMJ2Oyy0NW8= -k8s.io/component-base v0.23.6/go.mod h1:FGMPeMrjYu0UZBSAFcfloVDplj9IvU+uRMTOdE23Fj0= -k8s.io/component-base v0.27.4 h1:Wqc0jMKEDGjKXdae8hBXeskRP//vu1m6ypC+gwErj4c= -k8s.io/component-base v0.27.4/go.mod h1:hoiEETnLc0ioLv6WPeDt8vD34DDeB35MfQnxCARq3kY= -k8s.io/component-helpers v0.22.2/go.mod h1:+N61JAR9aKYSWbnLA88YcFr9K/6ISYvRNybX7QW7Rs8= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.30.0 h1:bUO6drIvCIsvZ/XFgfxoGFQU/a4Qkh0iAlvUR7vlHJw= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/api v0.28.0 h1:3j3VPWmN9tTDI68NETBWlDiA9qOiGJ7sdKeufehBYsM= +k8s.io/api v0.28.0/go.mod h1:0l8NZJzB0i/etuWnIXcwfIv+xnDOhL3lLW919AWYDuY= +k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= +k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= +k8s.io/apimachinery v0.28.0 h1:ScHS2AG16UlYWk63r46oU3D5y54T53cVI5mMJwwqFNA= +k8s.io/apimachinery v0.28.0/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw= +k8s.io/client-go v0.28.0 h1:ebcPRDZsCjpj62+cMk1eGNX1QkMdRmQ6lmz5BLoFWeM= +k8s.io/client-go v0.28.0/go.mod h1:0Asy9Xt3U98RypWJmU1ZrRAGKhP6NqDPmptlAzK2kMc= +k8s.io/component-base v0.28.0 h1:HQKy1enJrOeJlTlN4a6dU09wtmXaUvThC0irImfqyxI= +k8s.io/component-base v0.28.0/go.mod h1:Yyf3+ZypLfMydVzuLBqJ5V7Kx6WwDr/5cN+dFjw1FNk= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 h1:E3J9oCLlaobFUqsjG9DfKbP2BmgwBL2p7pn0A3dG9W4= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/kube-openapi v0.0.0-20230811205723-7ac0aad8c58d h1:lGN9colvFFZIY0Guxkzdd73CoDXHIbhlQkfi7n/26Ak= k8s.io/kube-openapi v0.0.0-20230811205723-7ac0aad8c58d/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/kubectl v0.22.2/go.mod h1:BApg2j0edxLArCOfO0ievI27EeTQqBDMNU9VQH734iQ= -k8s.io/metrics v0.22.2/go.mod h1:GUcsBtpsqQD1tKFS/2wCKu4ZBowwRncLOJH1rgWs3uw= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20211116205334-6203023598ed h1:ck1fRPWPJWsMd8ZRFsWc6mh/zHp5fZ/shhbrgPUxDAE= -k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= -sigs.k8s.io/cluster-api v1.0.1 h1:0YXQoemI4WnZF8RzT9T2vCtnXAi22rD4Fx1Tj2hhCEM= -sigs.k8s.io/cluster-api v1.0.1/go.mod h1:/LkJXtsvhxTV4U0z1Y2Y1Gr2xebJ0/ce09Ab2M0XU/U= sigs.k8s.io/cluster-api v1.5.0 h1:pwXvzScbAwnrB7EWHTApzW+VQfrj2OSrWAQDC9+bcbU= sigs.k8s.io/cluster-api v1.5.0/go.mod h1:ZSEP01t8oT6104gB4ljsOwwp5uJcI8SWy8IFp2HUvrc= -sigs.k8s.io/controller-runtime v0.10.3/go.mod h1:CQp8eyUQZ/Q7PJvnIrB6/hgfTC1kBkGylwsLgOQi1WY= -sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= -sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 h1:fD1pz4yfdADVNfFmcP2aBEtudwUQ1AlLnRBALr33v3s= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= -sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= -sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= -sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae0AwlvEMFM= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.3.0 h1:UZbZAZfX0wV2zr7YZorDz6GXROfDFj6LvqCRm4VUVKk= sigs.k8s.io/structured-merge-diff/v4 v4.3.0/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From 8d047eaa9e9ecb1f3f987dd21e3f815dae9cb0bc Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Aug 2023 09:04:07 -0400 Subject: [PATCH 185/228] Update workflow --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f8e91257..bc8d39ec 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-go@v3 name: Set up Go 1.x with: - go-version: 1.18 + go-version: 1.19 - uses: actions/checkout@v3 name: Checkout frontend-operator From 18fb4be3727d75e1c6cea16cf843c68c42ca1720 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Aug 2023 09:07:14 -0400 Subject: [PATCH 186/228] Update unit test go version --- .github/workflows/package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 56f59382..82a8ee23 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -10,9 +10,9 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/setup-go@v2 - name: Set up golang 1.17 + name: Set up golang 1.19 with: - go-version: '1.17.7' + go-version: '1.19.10' - name: Check out source code uses: actions/checkout@v2 - name: Install package and dependencies From 5a7a22f348fc17fd74c331930ab5c0b487783a02 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Aug 2023 09:41:35 -0400 Subject: [PATCH 187/228] Use UBI8 minimal for image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9328f77d..92e472f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ COPY controllers/ controllers/ # Build RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager main.go -FROM registry.access.redhat.com/ubi8/go-toolset:1.19.10-10 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1037 WORKDIR / COPY --from=builder /workspace/manager . USER 65534:65534 From 0c29a0083682ab563195304d0eb19af57dc7cf25 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Wed, 16 Aug 2023 11:49:32 -0400 Subject: [PATCH 188/228] Fix tests --- tests/e2e/bundles/02-assert.yaml | 4 +++- tests/e2e/generate-nav-json/02-assert.yaml | 4 +++- tests/e2e/storage/02-assert.yaml | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/e2e/bundles/02-assert.yaml b/tests/e2e/bundles/02-assert.yaml index b7584572..e8a28c84 100644 --- a/tests/e2e/bundles/02-assert.yaml +++ b/tests/e2e/bundles/02-assert.yaml @@ -35,7 +35,9 @@ spec: - name: config mountPath: /opt/app-root/src/build/chrome - name: config - mountPath: /opt/app-root/src/build/operator-generated + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated --- apiVersion: cloud.redhat.com/v1alpha1 kind: Bundle diff --git a/tests/e2e/generate-nav-json/02-assert.yaml b/tests/e2e/generate-nav-json/02-assert.yaml index c67b5d24..a347fec4 100644 --- a/tests/e2e/generate-nav-json/02-assert.yaml +++ b/tests/e2e/generate-nav-json/02-assert.yaml @@ -35,5 +35,7 @@ spec: - name: config mountPath: /opt/app-root/src/build/chrome - name: config - mountPath: /opt/app-root/src/build/operator-generated + mountPath: /opt/app-root/src/build/stable/operator-generated + - name: config + mountPath: /opt/app-root/src/build/preview/operator-generated diff --git a/tests/e2e/storage/02-assert.yaml b/tests/e2e/storage/02-assert.yaml index 41e436ac..9098531b 100644 --- a/tests/e2e/storage/02-assert.yaml +++ b/tests/e2e/storage/02-assert.yaml @@ -32,7 +32,9 @@ spec: terminationMessagePath: /dev/termination-log terminationMessagePolicy: File volumeMounts: - - mountPath: /opt/app-root/src/build/operator-generated + - mountPath: /opt/app-root/src/build/stable/operator-generated + name: config + - mountPath: /opt/app-root/src/build/preview/operator-generated name: config securityContext: {} terminationGracePeriodSeconds: 30 From 1661c743750b142b1ec431fd8d57baeb675d6d26 Mon Sep 17 00:00:00 2001 From: Matt Knop Date: Mon, 21 Aug 2023 11:04:48 -0600 Subject: [PATCH 189/228] Adding SLO doc --- .../frontend-operator-reconciliation-time.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/slos/frontend-operator-reconciliation-time.md diff --git a/docs/slos/frontend-operator-reconciliation-time.md b/docs/slos/frontend-operator-reconciliation-time.md new file mode 100644 index 00000000..23d5670f --- /dev/null +++ b/docs/slos/frontend-operator-reconciliation-time.md @@ -0,0 +1,24 @@ +# Frontend Operator Reconciliation Time SLO + +## Description + +This metric tracks the reconciliation time for the Frontend Operator's `frontend` controller. + +## SLI Rationale + +High reconciliation times backup the queue of objects needed to be reconciled. This could indicate an issue with the operator +and prevent objects from getting added or updated in a timely manor. + +## Implmentation + +The Operator SDK exposes the `controller_runtime_reconcile_time_seconds_bucket` metric to show reconciliation times. Using the +`sum(average_over_time)` modifier allows us to determine if that amount is staying under 4 seconds. + +## SLO Rationale +Almost all reconciler calls should be handled without issue in a timely manor. If we are hitting reconciliation times greater than +4 seconds, debugging should begin. + +## Alerting +Alerts should be kept to a medium level. Because there are a myriad of issues that could cause high reconciliation times, breaking +this SLO should not result in a page. It should be addressed, but higher than normal reconciliation times alone does not indiciate +an outage. From eda284f67e074cb387c1e70b85232feab20c2f24 Mon Sep 17 00:00:00 2001 From: Matt Knop Date: Mon, 21 Aug 2023 11:07:52 -0600 Subject: [PATCH 190/228] Added to description. --- docs/slos/frontend-operator-reconciliation-time.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/slos/frontend-operator-reconciliation-time.md b/docs/slos/frontend-operator-reconciliation-time.md index 23d5670f..6382f799 100644 --- a/docs/slos/frontend-operator-reconciliation-time.md +++ b/docs/slos/frontend-operator-reconciliation-time.md @@ -2,7 +2,8 @@ ## Description -This metric tracks the reconciliation time for the Frontend Operator's `frontend` controller. +This metric tracks the reconciliation time for the Frontend Operator's `frontend` controller. Reconcilations should stay +below 4 seconds for at least 95% of the time. ## SLI Rationale From 7cc6d4a66fc0908a82846f747bd754b1bab7b52c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 25 Sep 2023 08:03:51 -0400 Subject: [PATCH 191/228] Build arm64 and amd64 versions and use multi-arch manifest on quay. --- Dockerfile | 2 +- Dockerfile.base | 2 +- build_deploy.sh | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 92e472f3..d2d60cb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ COPY api/ api/ COPY controllers/ controllers/ # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux go build -o manager main.go FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1037 WORKDIR / diff --git a/Dockerfile.base b/Dockerfile.base index 5baa9e7e..24c70f6c 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -14,7 +14,7 @@ COPY controllers/ controllers/ USER 0 -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux go build -o manager main.go RUN rm main.go RUN rm -rf api diff --git a/build_deploy.sh b/build_deploy.sh index be7e0f92..a3df0b78 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -39,5 +39,11 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then fi #### End -docker --config="$DOCKER_CONF" build --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" . -docker --config="$DOCKER_CONF" push "${IMAGE}:${IMAGE_TAG}" +docker --config="$DOCKER_CONF" build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker --config="$DOCKER_CONF" build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . + +docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ + "${IMAGE}:${IMAGE_TAG}-amd64" \ + "${IMAGE}:${IMAGE_TAG}-arm64" + +docker --config="$DOCKER_CONF" manifest push "${IMAGE}:${IMAGE_TAG}" From 04a9d9797332f52d157529cb3e69b5aa8f711c9b Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 09:22:42 -0500 Subject: [PATCH 192/228] Multiarch builds --- build_deploy.sh | 9 +-------- pr_check.sh | 3 ++- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index a3df0b78..1f1f278b 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -39,11 +39,4 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then fi #### End -docker --config="$DOCKER_CONF" build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . -docker --config="$DOCKER_CONF" build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . - -docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ - "${IMAGE}:${IMAGE_TAG}-amd64" \ - "${IMAGE}:${IMAGE_TAG}-arm64" - -docker --config="$DOCKER_CONF" manifest push "${IMAGE}:${IMAGE_TAG}" +docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . diff --git a/pr_check.sh b/pr_check.sh index e163655c..f91f0cbd 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,7 +14,8 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it -docker build -t $CONTAINER_NAME -f build/Dockerfile.pr . +docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . +docker buildx build --load -t $CONTAINER_NAME -f build/Dockerfile.pr . docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh From d4dde31bc4cbd3648d70a5e1271f6d9ed8ee1ac7 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 09:59:56 -0500 Subject: [PATCH 193/228] Make some changes to make the linter happy --- controllers/frontend_controller_suite_test.go | 218 +++++++++--------- controllers/suite_test.go | 54 ++--- 2 files changed, 128 insertions(+), 144 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 85486bce..57aa9d40 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -6,8 +6,8 @@ import ( "time" crd "github.com/RedHatInsights/frontend-operator/api/v1alpha1" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "github.com/onsi/ginkgo" + "github.com/onsi/gomega" prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" apps "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" @@ -17,7 +17,7 @@ import ( "k8s.io/apimachinery/pkg/types" ) -var _ = Describe("Frontend controller with image", func() { +var _ = ginkgo.Describe("Frontend controller with image", func() { const ( FrontendName = "test-frontend" FrontendNamespace = "default" @@ -32,18 +32,18 @@ var _ = Describe("Frontend controller with image", func() { interval = time.Millisecond * 250 ) - Context("When creating a Frontend Resource", func() { - It("Should create a deployment with the correct items", func() { - By("By creating a new Frontend") + ginkgo.Context("When creating a Frontend Resource", func() { + ginkgo.It("Should create a deployment with the correct items", func() { + ginkgo.By("ginkgo.By creating a new Frontend") ctx := context.Background() var customConfig apiextensions.JSON err := customConfig.UnmarshalJSON([]byte(`{"apple":"pie"}`)) - Expect(err).Should(BeNil()) + gomega.Expect(err).Should(gomega.BeNil()) var customConfig2 apiextensions.JSON err = customConfig2.UnmarshalJSON([]byte(`{"cheese":"pasty"}`)) - Expect(err).Should(BeNil()) + gomega.Expect(err).Should(gomega.BeNil()) frontend := &crd.Frontend{ TypeMeta: metav1.TypeMeta{ @@ -84,7 +84,7 @@ var _ = Describe("Frontend controller with image", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend)).Should(gomega.Succeed()) frontend2 := &crd.Frontend{ TypeMeta: metav1.TypeMeta{ @@ -126,7 +126,7 @@ var _ = Describe("Frontend controller with image", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend2)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend2)).Should(gomega.Succeed()) frontendEnvironment := &crd.FrontendEnvironment{ TypeMeta: metav1.TypeMeta{ @@ -146,7 +146,7 @@ var _ = Describe("Frontend controller with image", func() { GenerateNavJSON: true, }, } - Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(gomega.Succeed()) bundle := &crd.Bundle{ TypeMeta: metav1.TypeMeta{ @@ -164,7 +164,7 @@ var _ = Describe("Frontend controller with image", func() { EnvName: FrontendEnvName, }, } - Expect(k8sClient.Create(ctx, bundle)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, bundle)).Should(gomega.Succeed()) deploymentLookupKey := types.NamespacedName{Name: frontend.Name + "-frontend", Namespace: FrontendNamespace} ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} @@ -172,30 +172,30 @@ var _ = Describe("Frontend controller with image", func() { serviceLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} createdDeployment := &apps.Deployment{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, deploymentLookupKey, createdDeployment) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdDeployment.Name).Should(Equal(FrontendName + "-frontend")) + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdDeployment.Name).Should(gomega.Equal(FrontendName + "-frontend")) fmt.Printf("\n%v\n", createdDeployment.GetAnnotations()) - Expect(createdDeployment.Spec.Template.GetAnnotations()["configHash"]).ShouldNot(Equal("")) + gomega.Expect(createdDeployment.Spec.Template.GetAnnotations()["configHash"]).ShouldNot(gomega.Equal("")) createdIngress := &networking.Ingress{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, ingressLookupKey, createdIngress) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdIngress.Name).Should(Equal(FrontendName)) + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdIngress.Name).Should(gomega.Equal(FrontendName)) createdService := &v1.Service{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, serviceLookupKey, createdService) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdService.Name).Should(Equal(FrontendName)) + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdService.Name).Should(gomega.Equal(FrontendName)) createdConfigMap := &v1.ConfigMap{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, configMapLookupKey, createdConfigMap) if err != nil { return err == nil @@ -204,19 +204,19 @@ var _ = Describe("Frontend controller with image", func() { return false } return true - }, timeout, interval).Should(BeTrue()) - Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) - Expect(createdConfigMap.Data).Should(Equal(map[string]string{ + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdConfigMap.Name).Should(gomega.Equal(FrontendEnvName)) + gomega.Expect(createdConfigMap.Data).Should(gomega.Equal(map[string]string{ "fed-modules.json": "{\"testFrontend\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"},\"fullProfile\":true},\"testFrontend2\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"cheese\":\"pasty\"},\"fullProfile\":false}}", - "test-env.json": "{\"id\":\"test-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", + "test-env.json": "{\"id\":\"test-bundle\",\"title\":\"\",\"navginkgo.Items\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", })) - Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) + gomega.Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(gomega.Equal(FrontendEnvName)) }) }) }) -var _ = Describe("Frontend controller with service", func() { +var _ = ginkgo.Describe("Frontend controller with service", func() { const ( FrontendName = "test-frontend-service" FrontendNamespace = "default" @@ -229,9 +229,9 @@ var _ = Describe("Frontend controller with service", func() { interval = time.Millisecond * 250 ) - Context("When creating a Frontend Resource", func() { - It("Should create a deployment with the correct items", func() { - By("By creating a new Frontend") + ginkgo.Context("When creating a Frontend Resource", func() { + ginkgo.It("Should create a deployment with the correct items", func() { + ginkgo.By("ginkgo.By creating a new Frontend") ctx := context.Background() frontendEnvironment := crd.FrontendEnvironment{ @@ -256,7 +256,7 @@ var _ = Describe("Frontend controller with service", func() { GenerateNavJSON: false, }, } - Expect(k8sClient.Create(ctx, &frontendEnvironment)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, &frontendEnvironment)).Should(gomega.Succeed()) frontend := &crd.Frontend{ TypeMeta: metav1.TypeMeta{ @@ -302,7 +302,7 @@ var _ = Describe("Frontend controller with service", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend)).Should(gomega.Succeed()) bundle := crd.Bundle{ TypeMeta: metav1.TypeMeta{ @@ -320,51 +320,51 @@ var _ = Describe("Frontend controller with service", func() { EnvName: FrontendEnvName, }, } - Expect(k8sClient.Create(ctx, &bundle)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, &bundle)).Should(gomega.Succeed()) ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} configMapLookupKey := types.NamespacedName{Name: frontendEnvironment.Name, Namespace: FrontendNamespace} createdIngress := &networking.Ingress{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, ingressLookupKey, createdIngress) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdIngress.Name).Should(Equal(FrontendName)) - Expect(createdIngress.Spec.Rules[0].HTTP.Paths[0].Backend.Service.Name).Should(Equal(ServiceName)) - Expect(createdIngress.Annotations["nginx.ingress.kubernetes.io/whitelist-source-range"]).Should(Equal("192.168.0.0/24,10.10.0.0/24")) - Expect(createdIngress.Annotations["haproxy.router.openshift.io/ip_whitelist"]).Should(Equal("192.168.0.0/24 10.10.0.0/24")) + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdIngress.Name).Should(gomega.Equal(FrontendName)) + gomega.Expect(createdIngress.Spec.Rules[0].HTTP.Paths[0].Backend.Service.Name).Should(gomega.Equal(ServiceName)) + gomega.Expect(createdIngress.Annotations["nginx.ingress.kubernetes.io/whitelist-source-range"]).Should(gomega.Equal("192.168.0.0/24,10.10.0.0/24")) + gomega.Expect(createdIngress.Annotations["haproxy.router.openshift.io/ip_whitelist"]).Should(gomega.Equal("192.168.0.0/24 10.10.0.0/24")) createdConfigMap := &v1.ConfigMap{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, configMapLookupKey, createdConfigMap) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) - Expect(createdConfigMap.Data).Should(Equal(map[string]string{ + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdConfigMap.Name).Should(gomega.Equal(FrontendEnvName)) + gomega.Expect(createdConfigMap.Data).Should(gomega.Equal(map[string]string{ "fed-modules.json": "{\"testFrontendService\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false}}", })) - Eventually(func() bool { + gomega.Eventually(func() bool { nfe := &crd.Frontend{} err := k8sClient.Get(ctx, types.NamespacedName{Name: frontend.Name, Namespace: frontend.Namespace}, nfe) if err != nil { return false } - Expect(nfe.Status.Conditions[0].Type).Should(Equal(crd.FrontendsReady)) - Expect(nfe.Status.Conditions[0].Status).Should(Equal(v1.ConditionTrue)) - Expect(nfe.Status.Conditions[1].Type).Should(Equal(crd.ReconciliationFailed)) - Expect(nfe.Status.Conditions[1].Status).Should(Equal(v1.ConditionFalse)) - Expect(nfe.Status.Conditions[2].Type).Should(Equal(crd.ReconciliationSuccessful)) - Expect(nfe.Status.Conditions[2].Status).Should(Equal(v1.ConditionTrue)) - Expect(nfe.Status.Ready).Should(Equal(true)) + gomega.Expect(nfe.Status.Conditions[0].Type).Should(gomega.Equal(crd.FrontendsReady)) + gomega.Expect(nfe.Status.Conditions[0].Status).Should(gomega.Equal(v1.ConditionTrue)) + gomega.Expect(nfe.Status.Conditions[1].Type).Should(gomega.Equal(crd.ReconciliationFailed)) + gomega.Expect(nfe.Status.Conditions[1].Status).Should(gomega.Equal(v1.ConditionFalse)) + gomega.Expect(nfe.Status.Conditions[2].Type).Should(gomega.Equal(crd.ReconciliationSuccessful)) + gomega.Expect(nfe.Status.Conditions[2].Status).Should(gomega.Equal(v1.ConditionTrue)) + gomega.Expect(nfe.Status.Ready).Should(gomega.Equal(true)) return true - }, timeout, interval).Should(BeTrue()) + }, timeout, interval).Should(gomega.BeTrue()) }) }) }) -var _ = Describe("Frontend controller with chrome", func() { +var _ = ginkgo.Describe("Frontend controller with chrome", func() { const ( FrontendName = "chrome" FrontendNamespace = "default" @@ -378,14 +378,14 @@ var _ = Describe("Frontend controller with chrome", func() { interval = time.Millisecond * 250 ) - Context("When creating a chrome Frontend Resource", func() { - It("Should create a deployment with the correct items", func() { - By("By creating a new Frontend") + ginkgo.Context("When creating a chrome Frontend Resource", func() { + ginkgo.It("Should create a deployment with the correct items", func() { + ginkgo.By("ginkgo.By creating a new Frontend") ctx := context.Background() var customConfig apiextensions.JSON err := customConfig.UnmarshalJSON([]byte(`{"apple":"pie"}`)) - Expect(err).Should(BeNil()) + gomega.Expect(err).Should(gomega.BeNil()) frontend := &crd.Frontend{ TypeMeta: metav1.TypeMeta{ @@ -425,7 +425,7 @@ var _ = Describe("Frontend controller with chrome", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend)).Should(gomega.Succeed()) frontend2 := &crd.Frontend{ TypeMeta: metav1.TypeMeta{ @@ -465,7 +465,7 @@ var _ = Describe("Frontend controller with chrome", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend2)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend2)).Should(gomega.Succeed()) frontend3 := &crd.Frontend{ TypeMeta: metav1.TypeMeta{ @@ -504,7 +504,7 @@ var _ = Describe("Frontend controller with chrome", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend3)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend3)).Should(gomega.Succeed()) frontendEnvironment := &crd.FrontendEnvironment{ TypeMeta: metav1.TypeMeta{ @@ -524,7 +524,7 @@ var _ = Describe("Frontend controller with chrome", func() { GenerateNavJSON: true, }, } - Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(gomega.Succeed()) bundle := &crd.Bundle{ TypeMeta: metav1.TypeMeta{ @@ -542,7 +542,7 @@ var _ = Describe("Frontend controller with chrome", func() { EnvName: FrontendEnvName, }, } - Expect(k8sClient.Create(ctx, bundle)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, bundle)).Should(gomega.Succeed()) deploymentLookupKey := types.NamespacedName{Name: frontend.Name + "-frontend", Namespace: FrontendNamespace} ingressLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} @@ -550,30 +550,30 @@ var _ = Describe("Frontend controller with chrome", func() { serviceLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} createdDeployment := &apps.Deployment{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, deploymentLookupKey, createdDeployment) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdDeployment.Name).Should(Equal(FrontendName + "-frontend")) + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdDeployment.Name).Should(gomega.Equal(FrontendName + "-frontend")) fmt.Printf("\n%v\n", createdDeployment.GetAnnotations()) - Expect(createdDeployment.Spec.Template.GetAnnotations()["configHash"]).ShouldNot(Equal("")) + gomega.Expect(createdDeployment.Spec.Template.GetAnnotations()["configHash"]).ShouldNot(gomega.Equal("")) createdIngress := &networking.Ingress{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, ingressLookupKey, createdIngress) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdIngress.Name).Should(Equal(FrontendName)) + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdIngress.Name).Should(gomega.Equal(FrontendName)) createdService := &v1.Service{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, serviceLookupKey, createdService) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdService.Name).Should(Equal(FrontendName)) + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdService.Name).Should(gomega.Equal(FrontendName)) createdConfigMap := &v1.ConfigMap{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, configMapLookupKey, createdConfigMap) if err != nil { return err == nil @@ -582,18 +582,18 @@ var _ = Describe("Frontend controller with chrome", func() { return false } return true - }, timeout, interval).Should(BeTrue()) - Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) - Expect(createdConfigMap.Data).Should(Equal(map[string]string{ + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdConfigMap.Name).Should(gomega.Equal(FrontendEnvName)) + gomega.Expect(createdConfigMap.Data).Should(gomega.Equal(map[string]string{ "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"},\"fullProfile\":false},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"},\"fullProfile\":false}}", - "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) - Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) + "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navginkgo.Items\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) + gomega.Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(gomega.Equal(FrontendEnvName)) }) }) }) -var _ = Describe("ServiceMonitor Creation", func() { +var _ = ginkgo.Describe("ServiceMonitor Creation", func() { const ( FrontendName = "test-service-monitor" FrontendNamespace = "default" @@ -605,9 +605,9 @@ var _ = Describe("ServiceMonitor Creation", func() { interval = time.Millisecond * 250 ) - Context("When creating a Frontend Resource", func() { - It("Should create a ServiceMonitor", func() { - By("Reading the FrontendEnvironment") + ginkgo.Context("When creating a Frontend Resource", func() { + ginkgo.It("Should create a ServiceMonitor", func() { + ginkgo.By("Reading the FrontendEnvironment") ctx := context.Background() frontend := &crd.Frontend{ @@ -647,7 +647,7 @@ var _ = Describe("ServiceMonitor Creation", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend)).Should(gomega.Succeed()) frontendEnvironment := &crd.FrontendEnvironment{ TypeMeta: metav1.TypeMeta{ @@ -667,7 +667,7 @@ var _ = Describe("ServiceMonitor Creation", func() { GenerateNavJSON: true, }, } - Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(gomega.Succeed()) bundle := &crd.Bundle{ TypeMeta: metav1.TypeMeta{ @@ -685,17 +685,17 @@ var _ = Describe("ServiceMonitor Creation", func() { EnvName: FrontendEnvName, }, } - Expect(k8sClient.Create(ctx, bundle)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, bundle)).Should(gomega.Succeed()) serviceLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: FrontendNamespace} monitorLookupKey := types.NamespacedName{Name: frontend.Name, Namespace: MonitoringNamespace} createdService := &v1.Service{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, serviceLookupKey, createdService) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdService.Name).Should(Equal(FrontendName)) + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdService.Name).Should(gomega.Equal(FrontendName)) createdServiceMonitor := &prom.ServiceMonitor{} ls := metav1.LabelSelector{ @@ -703,17 +703,17 @@ var _ = Describe("ServiceMonitor Creation", func() { "frontend": FrontendName, }, } - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, monitorLookupKey, createdServiceMonitor) return err == nil - }, timeout, interval).Should(BeTrue()) - Expect(createdServiceMonitor.Name).Should(Equal(FrontendName)) - Expect(createdServiceMonitor.Spec.Selector).Should(Equal(ls)) + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdServiceMonitor.Name).Should(gomega.Equal(FrontendName)) + gomega.Expect(createdServiceMonitor.Spec.Selector).Should(gomega.Equal(ls)) }) }) }) -var _ = Describe("Dependencies", func() { +var _ = ginkgo.Describe("Dependencies", func() { const ( FrontendName = "test-dependencies" FrontendName2 = "test-optional-dependencies" @@ -727,9 +727,9 @@ var _ = Describe("Dependencies", func() { interval = time.Millisecond * 250 ) - Context("When creating a Frontend Resource with dependencies", func() { - It("Should create the right config", func() { - By("Setting up dependencies and optionaldependencies") + ginkgo.Context("When creating a Frontend Resource with dependencies", func() { + ginkgo.It("Should create the right config", func() { + ginkgo.By("Setting up dependencies and optionaldependencies") ctx := context.Background() configMapLookupKey := types.NamespacedName{Name: FrontendEnvName, Namespace: FrontendNamespace} @@ -772,7 +772,7 @@ var _ = Describe("Dependencies", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend)).Should(gomega.Succeed()) frontend2 := &crd.Frontend{ TypeMeta: metav1.TypeMeta{ @@ -812,7 +812,7 @@ var _ = Describe("Dependencies", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend2)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend2)).Should(gomega.Succeed()) frontend3 := &crd.Frontend{ TypeMeta: metav1.TypeMeta{ @@ -851,7 +851,7 @@ var _ = Describe("Dependencies", func() { }, }, } - Expect(k8sClient.Create(ctx, frontend3)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontend3)).Should(gomega.Succeed()) frontendEnvironment := &crd.FrontendEnvironment{ TypeMeta: metav1.TypeMeta{ @@ -871,7 +871,7 @@ var _ = Describe("Dependencies", func() { GenerateNavJSON: true, }, } - Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, frontendEnvironment)).Should(gomega.Succeed()) bundle := &crd.Bundle{ TypeMeta: metav1.TypeMeta{ @@ -889,10 +889,10 @@ var _ = Describe("Dependencies", func() { EnvName: FrontendEnvName, }, } - Expect(k8sClient.Create(ctx, bundle)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, bundle)).Should(gomega.Succeed()) createdConfigMap := &v1.ConfigMap{} - Eventually(func() bool { + gomega.Eventually(func() bool { err := k8sClient.Get(ctx, configMapLookupKey, createdConfigMap) if err != nil { return err == nil @@ -901,13 +901,13 @@ var _ = Describe("Dependencies", func() { return false } return true - }, timeout, interval).Should(BeTrue()) - Expect(createdConfigMap.Name).Should(Equal(FrontendEnvName)) - Expect(createdConfigMap.Data).Should(Equal(map[string]string{ - "test-dependencies-env.json": "{\"id\":\"test-dependencies-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", + }, timeout, interval).Should(gomega.BeTrue()) + gomega.Expect(createdConfigMap.Name).Should(gomega.Equal(FrontendEnvName)) + gomega.Expect(createdConfigMap.Data).Should(gomega.Equal(map[string]string{ + "test-dependencies-env.json": "{\"id\":\"test-dependencies-bundle\",\"title\":\"\",\"navginkgo.Items\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", "fed-modules.json": "{\"testDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}],\"dependencies\":[\"depstring\"]}],\"fullProfile\":false},\"testNoDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false},\"testOptionalDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}],\"optionalDependencies\":[\"depstring-op\"]}],\"fullProfile\":false}}", })) - Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(Equal(FrontendEnvName)) + gomega.Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(gomega.Equal(FrontendEnvName)) }) }) diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 417c441d..8cfaf395 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -1,19 +1,3 @@ -/* -Copyright 2021 RedHatInsights. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package controllers import ( @@ -21,8 +5,8 @@ import ( "path/filepath" "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "github.com/onsi/ginkgo" + "github.com/onsi/gomega" prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -50,19 +34,19 @@ var stopController context.CancelFunc var MonitoringNamespace = "openshift-customer-monitoring" func TestAPIs(t *testing.T) { - RegisterFailHandler(Fail) + gomega.RegisterFailHandler(ginkgo.Fail) - RunSpecs(t, "Controller Suite") + ginkgo.RunSpecs(t, "Controller Suite") } -var _ = BeforeSuite(func() { - logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true))) +var _ = ginkgo.BeforeSuite(func() { + logf.SetLogger(zap.New(zap.WriteTo(ginkgo.GinkgoWriter), zap.UseDevMode(true))) k8sscheme := runtime.NewScheme() utilruntime.Must(clientgoscheme.AddToScheme(k8sscheme)) utilruntime.Must(prom.AddToScheme(k8sscheme)) utilruntime.Must(networking.AddToScheme(k8sscheme)) - By("bootstrapping test environment") + ginkgo.By("bootstrapping test environment") // Here be dragons: env-test does not play nice with third party CRDs // https://github.com/kubernetes-sigs/controller-runtime/issues/1191#issuecomment-833058115 testEnv = &envtest.Environment{ @@ -75,29 +59,29 @@ var _ = BeforeSuite(func() { } cfg, err := testEnv.Start() - Expect(err).NotTo(HaveOccurred()) - Expect(cfg).NotTo(BeNil()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(cfg).NotTo(gomega.BeNil()) err = crd.AddToScheme(k8sscheme) - Expect(err).NotTo(HaveOccurred()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) //+kubebuilder:scaffold:scheme k8sClient, err = client.New(cfg, client.Options{Scheme: k8sscheme}) - Expect(err).NotTo(HaveOccurred()) - Expect(k8sClient).NotTo(BeNil()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) + gomega.Expect(k8sClient).NotTo(gomega.BeNil()) k8sManager, err := ctrl.NewManager(cfg, ctrl.Options{ Scheme: k8sscheme, }) - Expect(err).ToNot(HaveOccurred()) + gomega.Expect(err).ToNot(gomega.HaveOccurred()) err = (&FrontendReconciler{ Client: k8sManager.GetClient(), Scheme: k8sManager.GetScheme(), Log: ctrl.Log.WithName("controllers").WithName("CronJob"), }).SetupWithManager(k8sManager) - Expect(err).ToNot(HaveOccurred()) + gomega.Expect(err).ToNot(gomega.HaveOccurred()) ctx, cancel := context.WithCancel(context.Background()) stopController = cancel @@ -107,18 +91,18 @@ var _ = BeforeSuite(func() { Name: MonitoringNamespace, }, } - Expect(k8sClient.Create(ctx, &monitorNs)).Should(Succeed()) + gomega.Expect(k8sClient.Create(ctx, &monitorNs)).Should(gomega.Succeed()) go func() { err = k8sManager.Start(ctx) - Expect(err).ToNot(HaveOccurred()) + gomega.Expect(err).ToNot(gomega.HaveOccurred()) }() }, 60) -var _ = AfterSuite(func() { - By("tearing down the test environment") +var _ = ginkgo.AfterSuite(func() { + ginkgo.By("tearing down the test environment") stopController() err := testEnv.Stop() - Expect(err).NotTo(HaveOccurred()) + gomega.Expect(err).NotTo(gomega.HaveOccurred()) }) From d8c214182978b63397925d072c29e9c06bde26a5 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 10:02:52 -0500 Subject: [PATCH 194/228] Make linter happy --- controllers/utils/utils_test.go | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/controllers/utils/utils_test.go b/controllers/utils/utils_test.go index 2982fbfa..ad69aa35 100644 --- a/controllers/utils/utils_test.go +++ b/controllers/utils/utils_test.go @@ -3,17 +3,17 @@ package utils import ( "testing" - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" + "github.com/onsi/ginkgo" + "github.com/onsi/gomega" ) func TestCamelCase(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "Camel Case Conversion") + gomega.RegisterFailHandler(ginkgo.Fail) + ginkgo.RunSpecs(t, "Camel Case Conversion") } -var _ = Describe("Camel Case Conversion", func() { +var _ = ginkgo.Describe("Camel Case Conversion", func() { const ( singleName = "inventory" dashName = "hac-core" @@ -22,24 +22,24 @@ var _ = Describe("Camel Case Conversion", func() { tripleCamelHump = "frontendTestName" ) - Context("When creating a fed-modules entry", func() { - It("Should convert a dash separated name", func() { - By("Using the ToCamelCase method") - Expect(ToCamelCase(dashName)).Should(Equal(camelName)) + ginkgo.Context("When creating a fed-modules entry", func() { + ginkgo.It("Should convert a dash separated name", func() { + ginkgo.By("Using the ToCamelCase method") + gomega.Expect(ToCamelCase(dashName)).Should(gomega.Equal(camelName)) }) }) - Context("When creating a fed-modules entry", func() { - It("Should convert dash case to camel case for n dashes", func() { - By("Using the ToCamelCase method") - Expect(ToCamelCase(tripleDash)).Should(Equal(tripleCamelHump)) + ginkgo.Context("When creating a fed-modules entry", func() { + ginkgo.It("Should convert dash case to camel case for n dashes", func() { + ginkgo.By("Using the ToCamelCase method") + gomega.Expect(ToCamelCase(tripleDash)).Should(gomega.Equal(tripleCamelHump)) }) }) - Context("When creating a fed-modules entry", func() { - It("Should not convert a single word", func() { - By("Using the ToCamelCase method") - Expect(ToCamelCase(singleName)).Should(Equal(singleName)) + ginkgo.Context("When creating a fed-modules entry", func() { + ginkgo.It("Should not convert a single word", func() { + ginkgo.By("Using the ToCamelCase method") + gomega.Expect(ToCamelCase(singleName)).Should(gomega.Equal(singleName)) }) }) From 738f8661083f7dfd8f88295edf51bbf3829d385c Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 11:25:01 -0500 Subject: [PATCH 195/228] Update test --- controllers/frontend_controller_suite_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index 57aa9d40..f7831fe9 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -208,7 +208,7 @@ var _ = ginkgo.Describe("Frontend controller with image", func() { gomega.Expect(createdConfigMap.Name).Should(gomega.Equal(FrontendEnvName)) gomega.Expect(createdConfigMap.Data).Should(gomega.Equal(map[string]string{ "fed-modules.json": "{\"testFrontend\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"},\"fullProfile\":true},\"testFrontend2\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"cheese\":\"pasty\"},\"fullProfile\":false}}", - "test-env.json": "{\"id\":\"test-bundle\",\"title\":\"\",\"navginkgo.Items\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", + "test-env.json": "{\"id\":\"test-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", })) gomega.Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(gomega.Equal(FrontendEnvName)) @@ -586,7 +586,7 @@ var _ = ginkgo.Describe("Frontend controller with chrome", func() { gomega.Expect(createdConfigMap.Name).Should(gomega.Equal(FrontendEnvName)) gomega.Expect(createdConfigMap.Data).Should(gomega.Equal(map[string]string{ "fed-modules.json": "{\"chrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\",\"ssoUrl\":\"https://something-auth\"},\"fullProfile\":false},\"noConfig\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false},\"nonChrome\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"config\":{\"apple\":\"pie\"},\"fullProfile\":false}}", - "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navginkgo.Items\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) + "test-chrome-env.json": "{\"id\":\"test-chrome-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}"})) gomega.Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(gomega.Equal(FrontendEnvName)) }) @@ -904,7 +904,7 @@ var _ = ginkgo.Describe("Dependencies", func() { }, timeout, interval).Should(gomega.BeTrue()) gomega.Expect(createdConfigMap.Name).Should(gomega.Equal(FrontendEnvName)) gomega.Expect(createdConfigMap.Data).Should(gomega.Equal(map[string]string{ - "test-dependencies-env.json": "{\"id\":\"test-dependencies-bundle\",\"title\":\"\",\"navginkgo.Items\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", + "test-dependencies-env.json": "{\"id\":\"test-dependencies-bundle\",\"title\":\"\",\"navItems\":[{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"},{\"title\":\"Test\",\"href\":\"/test/href\"}]}", "fed-modules.json": "{\"testDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}],\"dependencies\":[\"depstring\"]}],\"fullProfile\":false},\"testNoDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}]}],\"fullProfile\":false},\"testOptionalDependencies\":{\"manifestLocation\":\"/apps/inventory/fed-mods.json\",\"modules\":[{\"id\":\"test\",\"module\":\"./RootApp\",\"routes\":[{\"pathname\":\"/test/href\"}],\"optionalDependencies\":[\"depstring-op\"]}],\"fullProfile\":false}}", })) gomega.Expect(createdConfigMap.ObjectMeta.OwnerReferences[0].Name).Should(gomega.Equal(FrontendEnvName)) From 2e395062c4c26a02480f23da01e35358c28df1f3 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 11:32:03 -0500 Subject: [PATCH 196/228] Bump images to hopefully make sec happy --- Dockerfile.base | 2 +- build/Dockerfile.pr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.base b/Dockerfile.base index 24c70f6c..c0330219 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,5 +1,5 @@ # Build the manager binary -FROM registry.access.redhat.com/ubi8/go-toolset:1.19.10-10 as builder +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1698062273 as builder WORKDIR /workspace diff --git a/build/Dockerfile.pr b/build/Dockerfile.pr index 498d8b45..32887cf7 100644 --- a/build/Dockerfile.pr +++ b/build/Dockerfile.pr @@ -1,4 +1,4 @@ -FROM registry.access.redhat.com/ubi8/go-toolset:1.19.9-2.1687187497 +FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1698062273 USER 0 RUN dnf install -y openssh-clients git podman make which go jq python3 RUN mkdir /root/go -p From e321d511c7af7cd5146ef3dd80f2ddfd60d370d6 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 13:12:57 -0500 Subject: [PATCH 197/228] Update buiold scripts --- build_deploy.sh | 1 + pr_check.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/build_deploy.sh b/build_deploy.sh index 1f1f278b..82ff7c2f 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -39,4 +39,5 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then fi #### End +docker buildx use multiarchbuilder docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . diff --git a/pr_check.sh b/pr_check.sh index f91f0cbd..c402ce6e 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,6 +14,7 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it +docker buildx use multiarchbuilder docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . docker buildx build --load -t $CONTAINER_NAME -f build/Dockerfile.pr . From cecb96ca203165261607a8308637ed24902f8022 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 13:31:49 -0500 Subject: [PATCH 198/228] frontend controller --- controllers/frontend_controller_suite_test.go | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/controllers/frontend_controller_suite_test.go b/controllers/frontend_controller_suite_test.go index f7831fe9..cb1df411 100644 --- a/controllers/frontend_controller_suite_test.go +++ b/controllers/frontend_controller_suite_test.go @@ -351,15 +351,21 @@ var _ = ginkgo.Describe("Frontend controller with service", func() { if err != nil { return false } - gomega.Expect(nfe.Status.Conditions[0].Type).Should(gomega.Equal(crd.FrontendsReady)) - gomega.Expect(nfe.Status.Conditions[0].Status).Should(gomega.Equal(v1.ConditionTrue)) - gomega.Expect(nfe.Status.Conditions[1].Type).Should(gomega.Equal(crd.ReconciliationFailed)) - gomega.Expect(nfe.Status.Conditions[1].Status).Should(gomega.Equal(v1.ConditionFalse)) - gomega.Expect(nfe.Status.Conditions[2].Type).Should(gomega.Equal(crd.ReconciliationSuccessful)) - gomega.Expect(nfe.Status.Conditions[2].Status).Should(gomega.Equal(v1.ConditionTrue)) - gomega.Expect(nfe.Status.Ready).Should(gomega.Equal(true)) - return true + + // Check the length of Conditions slice before accessing by index + if len(nfe.Status.Conditions) > 2 { + gomega.Expect(nfe.Status.Conditions[0].Type).Should(gomega.Equal(crd.FrontendsReady)) + gomega.Expect(nfe.Status.Conditions[0].Status).Should(gomega.Equal(v1.ConditionTrue)) + gomega.Expect(nfe.Status.Conditions[1].Type).Should(gomega.Equal(crd.ReconciliationFailed)) + gomega.Expect(nfe.Status.Conditions[1].Status).Should(gomega.Equal(v1.ConditionFalse)) + gomega.Expect(nfe.Status.Conditions[2].Type).Should(gomega.Equal(crd.ReconciliationSuccessful)) + gomega.Expect(nfe.Status.Conditions[2].Status).Should(gomega.Equal(v1.ConditionTrue)) + gomega.Expect(nfe.Status.Ready).Should(gomega.Equal(true)) + return true + } + return false }, timeout, interval).Should(gomega.BeTrue()) + }) }) }) From a249e3597a669df155b0baee4b4561a5a9e665f8 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 14:03:09 -0500 Subject: [PATCH 199/228] ls --- build_deploy.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_deploy.sh b/build_deploy.sh index 82ff7c2f..e6053331 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -39,5 +39,7 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then fi #### End +docker buildx ls + docker buildx use multiarchbuilder docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . From f27a7463d6f77c7dfef44358efcba791deb472f8 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Mon, 6 Nov 2023 14:07:33 -0500 Subject: [PATCH 200/228] More debug data --- build_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_deploy.sh b/build_deploy.sh index e6053331..3edd0b94 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -40,6 +40,6 @@ fi #### End docker buildx ls - +docker buildx inspect --bootstrap docker buildx use multiarchbuilder docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . From e4182d0dda956978e1d670f778af6df3571a9771 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 08:46:24 -0500 Subject: [PATCH 201/228] Trying another build change --- build_deploy.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index 3edd0b94..f8fb8e6c 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -39,7 +39,15 @@ if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then fi #### End -docker buildx ls -docker buildx inspect --bootstrap + docker buildx use multiarchbuilder -docker --config="$DOCKER_CONF" buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . + + +docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" . +docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" . + +docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ + "${IMAGE}:${IMAGE_TAG}-amd64" \ + "${IMAGE}:${IMAGE_TAG}-arm64" + +docker --config="$DOCKER_CONF" manifest push "${IMAGE}:${IMAGE_TAG}" \ No newline at end of file From ebec9af9bfc4c4a5448a62d61d53d5d6a4f28170 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 08:50:23 -0500 Subject: [PATCH 202/228] Another try --- build_deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index f8fb8e6c..0027d020 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -43,8 +43,8 @@ fi docker buildx use multiarchbuilder -docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" . -docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" . +docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ "${IMAGE}:${IMAGE_TAG}-amd64" \ From f16c9a45d3d607249f376fdf0e6ef7b21a029150 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 09:07:43 -0500 Subject: [PATCH 203/228] Slim it down? --- build_deploy.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index 0027d020..ccf3de1e 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -41,13 +41,5 @@ fi docker buildx use multiarchbuilder - - -docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . -docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . - -docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ - "${IMAGE}:${IMAGE_TAG}-amd64" \ - "${IMAGE}:${IMAGE_TAG}-arm64" - -docker --config="$DOCKER_CONF" manifest push "${IMAGE}:${IMAGE_TAG}" \ No newline at end of file +export DOCKER_CONFIG="$DOCKER_CONF" +docker buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . From f06eea1a587c508d50e131661458574f68eb247e Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 09:17:58 -0500 Subject: [PATCH 204/228] Trying another build config --- build_deploy.sh | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index ccf3de1e..b65f6d6a 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -4,6 +4,20 @@ set -exv IMAGE="quay.io/cloudservices/frontend-operator" IMAGE_TAG=$(git rev-parse --short=7 HEAD) +# Generate a unique builder name using Jenkins environment variables +BUILDER_NAME="builder-${JOB_NAME}-${BUILD_ID}" + +# Function to remove Docker builder +cleanup() { + echo "Cleaning up Docker builder..." + # Check if the specified builder exists and remove it if it does + docker buildx inspect "$BUILDER_NAME" &>/dev/null && docker buildx rm "$BUILDER_NAME" +} + +# Create a trap for different signals +# It will call the cleanup function on EXIT, or if the script receives +# a SIGINT (Ctrl+C), or a SIGTERM (termination signal) +trap cleanup EXIT SIGINT SIGTERM if [[ -z "$QUAY_USER" || -z "$QUAY_TOKEN" ]]; then echo "QUAY_USER and QUAY_TOKEN must be set" @@ -40,6 +54,15 @@ fi #### End -docker buildx use multiarchbuilder -export DOCKER_CONFIG="$DOCKER_CONF" -docker buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" -t "${IMAGE}:${IMAGE_TAG}" --push . + +# Create a new buildx builder with the unique name +docker buildx create --name "${BUILDER_NAME}" --use --driver docker-container --driver-opt image=moby/buildkit:latest + +# Initialize the builder +docker buildx inspect "${BUILDER_NAME}" --bootstrap + +# Build and push the multi-architecture image +docker --config="$DOCKER_CONF" buildx build --builder "${BUILDER_NAME}" \ + --platform linux/amd64,linux/arm64 \ + --build-arg BASE_IMAGE="$BASE_IMG" \ + -t "${IMAGE}:${IMAGE_TAG}" --push . From 4f94b1d55a60f07099119fa0906f87f8099fc3a3 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 09:19:48 -0500 Subject: [PATCH 205/228] Different buildkit image --- build_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_deploy.sh b/build_deploy.sh index b65f6d6a..6b0f18ae 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -56,7 +56,7 @@ fi # Create a new buildx builder with the unique name -docker buildx create --name "${BUILDER_NAME}" --use --driver docker-container --driver-opt image=moby/buildkit:latest +docker buildx create --name "${BUILDER_NAME}" --use --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.3 # Initialize the builder docker buildx inspect "${BUILDER_NAME}" --bootstrap From 625d549a60e61258fcd7d712b0db0a9fbea9d41f Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 09:24:59 -0500 Subject: [PATCH 206/228] No, just gonna to it this way --- build_deploy.sh | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index 6b0f18ae..0027d020 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -4,20 +4,6 @@ set -exv IMAGE="quay.io/cloudservices/frontend-operator" IMAGE_TAG=$(git rev-parse --short=7 HEAD) -# Generate a unique builder name using Jenkins environment variables -BUILDER_NAME="builder-${JOB_NAME}-${BUILD_ID}" - -# Function to remove Docker builder -cleanup() { - echo "Cleaning up Docker builder..." - # Check if the specified builder exists and remove it if it does - docker buildx inspect "$BUILDER_NAME" &>/dev/null && docker buildx rm "$BUILDER_NAME" -} - -# Create a trap for different signals -# It will call the cleanup function on EXIT, or if the script receives -# a SIGINT (Ctrl+C), or a SIGTERM (termination signal) -trap cleanup EXIT SIGINT SIGTERM if [[ -z "$QUAY_USER" || -z "$QUAY_TOKEN" ]]; then echo "QUAY_USER and QUAY_TOKEN must be set" @@ -54,15 +40,14 @@ fi #### End +docker buildx use multiarchbuilder + -# Create a new buildx builder with the unique name -docker buildx create --name "${BUILDER_NAME}" --use --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.3 +docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . -# Initialize the builder -docker buildx inspect "${BUILDER_NAME}" --bootstrap +docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ + "${IMAGE}:${IMAGE_TAG}-amd64" \ + "${IMAGE}:${IMAGE_TAG}-arm64" -# Build and push the multi-architecture image -docker --config="$DOCKER_CONF" buildx build --builder "${BUILDER_NAME}" \ - --platform linux/amd64,linux/arm64 \ - --build-arg BASE_IMAGE="$BASE_IMG" \ - -t "${IMAGE}:${IMAGE_TAG}" --push . +docker --config="$DOCKER_CONF" manifest push "${IMAGE}:${IMAGE_TAG}" \ No newline at end of file From d82cd08b614c11c651421ca1f5804f3215d062d0 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 09:38:19 -0500 Subject: [PATCH 207/228] Make sure we have a multiarch base image --- Dockerfile.base | 1 + build_deploy.sh | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile.base b/Dockerfile.base index c0330219..37777566 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,6 +1,7 @@ # Build the manager binary FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1698062273 as builder + WORKDIR /workspace COPY go.mod go.mod diff --git a/build_deploy.sh b/build_deploy.sh index 0027d020..fa4bf771 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -33,16 +33,19 @@ echo "received HTTP response: $RESPONSE" # find all non-expired tags VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length') +docker buildx use multiarchbuilder + if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then - docker --config="$DOCKER_CONF" build -f Dockerfile.base . -t "$BASE_IMG" + docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 -f Dockerfile.base --push . -t "${BASE_IMG}-amd64" + docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 -f Dockerfile.base --push . -t "${BASE_IMG}-arm64" + docker --config="$DOCKER_CONF" manifest create "${BASE_IMG}" \ + "${BASE_IMG}-amd64" \ + "${BASE_IMG}-arm64" docker --config="$DOCKER_CONF" push "$BASE_IMG" fi #### End -docker buildx use multiarchbuilder - - docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . From d3defd0f798a4de731a8712d2719a088521c5f54 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:00:22 -0500 Subject: [PATCH 208/228] Trying different syntax --- Dockerfile | 2 +- Dockerfile.base | 1 - build_deploy.sh | 11 ++++------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index d2d60cb9..2a77eca2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ COPY controllers/ controllers/ # Build RUN CGO_ENABLED=0 GOOS=linux go build -o manager main.go -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1037 +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8-1072.1697626218 WORKDIR / COPY --from=builder /workspace/manager . USER 65534:65534 diff --git a/Dockerfile.base b/Dockerfile.base index 37777566..c0330219 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,7 +1,6 @@ # Build the manager binary FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1698062273 as builder - WORKDIR /workspace COPY go.mod go.mod diff --git a/build_deploy.sh b/build_deploy.sh index fa4bf771..e465b742 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -21,7 +21,6 @@ mkdir -p "$DOCKER_CONF" docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io - ### Start base image build and push BASE_TAG=`cat go.mod go.sum Dockerfile.base | sha256sum | head -c 8` BASE_IMG=quay.io/cloudservices/frontend-operator-build-base:$BASE_TAG @@ -33,11 +32,9 @@ echo "received HTTP response: $RESPONSE" # find all non-expired tags VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length') -docker buildx use multiarchbuilder - if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then - docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 -f Dockerfile.base --push . -t "${BASE_IMG}-amd64" - docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 -f Dockerfile.base --push . -t "${BASE_IMG}-arm64" + docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . + docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . docker --config="$DOCKER_CONF" manifest create "${BASE_IMG}" \ "${BASE_IMG}-amd64" \ "${BASE_IMG}-arm64" @@ -46,8 +43,8 @@ fi #### End -docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . -docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . +docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ "${IMAGE}:${IMAGE_TAG}-amd64" \ From 5a555e4971ad8afa927726074dd6784e1ae9c6ef Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:01:20 -0500 Subject: [PATCH 209/228] debug info --- build_deploy.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_deploy.sh b/build_deploy.sh index e465b742..b03516cb 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -18,6 +18,8 @@ fi DOCKER_CONF="$PWD/.docker" mkdir -p "$DOCKER_CONF" +docker buildx ls + docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io From 6b59220694507a9ef5053ef7b326ca8c2cc64cea Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:03:13 -0500 Subject: [PATCH 210/228] boostrap --- build_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_deploy.sh b/build_deploy.sh index b03516cb..5186da3e 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -18,7 +18,7 @@ fi DOCKER_CONF="$PWD/.docker" mkdir -p "$DOCKER_CONF" -docker buildx ls +docker buildx inspect --builder multiarchbuilder --bootstrap docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io From ee7481403f4faaa861a55796920ac7f94b67b9eb Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:04:08 -0500 Subject: [PATCH 211/228] This is utterly exhausting --- build_deploy.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_deploy.sh b/build_deploy.sh index 5186da3e..358a4152 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -20,6 +20,9 @@ mkdir -p "$DOCKER_CONF" docker buildx inspect --builder multiarchbuilder --bootstrap +docker buildx ls + + docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io From f7cfd27310c7923640fab1a4f265c96df48b46b1 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:06:35 -0500 Subject: [PATCH 212/228] trial and error --- build_deploy.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index 358a4152..2b9434e5 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -21,7 +21,7 @@ mkdir -p "$DOCKER_CONF" docker buildx inspect --builder multiarchbuilder --bootstrap docker buildx ls - +docker buildx use multiarchbuilder docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io @@ -38,8 +38,8 @@ echo "received HTTP response: $RESPONSE" VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length') if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then - docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . - docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . + docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . + docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . docker --config="$DOCKER_CONF" manifest create "${BASE_IMG}" \ "${BASE_IMG}-amd64" \ "${BASE_IMG}-arm64" @@ -48,8 +48,8 @@ fi #### End -docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . -docker --config="$DOCKER_CONF" buildx --builder multiarchbuilder build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . +docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ "${IMAGE}:${IMAGE_TAG}-amd64" \ From 3aaf82071727e9d0410fb3c7edac7dc725fecaf0 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:08:21 -0500 Subject: [PATCH 213/228] Retrigger base image rebuild? --- Dockerfile.base | 2 ++ build_deploy.sh | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.base b/Dockerfile.base index c0330219..c63652d8 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,8 +1,10 @@ # Build the manager binary FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1698062273 as builder + WORKDIR /workspace +# Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum diff --git a/build_deploy.sh b/build_deploy.sh index 2b9434e5..88f5b5b8 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -19,8 +19,6 @@ DOCKER_CONF="$PWD/.docker" mkdir -p "$DOCKER_CONF" docker buildx inspect --builder multiarchbuilder --bootstrap - -docker buildx ls docker buildx use multiarchbuilder docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io From 7e1721fa53e8b5f517b33ce497b673b4969ce4a8 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:17:01 -0500 Subject: [PATCH 214/228] This is a nightmare --- Dockerfile.base | 2 -- build_deploy.sh | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Dockerfile.base b/Dockerfile.base index c63652d8..c0330219 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -1,10 +1,8 @@ # Build the manager binary FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1698062273 as builder - WORKDIR /workspace -# Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum diff --git a/build_deploy.sh b/build_deploy.sh index 88f5b5b8..a124704e 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -19,7 +19,6 @@ DOCKER_CONF="$PWD/.docker" mkdir -p "$DOCKER_CONF" docker buildx inspect --builder multiarchbuilder --bootstrap -docker buildx use multiarchbuilder docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io @@ -36,8 +35,8 @@ echo "received HTTP response: $RESPONSE" VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length') if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then - docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . - docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . + docker --config="$DOCKER_CONF" buildx build --builder multiarchbuilder --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . + docker --config="$DOCKER_CONF" buildx build --builder multiarchbuilder --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . docker --config="$DOCKER_CONF" manifest create "${BASE_IMG}" \ "${BASE_IMG}-amd64" \ "${BASE_IMG}-arm64" @@ -46,8 +45,8 @@ fi #### End -docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . -docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . +docker --config="$DOCKER_CONF" buildx build --builder multiarchbuilder --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker --config="$DOCKER_CONF" buildx build --builder multiarchbuilder --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ "${IMAGE}:${IMAGE_TAG}-amd64" \ From 21408b25a5b08d964c01709153e48bf588cd3f3a Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:20:49 -0500 Subject: [PATCH 215/228] Is this it? --- build_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_deploy.sh b/build_deploy.sh index a124704e..43de57f2 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -18,7 +18,7 @@ fi DOCKER_CONF="$PWD/.docker" mkdir -p "$DOCKER_CONF" -docker buildx inspect --builder multiarchbuilder --bootstrap +docker --config="$DOCKER_CONF" buildx inspect --builder multiarchbuilder --bootstrap docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io From 281a34baa2368eb2f824a02c0115cf723317ff51 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:21:08 -0500 Subject: [PATCH 216/228] force base rebuild --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2a77eca2..e9a97c6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,16 @@ ARG BASE_IMAGE= FROM $BASE_IMAGE as builder + WORKDIR /workspace + + # Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum + + + # cache deps before building and copying source so that we don't need to re-download as much # and so that source changes don't invalidate our downloaded layer RUN go mod download From fedcb40ac8aa86d9d347ed4639371a886c0acf73 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:22:14 -0500 Subject: [PATCH 217/228] buildx ls --- build_deploy.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_deploy.sh b/build_deploy.sh index 43de57f2..0e761f17 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -17,6 +17,8 @@ fi DOCKER_CONF="$PWD/.docker" mkdir -p "$DOCKER_CONF" +docker --config="$DOCKER_CONF" buildx ls + docker --config="$DOCKER_CONF" buildx inspect --builder multiarchbuilder --bootstrap From 15652a2a0867a27f01a6e6bceb43c8eebfe68d96 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:29:25 -0500 Subject: [PATCH 218/228] Please be right --- Dockerfile | 4 ---- build_deploy.sh | 33 +++++++++++++++++++++++++++------ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index e9a97c6c..828dffc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,12 @@ ARG BASE_IMAGE= FROM $BASE_IMAGE as builder - WORKDIR /workspace - # Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum - - # cache deps before building and copying source so that we don't need to re-download as much # and so that source changes don't invalidate our downloaded layer RUN go mod download diff --git a/build_deploy.sh b/build_deploy.sh index 0e761f17..16929c45 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -4,6 +4,7 @@ set -exv IMAGE="quay.io/cloudservices/frontend-operator" IMAGE_TAG=$(git rev-parse --short=7 HEAD) +export BUILDER_NAME="builder-${JOB_NAME}-${BUILD_ID}" if [[ -z "$QUAY_USER" || -z "$QUAY_TOKEN" ]]; then echo "QUAY_USER and QUAY_TOKEN must be set" @@ -17,10 +18,30 @@ fi DOCKER_CONF="$PWD/.docker" mkdir -p "$DOCKER_CONF" -docker --config="$DOCKER_CONF" buildx ls -docker --config="$DOCKER_CONF" buildx inspect --builder multiarchbuilder --bootstrap + +# Function to remove Docker builder +cleanup() { + echo "Cleaning up Docker builder..." + # Check if the specified builder exists and remove it if it does + docker --config="$DOCKER_CONF" buildx inspect "$BUILDER_NAME" &>/dev/null && docker buildx rm "$BUILDER_NAME" +} + +# Create a trap for different signals +# It will call the cleanup function on EXIT, or if the script receives +# a SIGINT (Ctrl+C), or a SIGTERM (termination signal) +trap cleanup EXIT SIGINT SIGTERM + + +# Create a new buildx builder with the unique name +docker --config="$DOCKER_CONF" buildx create --name "$BUILDER_NAME" --use --driver docker-container --driver-opt image=moby/buildkit:latest + +# Initialize the builder +docker --config="$DOCKER_CONF" buildx inspect "$BUILDER_NAME" --bootstrap + + +docker --config="$DOCKER_CONF" buildx use "$BUILDER_NAME" docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io @@ -37,8 +58,8 @@ echo "received HTTP response: $RESPONSE" VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length') if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then - docker --config="$DOCKER_CONF" buildx build --builder multiarchbuilder --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . - docker --config="$DOCKER_CONF" buildx build --builder multiarchbuilder --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . + docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . + docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . docker --config="$DOCKER_CONF" manifest create "${BASE_IMG}" \ "${BASE_IMG}-amd64" \ "${BASE_IMG}-arm64" @@ -47,8 +68,8 @@ fi #### End -docker --config="$DOCKER_CONF" buildx build --builder multiarchbuilder --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . -docker --config="$DOCKER_CONF" buildx build --builder multiarchbuilder --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . +docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ "${IMAGE}:${IMAGE_TAG}-amd64" \ From 57ca0215679f34e0a918536438f51b3b57ea0874 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:36:06 -0500 Subject: [PATCH 219/228] correct buildkit image --- build_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_deploy.sh b/build_deploy.sh index 16929c45..b658f1b6 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -35,7 +35,7 @@ trap cleanup EXIT SIGINT SIGTERM # Create a new buildx builder with the unique name -docker --config="$DOCKER_CONF" buildx create --name "$BUILDER_NAME" --use --driver docker-container --driver-opt image=moby/buildkit:latest +docker --config="$DOCKER_CONF" buildx create --name "$BUILDER_NAME" --use --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.3 # Initialize the builder docker --config="$DOCKER_CONF" buildx inspect "$BUILDER_NAME" --bootstrap From 58e79463f206c07a95566b0bc26765afc212550f Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 10:38:35 -0500 Subject: [PATCH 220/228] builder platforms --- build_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_deploy.sh b/build_deploy.sh index b658f1b6..2b34f78e 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -35,7 +35,7 @@ trap cleanup EXIT SIGINT SIGTERM # Create a new buildx builder with the unique name -docker --config="$DOCKER_CONF" buildx create --name "$BUILDER_NAME" --use --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.3 +docker --config="$DOCKER_CONF" buildx create --platform linux/amd64,linux/arm64 --name "$BUILDER_NAME" --use --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.3 # Initialize the builder docker --config="$DOCKER_CONF" buildx inspect "$BUILDER_NAME" --bootstrap From 6224bdb7ea8b130ef26503be0e12749b82d31e66 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 11:11:04 -0500 Subject: [PATCH 221/228] Thrashing --- build_deploy.sh | 43 +++++++++++-------------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index 2b34f78e..59fbf6c6 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -20,31 +20,10 @@ DOCKER_CONF="$PWD/.docker" mkdir -p "$DOCKER_CONF" +docker buildx use multiarchbuilder -# Function to remove Docker builder -cleanup() { - echo "Cleaning up Docker builder..." - # Check if the specified builder exists and remove it if it does - docker --config="$DOCKER_CONF" buildx inspect "$BUILDER_NAME" &>/dev/null && docker buildx rm "$BUILDER_NAME" -} - -# Create a trap for different signals -# It will call the cleanup function on EXIT, or if the script receives -# a SIGINT (Ctrl+C), or a SIGTERM (termination signal) -trap cleanup EXIT SIGINT SIGTERM - - -# Create a new buildx builder with the unique name -docker --config="$DOCKER_CONF" buildx create --platform linux/amd64,linux/arm64 --name "$BUILDER_NAME" --use --driver docker-container --driver-opt image=quay.io/domino/buildkit:v0.12.3 - -# Initialize the builder -docker --config="$DOCKER_CONF" buildx inspect "$BUILDER_NAME" --bootstrap - - -docker --config="$DOCKER_CONF" buildx use "$BUILDER_NAME" - -docker --config="$DOCKER_CONF" login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io -docker --config="$DOCKER_CONF" login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io +docker login -u="$QUAY_USER" -p="$QUAY_TOKEN" quay.io +docker login -u="$RH_REGISTRY_USER" -p="$RH_REGISTRY_TOKEN" registry.redhat.io ### Start base image build and push BASE_TAG=`cat go.mod go.sum Dockerfile.base | sha256sum | head -c 8` @@ -58,21 +37,21 @@ echo "received HTTP response: $RESPONSE" VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length') if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then - docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . - docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . - docker --config="$DOCKER_CONF" manifest create "${BASE_IMG}" \ + docker buildx build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . + docker buildx build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . + docker manifest create "${BASE_IMG}" \ "${BASE_IMG}-amd64" \ "${BASE_IMG}-arm64" - docker --config="$DOCKER_CONF" push "$BASE_IMG" + docker push "$BASE_IMG" fi #### End -docker --config="$DOCKER_CONF" buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . -docker --config="$DOCKER_CONF" buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . +docker buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . -docker --config="$DOCKER_CONF" manifest create "${IMAGE}:${IMAGE_TAG}" \ +docker manifest create "${IMAGE}:${IMAGE_TAG}" \ "${IMAGE}:${IMAGE_TAG}-amd64" \ "${IMAGE}:${IMAGE_TAG}-arm64" -docker --config="$DOCKER_CONF" manifest push "${IMAGE}:${IMAGE_TAG}" \ No newline at end of file +docker manifest push "${IMAGE}:${IMAGE_TAG}" \ No newline at end of file From fe70e88e324fc5db3bd0f94accc7987f98b8ea17 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 11:14:17 -0500 Subject: [PATCH 222/228] More thrashing --- build_deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index 59fbf6c6..2e07a5e5 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -47,8 +47,8 @@ fi #### End -docker buildx build --platform linux/amd64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . -docker buildx build --platform linux/arm64 --build-arg BASE_IMAGE="$BASE_IMG" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . +docker buildx build --platform linux/amd64 --build-arg BASE_IMAGE="${BASE_IMG}-amd64" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker buildx build --platform linux/arm64 --build-arg BASE_IMAGE="${BASE_IMG}-arm64" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . docker manifest create "${IMAGE}:${IMAGE_TAG}" \ "${IMAGE}:${IMAGE_TAG}-amd64" \ From 7523f29288b7a864a8f5478871abd6478d832709 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 11:15:27 -0500 Subject: [PATCH 223/228] Force base rebuild --- Dockerfile.base | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile.base b/Dockerfile.base index c0330219..34ae7a87 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -3,9 +3,14 @@ FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1698062273 as builder WORKDIR /workspace + + COPY go.mod go.mod COPY go.sum go.sum + + + RUN go mod download COPY main.go main.go From ec3a777b439d38439c17563a4e9448a33d76558f Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 11:27:55 -0500 Subject: [PATCH 224/228] Yet another try --- Dockerfile.base | 4 ---- build_deploy.sh | 16 ++-------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Dockerfile.base b/Dockerfile.base index 34ae7a87..0ded5606 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -3,14 +3,10 @@ FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1698062273 as builder WORKDIR /workspace - - COPY go.mod go.mod COPY go.sum go.sum - - RUN go mod download COPY main.go main.go diff --git a/build_deploy.sh b/build_deploy.sh index 2e07a5e5..c192ffac 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -37,21 +37,9 @@ echo "received HTTP response: $RESPONSE" VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length') if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then - docker buildx build --platform linux/amd64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . - docker buildx build --platform linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-arm64" --push . - docker manifest create "${BASE_IMG}" \ - "${BASE_IMG}-amd64" \ - "${BASE_IMG}-arm64" - docker push "$BASE_IMG" + docker buildx build --platform linux/amd64,linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . fi #### End -docker buildx build --platform linux/amd64 --build-arg BASE_IMAGE="${BASE_IMG}-amd64" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . -docker buildx build --platform linux/arm64 --build-arg BASE_IMAGE="${BASE_IMG}-arm64" --build-arg GOARCH="arm64" -t "${IMAGE}:${IMAGE_TAG}-arm64" --push . - -docker manifest create "${IMAGE}:${IMAGE_TAG}" \ - "${IMAGE}:${IMAGE_TAG}-amd64" \ - "${IMAGE}:${IMAGE_TAG}-arm64" - -docker manifest push "${IMAGE}:${IMAGE_TAG}" \ No newline at end of file +docker buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="${BASE_IMG}-amd64" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . From 36c4eef0d09d7d422d22789e6d90d710e905dc0b Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Tue, 7 Nov 2023 11:29:25 -0500 Subject: [PATCH 225/228] trying more --- build_deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_deploy.sh b/build_deploy.sh index c192ffac..ac372e3b 100755 --- a/build_deploy.sh +++ b/build_deploy.sh @@ -37,9 +37,9 @@ echo "received HTTP response: $RESPONSE" VALID_TAGS_LENGTH=$(echo $RESPONSE | jq '[ .tags[] | select(.end_ts == null) ] | length') if [[ "$VALID_TAGS_LENGTH" -eq 0 ]]; then - docker buildx build --platform linux/amd64,linux/arm64 -f Dockerfile.base -t "${BASE_IMG}-amd64" --push . + docker buildx build --platform linux/amd64,linux/arm64 -f Dockerfile.base -t "${BASE_IMG}" --push . fi #### End -docker buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="${BASE_IMG}-amd64" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}-amd64" --push . +docker buildx build --platform linux/amd64,linux/arm64 --build-arg BASE_IMAGE="${BASE_IMG}" --build-arg GOARCH="amd64" -t "${IMAGE}:${IMAGE_TAG}" --push . From 2e99a477b7301e907b9830dfdd06deb83bf8985a Mon Sep 17 00:00:00 2001 From: Gabor Burges Date: Thu, 9 Nov 2023 16:02:24 +0100 Subject: [PATCH 226/228] We don't need the job to be monitored --- controllers/reconcile.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/reconcile.go b/controllers/reconcile.go index 2a4b09b6..39f8894e 100644 --- a/controllers/reconcile.go +++ b/controllers/reconcile.go @@ -138,7 +138,7 @@ func populateContainer(d *apps.Deployment, frontend *crd.Frontend, frontendEnvir d.SetOwnerReferences([]metav1.OwnerReference{frontend.MakeOwnerReference()}) - // Modify the obejct to set the things we care about + // Modify the object to set the things we care about d.Spec.Template.Spec.Containers = []v1.Container{{ Name: "fe-image", Image: frontend.Spec.Image, @@ -568,6 +568,8 @@ func (r *FrontendReconciliation) createOrUpdateCacheBustJob() error { annotations = make(map[string]string) } annotations["frontend-image"] = r.Frontend.Spec.Image + annotations["kube-linter.io/ignore-all"] = "we don't need no any checking" + j.Spec.Template.ObjectMeta.SetAnnotations(annotations) errr := r.populateCacheBustContainer(j) From baf88a0f7396448c17ef10ccb1ba3153858ea840 Mon Sep 17 00:00:00 2001 From: Adam Drew Date: Fri, 10 Nov 2023 08:04:52 -0500 Subject: [PATCH 227/228] Switch to single arch AMD64 for pr checks --- pr_check.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pr_check.sh b/pr_check.sh index c402ce6e..3828ab48 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -14,8 +14,7 @@ docker rm -f $CONTAINER_NAME-run # This confused me for a while because pr_check_inner.sh is also copied into the pr check container at build time # but the template_check.sh isn't. I couldn't figure out how it was sourcing it -docker buildx use multiarchbuilder -docker buildx build --platform linux/amd64,linux/arm64 -t $CONTAINER_NAME -f build/Dockerfile.pr . +docker buildx build --platform linux/amd64 -t $CONTAINER_NAME -f build/Dockerfile.pr . docker buildx build --load -t $CONTAINER_NAME -f build/Dockerfile.pr . docker run -i --name $CONTAINER_NAME-run -v $PWD:/workspace:ro $CONTAINER_NAME /workspace/build/pr_check_inner.sh From dfce47a6bf064a98e631d1ef743510c826c65056 Mon Sep 17 00:00:00 2001 From: Gabor Burges Date: Mon, 13 Nov 2023 15:30:24 +0100 Subject: [PATCH 228/228] Add image updater workflow --- .github/workflows/imageupdate.yml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/imageupdate.yml diff --git a/.github/workflows/imageupdate.yml b/.github/workflows/imageupdate.yml new file mode 100644 index 00000000..8f3e103c --- /dev/null +++ b/.github/workflows/imageupdate.yml @@ -0,0 +1,43 @@ +name: Base image auto update +on: + schedule: + - cron: "5 0 * * *" + workflow_dispatch: + +jobs: + checkout: + runs-on: ubuntu-latest + steps: + - name: Set up skopeo + run: sudo apt-get install -y skopeo + - name: Check ubi8-minimal change + run: | + UBIVERSION=$(skopeo inspect docker://registry.access.redhat.com/ubi8/ubi-minimal:latest |jq '.Labels.url' |sed 's/"//g' |awk -F/ '{print $NF}') + echo "ubiversion=$UBIVERSION" >> "$GITHUB_ENV" + - name: Check go-toolset change + run: | + GOTOOLSETVER=$(skopeo inspect docker://registry.access.redhat.com/ubi8/go-toolset:latest |jq '.Labels.url' |sed 's/"//g' |awk -F/ '{print $NF}') + echo "gotoolsetver=$GOTOOLSETVER" >> "$GITHUB_ENV" + - name: Checkout repository + uses: actions/checkout@v4 + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.SIGN_KEY }} + passphrase: ${{ secrets.SIGN_KEY_PHRASE }} + git_user_signingkey: true + git_commit_gpgsign: true + - name: Do change if the version changed + run: | + git config user.name 'DevProdBot' + git config user.email 'platform-developerproductivity@redhat.com>' + git checkout -b update + sed -i "s/registry.access.redhat.com\/ubi8\/ubi-minimal:[0-9.-]*/registry.access.redhat.com\/ubi8\/ubi-minimal:$ubiversion/" Dockerfile + sed -i "s/registry.access.redhat.com\/ubi8\/go-toolset:[0-9.-]*/registry.access.redhat.com\/ubi8\/go-toolset:$gotoolsetver/" Dockerfile.base + git add -A + git commit -S -m "Update to ubi-minimal or go-toolset image" || echo "No changes to commit" + git push -u origin update || git push -f origin update + - name: Create pull request + run: gh pr create --title 'Regular docker image update' --body 'Automation \o/' --reviewer addrew + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}