Skip to content

Commit

Permalink
Expose more configuration through values.yaml files (#6320)
Browse files Browse the repository at this point in the history
* Expose more configuration through values.yaml files

* Add bumpversion config for helm chart
  • Loading branch information
jonstacks authored Sep 24, 2021
1 parent 6f1bd71 commit 41157f7
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 30 deletions.
4 changes: 4 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ serialize =
[bumpversion:file:kube/overlays/stable-with-resource-limits/.env]

[bumpversion:file:kube/overlays/stable-with-resource-limits/kustomization.yaml]

[bumpversion:file:charts/airbyte/Chart.yaml]

[bumpversion:file:charts/airbyte/values.yaml]
4 changes: 2 additions & 2 deletions charts/airbyte/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.2.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.29.13-alpha"
appVersion: "0.29.21-alpha"

dependencies:
- name: common
Expand Down
21 changes: 15 additions & 6 deletions charts/airbyte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

### Global Parameters

| Name | Description | Value |
| --------------------- | -------------------------------------------- | ----- |
| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` |
| Name | Description | Value |
| ---------------------- | -------------------------------------------- | ----- |
| `global.imageRegistry` | Global Docker image registry | `""` |
| `global.storageClass` | Global StorageClass for Persistent Volume(s) | `""` |


### Common Parameters
Expand All @@ -18,6 +19,7 @@
| `serviceAccount.annotations` | Annotations for service account. Evaluated as a template. Only used if `create` is `true`. | `{}` |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
| `serviceAccount.name` | Name of the service account to use. If not set and create is true, a name is generated using the fullname template. | `airbyte-admin` |
| `version` | Sets the AIRBYTE_VERSION environment variable. Defaults to Chart.AppVersion. | `""` |


### Webapp Parameters
Expand All @@ -27,7 +29,7 @@
| `webapp.replicaCount` | Number of webapp replicas | `1` |
| `webapp.image.repository` | The repository to use for the airbyte webapp image. | `airbyte/webapp` |
| `webapp.image.pullPolicy` | the pull policy to use for the airbyte webapp image | `IfNotPresent` |
| `webapp.image.tag` | The airbyte webapp image tag. Defaults to the chart's AppVersion | `0.29.13-alpha` |
| `webapp.image.tag` | The airbyte webapp image tag. Defaults to the chart's AppVersion | `0.29.21-alpha` |
| `webapp.podAnnotations` | Add extra annotations to the scheduler pod | `{}` |
| `webapp.service.type` | The service type to use for the webapp service | `ClusterIP` |
| `webapp.service.port` | The service port to expose the webapp on | `80` |
Expand All @@ -41,6 +43,11 @@
| `webapp.ingress.annotations` | Ingress annotations done as key:value pairs | `{}` |
| `webapp.ingress.hosts` | The list of hostnames to be covered with this ingress record. | `[]` |
| `webapp.ingress.tls` | Custom ingress TLS configuration | `[]` |
| `webapp.api.url` | The webapp API url. | `/api/v1/` |
| `webapp.isDemo` | Set to true if this is a demo | `false` |
| `webapp.fullstory.enabled` | Whether or not to enable fullstory | `false` |
| `webapp.openreplay.enabled` | Whether or not to enable openreplay | `false` |
| `webapp.storytime.enabled` | Whether or not to enable Papercups storytime | `false` |


### Scheduler Parameters
Expand All @@ -50,12 +57,13 @@
| `scheduler.replicaCount` | Number of scheduler replicas | `1` |
| `scheduler.image.repository` | The repository to use for the airbyte scheduler image. | `airbyte/scheduler` |
| `scheduler.image.pullPolicy` | the pull policy to use for the airbyte scheduler image | `IfNotPresent` |
| `scheduler.image.tag` | The airbyte scheduler image tag. Defaults to the chart's AppVersion | `0.29.13-alpha` |
| `scheduler.image.tag` | The airbyte scheduler image tag. Defaults to the chart's AppVersion | `0.29.21-alpha` |
| `scheduler.podAnnotations` | Add extra annotations to the scheduler pod | `{}` |
| `scheduler.resources.limits` | The resources limits for the scheduler container | `{}` |
| `scheduler.resources.requests` | The requested resources for the scheduler container | `{}` |
| `scheduler.nodeSelector` | Node labels for pod assignment | `{}` |
| `scheduler.tolerations` | Tolerations for scheduler pod assignment. | `[]` |
| `scheduler.log.level` | The log level to log at. | `INFO` |


### Pod Sweeper parameters
Expand All @@ -79,7 +87,7 @@
| `server.replicaCount` | Number of server replicas | `1` |
| `server.image.repository` | The repository to use for the airbyte server image. | `airbyte/server` |
| `server.image.pullPolicy` | the pull policy to use for the airbyte server image | `IfNotPresent` |
| `server.image.tag` | The airbyte server image tag. Defaults to the chart's AppVersion | `0.29.13-alpha` |
| `server.image.tag` | The airbyte server image tag. Defaults to the chart's AppVersion | `0.29.21-alpha` |
| `server.podAnnotations` | Add extra annotations to the server pod | `{}` |
| `server.livenessProbe.enabled` | Enable livenessProbe on the server | `true` |
| `server.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
Expand All @@ -102,6 +110,7 @@
| `server.persistence.storageClass` | The storage class to use for the airbyte server pvc | `""` |
| `server.nodeSelector` | Node labels for pod assignment | `{}` |
| `server.tolerations` | Tolerations for server pod assignment. | `[]` |
| `server.log.level` | The log level to log at | `INFO` |


### Temporal parameters
Expand Down
28 changes: 28 additions & 0 deletions charts/airbyte/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,31 @@ Add environment variables to configure minio
{{- $port := (include "airbyte.minio.port" .) -}}
{{- printf "http://%s:%s" $host $port -}}
{{- end -}}

{{/*
Returns the Airbyte Scheduler Image
*/}}
{{- define "airbyte.schedulerImage" -}}
{{- include "common.images.image" (dict "imageRoot" .Values.scheduler.image "global" .Values.global) -}}
{{- end -}}

{{/*
Returns the Airbyte Server Image
*/}}
{{- define "airbyte.serverImage" -}}
{{- include "common.images.image" (dict "imageRoot" .Values.server.image "global" .Values.global) -}}
{{- end -}}

{{/*
Returns the Airbyte Webapp Image
*/}}
{{- define "airbyte.webappImage" -}}
{{- include "common.images.image" (dict "imageRoot" .Values.webapp.image "global" .Values.global) -}}
{{- end -}}

{{/*
Returns the Airbyte podSweeper Image
*/}}
{{- define "airbyte.podSweeperImage" -}}
{{- include "common.images.image" (dict "imageRoot" .Values.podSweeper.image "global" .Values.global) -}}
{{- end -}}
13 changes: 6 additions & 7 deletions charts/airbyte/templates/env-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ kind: ConfigMap
metadata:
name: airbyte-env
data:
AIRBYTE_VERSION: {{ .Chart.AppVersion }}
API_URL: /api/v1/
AIRBYTE_VERSION: {{ .Values.version | default .Chart.AppVersion }}
API_URL: {{ .Values.webapp.api.url }}
AWS_ACCESS_KEY_ID: {{ .Values.minio.accessKey.password }}
AWS_SECRET_ACCESS_KEY: {{ .Values.minio.secretKey.password }}
CONFIG_ROOT: /configs
Expand All @@ -16,15 +16,14 @@ data:
DATABASE_URL: {{ include "airbyte.database.url" . | quote }}
DATABASE_USER: {{ include "airbyte.database.user" . }}
DB_DOCKER_MOUNT: airbyte_db
FULLSTORY: enabled
FULLSTORY: {{ ternary "enabled" "disabled" .Values.webapp.fullstory.enabled }}
GCP_STORAGE_BUCKET: ""
GOOGLE_APPLICATION_CREDENTIALS: ""
INTERNAL_API_HOST: {{ include "common.names.fullname" . }}-server:{{ .Values.server.service.port }}
IS_DEMO: "false"
IS_DEMO: {{ ternary "true" "false" .Values.webapp.isDemo | quote }}
LOCAL_ROOT: /tmp/airbyte_local
LOG_LEVEL: INFO
OPENREPLAY: enabled
PAPERCUPS_STORYTIME: enabled
OPENREPLAY: {{ ternary "enabled" "disabled" .Values.webapp.openreplay.enabled }}
PAPERCUPS_STORYTIME: {{ ternary "enabled" "disabled" .Values.webapp.storytime.enabled }}
RESOURCE_CPU_LIMIT: ""
RESOURCE_CPU_REQUEST: ""
RESOURCE_MEMORY_LIMIT: ""
Expand Down
2 changes: 1 addition & 1 deletion charts/airbyte/templates/pod-sweeper/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
{{- end }}
containers:
- name: airbyte-pod-sweeper
image: "{{ .Values.podSweeper.image.repository }}:{{ .Values.podSweeper.image.tag}}"
image: {{ include "airbyte.podSweeperImage" . }}
imagePullPolicy: "{{ .Values.podSweeper.image.pullPolicy }}"
env:
- name: KUBE_NAMESPACE
Expand Down
7 changes: 2 additions & 5 deletions charts/airbyte/templates/scheduler/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
{{- end }}
containers:
- name: airbyte-scheduler-container
image: "{{ .Values.scheduler.image.repository }}:{{ default .Chart.AppVersion .Values.scheduler.image.tag }}"
image: {{ include "airbyte.schedulerImage" . }}
imagePullPolicy: "{{ .Values.scheduler.image.pullPolicy }}"
env:
- name: AIRBYTE_VERSION
Expand Down Expand Up @@ -101,10 +101,7 @@ spec:
name: airbyte-env
key: TEMPORAL_WORKER_PORTS
- name: LOG_LEVEL
valueFrom:
configMapKeyRef:
name: airbyte-env
key: LOG_LEVEL
value: "{{ .Values.scheduler.log.level }}"
- name: KUBE_NAMESPACE
valueFrom:
fieldRef:
Expand Down
7 changes: 2 additions & 5 deletions charts/airbyte/templates/server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
{{- end }}
containers:
- name: airbyte-server-container
image: "{{ .Values.server.image.repository }}:{{ default .Chart.AppVersion .Values.server.image.tag }}"
image: {{ include "airbyte.serverImage" . }}
imagePullPolicy: "{{ .Values.server.image.pullPolicy }}"
env:
- name: AIRBYTE_VERSION
Expand Down Expand Up @@ -92,10 +92,7 @@ spec:
name: airbyte-env
key: TEMPORAL_HOST
- name: LOG_LEVEL
valueFrom:
configMapKeyRef:
name: airbyte-env
key: LOG_LEVEL
value: "{{ .Values.scheduler.log.level }}"
- name: RESOURCE_CPU_REQUEST
valueFrom:
configMapKeyRef:
Expand Down
2 changes: 1 addition & 1 deletion charts/airbyte/templates/webapp/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
{{- end }}
containers:
- name: airbyte-webapp-container
image: "{{ .Values.webapp.image.repository }}:{{ default .Chart.AppVersion .Values.webapp.image.tag }}"
image: {{ include "airbyte.webappImage" . }}
imagePullPolicy: "{{ .Values.webapp.image.pullPolicy }}"
env:
- name: AIRBYTE_VERSION
Expand Down
39 changes: 36 additions & 3 deletions charts/airbyte/values.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
## @section Global Parameters

## @param global.imageRegistry Global Docker image registry
## @param global.storageClass Global StorageClass for Persistent Volume(s)
##
global:
imageRegistry: ""
storageClass: ""

## @section Common Parameters
Expand All @@ -25,6 +27,11 @@ serviceAccount:
annotations: {}
name: airbyte-admin

## @param version Sets the AIRBYTE_VERSION environment variable. Defaults to Chart.AppVersion.
## If changing the image tags below, you should probably also update this.
version: ""


## @section Webapp Parameters

webapp:
Expand All @@ -37,7 +44,7 @@ webapp:
image:
repository: airbyte/webapp
pullPolicy: IfNotPresent
tag: 0.29.13-alpha
tag: 0.29.21-alpha

## @param webapp.podAnnotations [object] Add extra annotations to the scheduler pod
##
Expand Down Expand Up @@ -103,6 +110,24 @@ webapp:
# hosts:
# - chart-example.local

## @param webapp.api.url The webapp API url.
api:
url: /api/v1/

## @param webapp.isDemo Set to true if this is a demo
isDemo: false

## @param webapp.fullstory.enabled Whether or not to enable fullstory
fullstory:
enabled: false

## @param webapp.openreplay.enabled Whether or not to enable openreplay
openreplay:
enabled: false

## @param webapp.storytime.enabled Whether or not to enable Papercups storytime
storytime:
enabled: false

## @section Scheduler Parameters

Expand All @@ -116,7 +141,7 @@ scheduler:
image:
repository: airbyte/scheduler
pullPolicy: IfNotPresent
tag: 0.29.13-alpha
tag: 0.29.21-alpha

## @param scheduler.podAnnotations [object] Add extra annotations to the scheduler pod
##
Expand Down Expand Up @@ -152,6 +177,10 @@ scheduler:
##
tolerations: []

## @param scheduler.log.level The log level to log at.
log:
level: "INFO"


## @section Pod Sweeper parameters

Expand Down Expand Up @@ -211,7 +240,7 @@ server:
image:
repository: airbyte/server
pullPolicy: IfNotPresent
tag: 0.29.13-alpha
tag: 0.29.21-alpha

## @param server.podAnnotations [object] Add extra annotations to the server pod
##
Expand Down Expand Up @@ -299,6 +328,10 @@ server:
##
tolerations: []

## @param server.log.level The log level to log at
log:
level: "INFO"

## @section Temporal parameters
## TODO: Move to consuming temporal from a dedicated helm chart

Expand Down

0 comments on commit 41157f7

Please sign in to comment.