Skip to content

Commit

Permalink
Merge pull request #103 from tahmmee/2.4.x
Browse files Browse the repository at this point in the history
2.4.0 Release
  • Loading branch information
tahmmee authored Jan 25, 2023
2 parents ebca67d + 19084a5 commit a304f35
Show file tree
Hide file tree
Showing 13 changed files with 1,790 additions and 303 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- 2.3.x
- 2.4.x
# Ignore anything unrelated to a chart release
paths-ignore:
- 'charts/couchbase-operator/examples/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Validate CI
on:
pull_request:
branches:
- 2.3.x
- 2.4.x
# Ignore anything unrelated to a chart release
paths-ignore:
- 'charts/couchbase-operator/examples/**'
Expand Down
6 changes: 4 additions & 2 deletions charts/couchbase-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: couchbase-operator
description: A Helm chart to deploy the Couchbase Autonomous Operator for easily deploying, managing, and maintaining Couchbase Clusters. Couchbase Server is a NoSQL document database with a distributed architecture for performance, scalability, and availability. It enables developers to build applications easier and faster by leveraging the power of SQL with the flexibility of JSON.
version: 2.32.2
appVersion: 2.3.2
version: 2.40.0
appVersion: 2.4.0
type: application
keywords:
- couchbase
Expand All @@ -20,3 +20,5 @@ maintainers:
email: [email protected]
- name: Tommie McAfee
email: [email protected]
- name: Alex Emery
email: [email protected]
49 changes: 28 additions & 21 deletions charts/couchbase-operator/README.md

Large diffs are not rendered by default.

53 changes: 30 additions & 23 deletions charts/couchbase-operator/README.md.adoc

Large diffs are not rendered by default.

1,667 changes: 1,520 additions & 147 deletions charts/couchbase-operator/crds/couchbase.crds.yaml

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions charts/couchbase-operator/templates/admission-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,12 @@ rules:
- secrets
verbs:
- get
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get

---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{ printf "%sBinding" .Values.admissionController.scope }}
Expand Down
15 changes: 12 additions & 3 deletions charts/couchbase-operator/templates/operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,29 @@ rules:
- apiGroups:
- couchbase.com
resources:
- couchbasebuckets
- couchbaseephemeralbuckets
- couchbasememcachedbuckets
- couchbasereplications
- couchbasemigrationreplications
- couchbaseusers
- couchbasegroups
- couchbaserolebindings
- couchbasebackups
verbs:
- list
- watch
- apiGroups:
- couchbase.com
resources:
- couchbasebuckets
- couchbaseephemeralbuckets
- couchbasememcachedbuckets
- couchbasescopes
- couchbasescopegroups
- couchbasecollections
- couchbasecollectiongroups
verbs:
- list
- watch
- create
- apiGroups:
- couchbase.com
resources:
Expand Down Expand Up @@ -161,6 +168,8 @@ rules:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- delete
Expand Down
204 changes: 132 additions & 72 deletions charts/couchbase-operator/values-all.yaml

Large diffs are not rendered by default.

60 changes: 44 additions & 16 deletions charts/couchbase-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ couchbaseOperator:
# -- Image specifies repository and tag of the Couchbase Operator container.
image:
repository: couchbase/operator
tag: 2.3.2
tag: 2.4.0
# -- The policy for pulling images from the repository onto hosts.
# The imagePullPolicy value defaults to IfNotPresent, which means
# that images are only pulled if they’re not present on the Kubernetes node.
Expand Down Expand Up @@ -53,7 +53,7 @@ admissionController:
# -- Image specifies repository and tag of the Couchbase Admission container.
image:
repository: couchbase/admission-controller
tag: 2.3.2
tag: 2.4.0
# -- The policy for pulling images from the repository onto hosts.
# The imagePullPolicy value defaults to IfNotPresent, which means
# that images are only pulled if they’re not present on the Kubernetes node.
Expand Down Expand Up @@ -106,7 +106,7 @@ admissionCA:
# -- A base64 encoded PEM format private key
key:
# -- Expiry time of CA in days for generated certs
expiration: 365
expiration: 3650

# secret with client certs mounted within the admission controller.
admissionSecret:
Expand Down Expand Up @@ -576,7 +576,7 @@ syncGateway:
# -- Image of the sync gateway container
image:
repository: couchbase/sync-gateway
tag: 3.0.3-enterprise
tag: 3.0.4-enterprise
imagePullPolicy: IfNotPresent
# -- Optional secret to use with prepoulated database config
configSecret:
Expand All @@ -598,8 +598,6 @@ syncGateway:
requests:
storage: 1Gi



