From 86e93859c655204367d7e14b804a23c8b7c58a34 Mon Sep 17 00:00:00 2001 From: Roi Vazquez Date: Fri, 17 Sep 2021 18:18:19 +0200 Subject: [PATCH 1/4] Ignore spec.ipFamilyPolicy field in Services --- Makefile | 2 +- bundle.Dockerfile | 4 +--- .../saas-operator.clusterserviceversion.yaml | 6 +++--- bundle/metadata/annotations.yaml | 3 +-- config/manager/kustomization.yaml | 2 +- pkg/assets/bindata.go | 16 ++++++++-------- pkg/basereconciler/reconcile_resources.go | 2 +- pkg/generators/common_blocks/service/util.go | 12 ------------ pkg/version/version.go | 2 +- 9 files changed, 17 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index e8850205..45bf4d04 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL:=/bin/bash # Current Operator version -VERSION ?= 0.10.6 +VERSION ?= 0.10.7-alpha.1 # Default catalog image CATALOG_IMG ?= quay.io/3scaleops/saas-operator-bundle:catalog # Default bundle image tag diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 346f9e6f..ab793deb 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -4,14 +4,12 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=saas-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,stable -LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha +LABEL operators.operatorframework.io.bundle.channels.v1=alpha LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.3.2 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 - COPY bundle/manifests /manifests/ COPY bundle/metadata /metadata/ COPY bundle/tests/scorecard /tests/scorecard/ diff --git a/bundle/manifests/saas-operator.clusterserviceversion.yaml b/bundle/manifests/saas-operator.clusterserviceversion.yaml index 7af72151..0f199c56 100644 --- a/bundle/manifests/saas-operator.clusterserviceversion.yaml +++ b/bundle/manifests/saas-operator.clusterserviceversion.yaml @@ -528,7 +528,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/3scale/saas-operator support: Red Hat - name: saas-operator.v0.10.6 + name: saas-operator.v0.10.7-alpha.1 namespace: placeholder spec: apiservicedefinitions: {} @@ -2993,7 +2993,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/saas-operator:0.10.6 + image: quay.io/3scale/saas-operator:0.10.7-alpha.1 livenessProbe: httpGet: path: /healthz @@ -3380,4 +3380,4 @@ spec: provider: name: Red Hat url: https://www.3scale.net/ - version: 0.10.6 + version: 0.10.7-alpha.1 diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 51ba9929..e181db47 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -1,6 +1,5 @@ annotations: - operators.operatorframework.io.bundle.channel.default.v1: alpha - operators.operatorframework.io.bundle.channels.v1: alpha,stable + operators.operatorframework.io.bundle.channels.v1: alpha operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.mediatype.v1: registry+v1 operators.operatorframework.io.bundle.metadata.v1: metadata/ diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 56298826..8f579b6f 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,4 +13,4 @@ kind: Kustomization images: - name: controller newName: quay.io/3scale/saas-operator - newTag: 0.10.6 + newTag: 0.10.7-alpha.2 diff --git a/pkg/assets/bindata.go b/pkg/assets/bindata.go index 22499b2b..37b839be 100644 --- a/pkg/assets/bindata.go +++ b/pkg/assets/bindata.go @@ -99,7 +99,7 @@ func dashboardsApicastServicesJsonTpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dashboards/apicast-services.json.tpl", size: 17460, mode: os.FileMode(436), modTime: time.Unix(1631544126, 0)} + info := bindataFileInfo{name: "dashboards/apicast-services.json.tpl", size: 17460, mode: os.FileMode(420), modTime: time.Unix(1614940003, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -119,7 +119,7 @@ func dashboardsApicastJsonTpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dashboards/apicast.json.tpl", size: 84544, mode: os.FileMode(436), modTime: time.Unix(1631544126, 0)} + info := bindataFileInfo{name: "dashboards/apicast.json.tpl", size: 84544, mode: os.FileMode(420), modTime: time.Unix(1614940003, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -139,7 +139,7 @@ func dashboardsAutosslJsonTpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dashboards/autossl.json.tpl", size: 59358, mode: os.FileMode(436), modTime: time.Unix(1631544126, 0)} + info := bindataFileInfo{name: "dashboards/autossl.json.tpl", size: 59358, mode: os.FileMode(420), modTime: time.Unix(1614940003, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -159,7 +159,7 @@ func dashboardsBackendJsonTpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dashboards/backend.json.tpl", size: 138352, mode: os.FileMode(436), modTime: time.Unix(1631544126, 0)} + info := bindataFileInfo{name: "dashboards/backend.json.tpl", size: 138352, mode: os.FileMode(420), modTime: time.Unix(1614940003, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -179,7 +179,7 @@ func dashboardsCorsProxyJsonTpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dashboards/cors-proxy.json.tpl", size: 78729, mode: os.FileMode(436), modTime: time.Unix(1631544126, 0)} + info := bindataFileInfo{name: "dashboards/cors-proxy.json.tpl", size: 78729, mode: os.FileMode(420), modTime: time.Unix(1614940003, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -199,7 +199,7 @@ func dashboardsMappingServiceJsonTpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dashboards/mapping-service.json.tpl", size: 70520, mode: os.FileMode(436), modTime: time.Unix(1631544126, 0)} + info := bindataFileInfo{name: "dashboards/mapping-service.json.tpl", size: 70520, mode: os.FileMode(420), modTime: time.Unix(1614940003, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -219,7 +219,7 @@ func dashboardsSystemJsonTpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dashboards/system.json.tpl", size: 81336, mode: os.FileMode(436), modTime: time.Unix(1631544126, 0)} + info := bindataFileInfo{name: "dashboards/system.json.tpl", size: 81336, mode: os.FileMode(420), modTime: time.Unix(1614940003, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -239,7 +239,7 @@ func dashboardsZyncJsonTpl() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "dashboards/zync.json.tpl", size: 70296, mode: os.FileMode(436), modTime: time.Unix(1631544126, 0)} + info := bindataFileInfo{name: "dashboards/zync.json.tpl", size: 70296, mode: os.FileMode(420), modTime: time.Unix(1625827662, 0)} a := &asset{bytes: bytes, info: info} return a, nil } diff --git a/pkg/basereconciler/reconcile_resources.go b/pkg/basereconciler/reconcile_resources.go index 63d97a9e..c4ffc5fd 100644 --- a/pkg/basereconciler/reconcile_resources.go +++ b/pkg/basereconciler/reconcile_resources.go @@ -292,7 +292,7 @@ func (r *Reconciler) ReconcileOwnedResources(ctx context.Context, owner client.O func ServiceExcludes(fn GeneratorFunction) []string { svc := fn().(*corev1.Service) paths := []string{} - paths = append(paths, "/spec/clusterIP", "/spec/clusterIPs") + paths = append(paths, "/spec/clusterIP", "/spec/clusterIPs", "/spec/ipFamilies", "/spec/ipFamilyPolicy") for idx := range svc.Spec.Ports { paths = append(paths, fmt.Sprintf("/spec/ports/%d/nodePort", idx)) } diff --git a/pkg/generators/common_blocks/service/util.go b/pkg/generators/common_blocks/service/util.go index 3b477b96..a5a5b9c7 100644 --- a/pkg/generators/common_blocks/service/util.go +++ b/pkg/generators/common_blocks/service/util.go @@ -5,7 +5,6 @@ import ( "strings" saasv1alpha1 "github.com/3scale/saas-operator/api/v1alpha1" - "github.com/3scale/saas-operator/pkg/basereconciler" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/intstr" ) @@ -65,14 +64,3 @@ func Ports(ports ...corev1.ServicePort) []corev1.ServicePort { list := []corev1.ServicePort{} return append(list, ports...) } - -// Excludes generates the list of excluded paths for a Service resource -func Excludes(fn basereconciler.GeneratorFunction) []string { - svc := fn().(*corev1.Service) - paths := []string{} - paths = append(paths, "/spec/clusterIP") - for idx := range svc.Spec.Ports { - paths = append(paths, fmt.Sprintf("/spec/ports/%d/nodePort", idx)) - } - return paths -} diff --git a/pkg/version/version.go b/pkg/version/version.go index 12a10f8f..c77ab0e4 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,7 +1,7 @@ package version const ( - version string = "v0.10.6" + version string = "v0.10.7-alpha.1" ) // Current returns the current marin3r operator version From e5ada186c6f958b587b46e9d858733afe94c50aa Mon Sep 17 00:00:00 2001 From: Roi Vazquez Date: Fri, 17 Sep 2021 19:44:46 +0200 Subject: [PATCH 2/4] Upgrade kind and pin k8s version to 1.20.0 --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 45bf4d04..73c79941 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL:=/bin/bash # Current Operator version -VERSION ?= 0.10.7-alpha.1 +VERSION ?= 0.10.7-alpha.2 # Default catalog image CATALOG_IMG ?= quay.io/3scaleops/saas-operator-bundle:catalog # Default bundle image tag @@ -96,7 +96,7 @@ go-bindata: # Download kind locally if necessary KIND = $(shell pwd)/bin/kind kind: - $(call go-get-tool,$(KIND),sigs.k8s.io/kind@v0.9.0) + $(call go-get-tool,$(KIND),sigs.k8s.io/kind@v0.11.1) # Download crd-ref-docs locally if necessary CRD_REFDOCS = $(shell pwd)/bin/crd-ref-docs @@ -228,7 +228,7 @@ get-new-release: kind-create: ## runs a k8s kind cluster for testing kind-create: export KUBECONFIG = ${PWD}/kubeconfig kind-create: tmp $(KIND) - $(KIND) create cluster --wait 5m + $(KIND) create cluster --wait 5m --image kindest/node:v1.20.0 kind-delete: ## deletes the kind cluster kind-delete: $(KIND) From ed21433ea6479888bc10ef6d6c5530b06c4aa3b9 Mon Sep 17 00:00:00 2001 From: Roi Vazquez Date: Fri, 17 Sep 2021 19:52:56 +0200 Subject: [PATCH 3/4] Bump alpha release --- bundle/manifests/saas-operator.clusterserviceversion.yaml | 6 +++--- pkg/version/version.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundle/manifests/saas-operator.clusterserviceversion.yaml b/bundle/manifests/saas-operator.clusterserviceversion.yaml index 0f199c56..3a0c3e2a 100644 --- a/bundle/manifests/saas-operator.clusterserviceversion.yaml +++ b/bundle/manifests/saas-operator.clusterserviceversion.yaml @@ -528,7 +528,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/3scale/saas-operator support: Red Hat - name: saas-operator.v0.10.7-alpha.1 + name: saas-operator.v0.10.7-alpha.2 namespace: placeholder spec: apiservicedefinitions: {} @@ -2993,7 +2993,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/saas-operator:0.10.7-alpha.1 + image: quay.io/3scale/saas-operator:0.10.7-alpha.2 livenessProbe: httpGet: path: /healthz @@ -3380,4 +3380,4 @@ spec: provider: name: Red Hat url: https://www.3scale.net/ - version: 0.10.7-alpha.1 + version: 0.10.7-alpha.2 diff --git a/pkg/version/version.go b/pkg/version/version.go index c77ab0e4..aca16fee 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,7 +1,7 @@ package version const ( - version string = "v0.10.7-alpha.1" + version string = "v0.10.7-alpha.2" ) // Current returns the current marin3r operator version From 97625e64d7c51a6e8795ba6c8e5030a2c5745b71 Mon Sep 17 00:00:00 2001 From: Roi Vazquez Date: Mon, 20 Sep 2021 11:20:38 +0200 Subject: [PATCH 4/4] Create stable release --- Makefile | 2 +- bundle.Dockerfile | 4 +++- bundle/manifests/saas-operator.clusterserviceversion.yaml | 6 +++--- bundle/metadata/annotations.yaml | 3 ++- config/manager/kustomization.yaml | 2 +- pkg/version/version.go | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 73c79941..07f2921f 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ SHELL:=/bin/bash # Current Operator version -VERSION ?= 0.10.7-alpha.2 +VERSION ?= 0.10.7 # Default catalog image CATALOG_IMG ?= quay.io/3scaleops/saas-operator-bundle:catalog # Default bundle image tag diff --git a/bundle.Dockerfile b/bundle.Dockerfile index ab793deb..346f9e6f 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -4,12 +4,14 @@ LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ LABEL operators.operatorframework.io.bundle.package.v1=saas-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha +LABEL operators.operatorframework.io.bundle.channels.v1=alpha,stable +LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.3.2 LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 + COPY bundle/manifests /manifests/ COPY bundle/metadata /metadata/ COPY bundle/tests/scorecard /tests/scorecard/ diff --git a/bundle/manifests/saas-operator.clusterserviceversion.yaml b/bundle/manifests/saas-operator.clusterserviceversion.yaml index 3a0c3e2a..da9c6fc6 100644 --- a/bundle/manifests/saas-operator.clusterserviceversion.yaml +++ b/bundle/manifests/saas-operator.clusterserviceversion.yaml @@ -528,7 +528,7 @@ metadata: operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/3scale/saas-operator support: Red Hat - name: saas-operator.v0.10.7-alpha.2 + name: saas-operator.v0.10.7 namespace: placeholder spec: apiservicedefinitions: {} @@ -2993,7 +2993,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/saas-operator:0.10.7-alpha.2 + image: quay.io/3scale/saas-operator:0.10.7 livenessProbe: httpGet: path: /healthz @@ -3380,4 +3380,4 @@ spec: provider: name: Red Hat url: https://www.3scale.net/ - version: 0.10.7-alpha.2 + version: 0.10.7 diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index e181db47..51ba9929 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -1,5 +1,6 @@ annotations: - operators.operatorframework.io.bundle.channels.v1: alpha + operators.operatorframework.io.bundle.channel.default.v1: alpha + operators.operatorframework.io.bundle.channels.v1: alpha,stable operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.mediatype.v1: registry+v1 operators.operatorframework.io.bundle.metadata.v1: metadata/ diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 8f579b6f..cbc75dee 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,4 +13,4 @@ kind: Kustomization images: - name: controller newName: quay.io/3scale/saas-operator - newTag: 0.10.7-alpha.2 + newTag: 0.10.7 diff --git a/pkg/version/version.go b/pkg/version/version.go index aca16fee..7a0acd42 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -1,7 +1,7 @@ package version const ( - version string = "v0.10.7-alpha.2" + version string = "v0.10.7" ) // Current returns the current marin3r operator version