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

Set appProtocol for service resources (compatibility with service mesh) #186

Open
fnkr opened this issue Oct 21, 2022 · 0 comments
Open

Comments

@fnkr
Copy link

fnkr commented Oct 21, 2022

Hi. Currently there is no way to specify the appProtocol for services created by the operator. Unfortunately Microsoft's service mesh (Open Service Mesh) assumes the appProtocol is HTTP, which breaks Kafka and ZooKeeper. Please add appProtocol to all service ports or offer a way to customize it (e.g. something like podTemplate in the CRD but for the services).

Application protocol

FEATURE STATE: Kubernetes v1.20 [stable]

The appProtocol field provides a way to specify an application protocol for each Service port. The value of this field is mirrored by the corresponding Endpoints and EndpointSlice objects.

This field follows standard Kubernetes label syntax. Values should either be IANA standard service names or domain prefixed names such as mycompany.com/my-custom-protocol.

e.g.

apiVersion: v1
kind: Service
metadata:
  name: kafka
spec:
  ports:
  - name: external
    port: 9092
    protocol: tcp
    appProtocol: tcp
    targetPort: 9092
  - name: http-external
    port: 8090
    protocol: tcp
    appProtocol: http
    targetPort: 8090
  - name: internal
    port: 9071
    protocol: tcp
    appProtocol: tcp
    targetPort: 9071
  - name: jmx
    port: 7203
    protocol: tcp
    appProtocol: tcp
    targetPort: 7203
  - name: jolokia
    port: 7777
    protocol: tcp
    appProtocol: http
    targetPort: 7777
  - name: prometheus
    port: 7778
    protocol: tcp
    appProtocol: http
    targetPort: 7778
  - name: replication
    port: 9072
    protocol: tcp
    appProtocol: tcp
    targetPort: 9072
apiVersion: v1
kind: Service
metadata:
  name: zookeeper
spec:
  ports:
  - name: client
    port: 2181
    protocol: tcp
    appProtocol: tcp
    targetPort: 2181
  - name: jmx
    port: 7203
    protocol: tcp
    appProtocol: tcp
    targetPort: 7203
  - name: jolokia
    port: 7777
    protocol: tcp
    appProtocol: http
    targetPort: 7777
  - name: leader-election
    port: 3888
    protocol: tcp
    appProtocol: tcp
    targetPort: 3888
  - name: peer
    port: 2888
    protocol: tcp
    appProtocol: tcp
    targetPort: 2888
  - name: prometheus
    port: 7778
    protocol: tcp
    appProtocol: http
    targetPort: 7778
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

1 participant