ansible role update

This commit is contained in:
havelight-ee
2022-12-09 13:38:44 +09:00
parent 8391ca915d
commit 3af7e034fc
890 changed files with 79234 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
1. Get the router URL by running these commands:
{{- if .Values.router.ingress.enabled }}
{{- range .Values.router.ingress.hosts }}
http{{ if $.Values.router.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.router.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.router.serviceType }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "druid.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.router.serviceType }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ include "druid.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "druid.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.router.port }}
{{- else if contains "ClusterIP" .Values.router.serviceType }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ include "druid.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:{{ .Values.router.port }}
{{- end }}

View File

@@ -0,0 +1,100 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "druid.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "druid.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "druid.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified historical name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "druid.historical.fullname" -}}
{{ template "druid.fullname" . }}-{{ .Values.historical.name }}
{{- end -}}
{{/*
Create a default fully qualified middleManager name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "druid.middleManager.fullname" -}}
{{ template "druid.fullname" . }}-{{ .Values.middleManager.name }}
{{- end -}}
{{/*
Create a default fully qualified broker name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "druid.broker.fullname" -}}
{{ template "druid.fullname" . }}-{{ .Values.broker.name }}
{{- end -}}
{{/*
Create a default fully qualified overlord name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "druid.overlord.fullname" -}}
{{ template "druid.fullname" . }}-{{ .Values.overlord.name }}
{{- end -}}
{{/*
Create a default fully qualified coordinator name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "druid.coordinator.fullname" -}}
{{ template "druid.fullname" . }}-{{ .Values.coordinator.name }}
{{- end -}}
{{/*
Create a default fully qualified router name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "druid.router.fullname" -}}
{{ template "druid.fullname" . }}-{{ .Values.router.name }}
{{- end -}}

View File

@@ -0,0 +1,99 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.broker.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "druid.broker.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.broker.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.broker.replicaCount }}
selector:
matchLabels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.broker.name }}
template:
metadata:
labels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.broker.name }}
{{- with .Values.broker.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [ "broker" ]
env:
{{- range $key, $val := .Values.broker.config }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end}}
envFrom:
- configMapRef:
name: {{ template "druid.name" . }}
ports:
- name: http
containerPort: {{ .Values.broker.port }}
protocol: TCP
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- name: metric
containerPort: {{ .Values.configVars.druid_emitter_prometheus_port }}
protocol: TCP
{{ end }}
livenessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.broker.port }}
readinessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.broker.port }}
resources:
{{ toYaml .Values.broker.resources | indent 12 }}
{{- with .Values.broker.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.broker.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.broker.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,58 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.broker.ingress.enabled -}}
{{- $fullName := include "druid.broker.fullname" . -}}
{{- $ingressPath := .Values.broker.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.broker.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.broker.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.broker.ingress.tls }}
tls:
{{- range .Values.broker.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.broker.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}

View File

@@ -0,0 +1,48 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.broker.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "druid.broker.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.broker.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.broker.serviceType }}
ports:
- port: {{ .Values.broker.port }}
targetPort: http
protocol: TCP
name: http
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- port: {{ .Values.configVars.druid_emitter_prometheus_port }}
targetPort: metric
protocol: TCP
name: metric
{{ end }}
selector:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.broker.name }}
{{- end }}

View File

@@ -0,0 +1,52 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.configMap.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "druid.name" . }}
labels:
app: {{ template "druid.name" . }}
chart: {{ template "druid.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{ toYaml .Values.configVars | indent 2 }}
{{- if .Values.zookeeper.enabled }}
druid_zk_service_host: {{ .Release.Name }}-zookeeper-headless:2181
{{- else }}
druid_zk_service_host: {{ .Values.zkHosts }}
{{- end }}
{{- if .Values.mysql.enabled }}
druid_metadata_storage_type: mysql
druid_metadata_storage_connector_connectURI: jdbc:mysql://{{ .Release.Name }}-mysql:3306/{{ .Values.mysql.mysqlDatabase}}
druid_metadata_storage_connector_user: {{ .Values.mysql.mysqlUser }}
druid_metadata_storage_connector_password: {{ .Values.mysql.mysqlPassword }}
{{- end }}
{{- if .Values.postgresql.enabled }}
druid_metadata_storage_type: postgresql
druid_metadata_storage_connector_connectURI: jdbc:postgresql://{{ .Release.Name }}-postgresql:{{ .Values.postgresql.service.port}}/{{ .Values.postgresql.postgresqlDatabase }}
druid_metadata_storage_connector_user: {{ .Values.postgresql.postgresqlUsername }}
druid_metadata_storage_connector_password: {{ .Values.postgresql.postgresqlPassword }}
{{- end }}
{{- if .Values.gCloudStorage.enabled }}
GOOGLE_APPLICATION_CREDENTIALS: /var/secrets/google/key.json
{{- end }}
{{- end }}

View File

@@ -0,0 +1,110 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.coordinator.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "druid.coordinator.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.coordinator.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.coordinator.replicaCount }}
selector:
matchLabels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.coordinator.name }}
template:
metadata:
labels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.coordinator.name }}
{{- with .Values.coordinator.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [ "coordinator" ]
env:
{{- range $key, $val := .Values.coordinator.config }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end}}
envFrom:
- configMapRef:
name: {{ template "druid.name" . }}
ports:
- name: http
containerPort: {{ .Values.coordinator.port }}
protocol: TCP
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- name: metric
containerPort: {{ .Values.configVars.druid_emitter_prometheus_port }}
protocol: TCP
{{ end }}
livenessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.coordinator.port }}
readinessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.coordinator.port }}
resources:
{{ toYaml .Values.coordinator.resources | indent 12 }}
volumeMounts:
{{- if .Values.gCloudStorage.enabled }}
- name: google-cloud-key
mountPath: /var/secrets/google
{{- end }}
volumes:
{{- if .Values.gCloudStorage.enabled }}
- name: google-cloud-key
secret:
secretName: {{ .Values.gCloudStorage.secretName }}
{{- end }}
{{- with .Values.coordinator.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.coordinator.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.coordinator.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,58 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.coordinator.ingress.enabled -}}
{{- $fullName := include "druid.coordinator.fullname" . -}}
{{- $ingressPath := .Values.coordinator.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.coordinator.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.coordinator.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.coordinator.ingress.tls }}
tls:
{{- range .Values.coordinator.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.coordinator.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}

View File

@@ -0,0 +1,48 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.coordinator.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "druid.coordinator.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.coordinator.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.coordinator.serviceType }}
ports:
- port: {{ .Values.coordinator.port }}
targetPort: http
protocol: TCP
name: http
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- port: {{ .Values.configVars.druid_emitter_prometheus_port }}
targetPort: metric
protocol: TCP
name: metric
{{ end }}
selector:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.coordinator.name }}
{{- end }}

View File

@@ -0,0 +1,58 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.historical.ingress.enabled -}}
{{- $fullName := include "druid.historical.fullname" . -}}
{{- $ingressPath := .Values.historical.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.historical.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.historical.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.historical.ingress.tls }}
tls:
{{- range .Values.historical.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.historical.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}

View File

@@ -0,0 +1,43 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.historical.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
labels:
app: {{ template "druid.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: {{ .Values.historical.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "druid.historical.fullname" . }}
spec:
{{- if .Values.historical.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.historical.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.historical.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.historical.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
app: {{ template "druid.name" . }}
component: {{ .Values.historical.name }}
release: {{ .Release.Name }}
{{- end }}

View File

@@ -0,0 +1,48 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.historical.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "druid.historical.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.historical.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.historical.serviceType }}
ports:
- port: {{ .Values.historical.port }}
targetPort: http
protocol: TCP
name: http
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- port: {{ .Values.configVars.druid_emitter_prometheus_port }}
targetPort: metric
protocol: TCP
name: metric
{{ end }}
selector:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.historical.name }}
{{- end }}

View File

@@ -0,0 +1,164 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.historical.enabled -}}
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: {{ template "druid.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: {{ .Values.historical.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "druid.historical.fullname" . }}
spec:
serviceName: {{ template "druid.historical.fullname" . }}
replicas: {{ .Values.historical.replicaCount }}
selector:
matchLabels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.historical.name }}
template:
metadata:
labels:
app: {{ template "druid.name" . }}
component: {{ .Values.historical.name }}
release: {{ .Release.Name }}
{{- with .Values.historical.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
{{- if or .Values.historical.antiAffinity .Values.historical.nodeAffinity }}
affinity:
{{- end }}
{{- if eq .Values.historical.antiAffinity "hard" }}
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
app: "{{ template "druid.name" . }}"
release: "{{ .Release.Name }}"
component: "{{ .Values.historical.name }}"
{{- else if eq .Values.historical.antiAffinity "soft" }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app: "{{ template "druid.name" . }}"
release: "{{ .Release.Name }}"
component: "{{ .Values.historical.name }}"
{{- end }}
{{- with .Values.historical.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.historical.nodeSelector }}
nodeSelector:
{{ toYaml .Values.historical.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.historical.securityContext }}
securityContext:
{{ toYaml .Values.historical.securityContext | indent 8 }}
{{- end }}
{{- if .Values.historical.tolerations }}
tolerations:
{{ toYaml .Values.historical.tolerations | indent 8 }}
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{ toYaml .Values.image.pullSecrets | indent 8 }}
{{- end }}
containers:
- name: druid
args: [ "historical" ]
env:
{{- range $key, $val := .Values.historical.config }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end}}
envFrom:
- configMapRef:
name: {{ template "druid.name" . }}
resources:
{{ toYaml .Values.historical.resources | indent 12 }}
livenessProbe:
initialDelaySeconds: {{ .Values.historical.livenessProbeInitialDelaySeconds }}
httpGet:
path: /status/health
port: {{ .Values.historical.port }}
readinessProbe:
initialDelaySeconds: {{ .Values.historical.readinessProbeInitialDelaySeconds }}
httpGet:
path: /status/health
port: {{ .Values.historical.port }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
ports:
- containerPort: {{ .Values.historical.port }}
name: http
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- name: metric
containerPort: {{ .Values.configVars.druid_emitter_prometheus_port }}
protocol: TCP
{{ end }}
volumeMounts:
- mountPath: /opt/druid/var/druid/
name: data
{{- if .Values.gCloudStorage.enabled }}
- name: google-cloud-key
mountPath: /var/secrets/google
{{- end }}
volumes:
{{- if not .Values.historical.persistence.enabled }}
- name: data
emptyDir: {}
{{- end }}
{{- if .Values.gCloudStorage.enabled }}
- name: google-cloud-key
secret:
secretName: {{ .Values.gCloudStorage.secretName }}
{{- end }}
updateStrategy:
type: {{ .Values.historical.updateStrategy.type }}
{{- if .Values.historical.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- {{ .Values.historical.persistence.accessMode | quote }}
{{- if .Values.historical.persistence.storageClass }}
{{- if (eq "-" .Values.historical.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.historical.persistence.storageClass }}"
{{- end }}
{{- end }}
resources:
requests:
storage: "{{ .Values.historical.persistence.size }}"
{{- end }}
{{- end }}

View File

@@ -0,0 +1,40 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.middleManager.autoscaling.enabled }}
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "druid.middleManager.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: "{{ .Values.name }}"
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: StatefulSet
name: {{ include "druid.middleManager.fullname" . }}
minReplicas: {{ .Values.middleManager.autoscaling.minReplicas }}
maxReplicas: {{ .Values.middleManager.autoscaling.maxReplicas }}
metrics:
{{ toYaml .Values.middleManager.autoscaling.metrics | indent 4 }}
{{- end }}

View File

@@ -0,0 +1,58 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.middleManager.ingress.enabled -}}
{{- $fullName := include "druid.middleManager.fullname" . -}}
{{- $ingressPath := .Values.middleManager.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.middleManager.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.middleManager.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.middleManager.ingress.tls }}
tls:
{{- range .Values.middleManager.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.middleManager.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}

View File

@@ -0,0 +1,43 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.middleManager.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
labels:
app: {{ template "druid.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: {{ .Values.middleManager.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "druid.middleManager.fullname" . }}
spec:
{{- if .Values.middleManager.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.middleManager.podDisruptionBudget.minAvailable }}
{{- end }}
{{- if .Values.middleManager.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.middleManager.podDisruptionBudget.maxUnavailable }}
{{- end }}
selector:
matchLabels:
app: {{ template "druid.name" . }}
component: {{ .Values.middleManager.name }}
release: {{ .Release.Name }}
{{- end }}

View File

@@ -0,0 +1,48 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.middleManager.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "druid.middleManager.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.middleManager.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.middleManager.serviceType }}
ports:
- port: {{ .Values.middleManager.port }}
targetPort: http
protocol: TCP
name: http
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- port: {{ .Values.configVars.druid_emitter_prometheus_port }}
targetPort: metric
protocol: TCP
name: metric
{{ end }}
selector:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.middleManager.name }}
{{- end }}

View File

@@ -0,0 +1,164 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.middleManager.enabled -}}
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: {{ template "druid.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: {{ .Values.middleManager.name }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "druid.middleManager.fullname" . }}
spec:
serviceName: {{ template "druid.middleManager.fullname" . }}
replicas: {{ .Values.middleManager.replicaCount }}
selector:
matchLabels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.middleManager.name }}
template:
metadata:
labels:
app: {{ template "druid.name" . }}
component: {{ .Values.middleManager.name }}
release: {{ .Release.Name }}
{{- if .Values.middleManager.podAnnotations }}
annotations:
{{ toYaml .Values.middleManager.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- if or .Values.middleManager.antiAffinity .Values.middleManager.nodeAffinity }}
affinity:
{{- end }}
{{- if eq .Values.middleManager.antiAffinity "hard" }}
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
app: "{{ template "druid.name" . }}"
release: "{{ .Release.Name }}"
component: "{{ .Values.middleManager.name }}"
{{- else if eq .Values.middleManager.antiAffinity "soft" }}
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app: "{{ template "druid.name" . }}"
release: "{{ .Release.Name }}"
component: "{{ .Values.middleManager.name }}"
{{- end }}
{{- with .Values.middleManager.nodeAffinity }}
nodeAffinity:
{{ toYaml . | indent 10 }}
{{- end }}
{{- if .Values.middleManager.nodeSelector }}
nodeSelector:
{{ toYaml .Values.middleManager.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.middleManager.securityContext }}
securityContext:
{{ toYaml .Values.middleManager.securityContext | indent 8 }}
{{- end }}
{{- if .Values.middleManager.tolerations }}
tolerations:
{{ toYaml .Values.middleManager.tolerations | indent 8 }}
{{- end }}
{{- if .Values.image.pullSecrets }}
imagePullSecrets:
{{ toYaml .Values.image.pullSecrets | indent 8 }}
{{- end }}
containers:
- name: druid
args: [ "middleManager" ]
env:
{{- range $key, $val := .Values.middleManager.config }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end}}
envFrom:
- configMapRef:
name: {{ template "druid.name" . }}
resources:
{{ toYaml .Values.middleManager.resources | indent 12 }}
livenessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.middleManager.port }}
readinessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.middleManager.port }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
ports:
- containerPort: {{ .Values.middleManager.port }}
name: http
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- name: metric
containerPort: {{ .Values.configVars.druid_emitter_prometheus_port }}
protocol: TCP
{{ end }}
volumeMounts:
- mountPath: /opt/druid/var/druid/
name: data
{{- if .Values.gCloudStorage.enabled }}
- name: google-cloud-key
mountPath: /var/secrets/google
{{- end }}
volumes:
{{- if not .Values.middleManager.persistence.enabled }}
- name: data
emptyDir: {}
{{- end }}
{{- if .Values.gCloudStorage.enabled }}
- name: google-cloud-key
secret:
secretName: {{ .Values.gCloudStorage.secretName }}
{{- end }}
updateStrategy:
type: {{ .Values.middleManager.updateStrategy.type }}
{{- if .Values.middleManager.persistence.enabled }}
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes:
- {{ .Values.middleManager.persistence.accessMode | quote }}
{{- if .Values.middleManager.persistence.storageClass }}
{{- if (eq "-" .Values.middleManager.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.middleManager.persistence.storageClass }}"
{{- end }}
{{- end }}
resources:
requests:
storage: "{{ .Values.middleManager.persistence.size }}"
{{- end }}
{{- end }}

View File

@@ -0,0 +1,105 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.overlord.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "druid.overlord.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.overlord.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.overlord.replicaCount }}
selector:
matchLabels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.overlord.name }}
template:
metadata:
labels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.overlord.name }}
{{- with .Values.overlord.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [ "overlord" ]
env:
{{- range $key, $val := .Values.overlord.config }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end}}
envFrom:
- configMapRef:
name: {{ template "druid.name" . }}
ports:
- name: http
containerPort: {{ .Values.overlord.port }}
protocol: TCP
livenessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.overlord.port }}
readinessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.overlord.port }}
resources:
{{ toYaml .Values.overlord.resources | indent 12 }}
volumeMounts:
{{- if .Values.gCloudStorage.enabled }}
- name: google-cloud-key
mountPath: /var/secrets/google
{{- end }}
volumes:
{{- if .Values.gCloudStorage.enabled }}
- name: google-cloud-key
secret:
secretName: {{ .Values.gCloudStorage.secretName }}
{{- end }}
{{- with .Values.overlord.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.overlord.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.overlord.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,58 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.overlord.ingress.enabled -}}
{{- $fullName := include "druid.overlord.fullname" . -}}
{{- $ingressPath := .Values.overlord.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.overlord.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.overlord.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.overlord.ingress.tls }}
tls:
{{- range .Values.overlord.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.overlord.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}

View File

@@ -0,0 +1,42 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.overlord.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "druid.overlord.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.overlord.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.overlord.serviceType }}
ports:
- port: {{ .Values.overlord.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.overlord.name }}
{{- end }}

View File

@@ -0,0 +1,99 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.router.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "druid.router.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.router.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.router.replicaCount }}
selector:
matchLabels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.router.name }}
template:
metadata:
labels:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.router.name }}
{{- with .Values.router.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [ "router" ]
env:
{{- range $key, $val := .Values.router.config }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end}}
envFrom:
- configMapRef:
name: {{ template "druid.name" . }}
ports:
- name: http
containerPort: {{ .Values.router.port }}
protocol: TCP
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- name: metric
containerPort: {{ .Values.configVars.druid_emitter_prometheus_port }}
protocol: TCP
{{ end }}
livenessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.router.port }}
readinessProbe:
initialDelaySeconds: 60
httpGet:
path: /status/health
port: {{ .Values.router.port }}
resources:
{{ toYaml .Values.router.resources | indent 12 }}
{{- with .Values.router.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.router.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.router.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,58 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.router.ingress.enabled -}}
{{- $fullName := include "druid.router.fullname" . -}}
{{- $ingressPath := .Values.router.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.router.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.router.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.router.ingress.tls }}
tls:
{{- range .Values.router.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.router.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}

View File

@@ -0,0 +1,49 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.router.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "druid.router.fullname" . }}
labels:
app: {{ include "druid.name" . }}
chart: {{ include "druid.chart" . }}
component: {{ .Values.router.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.router.serviceType }}
ports:
- port: {{ .Values.router.port }}
nodePort: {{ .Values.router.nodePort }}
targetPort: http
protocol: TCP
name: http
{{ if .Values.configVars.druid_emitter_prometheus_port }}
- port: {{ .Values.configVars.druid_emitter_prometheus_port }}
targetPort: metric
protocol: TCP
name: metric
{{ end }}
selector:
app: {{ include "druid.name" . }}
release: {{ .Release.Name }}
component: {{ .Values.router.name }}
{{- end }}

View File

@@ -0,0 +1,28 @@
{{/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/}}
{{- if .Values.gCloudStorage.enabled -}}
apiVersion: v1
kind: Secret
metadata:
name: google-cloud-key
type: Opaque
data:
key.json: {{ .Values.google.gcsAPIKey }}
{{- end }}