diff --git a/Makefile b/Makefile index d09dc435..43d58f10 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # To re-generate a bundle for another specific version without changing the standard setup, you can: # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -VERSION ?= 0.9.2-alpha.1 +VERSION ?= 0.10.0 # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") diff --git a/bundle.Dockerfile b/bundle.Dockerfile index 75b22be4..cb777204 100644 --- a/bundle.Dockerfile +++ b/bundle.Dockerfile @@ -5,8 +5,9 @@ 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=marin3r -LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.13.0+git +LABEL operators.operatorframework.io.bundle.channels.v1=alpha,stable +LABEL operators.operatorframework.io.bundle.channel.default.v1=stable +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.14.0+git LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3 diff --git a/bundle/manifests/marin3r.3scale.net_envoyconfigrevisions.yaml b/bundle/manifests/marin3r.3scale.net_envoyconfigrevisions.yaml index d729d9da..fd249290 100644 --- a/bundle/manifests/marin3r.3scale.net_envoyconfigrevisions.yaml +++ b/bundle/manifests/marin3r.3scale.net_envoyconfigrevisions.yaml @@ -168,6 +168,25 @@ spec: - value type: object type: array + scopedRoutes: + description: 'ScopedRoutes is a list of the envoy ScopeRoute resource + type. API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/scoped_route.proto' + items: + description: EnvoyResource holds serialized representation of + an envoy resource + properties: + name: + description: Name of the envoy resource + type: string + value: + description: Value is the serialized representation of the + envoy resource + type: string + required: + - name + - value + type: object + type: array secrets: description: Secrets is a list of references to Kubernetes Secret objects. @@ -285,6 +304,8 @@ spec: type: string runtimes: type: string + scopedRoutes: + type: string secrets: type: string type: object diff --git a/bundle/manifests/marin3r.3scale.net_envoyconfigs.yaml b/bundle/manifests/marin3r.3scale.net_envoyconfigs.yaml index fd5500d9..269140da 100644 --- a/bundle/manifests/marin3r.3scale.net_envoyconfigs.yaml +++ b/bundle/manifests/marin3r.3scale.net_envoyconfigs.yaml @@ -160,6 +160,25 @@ spec: - value type: object type: array + scopedRoutes: + description: 'ScopedRoutes is a list of the envoy ScopeRoute resource + type. API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/scoped_route.proto' + items: + description: EnvoyResource holds serialized representation of + an envoy resource + properties: + name: + description: Name of the envoy resource + type: string + value: + description: Value is the serialized representation of the + envoy resource + type: string + required: + - name + - value + type: object + type: array secrets: description: Secrets is a list of references to Kubernetes Secret objects. diff --git a/bundle/manifests/marin3r.clusterserviceversion.yaml b/bundle/manifests/marin3r.clusterserviceversion.yaml index 71db76e3..0682358d 100644 --- a/bundle/manifests/marin3r.clusterserviceversion.yaml +++ b/bundle/manifests/marin3r.clusterserviceversion.yaml @@ -74,12 +74,12 @@ metadata: certified: "false" containerImage: quay.io/3scale/marin3r description: Lighweight, CRD based Envoy control plane for Kubernetes - operators.operatorframework.io/builder: operator-sdk-v1.13.0+git + operators.operatorframework.io/builder: operator-sdk-v1.14.0+git operators.operatorframework.io/internal-objects: '["envoyconfigrevisions.marin3r.3scale.net","discoveryservicecertificates.operator.marin3r.3scale.net"]' operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 repository: https://github.com/3scale-ops/marin3r support: Red Hat, Inc. - name: marin3r.v0.9.2-alpha.1 + name: marin3r.v0.10.0 namespace: placeholder spec: apiservicedefinitions: {} @@ -277,6 +277,16 @@ spec: - description: Value is the serialized representation of the envoy resource displayName: Value path: envoyResources.runtimes[0].value + - description: 'ScopedRoutes is a list of the envoy ScopeRoute resource type. + API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/scoped_route.proto' + displayName: Scoped Routes + path: envoyResources.scopedRoutes + - description: Name of the envoy resource + displayName: Name + path: envoyResources.scopedRoutes[0].name + - description: Value is the serialized representation of the envoy resource + displayName: Value + path: envoyResources.scopedRoutes[0].value - description: Secrets is a list of references to Kubernetes Secret objects. displayName: Secrets path: envoyResources.secrets @@ -393,6 +403,16 @@ spec: - description: Value is the serialized representation of the envoy resource displayName: Value path: envoyResources.runtimes[0].value + - description: 'ScopedRoutes is a list of the envoy ScopeRoute resource type. + API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/scoped_route.proto' + displayName: Scoped Routes + path: envoyResources.scopedRoutes + - description: Name of the envoy resource + displayName: Name + path: envoyResources.scopedRoutes[0].name + - description: Value is the serialized representation of the envoy resource + displayName: Value + path: envoyResources.scopedRoutes[0].value - description: Secrets is a list of references to Kubernetes Secret objects. displayName: Secrets path: envoyResources.secrets @@ -602,6 +622,15 @@ spec: which handles graceful termination of Envoy pods displayName: Shutdown Manager path: shutdownManager + - description: The drain strategy for the graceful shutdown. It also affects + drain when listeners are modified or removed via LDS. + displayName: Drain Strategy + path: shutdownManager.drainStrategy + - description: The time in seconds that Envoy will drain connections during + shutdown. It also affects drain behaviour when listeners are modified or + removed via LDS. + displayName: Drain Time + path: shutdownManager.drainTime - description: Image is the shutdown manager image and tag to use displayName: Image path: shutdownManager.image @@ -673,7 +702,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/marin3r:v0.9.2-alpha.1 + image: quay.io/3scale/marin3r:v0.10.0 livenessProbe: httpGet: path: /healthz @@ -729,7 +758,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/3scale/marin3r:v0.9.2-alpha.1 + image: quay.io/3scale/marin3r:v0.10.0 livenessProbe: httpGet: path: /healthz @@ -1020,72 +1049,69 @@ spec: maturity: alpha provider: name: Red Hat - version: 0.9.2-alpha.1 + version: 0.10.0 webhookdefinitions: - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: marin3r-controller-webhook failurePolicy: Fail - generateName: sidecar-injector.marin3r.3scale.net - matchPolicy: Equivalent - objectSelector: - matchLabels: - marin3r.3scale.net/status: enabled - reinvocationPolicy: Never + generateName: envoyconfig.marin3r.3scale.net rules: - apiGroups: - - "" + - marin3r.3scale.net apiVersions: - - v1 + - v1alpha1 operations: - CREATE + - UPDATE resources: - - pods + - envoyconfigs sideEffects: None targetPort: 9443 - type: MutatingAdmissionWebhook - webhookPath: /pod-v1-mutate + type: ValidatingAdmissionWebhook + webhookPath: /validate-marin3r-3scale-net-v1alpha1-envoyconfig - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: marin3r-controller-webhook failurePolicy: Fail - generateName: envoyconfig.marin3r.3scale.net + generateName: envoydeployment.operator.marin3r.3scale.net rules: - apiGroups: - - marin3r.3scale.net + - operator.marin3r.3scale.net apiVersions: - v1alpha1 operations: - CREATE - UPDATE resources: - - envoyconfigs + - envoydeployments sideEffects: None targetPort: 9443 type: ValidatingAdmissionWebhook - webhookPath: /validate-marin3r-3scale-net-v1alpha1-envoyconfig + webhookPath: /validate-operator-marin3r-3scale-net-v1alpha1-envoydeployment - admissionReviewVersions: - v1 - - v1beta1 containerPort: 443 deploymentName: marin3r-controller-webhook failurePolicy: Fail - generateName: envoydeployment.operator.marin3r.3scale.net + generateName: sidecar-injector.marin3r.3scale.net + matchPolicy: Equivalent + objectSelector: + matchLabels: + marin3r.3scale.net/status: enabled + reinvocationPolicy: Never rules: - apiGroups: - - operator.marin3r.3scale.net + - "" apiVersions: - - v1alpha1 + - v1 operations: - CREATE - - UPDATE resources: - - envoydeployments + - pods sideEffects: None targetPort: 9443 - type: ValidatingAdmissionWebhook - webhookPath: /validate-operator-marin3r-3scale-net-v1alpha1-envoydeployment + type: MutatingAdmissionWebhook + webhookPath: /pod-v1-mutate diff --git a/bundle/manifests/operator.marin3r.3scale.net_envoydeployments.yaml b/bundle/manifests/operator.marin3r.3scale.net_envoydeployments.yaml index 8ea49e00..546d0d47 100644 --- a/bundle/manifests/operator.marin3r.3scale.net_envoydeployments.yaml +++ b/bundle/manifests/operator.marin3r.3scale.net_envoydeployments.yaml @@ -332,7 +332,7 @@ spec: field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector - ({}) matches all namespaces. This field is alpha-level + ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. properties: @@ -488,7 +488,7 @@ spec: the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - This field is alpha-level and is only honored when + This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. properties: matchExpressions: @@ -641,7 +641,7 @@ spec: field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector - ({}) matches all namespaces. This field is alpha-level + ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. properties: @@ -797,7 +797,7 @@ spec: the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. - This field is alpha-level and is only honored when + This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. properties: matchExpressions: @@ -1705,6 +1705,20 @@ spec: description: ShutdownManager defines configuration for Envoy's shutdown manager, which handles graceful termination of Envoy pods properties: + drainStrategy: + description: The drain strategy for the graceful shutdown. It + also affects drain when listeners are modified or removed via + LDS. + enum: + - gradual + - immediate + type: string + drainTime: + description: The time in seconds that Envoy will drain connections + during shutdown. It also affects drain behaviour when listeners + are modified or removed via LDS. + format: int64 + type: integer image: description: Image is the shutdown manager image and tag to use type: string diff --git a/bundle/metadata/annotations.yaml b/bundle/metadata/annotations.yaml index 3e5ee580..1176f632 100644 --- a/bundle/metadata/annotations.yaml +++ b/bundle/metadata/annotations.yaml @@ -4,8 +4,9 @@ annotations: operators.operatorframework.io.bundle.manifests.v1: manifests/ operators.operatorframework.io.bundle.metadata.v1: metadata/ operators.operatorframework.io.bundle.package.v1: marin3r - operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.metrics.builder: operator-sdk-v1.13.0+git + operators.operatorframework.io.bundle.channels.v1: alpha,stable + operators.operatorframework.io.bundle.channel.default.v1: stable + operators.operatorframework.io.metrics.builder: operator-sdk-v1.14.0+git operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3 diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 2609cd39..bcf31c12 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -13,7 +13,7 @@ kind: Kustomization images: - name: controller newName: quay.io/3scale/marin3r - newTag: v0.9.2-alpha.1 + newTag: v0.10.0 patchesStrategicMerge: - custom/manager_patch.yaml diff --git a/config/manifests/bases/marin3r.clusterserviceversion.yaml b/config/manifests/bases/marin3r.clusterserviceversion.yaml index 314a7f51..4e44c7c4 100644 --- a/config/manifests/bases/marin3r.clusterserviceversion.yaml +++ b/config/manifests/bases/marin3r.clusterserviceversion.yaml @@ -207,6 +207,16 @@ spec: - description: Value is the serialized representation of the envoy resource displayName: Value path: envoyResources.runtimes[0].value + - description: 'ScopedRoutes is a list of the envoy ScopeRoute resource type. + API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/scoped_route.proto' + displayName: Scoped Routes + path: envoyResources.scopedRoutes + - description: Name of the envoy resource + displayName: Name + path: envoyResources.scopedRoutes[0].name + - description: Value is the serialized representation of the envoy resource + displayName: Value + path: envoyResources.scopedRoutes[0].value - description: Secrets is a list of references to Kubernetes Secret objects. displayName: Secrets path: envoyResources.secrets @@ -323,6 +333,16 @@ spec: - description: Value is the serialized representation of the envoy resource displayName: Value path: envoyResources.runtimes[0].value + - description: 'ScopedRoutes is a list of the envoy ScopeRoute resource type. + API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/scoped_route.proto' + displayName: Scoped Routes + path: envoyResources.scopedRoutes + - description: Name of the envoy resource + displayName: Name + path: envoyResources.scopedRoutes[0].name + - description: Value is the serialized representation of the envoy resource + displayName: Value + path: envoyResources.scopedRoutes[0].value - description: Secrets is a list of references to Kubernetes Secret objects. displayName: Secrets path: envoyResources.secrets @@ -532,6 +552,15 @@ spec: which handles graceful termination of Envoy pods displayName: Shutdown Manager path: shutdownManager + - description: The drain strategy for the graceful shutdown. It also affects + drain when listeners are modified or removed via LDS. + displayName: Drain Strategy + path: shutdownManager.drainStrategy + - description: The time in seconds that Envoy will drain connections during + shutdown. It also affects drain behaviour when listeners are modified or + removed via LDS. + displayName: Drain Time + path: shutdownManager.drainTime - description: Image is the shutdown manager image and tag to use displayName: Image path: shutdownManager.image diff --git a/config/webhook/kustomization.yaml b/config/webhook/kustomization.yaml index 77fc7dd0..7f132ac7 100644 --- a/config/webhook/kustomization.yaml +++ b/config/webhook/kustomization.yaml @@ -10,7 +10,7 @@ kind: Kustomization images: - name: controller newName: quay.io/3scale/marin3r - newTag: v0.9.2-alpha.1 + newTag: v0.10.0 # [CUSTOM: pod mutating webhook config] This patch adds a label selector to the MutatingWebhookConfig patchesStrategicMerge: diff --git a/docs/api-reference/reference.asciidoc b/docs/api-reference/reference.asciidoc index c50eb63d..b5a4fb02 100644 --- a/docs/api-reference/reference.asciidoc +++ b/docs/api-reference/reference.asciidoc @@ -238,6 +238,7 @@ EnvoyResources holds each envoy api resource type | *`endpoints`* __xref:{anchor_prefix}-github-com-3scale-ops-marin3r-apis-marin3r-v1alpha1-envoyresource[$$EnvoyResource$$] array__ | Endpoints is a list of the envoy ClusterLoadAssignment resource type. API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/endpoint/v3/endpoint.proto | *`clusters`* __xref:{anchor_prefix}-github-com-3scale-ops-marin3r-apis-marin3r-v1alpha1-envoyresource[$$EnvoyResource$$]__ | Clusters is a list of the envoy Cluster resource type. API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/cluster/v3/cluster.proto | *`routes`* __xref:{anchor_prefix}-github-com-3scale-ops-marin3r-apis-marin3r-v1alpha1-envoyresource[$$EnvoyResource$$]__ | Routes is a list of the envoy Route resource type. API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route.proto +| *`scopedRoutes`* __xref:{anchor_prefix}-github-com-3scale-ops-marin3r-apis-marin3r-v1alpha1-envoyresource[$$EnvoyResource$$]__ | ScopedRoutes is a list of the envoy ScopeRoute resource type. API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/scoped_route.proto | *`listeners`* __xref:{anchor_prefix}-github-com-3scale-ops-marin3r-apis-marin3r-v1alpha1-envoyresource[$$EnvoyResource$$]__ | Listeners is a list of the envoy Listener resource type. API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/listener/v3/listener.proto | *`runtimes`* __xref:{anchor_prefix}-github-com-3scale-ops-marin3r-apis-marin3r-v1alpha1-envoyresource[$$EnvoyResource$$]__ | Runtimes is a list of the envoy Runtime resource type. API V3 reference: https://www.envoyproxy.io/docs/envoy/latest/api-v3/service/runtime/v3/rtds.proto | *`secrets`* __xref:{anchor_prefix}-github-com-3scale-ops-marin3r-apis-marin3r-v1alpha1-envoysecretresource[$$EnvoySecretResource$$] array__ | Secrets is a list of references to Kubernetes Secret objects. @@ -282,6 +283,7 @@ VersionTracker tracks the versions of the resources that this revision publishes | *`endpoints`* __string__ | | *`clusters`* __string__ | | *`routes`* __string__ | +| *`scopedRoutes`* __string__ | | *`listeners`* __string__ | | *`secrets`* __string__ | | *`runtimes`* __string__ | @@ -790,6 +792,8 @@ ShutdownManager defines configuration for Envoy's shutdown manager, which handle | Field | Description | *`image`* __string__ | Image is the shutdown manager image and tag to use | *`serverPort`* __integer__ | Configures the sutdown manager's server port. Defaults to 8090. +| *`drainTime`* __integer__ | The time in seconds that Envoy will drain connections during shutdown. It also affects drain behaviour when listeners are modified or removed via LDS. +| *`drainStrategy`* __DrainStrategy__ | The drain strategy for the graceful shutdown. It also affects drain when listeners are modified or removed via LDS. |=== diff --git a/pkg/image/zz_generated.go b/pkg/image/zz_generated.go index c238da8f..0a86b577 100644 --- a/pkg/image/zz_generated.go +++ b/pkg/image/zz_generated.go @@ -1,5 +1,5 @@ package image const ( - image string = "quay.io/3scale/marin3r:v0.9.2-alpha.1" + image string = "quay.io/3scale/marin3r:v0.10.0" ) diff --git a/pkg/version/zz_generated.go b/pkg/version/zz_generated.go index f7a360e5..9f0e6ebd 100644 --- a/pkg/version/zz_generated.go +++ b/pkg/version/zz_generated.go @@ -1,5 +1,5 @@ package version const ( - version string = "v0.9.2-alpha.1" + version string = "v0.10.0" )