Skip to content

Commit

Permalink
Pull request OT-CONTAINER-KIT#7: Pull in latest from upsteam
Browse files Browse the repository at this point in the history
Merge in OSS/redis-operator from master to cs-main

* commit '1f0be5c52f4be026c5fe702fdde37e8b19ab307a':
  Bump terser from 4.8.0 to 4.8.1 in /docs (OT-CONTAINER-KIT#311)
  Add pvc, pv clusterrole for deletion (OT-CONTAINER-KIT#313)
  Update zap options to support specifying log level (OT-CONTAINER-KIT#308)
  [BugFix][Change] Fixed cluster recovery logic (OT-CONTAINER-KIT#304)
  [BugFix][Change] Fixed the logic for probes (OT-CONTAINER-KIT#302)
  Fixed pdb creation issue (OT-CONTAINER-KIT#301)
  [BugFix][Change] Fixed secret whitespace issue in redis password (OT-CONTAINER-KIT#300)
  fix: crash if targetContainer does not exist (OT-CONTAINER-KIT#292)
  fix: crash if redisSecret is incomplete (OT-CONTAINER-KIT#293)
  fix: panic if resources is not present (OT-CONTAINER-KIT#294)
  add: error log when a user tries to modify cr.spec.storage.volumeClaimTemplate (OT-CONTAINER-KIT#280)
  Fixes case where node ip contains another PodIP (OT-CONTAINER-KIT#284)
  Bump eventsource from 1.1.0 to 1.1.1 in /docs (OT-CONTAINER-KIT#282)
  Fixed rbac policy for PDB
  • Loading branch information
devkmsg committed Sep 16, 2022
2 parents d1e3925 + 1f0be5c commit 49d401c
Show file tree
Hide file tree
Showing 21 changed files with 282 additions and 898 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
### v0.11.0
##### July 5, 2022

#### :beetle: Bug Fixes

- Fix Redis cluster and Redis CRD
- Fixed TLS authentication between redis cluster
- Fixed RBAC policy for PDB
- Redis exporter exception handled
- External service fix

### v0.10.0
##### January 26, 2022

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Current Operator version
VERSION ?= 0.10.0
VERSION ?= 0.12.0
# Default bundle image tag
BUNDLE_IMG ?= controller-bundle:$(VERSION)
# Options for 'bundle-build'
Expand All @@ -12,7 +12,7 @@ endif
BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)

# Image URL to use all building/pushing image targets
IMG ?= quay.io/opstree/redis-operator:v0.10.0
IMG ?= quay.io/opstree/redis-operator:v0.12.0
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false"

Expand Down
19 changes: 19 additions & 0 deletions api/v1beta1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,25 @@ type TLSConfig struct {
Secret corev1.SecretVolumeSource `json:"secret"`
}

// Probe is a interface for ReadinessProbe and LivenessProbe
type Probe struct {
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=1
InitialDelaySeconds int32 `json:"initialDelaySeconds,omitempty" protobuf:"varint,2,opt,name=initialDelaySeconds"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=1
TimeoutSeconds int32 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=10
PeriodSeconds int32 `json:"periodSeconds,omitempty" protobuf:"varint,4,opt,name=periodSeconds"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=1
SuccessThreshold int32 `json:"successThreshold,omitempty" protobuf:"varint,5,opt,name=successThreshold"`
// +kubebuilder:validation:Minimum=1
// +kubebuilder:default=3
FailureThreshold int32 `json:"failureThreshold,omitempty" protobuf:"varint,6,opt,name=failureThreshold"`
}

// Sidecar for each Redis pods
type Sidecar struct {
Name string `json:"name"`
Expand Down
8 changes: 5 additions & 3 deletions api/v1beta1/redis_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ type RedisSpec struct {
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Tolerations *[]corev1.Toleration `json:"tolerations,omitempty"`
TLS *TLSConfig `json:"TLS,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty" protobuf:"bytes,11,opt,name=livenessProbe"`
Sidecars *[]Sidecar `json:"sidecars,omitempty"`
// +kubebuilder:default:={initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}
ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
// +kubebuilder:default:={initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}
LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,11,opt,name=livenessProbe"`
Sidecars *[]Sidecar `json:"sidecars,omitempty"`
}

// RedisStatus defines the observed state of Redis
Expand Down
17 changes: 10 additions & 7 deletions api/v1beta1/rediscluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ import (
// RedisClusterSpec defines the desired state of RedisCluster
type RedisClusterSpec struct {
// +kubebuilder:validation:Minimum=3
Size *int32 `json:"clusterSize"`
KubernetesConfig KubernetesConfig `json:"kubernetesConfig"`
RedisLeader RedisLeader `json:"redisLeader,omitempty"`
Size *int32 `json:"clusterSize"`
KubernetesConfig KubernetesConfig `json:"kubernetesConfig"`
// +kubebuilder:default:={livenessProbe:{initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}, readinessProbe:{initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}}
RedisLeader RedisLeader `json:"redisLeader,omitempty"`
// +kubebuilder:default:={livenessProbe:{initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}, readinessProbe:{initialDelaySeconds: 1, timeoutSeconds: 1, periodSeconds: 10, successThreshold: 1, failureThreshold:3}}
RedisFollower RedisFollower `json:"redisFollower,omitempty"`
RedisExporter *RedisExporter `json:"redisExporter,omitempty"`
Storage *Storage `json:"storage,omitempty"`
Expand Down Expand Up @@ -56,18 +58,19 @@ type RedisLeader struct {
RedisConfig *RedisConfig `json:"redisConfig,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
PodDisruptionBudget *RedisPodDisruptionBudget `json:"pdb,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty" protobuf:"bytes,11,opt,name=livenessProbe"`
ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,11,opt,name=livenessProbe"`
}

// RedisFollower interface will have the redis follower configuration
type RedisFollower struct {
// +kubebuilder:validation:Minimum=3
Replicas *int32 `json:"replicas,omitempty"`
RedisConfig *RedisConfig `json:"redisConfig,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
PodDisruptionBudget *RedisPodDisruptionBudget `json:"pdb,omitempty"`
ReadinessProbe *corev1.Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty" protobuf:"bytes,11,opt,name=livenessProbe"`
ReadinessProbe *Probe `json:"readinessProbe,omitempty" protobuf:"bytes,11,opt,name=readinessProbe"`
LivenessProbe *Probe `json:"livenessProbe,omitempty" protobuf:"bytes,11,opt,name=livenessProbe"`
}

// RedisClusterStatus defines the observed state of RedisCluster
Expand Down
39 changes: 27 additions & 12 deletions api/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 49d401c

Please sign in to comment.