clickhouse-operator restarts after failing to get clickhouse-keeper.altinity.com/v1
When running the clickhouse-operator, the operator is restarting and causing issues in my k8s environment. The error in the logs before the restart is
│ ERROR controller-runtime.source.EventHandler failed to get informer from cache {"error": "failed to get API group resources: unable to retrieve the complete list of server APIs: clickhouse-keeper.altinity.com/v1: the server could not find the requested resource"}
Here is the configuration I am using when I run into this issue:
apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseInstallation"
metadata:
name: "my-cluster"
spec:
defaults:
templates:
dataVolumeClaimTemplate: default
podTemplate: clickhouse:19.6
configuration:
users:
default/password_sha256_hex: {{ .Values.defaultCredentials.passwordSha256 }}
clusters:
- name: my-cluster
secret:
auto: "true"
templates:
volumeClaimTemplates:
- name: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
podTemplates:
- name: clickhouse:19.6
spec:
containers:
- name: clickhouse-pod
image: clickhouse/clickhouse-server:22.3
Why would it be attempting to get information about the keeper when the cluster does not support replication / sharding?
Could say how did you install clickhouse-operator? Looks like you use unofficial customized helm chart and trying to upgrade clickhouse-operator image to 0.23.0? am i right?
Is there an official supported helm chart? I didn't see any mention of helm in the docs so I pushed the K8s resource definitions into charts.
I followed this step in the getting started guide to install the operator, which points to altinity/clickhouse-operator:latest
https://github.com/Altinity/clickhouse-operator/blob/master/docs/quick_start.md#in-case-you-can-not-run-scripts-from-the-internet-in-your-protected-environment
Looking at Docker Hub, it looks like the altinity/clickhouse-operator:latest tag points to 0.22, I had changed the latest locally to point to 0.23 to pin the version. I think this issue can be closed as the operator is running correctly now that I switched back to the 0.22 version.
Yes, 0.23.0 is not yet released
I didn't see any mention of helm in the docs
look into https://github.com/Altinity/clickhouse-operator/blob/master/docs/operator_installation_details.md#install-via-helm
If you will use operator helm chart you need separatelly install updated CRDs
I have same issue with operator helm chart 0.23.2. I have zookeeper instead of clickhouse-keeper. my changes to default values are:
operator.resources operator.metrics.resources secret.password configs.files.config.yaml.watch.namespaces: ["clickhouse-cip"] configs.files.config.yaml.user.default.password
ERROR controller-runtime.source.EventHandler failed to get informer from cache {"error": "failed to get API group resources: unable to retrieve the complete list of server APIs: clickhouse-keeper.altinity.com/v1: the server could not find the requested resource"} sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind).Start.func1.1
@ahmadubuntu read helm chart README https://github.com/Altinity/clickhouse-operator/tree/master/deploy/helm/ upgrade CRD separatelly this is Helm architecture problem