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

operator error #1374

Closed
dxygit1 opened this issue Mar 13, 2024 · 3 comments
Closed

operator error #1374

dxygit1 opened this issue Mar 13, 2024 · 3 comments

Comments

@dxygit1
Copy link

dxygit1 commented Mar 13, 2024

With added volumeMounts, the operator throws the following error:

 err: Operation cannot be fulfilled on clickhousekeeperinstallations.clickhouse-keeper.altinity.com "clickhouse-keeper": the object has been modified; please apply your changes to the latest version and try again

deploy

apiVersion: "clickhouse-keeper.altinity.com/v1"
kind: "ClickHouseKeeperInstallation"
metadata:
  name: clickhouse-keeper
spec:
  configuration:
    clusters:
      - name: {{ .Values.clickhouse.clusters.name}}
        layout:
          replicasCount: 3
    settings:
      logger/level: "trace"
      logger/console: "true"
      listen_host: "0.0.0.0"
      keeper_server/storage_path: /var/lib/clickhouse-keeper
      keeper_server/tcp_port: "2181"
      keeper_server/four_letter_word_white_list: "*"
      keeper_server/coordination_settings/raft_logs_level: "information"
      keeper_server/raft_configuration/server/port: "9444"
      prometheus/endpoint: "/metrics"
      prometheus/port: "7000"
      prometheus/metrics: "true"
      prometheus/events: "true"
      prometheus/asynchronous_metrics: "true"
      prometheus/status_info: "false"
  templates:
    podTemplates:
      - name: clickhouse-keeper
        spec:
          # affinity removed to allow use in single node test environment
          affinity:
            podAntiAffinity:
              requiredDuringSchedulingIgnoredDuringExecution:
                - labelSelector:
                    matchExpressions:
                      - key: "app"
                        operator: In
                        values:
                          - clickhouse-keeper
                  topologyKey: "kubernetes.io/hostname"
          containers:
            - name: clickhouse-keeper
              imagePullPolicy: IfNotPresent
              image: "altinity/clickhouse-keeper:23.8.8.21.altinitystable"
              resources:
                requests:
                  memory: "256M"
                  cpu: "1"
                limits:
                  memory: "4Gi"
                  cpu: "2"
              volumeMounts:
                - mountPath: /var/lib/clickhouse-keeper
                  name: working-dir
    volumeClaimTemplates:
      - name: working-dir
        spec:
          storageClassName: {{ .Values.global.acos.storageClass }}
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 10G
@dxygit1
Copy link
Author

dxygit1 commented Mar 13, 2024

If volumeMounts are not added, there will be errors related to PVC. I just want to add a PVC mounted to /var/lib/clickhouse-keeper

 failed to get pvc by name acos/both-paths: persistentvolumeclaim "both-paths" not found
failed to get pvc by name acos/log-storage-path: persistentvolumeclaim "log-storage-path" not found

deploy

apiVersion: "clickhouse-keeper.altinity.com/v1"
kind: "ClickHouseKeeperInstallation"
metadata:
  name: clickhouse-keeper
spec:
  configuration:
    clusters:
      - name: {{ .Values.clickhouse.clusters.name}}
        layout:
          replicasCount: 3
    settings:
      logger/level: "trace"
      logger/console: "true"
      listen_host: "0.0.0.0"
      keeper_server/storage_path: /var/lib/clickhouse-keeper
      keeper_server/tcp_port: "2181"
      keeper_server/four_letter_word_white_list: "*"
      keeper_server/coordination_settings/raft_logs_level: "information"
      keeper_server/raft_configuration/server/port: "9444"
      prometheus/endpoint: "/metrics"
      prometheus/port: "7000"
      prometheus/metrics: "true"
      prometheus/events: "true"
      prometheus/asynchronous_metrics: "true"
      prometheus/status_info: "false"
  templates:
    podTemplates:
      - name: clickhouse-keeper
        spec:
          # affinity removed to allow use in single node test environment
          affinity:
            podAntiAffinity:
              requiredDuringSchedulingIgnoredDuringExecution:
                - labelSelector:
                    matchExpressions:
                      - key: "app"
                        operator: In
                        values:
                          - clickhouse-keeper
                  topologyKey: "kubernetes.io/hostname"
          securityContext:
            fsGroup: 101
            runAsUser: 101
          containers:
            - name: clickhouse-keeper
              imagePullPolicy: IfNotPresent
              image: "altinity/clickhouse-keeper:23.8.8.21.altinitystable"
              resources:
                requests:
                  memory: "256M"
                  cpu: "1"
                limits:
                  memory: "4Gi"
                  cpu: "2"

    volumeClaimTemplates:
      - name: working-dir
        spec:
          storageClassName: {{ .Values.global.acos.storageClass }}
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 10G

@alex-zaitsev
Copy link
Member

Duplicate #1362

@jirislav
Copy link
Contributor

jirislav commented Aug 2, 2024

I have found the same operator error after POD annotations are dropped (by the operator itself):

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

3 participants