Skip to content

Commit

Permalink
Merge branch '1.22.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Sep 23, 2024
2 parents 0283e32 + bbcc904 commit e45e7e9
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 23 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ Changelog for Cass Operator, new PRs should update the `main / unreleased` secti
## unreleased

* [FEATURE] [#651](https://github.com/k8ssandra/cass-operator/issues/651) Add tsreload task for DSE deployments and ability to check if sync operation is available on the mgmt-api side
* [FEATURE] [#701](https://github.com/k8ssandra/cass-operator/issues/701) Allow ReadOnlyRootFilesystem for DSE also with extra mounts to provide support for cass-config-builder setups

## v1.22.4

* [BUGFIX] [#708](https://github.com/k8ssandra/cass-operator/issues/708) Preserve existing SecurityContext when ReadOnlyRootFilesystem is set

## v1.22.3

* [FEATURE] [#701](https://github.com/k8ssandra/cass-operator/issues/701) Allow ReadOnlyRootFilesystem for DSE also with extra mounts to provide support for cass-config-builder setups

## v1.22.2

* [BUGFIX] [#703](https://github.com/k8ssandra/cass-operator/issues/703) Fix HCD config path from /etc/cassandra to /opt/hcd/resources/cassandra/conf
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# - 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 ?= 1.23.0
VERSION ?= 1.22.4

COMMIT := $(shell git rev-parse --short HEAD)
DATE := $(shell date +%Y%m%d)
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ Default installation is simple, the kubectl will create a namespace ``cass-opera
Default install requires cert-manager to be installed, since webhooks require TLS certificates to be injected. See below how to install cert-manager if your environment does not have it installed previously.

```console
kubectl apply --force-conflicts --server-side -k github.com/k8ssandra/cass-operator/config/deployments/default?ref=v1.22.2
kubectl apply --force-conflicts --server-side -k github.com/k8ssandra/cass-operator/config/deployments/default?ref=v1.22.4
```

If you wish to install it with cluster wide rights to monitor all the namespaces for ``CassandraDatacenter`` objects, use the following command:

```console
kubectl apply --force-conflicts --server-side -k github.com/k8ssandra/cass-operator/config/deployments/cluster?ref=v1.22.2
kubectl apply --force-conflicts --server-side -k github.com/k8ssandra/cass-operator/config/deployments/cluster?ref=v1.22.4
```

Alternatively, if you checkout the code, you can use ``make deploy`` to run [Kustomize](https://kustomize.io/) and deploy the files.
Expand All @@ -61,7 +61,7 @@ cass-operator-555577b9f8-zgx6j 1/1 Running 0 25h
If you have Prometheus installed in your cluster, you can apply the following command to install the Prometheus support:

```console
kubectl apply -k github.com/k8ssandra/cass-operator/config/prometheus?ref=v1.22.2
kubectl apply -k github.com/k8ssandra/cass-operator/config/prometheus?ref=v1.22.4
```

#### Install cert-manager
Expand All @@ -83,10 +83,10 @@ kind: Kustomization
namespace: cass-operator

resources:
- github.com/k8ssandra/cass-operator/config/deployments/default?ref=v1.22.2
- github.com/k8ssandra/cass-operator/config/deployments/default?ref=v1.22.4

components:
- github.com/k8ssandra/cass-operator/config/components/cluster?ref=v1.22.2
- github.com/k8ssandra/cass-operator/config/components/cluster?ref=v1.22.4
```
We provide both components to modify the installation as well as some additional resources for custom features. At the moment, you can modify the behavior of the installation in the following ways, or remove a component to
Expand Down Expand Up @@ -121,7 +121,7 @@ kind: ImageConfig
metadata:
name: image-config
images:
system-logger: "k8ssandra/system-logger:v1.22.2"
system-logger: "k8ssandra/system-logger:v1.22.4"
config-builder: "datastax/cass-config-builder:1.0-ubi7"
imageRegistry: "localhost:5000"
defaults:
Expand Down Expand Up @@ -152,7 +152,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- github.com/k8ssandra/cass-operator/config/deployments/default?ref=v1.22.2
- github.com/k8ssandra/cass-operator/config/deployments/default?ref=v1.22.4

components:
- components/private_image_config
Expand All @@ -164,7 +164,7 @@ If you also wish to load the cass-operator from a different path, you will need
images:
- name: controller
newName: localhost:5000/k8ssandra/cass-operator
newTag: v1.22.2
newTag: v1.22.4
```
Run ``kubectl apply -k our_installation`` to install cass-operator.
Expand Down Expand Up @@ -253,7 +253,7 @@ reclaimPolicy: Delete
Paste the above to a file and apply:
```
kubectl apply -f https://raw.githubusercontent.com/k8ssandra/cass-operator/v1.22.2/operator/k8s-flavors/gke/storage.yaml
kubectl apply -f https://raw.githubusercontent.com/k8ssandra/cass-operator/v1.22.4/operator/k8s-flavors/gke/storage.yaml
```

### Creating a CassandraDatacenter
Expand Down
15 changes: 13 additions & 2 deletions scripts/post-release-process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@ KUSTOMIZE=$(pwd)/bin/kustomize
# Add new ## unreleased after the tagging (post-release-process.sh)
gawk -i inplace '/##/ && ++c==1 { print "## unreleased\n"; print; next }1' CHANGELOG.md

CURRENT_BRANCH=$(git branch --show-current)

if [ $CURRENT_BRANCH != "master" ]; then
# This is a release branch, we only bump the patch version
export PATCH_RELEASE=true
scripts/update-makefile-version.sh
NEXT_VERSION=$(gawk 'match($0, /^VERSION \?= /) { print substr($0, RLENGTH+1)}' Makefile)
git add Makefile
git add CHANGELOG.md
git commit -m "Prepare for next version $NEXT_VERSION"
exit 0
fi

# Modify Makefile for the next VERSION in line
scripts/update-makefile-version.sh

Expand All @@ -27,8 +40,6 @@ yq eval -i '.defaults.cassandra.repository |= sub("cr.k8ssandra.io/", "")' confi
yq eval -i '.images.config-builder |= sub("cr.dtsx.io/", "")' config/manager/image_config.yaml
yq eval -i '.defaults.dse.repository |= sub("cr.dtsx.io/", "")' config/manager/image_config.yaml



# Commit to git
NEXT_VERSION=$(gawk 'match($0, /^VERSION \?= /) { print substr($0, RLENGTH+1)}' Makefile)

Expand Down
34 changes: 24 additions & 10 deletions scripts/pre-release-process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,21 @@ if [[ ! $0 == scripts/* ]]; then
exit 1
fi

if [ "$#" -lt 1 ]; then
echo "Usage: scripts/pre-release-process.sh newTag"
if [ "$#" -le 1 ]; then
echo "Usage: scripts/pre-release-process.sh newTag [prevTag]"
echo ""
echo "If prevTag is not set, it will default to the latest tag in the repository"
echo "usage of prevTag is required when releasing a patch version from a branch"
exit
fi

CURRENT_BRANCH=$(git branch --show-current)

if [[ $CURRENT_BRANCH != "master" && -z "$2" ]]; then
echo "You must provide a prevTag when releasing from a branch"
exit 1
fi

TAG=$1
PREVTAG=$(git describe --abbrev=0 --tags)
IMG=cr.k8ssandra.io/k8ssandra/cass-operator:${TAG}
Expand All @@ -32,16 +42,20 @@ sed -i '' -e "s/$PREVTAG/$TAG/g" README.md
cd config/manager && $KUSTOMIZE edit set image controller=$IMG && cd -

# Modify config/manager/image_config.yaml to have proper version for server-system-logger
LOG_IMG=k8ssandra/system-logger:${TAG} yq eval -i '.images.system-logger = env(LOG_IMG)' config/manager/image_config.yaml
LOG_IMG=k8ssandra/system-logger:${TAG} yq eval -i '.images.system-logger = "cr.k8ssandra.io/" + env(LOG_IMG)' config/manager/image_config.yaml

# Add prefixes to image_config if not already set
CLIENT_VALUE=$(yq '.images.k8ssandra-client' config/manager/image_config.yaml)

# Add cr.k8ssandra.io prefixes
yq eval -i '.images.system-logger |= "cr.k8ssandra.io/" + .' config/manager/image_config.yaml
yq eval -i '.images.k8ssandra-client |= "cr.k8ssandra.io/" + .' config/manager/image_config.yaml
yq eval -i '.defaults.cassandra.repository |= "cr.k8ssandra.io/" + .' config/manager/image_config.yaml
if [[ ! $CLIENT_VALUE == cr.k8ssandra.io* ]]; then
# Add cr.k8ssandra.io prefixes
yq eval -i '.images.k8ssandra-client |= "cr.k8ssandra.io/" + .' config/manager/image_config.yaml
yq eval -i '.defaults.cassandra.repository |= "cr.k8ssandra.io/" + .' config/manager/image_config.yaml

# Add cr.dstx.io prefixes
yq eval -i '.images.config-builder |= "cr.dtsx.io/" + .' config/manager/image_config.yaml
yq eval -i '.defaults.dse.repository |= "cr.dtsx.io/" + .' config/manager/image_config.yaml
# Add cr.dstx.io prefixes
yq eval -i '.images.config-builder |= "cr.dtsx.io/" + .' config/manager/image_config.yaml
yq eval -i '.defaults.dse.repository |= "cr.dtsx.io/" + .' config/manager/image_config.yaml
fi

# Modify the controller

Expand Down

0 comments on commit e45e7e9

Please sign in to comment.