# @default -- will be filled in as below
# -- Disable default bucket creation by setting buckets.default: null. Note that
# setting default to null can throw a warning:
Expand Down Expand Up @@ -677,6 +675,12 @@ buckets:
# doesn't match a resource, then no error conditions are raised due to
# undefined resource creation ordering and eventual consistency.
resources: []
# -- StorageBackend to be assigned to and used by the bucket. Only valid for
# Couchbase Server 7.0.0 onward. Two different backend storage mechanisms
# can be used - "couchstore" or "magma", defaulting to "couchstore". This
# cannot be edited after bucket creation. Note: "magma" is only valid for
# Couchbase Server 7.1.0 onward.
storageBackend: couchstore

# @default -- will be filled in as below
# -- Controls the generation of the CouchbaseCluster CRD
Expand Down Expand Up @@ -723,22 +727,23 @@ cluster:
# automated-backup
backup:
# -- The Backup Image to run on backup pods.
image: couchbase/operator-backup:1.2.0
image: couchbase/operator-backup:1.3.1
# -- Managed defines whether backups are managed by us or the clients.
managed: true
# -- ObjectEndpoint contains the configuration for connecting to a custom S3
# compliant object store.
# -- Deprecated: by CouchbaseBackup.spec.objectStore.Endpoint ObjectEndpoint
# contains the configuration for connecting to a custom S3 compliant object
# store.
objectEndpoint:
# -- UseVirtualPath will force the AWS SDK to use the new virtual style
# paths. by default alternative path style URLs which are often required
# by S3 compatible object stores.
# paths which are often required by S3 compatible object stores.
useVirtualPath: false
# -- The Service Account to run backup (and restore) pods under. Without
# this backup pods will not be able to update status.
serviceAccountName: couchbase-backup
# -- UseIAMRole enables backup to fetch EC2 instance metadata. This allows
# the AWS SDK to use the EC2's IAM Role for S3 access. UseIAMRole will
# ignore credentials in s3Secret.
# -- Deprecated: by CouchbaseBackup.spec.objectStore.useIAM UseIAMRole
# enables backup to fetch EC2 instance metadata. This allows the AWS SDK to
# use the EC2's IAM Role for S3 access. UseIAMRole will ignore credentials
# in s3Secret.
useIAMRole: false
# -- Buckets defines whether the Operator should manage buckets, and how to
# lookup bucket resources.
Expand Down Expand Up @@ -812,7 +817,7 @@ cluster:
percent: 30
# -- AutoFailoverMaxCount is the maximum number of automatic failovers
# Couchbase server will allow before not allowing any more. This field must
# be between 1-3, default 3.
# be between 1-3 for server versions prior to 7.1.0 default is 3.
autoFailoverMaxCount: 3
# -- AutoFailoverOnDataDiskIssues defines whether Couchbase server should
# failover a pod if a disk issue was detected.
Expand All @@ -823,6 +828,8 @@ cluster:
# https://golang.org/pkg/time/#ParseDuration
autoFailoverOnDataDiskIssuesTimePeriod: 120s
# -- AutoFailoverServerGroup whether to enable failing over a server group.
# This field is ignored in server versions 7.1+ as it has been removed from
# the Couchbase API
autoFailoverServerGroup: false
# -- AutoFailoverTimeout defines how long Couchbase server will wait between
# a pod being witnessed as down, until when it will failover the pod.
Expand Down Expand Up @@ -871,6 +878,17 @@ cluster:
# snapshotted. This defaults to 200ms, and must be greater than or equal
# to 1ms.
memorySnapshotInterval: 200ms
# -- NumberOfReplica specifies number of secondary index replicas to be
# created by the Index Service whenever CREATE INDEX is invoked, which
# ensures high availability and high performance. Note, if nodes and
# num_replica are both specified in the WITH clause, the specified number
# of nodes must be one greater than num_replica This defaults to 0, which
# means no index replicas to be created by default. Minimum must be 0.
numReplica: 0
# -- RedistributeIndexes when true, Couchbase Server redistributes indexes
# when rebalance occurs, in order to optimize performance. If false (the
# default), such redistribution does not occur.
redistributeIndexes: false
# -- StableSnapshotInterval controls when disk indexes should be
# snapshotted. This defaults to 5s, and must be greater than or equal to
# 1ms.
Expand Down Expand Up @@ -921,9 +939,15 @@ cluster:
# longer restricts autoscaling to ephemeral services. EnablePreviewScaling
# enables autoscaling for stateful services and buckets.
enablePreviewScaling: false
# -- EnvImagePrecedence gives precedence over the default container image name
# in `spec.Image` to an image name provided through Operator environment
# variables. For more info on using Operator environment variables:
# https://docs.couchbase.com/operator/current/reference-operator-
# configuration.html
envImagePrecedence: false
# -- Hibernate is whether to hibernate the cluster.
hibernate: false
image: couchbase/server:7.0.2
image: couchbase/server:7.1.3
# -- Logging defines Operator logging options.
logging:
# -- Used to manage the audit configuration directly
Expand Down Expand Up @@ -1076,6 +1100,10 @@ cluster:
rbac:
# -- Managed defines whether RBAC is managed by us or the clients.
managed: true
# -- UISessionTimeout sets how long, in minutes, before a user is declared
# inactive and signed out from the Couchbase Server UI. 0 represents no time
# out.
uiSessionTimeout: 0
# -- Cluster administrator username
username: Administrator
# -- SecurityContext allows the configuration of the security context for all
Expand Down
10 changes: 4 additions & 6 deletions charts/couchbase-operator/values.yamltmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ couchbaseOperator:
# -- Image specifies repository and tag of the Couchbase Operator container.
image:
repository: couchbase/operator
tag: 2.3.2
tag: 2.4.0
# -- The policy for pulling images from the repository onto hosts.
# The imagePullPolicy value defaults to IfNotPresent, which means
# that images are only pulled if they’re not present on the Kubernetes node.
Expand Down Expand Up @@ -53,7 +53,7 @@ admissionController:
# -- Image specifies repository and tag of the Couchbase Admission container.
image:
repository: couchbase/admission-controller
tag: 2.3.2
tag: 2.4.0
# -- The policy for pulling images from the repository onto hosts.
# The imagePullPolicy value defaults to IfNotPresent, which means
# that images are only pulled if they’re not present on the Kubernetes node.
Expand Down Expand Up @@ -106,7 +106,7 @@ admissionCA:
# -- A base64 encoded PEM format private key
key:
# -- Expiry time of CA in days for generated certs
expiration: 365
expiration: 3650

