diff --git a/apis/redpanda/v1alpha1/cluster_types.go b/apis/redpanda/v1alpha1/cluster_types.go index 7819942d3288..3c2f834bbac6 100644 --- a/apis/redpanda/v1alpha1/cluster_types.go +++ b/apis/redpanda/v1alpha1/cluster_types.go @@ -142,6 +142,15 @@ type ClusterSpec struct { // DNS name. // http://www.dns-sd.org/trailingdotsindomainnames.html DNSTrailingDotDisabled bool `json:"dnsTrailingDotDisabled,omitempty"` + // RestartConfig allows to control the behavior of the cluster when restarting + RestartConfig *RestartConfig `json:"restartConfig,omitempty"` +} + +// RestartConfig contains strategies to configure how the cluster behaves when restarting, because of upgrades +// or other lifecycle events. +type RestartConfig struct { + // DisableMaintenanceModeHooks deactivates the preStop and postStart hooks that force nodes to enter maintenance mode when stopping and exit maintenance mode when up again + DisableMaintenanceModeHooks *bool `json:"disableMaintenanceModeHooks,omitempty"` } // PDBConfig specifies how the PodDisruptionBudget should be created for the @@ -283,9 +292,13 @@ type ClusterStatus struct { // Nodes of the provisioned redpanda nodes // +optional Nodes NodesList `json:"nodes,omitempty"` - // Indicates cluster is upgrading + // Indicates cluster is upgrading. + // +optional + // Deprecated: replaced by "restarting" + DeprecatedUpgrading bool `json:"upgrading"` + // Indicates that a cluster is restarting due to an upgrade or a different reason // +optional - Upgrading bool `json:"upgrading"` + Restarting bool `json:"restarting"` // Current version of the cluster. // +optional Version string `json:"version"` @@ -789,6 +802,31 @@ func (r *Cluster) IsSchemaRegistryMutualTLSEnabled() bool { r.Spec.Configuration.SchemaRegistry.TLS.RequireClientAuth } +// IsUsingMaintenanceModeHooks tells if the cluster is configured to use maintenance mode hooks on the pods. +// Maintenance mode feature needs to be enabled for this to be relevant. +func (r *Cluster) IsUsingMaintenanceModeHooks() bool { + // enabled unless explicitly stated + if r.Spec.RestartConfig != nil && r.Spec.RestartConfig.DisableMaintenanceModeHooks != nil { + return !*r.Spec.RestartConfig.DisableMaintenanceModeHooks + } + return true +} + +// ClusterStatus + +// IsRestarting tells if the cluster is restarting due to a change in configuration or an upgrade in progress +func (s *ClusterStatus) IsRestarting() bool { + // Let's consider the old field for a transition period + return s.Restarting || s.DeprecatedUpgrading +} + +// SetRestarting sets the cluster as restarting +func (s *ClusterStatus) SetRestarting(restarting bool) { + s.Restarting = restarting + // keep deprecated upgrading field as some external tools may still rely on it + s.DeprecatedUpgrading = restarting +} + // TLSConfig is a generic TLS configuration type TLSConfig struct { Enabled bool `json:"enabled,omitempty"` diff --git a/apis/redpanda/v1alpha1/zz_generated.deepcopy.go b/apis/redpanda/v1alpha1/zz_generated.deepcopy.go index 677ad886c299..57a60f5c37b9 100644 --- a/apis/redpanda/v1alpha1/zz_generated.deepcopy.go +++ b/apis/redpanda/v1alpha1/zz_generated.deepcopy.go @@ -200,6 +200,11 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { (*out)[key] = val } } + if in.RestartConfig != nil { + in, out := &in.RestartConfig, &out.RestartConfig + *out = new(RestartConfig) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. @@ -507,6 +512,26 @@ func (in *RedpandaResourceRequirements) DeepCopy() *RedpandaResourceRequirements return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RestartConfig) DeepCopyInto(out *RestartConfig) { + *out = *in + if in.DisableMaintenanceModeHooks != nil { + in, out := &in.DisableMaintenanceModeHooks, &out.DisableMaintenanceModeHooks + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestartConfig. +func (in *RestartConfig) DeepCopy() *RestartConfig { + if in == nil { + return nil + } + out := new(RestartConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SchemaRegistryAPI) DeepCopyInto(out *SchemaRegistryAPI) { *out = *in diff --git a/config/crd/bases/redpanda.vectorized.io_clusters.yaml b/config/crd/bases/redpanda.vectorized.io_clusters.yaml index 1c9dc1f9ebad..ef3383c82941 100644 --- a/config/crd/bases/redpanda.vectorized.io_clusters.yaml +++ b/config/crd/bases/redpanda.vectorized.io_clusters.yaml @@ -648,6 +648,16 @@ spec: to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object + restartConfig: + description: RestartConfig allows to control the behavior of the cluster + when restarting + properties: + disableMaintenanceModeHooks: + description: DisableMaintenanceModeHooks deactivates the preStop + and postStart hooks that force nodes to enter maintenance mode + when stopping and exit maintenance mode when up again + type: boolean + type: object sidecars: description: Sidecars is list of sidecars run alongside redpanda container properties: @@ -902,8 +912,13 @@ spec: description: Replicas show how many nodes are working in the cluster format: int32 type: integer + restarting: + description: Indicates that a cluster is restarting due to an upgrade + or a different reason + type: boolean upgrading: - description: Indicates cluster is upgrading + description: 'Indicates cluster is upgrading. Deprecated: replaced + by "restarting"' type: boolean version: description: Current version of the cluster. diff --git a/controllers/redpanda/cluster_controller_configuration.go b/controllers/redpanda/cluster_controller_configuration.go index fd670279223e..a8367198449e 100644 --- a/controllers/redpanda/cluster_controller_configuration.go +++ b/controllers/redpanda/cluster_controller_configuration.go @@ -303,16 +303,16 @@ func (r *ClusterReconciler) synchronizeStatusWithCluster( conditionData := mapStatusToCondition(status) conditionChanged := redpandaCluster.Status.SetCondition(conditionData.Type, conditionData.Status, conditionData.Reason, conditionData.Message) stsNeedsRestart := needsRestart(status) - if conditionChanged || (stsNeedsRestart && !redpandaCluster.Status.Upgrading) { + if conditionChanged || (stsNeedsRestart && !redpandaCluster.Status.IsRestarting()) { // Trigger restart here if needed if stsNeedsRestart { - redpandaCluster.Status.Upgrading = true + redpandaCluster.Status.SetRestarting(true) } log.Info("Updating configuration state for cluster", "status", conditionData.Status, "reason", conditionData.Reason, "message", conditionData.Message, - "upgrading", redpandaCluster.Status.Upgrading, + "restarting", redpandaCluster.Status.IsRestarting(), ) if err := r.Status().Update(ctx, redpandaCluster); err != nil { return nil, errorWithContext(err, "could not update condition on cluster") diff --git a/pkg/resources/featuregates/centralized_configuration.go b/pkg/resources/featuregates/centralized_configuration.go index 56a1b14c56d9..61193916edee 100644 --- a/pkg/resources/featuregates/centralized_configuration.go +++ b/pkg/resources/featuregates/centralized_configuration.go @@ -19,7 +19,7 @@ const ( // CentralizedConfiguration feature gate should be removed when the operator // will no longer support 21.x or older versions func CentralizedConfiguration(version string) bool { - if version == "dev" { + if version == devVersion { // development version contains this feature return true } diff --git a/pkg/resources/featuregates/common.go b/pkg/resources/featuregates/common.go new file mode 100644 index 000000000000..f763da157730 --- /dev/null +++ b/pkg/resources/featuregates/common.go @@ -0,0 +1,14 @@ +// Copyright 2022 Redpanda Data, Inc. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.md +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0 + +package featuregates + +const ( + devVersion = "dev" +) diff --git a/pkg/resources/featuregates/maintenance_mode.go b/pkg/resources/featuregates/maintenance_mode.go new file mode 100644 index 000000000000..f6f6fe93db3a --- /dev/null +++ b/pkg/resources/featuregates/maintenance_mode.go @@ -0,0 +1,32 @@ +// Copyright 2022 Redpanda Data, Inc. +// +// Use of this software is governed by the Business Source License +// included in the file licenses/BSL.md +// +// As of the Change Date specified in that file, in accordance with +// the Business Source License, use of this software will be governed +// by the Apache License, Version 2.0 + +package featuregates + +import "github.com/Masterminds/semver/v3" + +const ( + maintenanceModeMajor = uint64(22) + maintenanceModeMinor = uint64(1) +) + +// MaintenanceMode feature gate should be removed when the operator +// will no longer support 21.x or older versions +func MaintenanceMode(version string) bool { + if version == devVersion { + // development version contains this feature + return true + } + v, err := semver.NewVersion(version) + if err != nil { + return false + } + + return v.Major() == maintenanceModeMajor && v.Minor() >= maintenanceModeMinor || v.Major() > maintenanceModeMajor +} diff --git a/pkg/resources/statefulset.go b/pkg/resources/statefulset.go index 87e633bea3ca..0af5659d9b1f 100644 --- a/pkg/resources/statefulset.go +++ b/pkg/resources/statefulset.go @@ -71,6 +71,9 @@ var ( ConfigMapHashAnnotationKey = redpandav1alpha1.GroupVersion.Group + "/configmap-hash" // CentralizedConfigurationHashAnnotationKey contains the hash of the centralized configuration properties that require a restart when changed CentralizedConfigurationHashAnnotationKey = redpandav1alpha1.GroupVersion.Group + "/centralized-configuration-hash" + + // terminationGracePeriodSeconds should account for additional delay introduced by hooks + terminationGracePeriodSeconds int64 = 120 ) // ConfiguratorSettings holds settings related to configurator container and deployment @@ -345,6 +348,7 @@ func (r *StatefulSetResource) obj( }, }, }, r.secretVolumes()...), + TerminationGracePeriodSeconds: &terminationGracePeriodSeconds, InitContainers: []corev1.Container{ { Name: configuratorContainerName, @@ -512,6 +516,15 @@ func (r *StatefulSetResource) obj( }, } + // Only multi-replica clusters should use maintenance mode. See: https://github.com/redpanda-data/redpanda/issues/4338 + multiReplica := r.pandaCluster.Spec.Replicas != nil && *r.pandaCluster.Spec.Replicas > 1 + if featuregates.MaintenanceMode(r.pandaCluster.Spec.Version) && r.pandaCluster.IsUsingMaintenanceModeHooks() && multiReplica { + ss.Spec.Template.Spec.Containers[0].Lifecycle = &corev1.Lifecycle{ + PreStop: r.getPreStopHook(), + PostStart: r.getPostStartHook(), + } + } + if featuregates.CentralizedConfiguration(r.pandaCluster.Spec.Version) { ss.Spec.Template.Spec.Containers[0].VolumeMounts = append(ss.Spec.Template.Spec.Containers[0].VolumeMounts, corev1.VolumeMount{ Name: "configmap-dir", @@ -535,6 +548,76 @@ func (r *StatefulSetResource) obj( return ss, nil } +// getPrestopHook creates a hook that drains the node before shutting down. +func (r *StatefulSetResource) getPreStopHook() *corev1.Handler { + // TODO replace scripts with proper RPK calls + curlCommand := r.composeCURLMaintenanceCommand(`-X PUT --silent -o /dev/null -w "%{http_code}"`, nil) + genericMaintenancePath := "/v1/maintenance" + curlGetCommand := r.composeCURLMaintenanceCommand(`--silent`, &genericMaintenancePath) + cmd := strings.Join( + []string{ + fmt.Sprintf(`until [ "${status:-}" = "200" ]; do status=$(%s); sleep 0.5; done`, curlCommand), + fmt.Sprintf(`until [ "${finished:-}" = "true" ]; do finished=$(%s | grep -o '\"finished\":[^,}]*' | grep -o '[^: ]*$'); sleep 0.5; done`, curlGetCommand), + }, " && ") + + return &corev1.Handler{ + Exec: &corev1.ExecAction{ + Command: []string{ + "/bin/bash", + "-c", + cmd, + }, + }, + } +} + +// getPostStartHook creates a hook that removes maintenance mode after startup. +func (r *StatefulSetResource) getPostStartHook() *corev1.Handler { + // TODO replace scripts with proper RPK calls + curlCommand := r.composeCURLMaintenanceCommand(`-X DELETE --silent -o /dev/null -w "%{http_code}"`, nil) + // HTTP code 400 is returned by v22 nodes during an upgrade from v21 until the new version reaches quorum and the maintenance mode feature is enabled + cmd := fmt.Sprintf(`until [ "${status:-}" = "200" ] || [ "${status:-}" = "400" ]; do status=$(%s); sleep 0.5; done`, curlCommand) + + return &corev1.Handler{ + Exec: &corev1.ExecAction{ + Command: []string{ + "/bin/bash", + "-c", + cmd, + }, + }, + } +} + +// nolint:goconst // no need +func (r *StatefulSetResource) composeCURLMaintenanceCommand( + options string, urlOverwrite *string, +) string { + adminAPI := r.pandaCluster.AdminAPIInternal() + + cmd := fmt.Sprintf(`curl %s `, options) + + tlsConfig := adminAPI.GetTLS() + proto := "http" + if tlsConfig != nil && tlsConfig.Enabled { + proto = "https" + if tlsConfig.RequireClientAuth { + cmd += "--cacert /etc/tls/certs/admin/ca/ca.crt --cert /etc/tls/certs/admin/tls.crt --key /etc/tls/certs/admin/tls.key " + } else { + cmd += "--cacert /etc/tls/certs/admin/tls.crt " + } + } + cmd += fmt.Sprintf("%s://${POD_NAME}.%s.%s.svc.cluster.local:%d", proto, r.pandaCluster.Name, r.pandaCluster.Namespace, adminAPI.Port) + + if urlOverwrite == nil { + prefixLen := len(r.pandaCluster.Name) + 1 + cmd += fmt.Sprintf("/v1/brokers/${POD_NAME:%d}/maintenance", prefixLen) + } else { + cmd += *urlOverwrite + } + return cmd +} + // setCloudStorage manipulates v1.StatefulSet object in order to add cloud storage specific // properties to Redpanda pod. func setCloudStorage( diff --git a/pkg/resources/statefulset_update.go b/pkg/resources/statefulset_update.go index 36b734512e47..4cd2d82e8c1e 100644 --- a/pkg/resources/statefulset_update.go +++ b/pkg/resources/statefulset_update.go @@ -44,13 +44,13 @@ var errRedpandaNotReady = errors.New("redpanda not ready") // CR by removing statefulset with orphans Pods. The stateful set is then recreated // and all Pods are restarted accordingly to the ordinal number. // -// The process maintains an Upgrading bool status that is set to true once the +// The process maintains an Restarting bool status that is set to true once the // generated stateful differentiate from the actual state. It is set back to // false when all pods are verified. // -// The steps are as follows: 1) check the Upgrading status or if the statefulset +// The steps are as follows: 1) check the Restarting status or if the statefulset // differentiate from the current stored statefulset definition 2) if true, -// set the Upgrading status to true and remove statefulset with the orphan Pods +// set the Restarting status to true and remove statefulset with the orphan Pods // 3) perform rolling update like removing Pods accordingly to theirs ordinal // number 4) requeue until the pod is in ready state 5) prior to a pod update // verify the previously updated pod and requeue as necessary. Currently, the @@ -67,7 +67,7 @@ func (r *StatefulSetResource) runUpdate( modified.Spec.Template.Annotations[CentralizedConfigurationHashAnnotationKey] = ann } - update, err := r.shouldUpdate(r.pandaCluster.Status.Upgrading, current, modified) + update, err := r.shouldUpdate(r.pandaCluster.Status.IsRestarting(), current, modified) if err != nil { return fmt.Errorf("unable to determine the update procedure: %w", err) } @@ -76,8 +76,8 @@ func (r *StatefulSetResource) runUpdate( return nil } - if err = r.updateUpgradingStatus(ctx, true); err != nil { - return fmt.Errorf("unable to turn on upgrading status in cluster custom resource: %w", err) + if err = r.updateRestartingStatus(ctx, true); err != nil { + return fmt.Errorf("unable to turn on restarting status in cluster custom resource: %w", err) } if err = r.updateStatefulSet(ctx, current, modified); err != nil { return err @@ -87,9 +87,9 @@ func (r *StatefulSetResource) runUpdate( return err } - // Update is complete for all pods (and all are ready). Set upgrading status to false. - if err = r.updateUpgradingStatus(ctx, false); err != nil { - return fmt.Errorf("unable to turn off upgrading status in cluster custom resource: %w", err) + // Update is complete for all pods (and all are ready). Set restarting status to false. + if err = r.updateRestartingStatus(ctx, false); err != nil { + return fmt.Errorf("unable to turn off restarting status in cluster custom resource: %w", err) } return nil @@ -196,7 +196,7 @@ func (r *StatefulSetResource) updateStatefulSet( // shouldUpdate returns true if changes on the CR require update func (r *StatefulSetResource) shouldUpdate( - isUpgrading bool, current, modified *appsv1.StatefulSet, + isRestarting bool, current, modified *appsv1.StatefulSet, ) (bool, error) { prepareResourceForPatch(current, modified) opts := []patch.CalculateOption{ @@ -209,16 +209,16 @@ func (r *StatefulSetResource) shouldUpdate( if err != nil { return false, err } - return !patchResult.IsEmpty() || isUpgrading, nil + return !patchResult.IsEmpty() || isRestarting, nil } -func (r *StatefulSetResource) updateUpgradingStatus( - ctx context.Context, upgrading bool, +func (r *StatefulSetResource) updateRestartingStatus( + ctx context.Context, restarting bool, ) error { - if !reflect.DeepEqual(upgrading, r.pandaCluster.Status.Upgrading) { - r.pandaCluster.Status.Upgrading = upgrading + if !reflect.DeepEqual(restarting, r.pandaCluster.Status.IsRestarting()) { + r.pandaCluster.Status.SetRestarting(restarting) r.logger.Info("Status updated", - "status", upgrading, + "restarting", restarting, "resource name", r.pandaCluster.Name) if err := r.Status().Update(ctx, r.pandaCluster); err != nil { return err @@ -370,7 +370,7 @@ func deleteKubernetesTokenVolumeMounts(obj []byte) ([]byte, error) { return obj, nil } -// Temporarily using the status/ready endpoint until we have a specific one for upgrading. +// Temporarily using the status/ready endpoint until we have a specific one for restarting. func (r *StatefulSetResource) queryRedpandaStatus( ctx context.Context, adminURL *url.URL, ) error { diff --git a/tests/e2e/additional-configuration/00-assert.yaml b/tests/e2e/additional-configuration/00-assert.yaml index 2a839e619d3e..4c0b28ae285c 100644 --- a/tests/e2e/additional-configuration/00-assert.yaml +++ b/tests/e2e/additional-configuration/00-assert.yaml @@ -5,7 +5,7 @@ metadata: namespace: default status: replicas: 1 - upgrading: false + restarting: false --- diff --git a/tests/e2e/additional-configuration/02-assert.yaml b/tests/e2e/additional-configuration/02-assert.yaml index fd9998e6a6a2..85f68219f5ae 100644 --- a/tests/e2e/additional-configuration/02-assert.yaml +++ b/tests/e2e/additional-configuration/02-assert.yaml @@ -5,4 +5,4 @@ metadata: namespace: default status: replicas: 1 - upgrading: false + restarting: false diff --git a/tests/e2e/centralized-configuration-bootstrap/00-assert.yaml b/tests/e2e/centralized-configuration-bootstrap/00-assert.yaml index 17fea81f6286..c642c02c28e4 100644 --- a/tests/e2e/centralized-configuration-bootstrap/00-assert.yaml +++ b/tests/e2e/centralized-configuration-bootstrap/00-assert.yaml @@ -3,8 +3,8 @@ kind: Cluster metadata: name: centralized-configuration-bootstrap status: - replicas: 1 - upgrading: false + replicas: 2 + restarting: false conditions: - type: ClusterConfigured status: "False" diff --git a/tests/e2e/centralized-configuration-bootstrap/00-redpanda-cluster.yaml b/tests/e2e/centralized-configuration-bootstrap/00-redpanda-cluster.yaml index 71a10d9decbc..10f6e70db403 100644 --- a/tests/e2e/centralized-configuration-bootstrap/00-redpanda-cluster.yaml +++ b/tests/e2e/centralized-configuration-bootstrap/00-redpanda-cluster.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration-bootstrap/01-assert.yaml b/tests/e2e/centralized-configuration-bootstrap/01-assert.yaml index ee3306a97736..659b6ca783c3 100644 --- a/tests/e2e/centralized-configuration-bootstrap/01-assert.yaml +++ b/tests/e2e/centralized-configuration-bootstrap/01-assert.yaml @@ -3,8 +3,8 @@ kind: Cluster metadata: name: centralized-configuration-bootstrap status: - replicas: 1 - upgrading: false + replicas: 2 + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration-bootstrap/01-redpanda-cluster-change.yaml b/tests/e2e/centralized-configuration-bootstrap/01-redpanda-cluster-change.yaml index 416b29d52723..947c244b5490 100644 --- a/tests/e2e/centralized-configuration-bootstrap/01-redpanda-cluster-change.yaml +++ b/tests/e2e/centralized-configuration-bootstrap/01-redpanda-cluster-change.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration-drift/00-assert.yaml b/tests/e2e/centralized-configuration-drift/00-assert.yaml index 2c76124128b0..19721b50f5aa 100644 --- a/tests/e2e/centralized-configuration-drift/00-assert.yaml +++ b/tests/e2e/centralized-configuration-drift/00-assert.yaml @@ -3,8 +3,8 @@ kind: Cluster metadata: name: centralized-configuration-drift status: - replicas: 1 - upgrading: false + replicas: 2 + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration-drift/00-redpanda-cluster.yaml b/tests/e2e/centralized-configuration-drift/00-redpanda-cluster.yaml index ba35efce811b..a75b2e964623 100644 --- a/tests/e2e/centralized-configuration-drift/00-redpanda-cluster.yaml +++ b/tests/e2e/centralized-configuration-drift/00-redpanda-cluster.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration-drift/02-assert.yaml b/tests/e2e/centralized-configuration-drift/02-assert.yaml index 5c45e937a1a0..2f516ee71834 100644 --- a/tests/e2e/centralized-configuration-drift/02-assert.yaml +++ b/tests/e2e/centralized-configuration-drift/02-assert.yaml @@ -18,7 +18,7 @@ kind: Cluster metadata: name: centralized-configuration-drift status: - upgrading: false + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration-drift/03-assert.yaml b/tests/e2e/centralized-configuration-drift/03-assert.yaml index 1f13b9d7d2f1..5f81cf1f504b 100644 --- a/tests/e2e/centralized-configuration-drift/03-assert.yaml +++ b/tests/e2e/centralized-configuration-drift/03-assert.yaml @@ -18,7 +18,7 @@ kind: Cluster metadata: name: centralized-configuration-drift status: - upgrading: false + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration-tls/00-assert.yaml b/tests/e2e/centralized-configuration-tls/00-assert.yaml index 40f9829aadb7..16c1122957e1 100644 --- a/tests/e2e/centralized-configuration-tls/00-assert.yaml +++ b/tests/e2e/centralized-configuration-tls/00-assert.yaml @@ -3,8 +3,8 @@ kind: Cluster metadata: name: centralized-configuration-tls status: - replicas: 1 - upgrading: false + replicas: 2 + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration-tls/00-redpanda-cluster.yaml b/tests/e2e/centralized-configuration-tls/00-redpanda-cluster.yaml index ea6ef9357d53..4ecd3d0ec6c9 100644 --- a/tests/e2e/centralized-configuration-tls/00-redpanda-cluster.yaml +++ b/tests/e2e/centralized-configuration-tls/00-redpanda-cluster.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration-tls/01-assert.yaml b/tests/e2e/centralized-configuration-tls/01-assert.yaml index 99a2fa56a0a5..7e879828ba51 100644 --- a/tests/e2e/centralized-configuration-tls/01-assert.yaml +++ b/tests/e2e/centralized-configuration-tls/01-assert.yaml @@ -3,8 +3,8 @@ kind: Cluster metadata: name: centralized-configuration-tls status: - replicas: 1 - upgrading: false + replicas: 2 + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration-tls/01-redpanda-cluster-change.yaml b/tests/e2e/centralized-configuration-tls/01-redpanda-cluster-change.yaml index 9606e972a536..27f695651b6a 100644 --- a/tests/e2e/centralized-configuration-tls/01-redpanda-cluster-change.yaml +++ b/tests/e2e/centralized-configuration-tls/01-redpanda-cluster-change.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration-tls/03-assert.yaml b/tests/e2e/centralized-configuration-tls/03-assert.yaml index 99a2fa56a0a5..7e879828ba51 100644 --- a/tests/e2e/centralized-configuration-tls/03-assert.yaml +++ b/tests/e2e/centralized-configuration-tls/03-assert.yaml @@ -3,8 +3,8 @@ kind: Cluster metadata: name: centralized-configuration-tls status: - replicas: 1 - upgrading: false + replicas: 2 + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration-tls/03-redpanda-cluster-simple-tls.yaml b/tests/e2e/centralized-configuration-tls/03-redpanda-cluster-simple-tls.yaml index eec986b2ff61..9e45fbe8d800 100644 --- a/tests/e2e/centralized-configuration-tls/03-redpanda-cluster-simple-tls.yaml +++ b/tests/e2e/centralized-configuration-tls/03-redpanda-cluster-simple-tls.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration-tls/04-assert.yaml b/tests/e2e/centralized-configuration-tls/04-assert.yaml index 99a2fa56a0a5..7e879828ba51 100644 --- a/tests/e2e/centralized-configuration-tls/04-assert.yaml +++ b/tests/e2e/centralized-configuration-tls/04-assert.yaml @@ -3,8 +3,8 @@ kind: Cluster metadata: name: centralized-configuration-tls status: - replicas: 1 - upgrading: false + replicas: 2 + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration-tls/04-redpanda-cluster-change.yaml b/tests/e2e/centralized-configuration-tls/04-redpanda-cluster-change.yaml index ea6fe26f7db7..8371f7879bc7 100644 --- a/tests/e2e/centralized-configuration-tls/04-redpanda-cluster-change.yaml +++ b/tests/e2e/centralized-configuration-tls/04-redpanda-cluster-change.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration-upgrade/00-redpanda-cluster.yaml b/tests/e2e/centralized-configuration-upgrade/00-redpanda-cluster.yaml index 90fb9697ce2f..7c2ae09fc36e 100644 --- a/tests/e2e/centralized-configuration-upgrade/00-redpanda-cluster.yaml +++ b/tests/e2e/centralized-configuration-upgrade/00-redpanda-cluster.yaml @@ -4,7 +4,7 @@ metadata: name: centralized-configuration-upgrade spec: image: "vectorized/redpanda" - version: "v21.11.10" + version: "v21.11.11" replicas: 2 resources: requests: diff --git a/tests/e2e/centralized-configuration-upgrade/01-first-upgrade.yaml b/tests/e2e/centralized-configuration-upgrade/01-first-upgrade.yaml index 7c2ae09fc36e..47b908ff30f8 100644 --- a/tests/e2e/centralized-configuration-upgrade/01-first-upgrade.yaml +++ b/tests/e2e/centralized-configuration-upgrade/01-first-upgrade.yaml @@ -4,7 +4,7 @@ metadata: name: centralized-configuration-upgrade spec: image: "vectorized/redpanda" - version: "v21.11.11" + version: "v21.11.12" replicas: 2 resources: requests: diff --git a/tests/e2e/centralized-configuration-upgrade/02-assert.yaml b/tests/e2e/centralized-configuration-upgrade/02-assert.yaml index e61703863d08..c9becd625c62 100644 --- a/tests/e2e/centralized-configuration-upgrade/02-assert.yaml +++ b/tests/e2e/centralized-configuration-upgrade/02-assert.yaml @@ -3,7 +3,7 @@ kind: Cluster metadata: name: centralized-configuration-upgrade status: - upgrading: false + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration/00-assert.yaml b/tests/e2e/centralized-configuration/00-assert.yaml index 538fd8d27f1c..f2870df2dabf 100644 --- a/tests/e2e/centralized-configuration/00-assert.yaml +++ b/tests/e2e/centralized-configuration/00-assert.yaml @@ -3,8 +3,8 @@ kind: Cluster metadata: name: centralized-configuration status: - replicas: 1 - upgrading: false + replicas: 2 + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration/00-redpanda-cluster.yaml b/tests/e2e/centralized-configuration/00-redpanda-cluster.yaml index 6eb1ddfe7361..b9f973db70c6 100644 --- a/tests/e2e/centralized-configuration/00-redpanda-cluster.yaml +++ b/tests/e2e/centralized-configuration/00-redpanda-cluster.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration/01-assert.yaml b/tests/e2e/centralized-configuration/01-assert.yaml index b713297cbc4e..ffcc128f02f1 100644 --- a/tests/e2e/centralized-configuration/01-assert.yaml +++ b/tests/e2e/centralized-configuration/01-assert.yaml @@ -3,8 +3,8 @@ kind: Cluster metadata: name: centralized-configuration status: - replicas: 1 - upgrading: false + replicas: 2 + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration/01-redpanda-cluster-change.yaml b/tests/e2e/centralized-configuration/01-redpanda-cluster-change.yaml index 1e78c1d1944e..46aa56c654d4 100644 --- a/tests/e2e/centralized-configuration/01-redpanda-cluster-change.yaml +++ b/tests/e2e/centralized-configuration/01-redpanda-cluster-change.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration/03-assert.yaml b/tests/e2e/centralized-configuration/03-assert.yaml index 006af8eb4d7c..0990441a6a56 100644 --- a/tests/e2e/centralized-configuration/03-assert.yaml +++ b/tests/e2e/centralized-configuration/03-assert.yaml @@ -3,7 +3,7 @@ kind: Cluster metadata: name: centralized-configuration status: - upgrading: true + restarting: true conditions: - type: ClusterConfigured status: "False" diff --git a/tests/e2e/centralized-configuration/03-redpanda-cluster-change.yaml b/tests/e2e/centralized-configuration/03-redpanda-cluster-change.yaml index f4ae92d45b80..581f00a03b9d 100644 --- a/tests/e2e/centralized-configuration/03-redpanda-cluster-change.yaml +++ b/tests/e2e/centralized-configuration/03-redpanda-cluster-change.yaml @@ -5,7 +5,7 @@ metadata: spec: image: "localhost/redpanda" version: "dev" - replicas: 1 + replicas: 2 resources: requests: cpu: 100m diff --git a/tests/e2e/centralized-configuration/04-assert.yaml b/tests/e2e/centralized-configuration/04-assert.yaml index 6722ac0d77ce..a6bde1996026 100644 --- a/tests/e2e/centralized-configuration/04-assert.yaml +++ b/tests/e2e/centralized-configuration/04-assert.yaml @@ -3,7 +3,7 @@ kind: Cluster metadata: name: centralized-configuration status: - upgrading: false + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/centralized-configuration/05-assert.yaml b/tests/e2e/centralized-configuration/05-assert.yaml index 6c0c6e3c36d3..18b3fcbb42be 100644 --- a/tests/e2e/centralized-configuration/05-assert.yaml +++ b/tests/e2e/centralized-configuration/05-assert.yaml @@ -18,7 +18,7 @@ kind: Cluster metadata: name: centralized-configuration status: - upgrading: false + restarting: false conditions: - type: ClusterConfigured status: "True" diff --git a/tests/e2e/update-image-and-node-port/01-assert.yaml b/tests/e2e/update-image-and-node-port/01-assert.yaml index acd2a0f73f2d..4bc38a5099aa 100644 --- a/tests/e2e/update-image-and-node-port/01-assert.yaml +++ b/tests/e2e/update-image-and-node-port/01-assert.yaml @@ -14,7 +14,7 @@ metadata: spec: containers: - name: redpanda - image: "vectorized/redpanda:v21.11.2" + image: "vectorized/redpanda:v21.11.12" volumeMounts: - mountPath: /etc/redpanda name: config-dir @@ -36,7 +36,7 @@ metadata: spec: containers: - name: redpanda - image: "vectorized/redpanda:v21.11.2" + image: "vectorized/redpanda:v21.11.12" volumeMounts: - mountPath: /etc/redpanda name: config-dir @@ -86,4 +86,4 @@ kind: Cluster metadata: name: update-image-cluster-and-node-port status: - version: "v21.11.2" + version: "v21.11.12" diff --git a/tests/e2e/update-image-and-node-port/01-new-image-and-pv.yaml b/tests/e2e/update-image-and-node-port/01-new-image-and-pv.yaml index 6ee88ca40ddb..31d110804aa8 100644 --- a/tests/e2e/update-image-and-node-port/01-new-image-and-pv.yaml +++ b/tests/e2e/update-image-and-node-port/01-new-image-and-pv.yaml @@ -12,7 +12,7 @@ kind: Cluster metadata: name: update-image-cluster-and-node-port spec: - version: "v21.11.2" + version: "v21.11.12" cloudStorage: enabled: true accessKey: XXX diff --git a/tests/e2e/update-image-tls-client-auth/01-assert.yaml b/tests/e2e/update-image-tls-client-auth/01-assert.yaml index 87fd1c92a538..1ec4478d8450 100644 --- a/tests/e2e/update-image-tls-client-auth/01-assert.yaml +++ b/tests/e2e/update-image-tls-client-auth/01-assert.yaml @@ -14,7 +14,7 @@ metadata: spec: containers: - name: redpanda - image: "vectorized/redpanda:v21.11.2" + image: "vectorized/redpanda:v21.11.12" volumeMounts: - mountPath: /etc/redpanda name: config-dir @@ -40,7 +40,7 @@ metadata: spec: containers: - name: redpanda - image: "vectorized/redpanda:v21.11.2" + image: "vectorized/redpanda:v21.11.12" volumeMounts: - mountPath: /etc/redpanda name: config-dir diff --git a/tests/e2e/update-image-tls-client-auth/01-new-image-and-pv.yaml b/tests/e2e/update-image-tls-client-auth/01-new-image-and-pv.yaml index 2f08b482bfbf..4b4b31efaaea 100644 --- a/tests/e2e/update-image-tls-client-auth/01-new-image-and-pv.yaml +++ b/tests/e2e/update-image-tls-client-auth/01-new-image-and-pv.yaml @@ -12,7 +12,7 @@ kind: Cluster metadata: name: up-img spec: - version: "v21.11.2" + version: "v21.11.12" cloudStorage: enabled: true accessKey: XXX diff --git a/tests/e2e/update-image-tls/01-assert.yaml b/tests/e2e/update-image-tls/01-assert.yaml index 0620d5859272..e27c78a62c99 100644 --- a/tests/e2e/update-image-tls/01-assert.yaml +++ b/tests/e2e/update-image-tls/01-assert.yaml @@ -14,7 +14,7 @@ metadata: spec: containers: - name: redpanda - image: "vectorized/redpanda:v21.11.2" + image: "vectorized/redpanda:v21.11.12" volumeMounts: - mountPath: /etc/redpanda name: config-dir @@ -38,7 +38,7 @@ metadata: spec: containers: - name: redpanda - image: "vectorized/redpanda:v21.11.2" + image: "vectorized/redpanda:v21.11.12" volumeMounts: - mountPath: /etc/redpanda name: config-dir diff --git a/tests/e2e/update-image-tls/01-new-image-and-pv.yaml b/tests/e2e/update-image-tls/01-new-image-and-pv.yaml index 2f08b482bfbf..4b4b31efaaea 100644 --- a/tests/e2e/update-image-tls/01-new-image-and-pv.yaml +++ b/tests/e2e/update-image-tls/01-new-image-and-pv.yaml @@ -12,7 +12,7 @@ kind: Cluster metadata: name: up-img spec: - version: "v21.11.2" + version: "v21.11.12" cloudStorage: enabled: true accessKey: XXX