8000 Update default port names to Istio friendly names by brosenfi · Pull Request #1984 · Altinity/clickhouse-operator · GitHub
[go: up one dir, main page]

Skip to content

Update default port names to Istio friendly names - #1984

Closed
brosenfi wants to merge 2 commits into
Altinity:0.28.0from
brosenfi:istio_friendly_port_names
Closed

brosenfi wants to merge 2 commits into
Altinity:0.28.0from
brosenfi:istio_friendly_port_names

Conversation

@brosenfi
Copy link
Copy Markdown

Update default port names to more Istio friendly names indicating the app protocol.

Note I did not update the "interserver" port name as there appears to be indirectly linked references (within the operator) using that name - I had a local deployment fail when updating this name to "http-interserver". Also, istio's app protocol auto-detection seems to work fine for this interserver connection.

… app protocol.

Signed-off-by: Brian Rosenfield <brosenfi@yahoo.com>
@sunsingerus
Copy link
Copy Markdown
Collaborator

what is the motivation for these changes?

@brosenfi
Copy link
Copy Markdown
Author

Hi @sunsingerus - adding the ability to run this operator within istio enabled clusters. We have noticed without these name changes that istio / envoy is not auto-detecting the protocols successfully in our environment ( see this description concerning istio's app protocol selection and app protocol selection as part of the name).

@sunsingerus sunsingerus added the planned for review This feature is planned for review label May 26, 2026
@sunsingerus sunsingerus removed the planned for review This feature is planned for review label Jul 16, 2026
@Slach
Slach changed the base branch from 0.27.0 to 0.28.0 November 3, 2026 05:00
@Slach
Slach commented Nov 6, 2026
Copy link
Copy Markdown
Collaborator

@brosenfi thanks for the PR, but we will not merge it, reasons

Istio appProtocol has precedence over port name https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/
and it already works on 0.28.0 via serviceTemplates, operator copies service template spec as is

apiVersion: clickhouse.altinity.com/v1
kind: ClickHouseInstallation
metadata:
  name: demo
spec:
  defaults:
    templates:
      serviceTemplate: chi-svc
      replicaServiceTemplate: host-svc
  templates:
    serviceTemplates:
      - name: chi-svc
        spec:
          type: ClusterIP
          clusterIP: None
          ports:
            - { name: http, port: 8123, targetPort: http, appProtocol: http }
            - { name: tcp,  port: 9000, targetPort: tcp,  appProtocol: tcp }
      - name: host-svc
        spec:
          type: ClusterIP
          clusterIP: None
          publishNotReadyAddresses: true
          ports:
            - { name: http,        port: 8123, appProtocol: http }
            - { name: tcp,         port: 9000, appProtocol: tcp }
            - { name: interserver, port: 9009, appProtocol: http }
            # secure: yes
            # - { name: https,        port: 8443, appProtocol: https }
            # - { name: secureclient, port: 9440, appProtocol: tls }
apiVersion: clickhouse-keeper.altinity.com/v1
kind: ClickHouseKeeperInstallation
metadata:
  name: keeper
spec:
  defaults:
    templates:
      serviceTemplate: chk-svc
  templates:
    serviceTemplates:
      - name: chk-svc
        spec:
          type: ClusterIP
          clusterIP: None
          ports:
            - { name: zk,   port: 2181, targetPort: zk,   appProtocol: tcp }
            - { name: raft, port: 9444, targetPort: raft, appProtocol: tcp }

replicaServiceTemplate shall contain all ports, operator doesn't add default ports into templated service
for CHK replicaServiceTemplate replaces default pair of per-host services (peer + -client), so better set appProtocol only on CR level service

for existing LoadBalancer / NodePort services appProtocol will apply only after service recreate

feel free to reopen if you still have questions

@Slach Slach closed this Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0