Skip to content

2.23.1.0-b206

Summary:
Added namespaced service support for tserver/master.
- When the service `scope` is inferred as `Namespaced` we will only create one service in the namespace instead of having a per-AZ service.
- The Namespaced service resource is created with `helm.sh/resource-policy: keep` so that helm uninstall does not remove it on uninstall. The service delete should to be explicitly handled with `kubectl delete`.
- In case the owner AZ is deleted, the service should be annotated with a helm release with this annotation: `meta.helm.sh/release-name`.
- The service does not have a zone label.

Helm changes:
- `defaultServiceScope` controls the default value of scope if not provided in the service definition itself.
- Scope can be defined per service also, the service definitions support a `scope` parameter.

Helm values:

```
## Default service scope to use if not defined in service endpoint definition.
## Can be "Namespaced"/"AZ"
defaultServiceScope: "AZ"

serviceEndpoints:
  - name: "yb-master-ui"
    type: LoadBalancer
    # Can be AZ/Namespaced
    scope: "AZ"
    annotations: {}
    clusterIP: ""
    ## Sets the Service's externalTrafficPolicy
    externalTrafficPolicy: ""
    app: "yb-master"
    loadBalancerIP: ""
    ports:
      http-ui: "7000"

  - name: "yb-tserver-service"
    type: LoadBalancer
    # Can be AZ/Namespaced
    scope: "AZ"
    annotations: {}
    clusterIP: ""
    ## Sets the Service's externalTrafficPolicy
    externalTrafficPolicy: ""
    app: "yb-tserver"
    loadBalancerIP: ""
    ports:
      tcp-yql-port: "9042"
      tcp-yedis-port: "6379"
      tcp-ysql-port: "5433"
```

Test Plan: Verified Namespaced service comes up uniquely across AZs with correct annotation and labels.

Reviewers: anijhawan, bgandhi

Reviewed By: anijhawan, bgandhi

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D34771
Assets 2
Loading