Skip to content

Commit

Permalink
feat: make it possible to configure services separately
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsens committed Oct 30, 2023
1 parent 7a780c6 commit d02bb1a
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 70 deletions.
2 changes: 1 addition & 1 deletion charts/drill/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: drill
version: 1.2.6
version: 1.2.7
appVersion: 1.21.1
description: Helm Charts for deploying Apache Drill Clusters on Kubernetes
icon: https://raw.githubusercontent.com/wearefrank/charts/master/charts/drill/icon.svg
Expand Down
35 changes: 19 additions & 16 deletions charts/drill/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,22 +153,21 @@ Enable autoscaling by editing the autoscale section in `drill/values.yaml` file.

### Traffic Exposure Parameters

| Name | Description | Value |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| `service.type` | Drill service type | `ClusterIP` |
| `service.webPort` | Needed for the Drill Web UI. | `80` |
| `service.userPort` | User port address. Used between nodes in a Drill cluster. Needed for an external client, such as Tableau, to connect into the cluster nodes. Also needed for the Drill Web UI. | `31010` |
| `service.controlPort` | Control port address. Used between nodes in a Drill cluster. Needed for multi-node installation of Apache Drill. | `31011` |
| `service.dataPort` | Data port address. Used between nodes in a Drill cluster. Needed for multi-node installation of Apache Drill. | `31012` |
| `ingress.enabled` | Enable ingress record generation for Frank! | `false` |
| `ingress.className` | IngressClass that will be used to implement the Ingress (Kubernetes 1.18+) | `""` |
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations. | `{}` |
| `ingress.hosts` | Set hosts for ingress | `[]` |
| `ingress.hosts.host` | Set hostname | `""` |
| `ingress.hosts.paths` | Set multiple paths | `[]` |
| `ingress.hosts.paths.path` | Set path (context url) | `""` |
| `ingress.hosts.paths.pathType` | Set type of path | `""` |
| `ingress.tls` | Define tls secrets for hosts (implementation not done yet) | `[]` |
| Name | Description | Value |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| `service.web.type` | Drill Web service type | `ClusterIP` |
| `service.web.port` | Drill Web service port | `80` |
| `service.user.type` | Drill User Api service type | `ClusterIP` |
| `service.user.port` | Drill User Api service port | `31010` |
| `ingress.enabled` | Enable ingress record generation for Drill | `false` |
| `ingress.className` | IngressClass that will be used to implement the Ingress (Kubernetes 1.18+) | `""` |
| `ingress.annotations` | Additional annotations for the Ingress resource. To enable certificate auto-generation, place here your cert-manager annotations. | `{}` |
| `ingress.hosts` | Set hosts for ingress | `[]` |
| `ingress.hosts.host` | Set hostname | `""` |
| `ingress.hosts.paths` | Set multiple paths | `[]` |
| `ingress.hosts.paths.path` | Set path (context url) | `""` |
| `ingress.hosts.paths.pathType` | Set type of path | `""` |
| `ingress.tls` | Define tls secrets for hosts (implementation not done yet) | `[]` |

### Other Parameters

Expand Down Expand Up @@ -251,6 +250,10 @@ Make sure that ZooKeeper is persistent if you want to keep changes in the Web UI

## Notable changes

### 1.2.7

The notation for `.Values.service` has been changed. This makes it possible to configure `web` and `user` services separately.

### 1.2.6

