8000 docs: quote boolean-like values in CHOp config example YAML by realyota · Pull Request #1896 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions .github/workflows/release_chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ on:
types:
- published
- edited
workflow_dispatch:
inputs:
release_tag:
description: 'release tag'
required: true

jobs:
release_chart:
name: Release Chart
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -20,28 +26,43 @@ jobs:

- name: Install chart-releaser
run: |
wget https://github.com/helm/chart-releaser/releases/download/v1.4.1/chart-releaser_1.4.1_linux_amd64.tar.gz
tar -zxf chart-releaser_1.4.1_linux_amd64.tar.gz cr
HELM_CHART_RELEASER_VERSION=$(curl -fsSL https://github.com/helm/chart-releaser/releases/latest -H "Accept: application/json" | jq -r .tag_name)
wget -qO "chart-releaser_${HELM_CHART_RELEASER_VERSION#v}_linux_$(dpkg --print-architecture).tar.gz" "https://github.com/helm/chart-releaser/releases/download/${HELM_CHART_RELEASER_VERSION}/chart-releaser_${HELM_CHART_RELEASER_VERSION#v}_linux_$(dpkg --print-architecture).tar.gz"
tar -zxf "chart-releaser_${HELM_CHART_RELEASER_VERSION#v}_linux_$(dpkg --print-architecture).tar.gz"
sudo install cr /usr/local/bin/
rm -f cr chart-releaser_1.4.1_linux_amd64.tar.gz

- name: Install Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-4 | bash

- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Package Chart
run: cr package deploy/helm/clickhouse-operator

- name: Resolve Helm release ID and NAME
run: |
RELEASE_ID="${{ github.event.release.id }}"
RELEASE_NAME="${{ github.event.release.name }}"
if [[ -z "${RELEASE_ID}" || -z "${RELEASE_NAME}" ]]; then

RELEASE_ID=$(curl -s -H "Accept: application/json" https://github.com/${{ github.repository }}/releases/${{ github.event.inputs.release_tag }} | jq .id)
RELEASE_NAME="${{ github.event.inputs.release_tag }}"
fi
echo "RELEASE_ID=$RELEASE_ID" >> "$GITHUB_ENV"
echo "RELEASE_NAME=$RELEASE_NAME" >> "$GITHUB_ENV"



- name: Get Release Assets
id: get_assets
run: |
CHART_PATH=$(ls .cr-release-packages/altinity-clickhouse-operator-*.tgz)
ASSET_NAME=$(basename ${CHART_PATH})
ASSET_ID=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets" | \
"https://api.github.com/repos/${{ github.repository }}/releases/${RELEASE_ID}/assets" | \
jq -r ".[] | select(.name == \"$ASSET_NAME\") | .id")

echo "Asset ID is $ASSET_ID"
Expand All @@ -51,7 +72,7 @@ jobs:
if: steps.get_assets.outputs.asset_id != ''
run: |
curl -X DELETE -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets/${{ steps.get_assets.outputs.asset_id }}"
"https://api.github.com/repos/${{ github.repository }}/releases/${RELEASE_ID}/assets/${{ steps.get_assets.outputs.asset_id }}"

- name: Upload Release Artifacts
run: |
Expand All @@ -61,7 +82,7 @@ jobs:
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/gzip" \
-T "${CHART_PATH}" \
"https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets?name=$(basename ${CHART_PATH})"
"https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets?name=$(basename ${CHART_PATH})"
- name: Validate Helm Repository Configuration
run: |
if [ -z "${{ secrets.HELM_GITHUB_TOKEN }}" ]; then
Expand Down Expand Up @@ -90,7 +111,7 @@ jobs:
cr upload \
--git-repo=${{ vars.HELM_GITHUB_REPOSITORY }} \
--owner=${GITHUB_REPOSITORY_OWNER} \
--release-name-template=${{ github.event.release.name }} \
--release-name-template=${RELEASE_NAME} \
--token=${{ secrets.HELM_GITHUB_TOKEN }} \
--package-path=.cr-release-packages \
--skip-existing
Expand All @@ -105,7 +126,7 @@ jobs:
cr index \
--git-repo=${GITHUB_REPOSITORY#*/} \
--owner=${GITHUB_REPOSITORY_OWNER} \
--release-name-template=${{ github.event.release.name }} \
--release-name-template=${RELEASE_NAME} \
--token=${{ secrets.GITHUB_TOKEN }} \
--index-path=index.yaml \
--remote=httpsorigin \
Expand Down Expand Up @@ -174,7 +195,7 @@ jobs:
cr index \
--git-repo=${{ vars.HELM_GITHUB_REPOSITORY }} \
--owner=${GITHUB_REPOSITORY_OWNER} \
--release-name-template=${{ github.event.release.name }} \
--release-name-template=${RELEASE_NAME} \
--token=${{ secrets.HELM_GITHUB_TOKEN }} \
--package-path=.cr-release-packages \
--index-path=index.yaml \
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ tests/image/cache
.aider*
CLAUDE.md
AGENTS.md
.claude
.claude

/.cr-release-packages
2 changes: 1 addition & 1 deletion deploy/helm/clickhouse-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ crdHook:
| serviceMonitor.clickhouseMetrics.metricRelabelings | list | `[]` | |
| serviceMonitor.clickhouseMetrics.relabelings | list | `[]` | |
| serviceMonitor.clickhouseMetrics.scrapeTimeout | string | `""` | |
| serviceMonitor.enabled | bool | `false` | ServiceMonitor Custom resource is created for a [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator) In serviceMonitor will be created two endpoints ch-metrics on port 8888 and op-metrics # 9999. Ypu can specify interval, scrapeTimeout, relabelings, metricRelabelings for each endpoint below |
| serviceMonitor.enabled | bool | `false` | ServiceMonitor Custom resource is created for a [prometheus-operator](https://github.com/prometheus-operator/prometheus-operator) In serviceMonitor will be created two endpoints ch-metrics on port 8888 and op-metrics # 9999. You can specify interval, scrapeTimeout, relabelings, metricRelabelings for each endpoint below |
| serviceMonitor.operatorMetrics.interval | string | `"30s"` | |
| serviceMonitor.operatorMetrics.metricRelabelings | list | `[]` | |
| serviceMonitor.operatorMetrics.relabelings | list | `[]` | |
Expand Down
14 changes: 7 additions & 7 deletions docs/chi-examples/70-chop-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,16 @@ spec:
# - to be included into a ClickHouse cluster
# respectfully before moving forward with host reconcile
wait:
exclude: true
queries: true
include: false
exclude: "true"
queries: "true"
include: "false"
# The operator during reconcile procedure should wait for replicas to catch-up
# replication delay a.k.a replication lag for the following replicas
replicas:
# All replicas (new and known earlier) are explicitly requested to wait for replication to catch-up
all: no
all: "no"
# New replicas only are requested to wait for replication to catch-up
new: yes
new: "yes"
# Replication catch-up is considered to be completed as soon as replication delay
# a.k.a replication lag - calculated as "MAX(absolute_delay) FROM system.replicas"
# is within this specified delay (in seconds)
Expand All @@ -172,11 +172,11 @@ spec:
# Whether the operator during host launch procedure should wait for startup probe to succeed.
# In case probe is unspecified wait is assumed to be completed successfully.
# Default option value is to do not wait.
startup: no
startup: "no"
# Whether the operator during host launch procedure should wait for readiness probe to succeed.
# In case probe is unspecified wait is assumed to be completed successfully.
# Default option value is to wait.
readiness: yes
readiness: "yes"

################################################
##
Expand Down
0