Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm chart #837

Closed
ganievs opened this issue Dec 20, 2021 · 9 comments
Closed

Helm chart #837

ganievs opened this issue Dec 20, 2021 · 9 comments

Comments

@ganievs
Copy link

ganievs commented Dec 20, 2021

HI guys!
The issue is created in continue to PR #836
I've tested it in some basic configuration with replicated and sharded installation of clickhouse.

@esselius
Copy link

esselius commented Feb 4, 2022

I would love an official helm chart, currently I'm using slamdevs chart, which is fine, but it doesn't seem maintained anymore and is starting to lag in versions

@Slach
Copy link
Collaborator

Slach commented Feb 4, 2022

@navi86
Copy link

navi86 commented Apr 2, 2022

@Slach
helmify simply puts lots of things inside variable, it will be really hard to use this chart :(
for instance, variable "defaultPodTemplateYamlExample":

`
defaultPodTemplateYamlExample: |

apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseInstallationTemplate"
metadata:
  name: "default-oneperhost-pod-template"
spec:
  templates:
    podTemplates: 
      - name: default-oneperhost-pod-template
        distribution: "OnePerHost"

`
so it gives some possibility to override something but I think, this is error prone concept of using helm chart.
Do you use script for generating "clickhouse-operator-install-bundle.yaml" ?

@Slach
Copy link
Collaborator

Slach commented Apr 2, 2022

Do you use script for generating "clickhouse-operator-install-bundle.yaml" ?

Yes look to https://github.com/Altinity/clickhouse-operator/tree/0.18.2/deploy/builder/

@Bluesboy
Copy link

Bluesboy commented Apr 9, 2022

Hey guys! I have task to deploy clickhouse cluster with integrated clickhouse-backup and I'm writing chart for this and will like to share it. As I understand, problem is you want chart to be generated from some kind of templates, where can I look at your standard process, maybe I can help?

@Slach
Copy link
Collaborator

Slach commented Apr 9, 2022

@Bluesboy look to Yes look to https://github.com/Altinity/clickhouse-operator/tree/0.18.2/deploy/builder/
try to understand how it works to generate bundle.yaml
try to make script which got temaplates and created two separate charts
first install crds + clickhouse-operator
second for install kind: ClickHouseInstallation wich requireme first chart

@ganievs
Copy link
Author

ganievs commented May 6, 2022

Hi all! Sorry for delay, I've opened a new draft PR #925 with chart generation.
First of all I faced with a problem. I've error when I run helm lint.
[ERROR] templates/: parse error at (clickhouse-operator/templates/etc-clickhouse-operator-usersd-files.yaml:10): ".01C"
Helm can't parse the values what starting with number, like .Values.etcClickhouseOperatorUsersdFiles.02ClickhouseDefaultProfileXml
Do you have any ideas how to solve that?

@spectrogram
Copy link

@ganievs If you're still stuck on this, I think I was able to work around the problem by renaming the files the variables are named after. Note that I have only tested this in a sandbox environment and not production, but it seems to work the same.

Here's a quick and dirty script to do the necessary renames, put it in deploy/helm:

#!/bin/bash

mv ../builder/templates-config/config.d/01-clickhouse-01-listen.xml ../builder/templates-config/config.d/a-clickhouse-01-listen.xml
mv ../builder/templates-config/config.d/01-clickhouse-02-logger.xml ../builder/templates-config/config.d/b-clickhouse-02-logger.xml
mv ../builder/templates-config/config.d/01-clickhouse-03-query_log.xml ../builder/templates-config/config.d/c-clickhouse-03-query_log.xml
mv ../builder/templates-config/config.d/01-clickhouse-04-part_log.xml ../builder/templates-config/config.d/d-clickhouse-04-part_log.xml

mv ../builder/templates-config/templates.d/001-templates.json.example ../builder/templates-config/templates.d/a-templates.json.example

mv ../builder/templates-config/users.d/01-clickhouse-user.xml ../builder/templates-config/users.d/a-clickhouse-user.xml
mv ../builder/templates-config/users.d/02-clickhouse-default-profile.xml ../builder/templates-config/users.d/b-clickhouse-default-profile.xml
mv ../builder/templates-config/users.d/03-database-ordinary.xml ../builder/templates-config/users.d/c-database-ordinary.xml

I'm sure this script could be improved so it doesn't need to be updated if more files are added.
Remember to rebuild the operator files by running deploy/builder/build-clickhouse-operator-configs.sh and deploy/builder/build-clickhouse-operator-install-yaml.sh afterward.

@alex-zaitsev
Copy link
Member

Helm chart is available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants