Skip to content

Commit

Permalink
Merge pull request #1357 from Altinity/0.23.3
Browse files Browse the repository at this point in the history
0.23.3
  • Loading branch information
sunsingerus authored Feb 29, 2024
2 parents df26023 + 08709cb commit 899b1a0
Show file tree
Hide file tree
Showing 105 changed files with 13,443 additions and 3,447 deletions.
14 changes: 7 additions & 7 deletions deploy/builder/build-clickhouse-operator-configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ EOF
echo -n "" > "${dst}"
fi
# Render file body
cat "${src}" | \
WATCH_NAMESPACES="${WATCH_NAMESPACES:-""}" \
CH_USERNAME_PLAIN="${CH_USERNAME_PLAIN:-""}" \
CH_PASSWORD_PLAIN="${CH_PASSWORD_PLAIN:-""}" \
CH_CREDENTIALS_SECRET_NAMESPACE="${CH_CREDENTIALS_SECRET_NAMESPACE:-""}" \
cat "${src}" | \
WATCH_NAMESPACES="${WATCH_NAMESPACES:-""}" \
CH_USERNAME_PLAIN="${CH_USERNAME_PLAIN:-""}" \
CH_PASSWORD_PLAIN="${CH_PASSWORD_PLAIN:-""}" \
CH_CREDENTIALS_SECRET_NAMESPACE="${CH_CREDENTIALS_SECRET_NAMESPACE:-""}" \
CH_CREDENTIALS_SECRET_NAME="${CH_CREDENTIALS_SECRET_NAME:-"clickhouse-operator"}" \
VERBOSITY="${VERBOSITY:-"1"}" \
envsubst \
VERBOSITY="${VERBOSITY:-"1"}" \
envsubst \
>> "${dst}"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ spec:
type: string
description: CHI status
jsonPath: .status.status
- name: hosts-unchanged
type: integer
description: Unchanged hosts count
priority: 1 # show in wide view
jsonPath: .status.hostsUnchanged
- name: hosts-updated
type: integer
description: Updated hosts count
Expand Down Expand Up @@ -176,6 +181,10 @@ spec:
nullable: true
items:
type: string
hostsUnchanged:
type: integer
minimum: 0
description: "Unchanged Hosts count"
hostsUpdated:
type: integer
minimum: 0
Expand Down
8 changes: 4 additions & 4 deletions deploy/devspace/dev-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
PROJECT_ROOT="$(realpath "${CUR_DIR}/../..")"
MANIFEST_ROOT="$(realpath ${PROJECT_ROOT}/deploy)"
MANIFEST_ROOT="$(realpath "${PROJECT_ROOT}/deploy")"

OPERATOR_NAMESPACE="${OPERATOR_NAMESPACE:-"dev"}"
METRICS_EXPORTER_NAMESPACE="${OPERATOR_NAMESPACE}"
Expand All @@ -13,8 +13,7 @@ METRICS_EXPORTER_NAMESPACE="${OPERATOR_NAMESPACE}"
DEPLOY_OPERATOR="${DEPLOY_OPERATOR:-"no"}"
CUR_RELEASE=$(cat "${PROJECT_ROOT}/release")
MINIKUBE="${MINIKUBE:-"yes"}"

echo "DEPLOY_OPERATOR=${DEPLOY_OPERATOR}"
VERBOSITY="${VERBOSITY:-"2"}"

case "${DEPLOY_OPERATOR}" in
"yes" | "release" | "prod" | "latest")
Expand All @@ -32,9 +31,10 @@ case "${DEPLOY_OPERATOR}" in
"dev")
# This would be dev operator
OPERATOR_IMAGE="${OPERATOR_IMAGE:-"altinity/clickhouse-operator:dev"}"
OPERATOR_IMAGE_PULL_POLICY="${OPERATOR_IMAGE_PULL_POLICY:-"IfNotPresent"}"
METRICS_EXPORTER_IMAGE="${METRICS_EXPORTER_IMAGE:-"altinity/metrics-exporter:dev"}"
METRICS_EXPORTER_IMAGE_PULL_POLICY="${METRICS_EXPORTER_IMAGE_PULL_POLICY:-"IfNotPresent"}"
;;
*)
echo "No Operator would be installed"
;;
esac
35 changes: 24 additions & 11 deletions deploy/devspace/dev-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

source "${CUR_DIR}/dev-config.sh"

echo "Create namespace to deploy the operator into: ${OPERATOR_NAMESPACE}"
kubectl create namespace "${OPERATOR_NAMESPACE}"