# secret with client certs mounted within the admission controller.
admissionSecret:
Expand Down Expand Up @@ -576,7 +576,7 @@ syncGateway:
# -- Image of the sync gateway container
image:
repository: couchbase/sync-gateway
tag: 3.0.3-enterprise
tag: 3.0.4-enterprise
imagePullPolicy: IfNotPresent
# -- Optional secret to use with prepoulated database config
configSecret:
Expand All @@ -597,5 +597,3 @@ syncGateway:
resources:
requests:
storage: 1Gi


16 changes: 13 additions & 3 deletions tools/value-generation/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,15 @@ def processServiceType(key_prefix, value_map) :

return value_map[templateKey]

def preProcessBucket(crd_value, value_map, comment_map) :
# preProcessCRD allows modification of CRD prior to value generation.
# Use sparingly, as a change here is almost always better going into
# operator itself - unless we are dealing with released versions.
def preProcessCRD(properties):
# because of K8S-2971 storage backend cannot be empty when server is < 7.1.0
if 'storageBackend' in properties:
properties['storageBackend']['default'] = 'couchstore'

def preProcessBucket(crd_value, value_map, comment_map):
# Update top-level comment with extra details
comment_map[crd_value] = '-- Disable default bucket creation by setting buckets.default: null. Note that setting default to null can throw a warning: https://github.com/helm/helm/issues/5184'
# We have to nest under a new key
Expand Down Expand Up @@ -146,11 +154,11 @@ def postProcessCluster(crd_value, value_map, comment_map) :
if expectedKey not in value_map[crd_value]:
value_map[crd_value][expectedKey] = {}

value_map[crd_value]['backup']['image'] = 'couchbase/operator-backup:1.2.0'
value_map[crd_value]['backup']['image'] = 'couchbase/operator-backup:1.3.1'
value_map[crd_value]['backup']['managed'] = True

value_map[crd_value]['buckets']['managed'] = True
value_map[crd_value]['image'] = 'couchbase/server:7.0.2'
value_map[crd_value]['image'] = 'couchbase/server:7.1.3'
comment_map[(crd_value, 'backup')] += " Refer to the documentation for supported values https://docs.couchbase.com/operator/current/howto-backup.html#enable-automated-backup"

value_map[crd_value]['networking']['adminConsoleServices'] = ['data']
Expand Down Expand Up @@ -276,6 +284,8 @@ def generate(use_format):
crd_value=crd_mapping[crd_name]

crd_properties = data['spec']['versions'][0]['schema']['openAPIV3Schema']['properties']['spec']['properties']
preProcessCRD(crd_properties)

# purge unset properties when using min format
if use_format == "min":
crd_properties = purge_unset(crd_properties)
Expand Down
2 changes: 1 addition & 1 deletion tools/value-generation/generateValuesFile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

CRD_FILE=${CRD_FILE:-$SCRIPT_DIR/../../couchbase-operator/crds/couchbase.crds.yaml}

docker build -t values-generator "${SCRIPT_DIR}"
docker build --no-cache -t values-generator "${SCRIPT_DIR}"

# To find start/end easily and for redirection purposes
echo "==== START ===="
Expand Down

0 comments on commit a304f35

Please sign in to comment.