Skip to content

Commit 30eaac3

Browse files
committed
chore: deploy connector rollout worker on oss (#13887)
1 parent a1b5395 commit 30eaac3

File tree

11 files changed

+756
-1
lines changed

11 files changed

+756
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: v2
2+
name: connector-rollout-worker
3+
description: Helm chart to deploy airbyte-connector-rollout-worker
4+
5+
# A chart can be either an 'application' or a 'library' chart.
6+
#
7+
# Application charts are a collection of templates that can be packaged into versioned archives
8+
# to be deployed.
9+
#
10+
# Library charts provide useful utilities or functions for the chart developer. They're included as
11+
# a dependency of application charts to inject those utilities and functions into the rendering
12+
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
13+
type: application
14+
15+
# This is the chart version. This version number should be incremented each time you make changes
16+
# to the chart and its templates, including the app version.
17+
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18+
version: 0.1.0
19+
20+
# This is the version number of the application being deployed. This version number should be
21+
# incremented each time you make changes to the application. Versions are not expected to
22+
# follow Semantic Versioning. They should reflect the version the application is using.
23+
# It is recommended to use it with quotes.
24+
appVersion: dev
25+
26+
dependencies:
27+
- name: common
28+
repository: https://charts.bitnami.com/bitnami
29+
tags:
30+
- bitnami-common
31+
version: 1.x.x
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# connector-rollout-worker
2+
3+
![Version: 0.67.17](https://img.shields.io/badge/Version-0.67.17-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: dev](https://img.shields.io/badge/AppVersion-dev-informational?style=flat-square)
4+
5+
Helm chart to deploy airbyte-connector-rollout-worker
6+
7+
## Requirements
8+
9+
| Repository | Name | Version |
10+
|------------|------|---------|
11+
| https://charts.bitnami.com/bitnami | common | 1.x.x |
12+
13+
## Values
14+
15+
| Key | Type | Default | Description |
16+
|---------------------------------------------------|------|--------------------------------------|-------------|
17+
| affinity | object | `{}` | |
18+
| containerSecurityContext | object | `{}` | |
19+
| debug.enabled | bool | `false` | |
20+
| debug.remoteDebugPort | int | `5005` | |
21+
| enabled | bool | `true` | |
22+
| env_vars | object | `{}` | |
23+
| extraContainers | list | `[]` | |
24+
| extraEnv | list | `[]` | |
25+
| extraInitContainers | list | `[]` | |
26+
| extraLabels | object | `{}` | |
27+
| extraSelectorLabels | object | `{}` | |
28+
| extraVolumeMounts | list | `[]` | |
29+
| extraVolumes | list | `[]` | |
30+
| global.credVolumeOverride | string | `""` | |
31+
| global.database.secretName | string | `""` | |
32+
| global.database.secretValue | string | `""` | |
33+
| global.extraContainers | list | `[]` | |
34+
| global.extraLabels | object | `{}` | |
35+
| global.extraSelectorLabels | object | `{}` | |
36+
| global.secretName | string | `""` | |
37+
| global.serviceAccountName | string | `"airbyte-admin"` | |
38+
| image.pullPolicy | string | `"IfNotPresent"` | |
39+
| image.repository | string | `"airbyte/connector-rollout-worker"` | |
40+
| livenessProbe.enabled | bool | `true` | |
41+
| livenessProbe.failureThreshold | int | `3` | |
42+
| livenessProbe.initialDelaySeconds | int | `50` | |
43+
| livenessProbe.periodSeconds | int | `10` | |
44+
| livenessProbe.successThreshold | int | `1` | |
45+
| livenessProbe.timeoutSeconds | int | `1` | |
46+
| log.level | string | `"INFO"` | |
47+
| nodeSelector | object | `{}` | |
48+
| podAnnotations | object | `{}` | |
49+
| podLabels | object | `{}` | |
50+
| readinessProbe.enabled | bool | `true` | |
51+
| readinessProbe.failureThreshold | int | `3` | |
52+
| readinessProbe.initialDelaySeconds | int | `10` | |
53+
| readinessProbe.periodSeconds | int | `10` | |
54+
| readinessProbe.successThreshold | int | `1` | |
55+
| readinessProbe.timeoutSeconds | int | `1` | |
56+
| replicaCount | int | `1` | |
57+
| resources.limits | object | `{}` | |
58+
| resources.requests | object | `{}` | |
59+
| secrets | object | `{}` | |
60+
| tolerations | list | `[]` | |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "airbyte.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "airbyte.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "airbyte.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "airbyte.labels" -}}
37+
helm.sh/chart: {{ include "airbyte.chart" . }}
38+
{{ include "airbyte.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "airbyte.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "airbyte.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Define imageTag
55+
*/}}
56+
57+
{{- define "connector-rollout-worker.imageTag" -}}
58+
{{- if .Values.image.tag }}
59+
{{- printf "%s" .Values.image.tag }}
60+
{{- else if ((.Values.global.image).tag) }}
61+
{{- printf "%s" .Values.global.image.tag }}
62+
{{- else }}
63+
{{- printf "%s" .Chart.AppVersion }}
64+
{{- end }}
65+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
{{- if or (eq .Values.global.edition "community") (eq .Values.global.enterprise.connectorRolloutOptIn true)}}
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: {{ include "common.names.fullname" . }}
6+
labels:
7+
{{- include "airbyte.labels" . | nindent 4 }}
8+
{{- if .Values.extraLabels }}
9+
{{ toYaml (mergeOverwrite .Values.extraLabels .Values.global.extraLabels) | nindent 4 }}
10+
{{- end }}
11+
spec:
12+
replicas: {{ .Values.replicaCount }}
13+
selector:
14+
matchLabels:
15+
{{- include "airbyte.selectorLabels" . | nindent 6 }}
16+
{{- if .Values.extraSelectorLabels }}
17+
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 6 }}
18+
{{- end }}
19+
strategy:
20+
type: Recreate
21+
template:
22+
metadata:
23+
labels:
24+
{{- include "airbyte.selectorLabels" . | nindent 8 }}
25+
{{- if .Values.extraSelectorLabels }}
26+
{{ toYaml (mergeOverwrite .Values.extraSelectorLabels .Values.global.extraSelectorLabels) | nindent 8 }}
27+
{{- end }}
28+
{{- if .Values.podLabels }}
29+
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
30+
{{- end }}
31+
{{- if .Values.podAnnotations }}
32+
annotations:
33+
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
34+
{{- end }}
35+
spec:
36+
serviceAccountName: {{ .Values.global.serviceAccountName }}
37+
automountServiceAccountToken: true
38+
{{- if .Values.global.imagePullSecrets }}
39+
imagePullSecrets:
40+
{{- range .Values.global.imagePullSecrets }}
41+
{{- printf "- name: %s" .name | nindent 8 }}
42+
{{- end }}
43+
{{- end }}
44+
{{- if .Values.nodeSelector }}
45+
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
46+
{{- end }}
47+
{{- if .Values.tolerations }}
48+
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
49+
{{- end }}
50+
{{- if .Values.affinity }}
51+
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
52+
{{- end }}
53+
{{- if .Values.extraInitContainers }}
54+
initContainers:
55+
{{- toYaml .Values.extraInitContainers | nindent 6 }}
56+
{{- end }}
57+
containers:
58+
- name: airbyte-connector-rollout-worker-container
59+
image: {{ printf "%s:%s" .Values.image.repository (include "connector-rollout-worker.imageTag" .) }}
60+
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
61+
env:
62+
{{- if .Values.debug.enabled }}
63+
- name: JAVA_TOOL_OPTIONS
64+
value: "-Xdebug -agentlib:jdwp=transport=dt_socket,address=0.0.0.0:{{ .Values.debug.remoteDebugPort }},server=y,suspend=n"
65+
{{- end }}
66+
{{- if eq .Values.global.deploymentMode "oss" }}
67+
- name: AIRBYTE_VERSION
68+
valueFrom:
69+
configMapKeyRef:
70+
name: {{ .Release.Name }}-airbyte-env
71+
key: AIRBYTE_VERSION
72+
- name: INTERNAL_API_HOST
73+
valueFrom:
74+
configMapKeyRef:
75+
name: {{ .Release.Name }}-airbyte-env
76+
key: INTERNAL_API_HOST
77+
- name: LOG4J_CONFIGURATION_FILE
78+
valueFrom:
79+
configMapKeyRef:
80+
name: {{ .Release.Name }}-airbyte-env
81+
key: LOG4J_CONFIGURATION_FILE
82+
- name: MICROMETER_METRICS_ENABLED
83+
valueFrom:
84+
configMapKeyRef:
85+
name: {{ .Release.Name }}-airbyte-env
86+
key: MICROMETER_METRICS_ENABLED
87+
- name: MICROMETER_METRICS_STATSD_FLAVOR
88+
valueFrom:
89+
configMapKeyRef:
90+
name: {{ .Release.Name }}-airbyte-env
91+
key: MICROMETER_METRICS_STATSD_FLAVOR
92+
- name: SEGMENT_WRITE_KEY
93+
valueFrom:
94+
configMapKeyRef:
95+
name: {{ .Release.Name }}-airbyte-env
96+
key: SEGMENT_WRITE_KEY
97+
- name: STATSD_HOST
98+
valueFrom:
99+
configMapKeyRef:
100+
name: {{ .Release.Name }}-airbyte-env
101+
key: STATSD_HOST
102+
- name: STATSD_PORT
103+
valueFrom:
104+
configMapKeyRef:
105+
name: {{ .Release.Name }}-airbyte-env
106+
key: STATSD_PORT
107+
- name: TRACKING_STRATEGY
108+
valueFrom:
109+
configMapKeyRef:
110+
name: {{ .Release.Name }}-airbyte-env
111+
key: TRACKING_STRATEGY
112+
- name: WEBAPP_URL
113+
valueFrom:
114+
configMapKeyRef:
115+
name: {{ .Release.Name }}-airbyte-env
116+
key: WEBAPP_URL
117+
- name: TEMPORAL_HOST
118+
valueFrom:
119+
configMapKeyRef:
120+
name: {{ .Release.Name }}-airbyte-env
121+
key: TEMPORAL_HOST
122+
- name: TEMPORAL_WORKER_PORTS
123+
valueFrom:
124+
configMapKeyRef:
125+
name: {{ .Release.Name }}-airbyte-env
126+
key: TEMPORAL_WORKER_PORTS
127+
- name: LOG_LEVEL
128+
value: "{{ .Values.log.level }}"
129+
{{- end }}
130+
{{- if or (eq .Values.global.edition "pro") (eq .Values.global.edition "enterprise") }}
131+
- name: AIRBYTE_API_AUTH_HEADER_NAME
132+
value: "X-Airbyte-Auth"
133+
- name: AIRBYTE_API_AUTH_HEADER_VALUE
134+
value: "Internal worker"
135+
{{- else if and (eq .Values.global.deploymentMode "oss") .Values.global.auth.enabled }}
136+
# Self-Managed Enterprise and Community w/ auth enabled use the same auth header, just
137+
# splitting into two separate blocks for readability.
138+
- name: AIRBYTE_API_AUTH_HEADER_NAME
139+
value: "X-Airbyte-Auth"
140+
- name: AIRBYTE_API_AUTH_HEADER_VALUE
141+
value: "Internal worker"
142+
{{- end }}
143+
144+
# Values from secret
145+
{{- if .Values.secrets }}
146+
{{- range $k, $v := .Values.secrets }}
147+
- name: {{ $k }}
148+
valueFrom:
149+
secretKeyRef:
150+
name: connector-rollout-worker-secrets
151+
key: {{ $k }}
152+
{{- end }}
153+
{{- end }}
154+
155+
# Values from env
156+
{{- if or .Values.env_vars .Values.global.env_vars }}
157+
{{- range $k, $v := mergeOverwrite .Values.env_vars .Values.global.env_vars }}
158+
- name: {{ $k }}
159+
value: {{ $v | quote }}
160+
{{- end }}
161+
{{- end }}
162+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Create secrets only for the local deployment
2+
{{- if .Values.secrets }}
3+
apiVersion: v1
4+
kind: Secret
5+
metadata:
6+
name: connector-rollout-worker-secrets
7+
labels:
8+
{{- include "airbyte.labels" . | nindent 4 }}
9+
annotations:
10+
helm.sh/hook: pre-install,pre-upgrade
11+
helm.sh/hook-weight: "-1"
12+
type: Opaque
13+
data:
14+
{{- range $k, $v := mergeOverwrite .Values.secrets .Values.global.secrets }}
15+
{{ $k }}: {{ if $v }}{{ $v | b64enc }} {{else}}""{{end}}
16+
{{- end }}
17+
{{- end }}

0 commit comments

Comments
 (0)