echo "Install operator requirements with the following options:"
echo "OPERATOR_NAMESPACE=${OPERATOR_NAMESPACE}"
echo "OPERATOR_VERSION=${OPERATOR_VERSION}"
Expand All @@ -17,6 +14,10 @@ echo "METRICS_EXPORTER_IMAGE=${METRICS_EXPORTER_IMAGE}"
echo "METRICS_EXPORTER_IMAGE_PULL_POLICY=${METRICS_EXPORTER_IMAGE_PULL_POLICY}"
echo "DEPLOY_OPERATOR=${DEPLOY_OPERATOR}"
echo "MINIKUBE=${MINIKUBE}"
echo "VERBOSITY=${VERBOSITY}"

echo "Create namespace to deploy the operator into: ${OPERATOR_NAMESPACE}"
kubectl create namespace "${OPERATOR_NAMESPACE}"

echo "Deploy prerequisites - CRDs, RBACs, etc"
kubectl -n "${OPERATOR_NAMESPACE}" apply -f <( \
Expand All @@ -30,19 +31,30 @@ kubectl -n "${OPERATOR_NAMESPACE}" apply -f <( \
)

if [[ "${MINIKUBE}" == "yes" ]]; then
echo "Preparing for minikube"
case "${DEPLOY_OPERATOR}" in
"dev")
echo "Build" && \
${PROJECT_ROOT}/dev/image_build_all_dev.sh && \
echo "Load images into minikube" && \
minikube image load "${OPERATOR_IMAGE}" && \
minikube image load "${METRICS_EXPORTER_IMAGE}" && \
echo "Images prepared"
echo "Clean images in minikube"
echo " 1. ${OPERATOR_IMAGE}"
echo " 2. ${METRICS_EXPORTER_IMAGE}"
echo "Remove errors will be ignored."
minikube image rm "${OPERATOR_IMAGE}" > /dev/null 2>&1
minikube image rm "${METRICS_EXPORTER_IMAGE}" > /dev/null 2>&1

echo "Build images"
echo "VERBOSITY=${VERBOSITY} ${PROJECT_ROOT}/dev/image_build_all_dev.sh"
VERBOSITY="${VERBOSITY}" "${PROJECT_ROOT}/dev/image_build_all_dev.sh"
echo "Load images into minikube:"
echo " 1. ${OPERATOR_IMAGE}"
echo " 2. ${METRICS_EXPORTER_IMAGE}"
echo "Load images into minikube"
minikube image load "${OPERATOR_IMAGE}"
minikube image load "${METRICS_EXPORTER_IMAGE}"
echo "Images loaded"
;;
esac
fi


echo "Deploy operator's deployment"
case "${DEPLOY_OPERATOR}" in
"yes" | "release" | "prod" | "latest" | "local" | "dev")
Expand All @@ -60,7 +72,8 @@ case "${DEPLOY_OPERATOR}" in
MANIFEST_PRINT_CRD="no" \
MANIFEST_PRINT_RBAC_CLUSTERED="no" \
MANIFEST_PRINT_RBAC_NAMESPACED="no" \
\
VERBOSITY="${VERBOSITY:-"1"}" \
\
"${MANIFEST_ROOT}/builder/cat-clickhouse-operator-install-yaml.sh" \
)
;;
Expand Down
12 changes: 12 additions & 0 deletions deploy/devspace/dev-logs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

NAMESPACE="${NAMESPACE:-"dev"}"