`.Values.replicaCount` has been changed from `3` to `1`. This is to default to a less complex install.
Expand Down
34 changes: 22 additions & 12 deletions charts/drill/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
apiVersion: v1
kind: Service
{{ template "drill.metadata" . }}
metadata:
name: {{ include "drill.fullname" . }}-web
labels:
{{- include "drill.labels" . | nindent 4 }}
spec:
sessionAffinity: ClientIP
ports:
- name: http
port: {{ .Values.service.webPort }}
port: {{ .Values.service.web.port }}
targetPort: 8047
- name: user
port: {{ .Values.service.userPort }}
targetPort: 31010
- name: control
port: {{ .Values.service.controlPort }}
targetPort: 31011
- name: data
port: {{ add .Values.service.dataPort 2 }}
targetPort: 31012
type: {{ .Values.service.type }}
type: {{ .Values.service.web.type }}
selector:
{{- include "drill.selectorLabels" . | nindent 4 }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "drill.fullname" . }}-user
labels:
{{- include "drill.labels" . | nindent 4 }}
spec:
sessionAffinity: ClientIP
ports:
- name: user
port: {{ .Values.service.user.port }}
targetPort: 31010
type: {{ .Values.service.user.type }}
selector:
{{- include "drill.selectorLabels" . | nindent 4 }}
55 changes: 30 additions & 25 deletions charts/drill/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,30 +197,35 @@
"service": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Drill service type",
"default": "ClusterIP"
},
"webPort": {
"type": "number",
"description": "Needed for the Drill Web UI.",
"default": 80
},
"userPort": {
"type": "number",
"description": "User port address. Used between nodes in a Drill cluster. Needed for an external client, such as Tableau, to connect into the cluster nodes. Also needed for the Drill Web UI.",
"default": 31010
},
"controlPort": {
"type": "number",
"description": "Control port address. Used between nodes in a Drill cluster. Needed for multi-node installation of Apache Drill.",
"default": 31011
"web": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Drill Web service type",
"default": "ClusterIP"
},
"port": {
"type": "number",
"description": "Drill Web service port",
"default": 80
}
}
},
"dataPort": {
"type": "number",
"description": "Data port address. Used between nodes in a Drill cluster. Needed for multi-node installation of Apache Drill.",
"default": 31012
"user": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Drill User Api service type",
"default": "ClusterIP"
},
"port": {
"type": "number",
"description": "Drill User Api service port",
"default": 31010
}
}
}
}
},
Expand Down Expand Up @@ -259,7 +264,7 @@
},
"enabled": {
"type": "boolean",
"description": "Enable ingress record generation for Frank!",
"description": "Enable ingress record generation for Drill",
"default": false
},
"className": {
Expand All @@ -269,7 +274,7 @@
},
"annotations": {
"type": "object",
"description": "Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.",
"description": "Additional annotations for the Ingress resource. To enable certificate auto-generation, place here your cert-manager annotations.",
"default": {}
},
"tls": {
Expand Down
31 changes: 15 additions & 16 deletions charts/drill/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,35 +142,34 @@ timeZone: Etc/UTC
## Drill service parameters
##
service:
## @param service.type Drill service type
## Drill Web UI
## @param service.web.type Drill Web service type
## @param service.web.port Drill Web service port
##
type: ClusterIP
## @param service.webPort Needed for the Drill Web UI.
web:
type: ClusterIP
port: 80
## Drill User Api for external client, such as Tableau, to connect into the cluster nodes.
## @param service.user.type Drill User Api service type
## @param service.user.port Drill User Api service port
##
webPort: 80
## @param service.userPort User port address. Used between nodes in a Drill cluster. Needed for an external client, such as Tableau, to connect into the cluster nodes. Also needed for the Drill Web UI.
##
userPort: 31010
## @param service.controlPort Control port address. Used between nodes in a Drill cluster. Needed for multi-node installation of Apache Drill.
##
controlPort: 31011
## @param service.dataPort Data port address. Used between nodes in a Drill cluster. Needed for multi-node installation of Apache Drill.
##
dataPort: 31012
user:
type: ClusterIP
port: 31010

## Configure the ingress resource that allows you to access the Drill installation
## Configure the ingress resource that allows you to access the Drill Web UI
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
##
ingress:
## @param ingress.enabled Enable ingress record generation for Frank!
## @param ingress.enabled Enable ingress record generation for Drill
##
enabled: false
## @param ingress.className IngressClass that will be used to implement the Ingress (Kubernetes 1.18+)
## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
##
className: ""
## @param ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.
## @param ingress.annotations Additional annotations for the Ingress resource. To enable certificate auto-generation, place here your cert-manager annotations.
## For a full list of possible ingress annotations, please see
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
## Use this parameter to set the required annotations for cert-manager, see
Expand Down

0 comments on commit d02bb1a

Please sign in to comment.