echo "Looking for ${NAMESPACE}/clickhouse-operator logs"
CLICKHOUSE_OPERATOR_POD=$(kubectl -n "${NAMESPACE}" get pod | awk '{print $1}' | grep clickhouse-operator)
if [[ -z "${CLICKHOUSE_OPERATOR_POD}" ]]; then
echo "clickhouse-operator pod not found in namespace ${NAMESPACE}"
echo "Abort."
exit 1
fi
kubectl logs -n "${NAMESPACE}" "${CLICKHOUSE_OPERATOR_POD}" clickhouse-operator -f
4 changes: 2 additions & 2 deletions deploy/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ description: |-
kubectl apply -f https://github.com/Altinity/clickhouse-operator/raw/master/deploy/helm/crds/CustomResourceDefinition-clickhouseoperatorconfigurations.clickhouse.altinity.com.yaml
```
type: application
version: 0.23.2
appVersion: 0.23.2
version: 0.23.3
appVersion: 0.23.3
home: https://github.com/Altinity/clickhouse-operator
icon: https://logosandtypes.com/wp-content/uploads/2020/12/altinity.svg
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion deploy/helm/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# altinity-clickhouse-operator

![Version: 0.23.2](https://img.shields.io/badge/Version-0.23.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.23.2](https://img.shields.io/badge/AppVersion-0.23.2-informational?style=flat-square)
![Version: 0.23.3](https://img.shields.io/badge/Version-0.23.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.23.3](https://img.shields.io/badge/AppVersion-0.23.3-informational?style=flat-square)

Helm chart to deploy [altinity-clickhouse-operator](https://github.com/Altinity/clickhouse-operator).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# SINGULAR=clickhouseinstallation
# PLURAL=clickhouseinstallations
# SHORT=chi
# OPERATOR_VERSION=0.23.2
# OPERATOR_VERSION=0.23.3
#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: clickhouseinstallations.clickhouse.altinity.com
labels:
clickhouse.altinity.com/chop: 0.23.2
clickhouse.altinity.com/chop: 0.23.3
spec:
group: clickhouse.altinity.com
scope: Namespaced
Expand Down Expand Up @@ -53,6 +53,11 @@ spec:
type: string
description: CHI status
jsonPath: .status.status
- name: hosts-unchanged
type: integer
description: Unchanged hosts count
priority: 1 # show in wide view
jsonPath: .status.hostsUnchanged
- name: hosts-updated
type: integer
description: Updated hosts count
Expand Down Expand Up @@ -172,6 +177,10 @@ spec:
nullable: true
items:
type: string
hostsUnchanged:
type: integer
minimum: 0
description: "Unchanged Hosts count"
hostsUpdated:
type: integer
minimum: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# SINGULAR=clickhouseinstallationtemplate
# PLURAL=clickhouseinstallationtemplates
# SHORT=chit
# OPERATOR_VERSION=0.23.2
# OPERATOR_VERSION=0.23.3
#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: clickhouseinstallationtemplates.clickhouse.altinity.com
labels:
clickhouse.altinity.com/chop: 0.23.2
clickhouse.altinity.com/chop: 0.23.3
spec:
group: clickhouse.altinity.com
scope: Namespaced
Expand Down Expand Up @@ -53,6 +53,11 @@ spec:
type: string
description: CHI status
jsonPath: .status.status
- name: hosts-unchanged
type: integer
description: Unchanged hosts count
priority: 1 # show in wide view
jsonPath: .status.hostsUnchanged
- name: hosts-updated
type: integer
description: Updated hosts count
Expand Down Expand Up @@ -172,6 +177,10 @@ spec:
nullable: true
items:
type: string
hostsUnchanged:
type: integer
minimum: 0
description: "Unchanged Hosts count"
hostsUpdated:
type: integer
minimum: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Template Parameters:
#
# OPERATOR_VERSION=0.23.2
# OPERATOR_VERSION=0.23.3
#
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: clickhousekeeperinstallations.clickhouse-keeper.altinity.com
labels:
clickhouse-keeper.altinity.com/chop: 0.23.2
clickhouse-keeper.altinity.com/chop: 0.23.3
spec:
group: clickhouse-keeper.altinity.com
scope: Namespaced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kind: CustomResourceDefinition
metadata:
name: clickhouseoperatorconfigurations.clickhouse.altinity.com
labels:
clickhouse.altinity.com/chop: 0.23.2
clickhouse.altinity.com/chop: 0.23.3
spec:
group: clickhouse.altinity.com
scope: Namespaced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#
# NAMESPACE=kube-system
# COMMENT=
# OPERATOR_IMAGE=altinity/clickhouse-operator:0.23.2
# OPERATOR_IMAGE=altinity/clickhouse-operator:0.23.3
# OPERATOR_IMAGE_PULL_POLICY=Always
# METRICS_EXPORTER_IMAGE=altinity/metrics-exporter:0.23.2
# METRICS_EXPORTER_IMAGE=altinity/metrics-exporter:0.23.3
# METRICS_EXPORTER_IMAGE_PULL_POLICY=Always
#
# Setup Deployment for clickhouse-operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Template parameters available:
# NAMESPACE=kube-system
# COMMENT=
# OPERATOR_VERSION=0.23.2
# OPERATOR_VERSION=0.23.3
# CH_USERNAME_SECRET_PLAIN=clickhouse_operator
# CH_PASSWORD_SECRET_PLAIN=clickhouse_operator_password
#
Expand Down
Loading

0 comments on commit 899b1a0

Please sign in to comment.