Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into prometheus-operator-ns-override-try
Browse files Browse the repository at this point in the history
  • Loading branch information
yoninl2 authored Jun 7, 2020
2 parents 1c74fdb + fd82c27 commit 4f25072
Show file tree
Hide file tree
Showing 326 changed files with 4,231 additions and 7,694 deletions.
2 changes: 1 addition & 1 deletion incubator/cassandra/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: cassandra
version: 0.15.0
version: 0.15.1
appVersion: 3.11.6
description: Apache Cassandra is a free and open-source distributed database management
system designed to handle large amounts of data across many commodity servers, providing
Expand Down
1 change: 0 additions & 1 deletion incubator/cassandra/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "cassandra.fullname" . }}
name: hello-prometheus-scraping
labels:
app: {{ template "cassandra.name" . }}
chart: {{ template "cassandra.chart" . }}
Expand Down
6 changes: 3 additions & 3 deletions incubator/druid/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: v1
appVersion: 0.12.3
appVersion: 0.18.0
description: Apache Druid (incubating) is a high performance analytics data store for event-driven data.
name: druid
version: 0.1.1
version: 0.2.0
home: http://druid.io/
icon: http://druid.io/img/druid_nav.png
maintainers:
- name: maver1ck
email: maciek@brynski.pl
sources:
- /~https://github.com/apache/incubator-druid
- /~https://github.com/apache/druid
keywords:
- olap
- database
Expand Down
216 changes: 119 additions & 97 deletions incubator/druid/README.md

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions incubator/druid/requirements.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
dependencies:
- name: zookeeper
repository: https://kubernetes-charts-incubator.storage.googleapis.com/
version: 1.2.0
version: 2.1.3
- name: mysql
repository: https://kubernetes-charts.storage.googleapis.com/
version: 0.10.2
digest: sha256:28aa139b80203f125af6c7b5c9881d0c7de98c3a420ab1a5d18daf76c819b850
generated: 2018-11-13T14:34:00.5675116+01:00
- name: postgresql
repository: https://kubernetes-charts.storage.googleapis.com/
version: 3.11.7
digest: sha256:ddcc50bd807ffc16a66c5814ed2845d026be0d0c8d707fbe10cd749045bcece7
generated: "2020-05-14T21:41:30.582142+08:00"
6 changes: 5 additions & 1 deletion incubator/druid/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
dependencies:
- name: zookeeper
version: 1.2.0
version: 2.1.3
repository: https://kubernetes-charts-incubator.storage.googleapis.com/
condition: zookeeper.enabled
- name: mysql
version: 0.10.2
repository: https://kubernetes-charts.storage.googleapis.com/
condition: mysql.enabled
- name: postgresql
version: 3.11.7
repository: https://kubernetes-charts.storage.googleapis.com/
condition: postgresql.enabled
18 changes: 9 additions & 9 deletions incubator/druid/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
1. Get the broker URL by running these commands:
{{- if .Values.broker.ingress.enabled }}
{{- range .Values.broker.ingress.hosts }}
http{{ if $.Values.broker.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.broker.ingress.path }}
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.broker.serviceType }}
{{- 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.broker.serviceType }}
{{- 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.broker.port }}
{{- else if contains "ClusterIP" .Values.broker.serviceType }}
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.broker.port }}
kubectl port-forward $POD_NAME 8080:{{ .Values.router.port }}
{{- end }}
7 changes: 7 additions & 0 deletions incubator/druid/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{ 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 -}}
38 changes: 11 additions & 27 deletions incubator/druid/templates/broker/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,21 @@ spec:
{{- with .Values.broker.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [ "broker" ]
env:
{{- if .Values.zookeeper.enabled }}
- name: ZOOKEEPER_HOST
value: {{ .Release.Name }}-zookeeper-headless:2181
{{- else }}
- name: ZOOKEEPER_HOST
value: {{ .Values.zkHosts }}
{{- end }}
{{- if .Values.mysql.enabled }}
- name: DB_HOST
value: {{ .Release.Name }}-mysql
- name: DB_TYPE
value: mysql
- name: DB_USERNAME
value: {{ .Values.mysql.mysqlUser }}
- name: DB_PASSWORD
value: {{ .Values.mysql.mysqlPassword }}
- name: DB_DBNAME
value: {{ .Values.mysql.mysqlDatabase }}
- name: DB_PORT
value: "3306"
{{- end }}
- name: JAVA_OPTS
value: {{ .Values.broker.javaOpts }}
{{- range $key, $value := .Values.env }}
{{- range $key, $val := .Values.broker.config }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
value: {{ $val | quote }}
{{- end}}
envFrom:
- configMapRef:
name: {{ template "druid.name" . }}
ports:
- name: http
containerPort: {{ .Values.broker.port }}
Expand Down Expand Up @@ -87,3 +67,7 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{ toYaml . | indent 8 }}
{{- end }}
31 changes: 31 additions & 0 deletions incubator/druid/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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 }}
49 changes: 22 additions & 27 deletions incubator/druid/templates/coordinator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,21 @@ spec:
{{- with .Values.coordinator.podAnnotations }}
annotations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args: [ "coordinator" ]
env:
{{- if .Values.zookeeper.enabled }}
- name: ZOOKEEPER_HOST
value: {{ .Release.Name }}-zookeeper-headless:2181
{{- else }}
- name: ZOOKEEPER_HOST
value: {{ .Values.zkHosts }}
{{- end }}
{{- if .Values.mysql.enabled }}
- name: DB_HOST
value: {{ .Release.Name }}-mysql
- name: DB_TYPE
value: mysql
- name: DB_USERNAME
value: {{ .Values.mysql.mysqlUser }}
- name: DB_PASSWORD
value: {{ .Values.mysql.mysqlPassword }}
- name: DB_DBNAME
value: {{ .Values.mysql.mysqlDatabase }}
- name: DB_PORT
value: "3306"
{{- end }}
- name: JAVA_OPTS
value: {{ .Values.coordinator.javaOpts }}
{{- range $key, $value := .Values.env }}
{{- range $key, $val := .Values.coordinator.config }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
value: {{ $val | quote }}
{{- end}}
envFrom:
- configMapRef:
name: {{ template "druid.name" . }}
ports:
- name: http
containerPort: {{ .Values.coordinator.port }}
Expand All @@ -75,6 +55,17 @@ spec:
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 }}
Expand All @@ -87,3 +78,7 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.image.pullSecrets }}
imagePullSecrets:
{{ toYaml . | indent 8 }}
{{- end }}
47 changes: 20 additions & 27 deletions incubator/druid/templates/historical/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,38 +62,22 @@ spec:
{{- 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:
{{- if .Values.zookeeper.enabled }}
- name: ZOOKEEPER_HOST
value: {{ .Release.Name }}-zookeeper-headless:2181
{{- else }}
- name: ZOOKEEPER_HOST
value: {{ .Values.zkHosts }}
{{- end }}
{{- if .Values.mysql.enabled }}
- name: DB_HOST
value: {{ .Release.Name }}-mysql
- name: DB_TYPE
value: mysql
- name: DB_USERNAME
value: {{ .Values.mysql.mysqlUser }}
- name: DB_PASSWORD
value: {{ .Values.mysql.mysqlPassword }}
- name: DB_DBNAME
value: {{ .Values.mysql.mysqlDatabase }}
- name: DB_PORT
value: "3306"
{{- end }}
- name: JAVA_OPTS
value: {{ .Values.historical.javaOpts }}
{{- range $key, $value := .Values.env }}
{{- range $key, $val := .Values.historical.config }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
value: {{ $val | quote }}
{{- end}}
envFrom:
- configMapRef:
name: {{ template "druid.name" . }}
resources:
{{ toYaml .Values.historical.resources | indent 12 }}
livenessProbe:
Expand All @@ -114,11 +98,20 @@ spec:
volumeMounts:
- mountPath: /var/druid/
name: data
{{- if not .Values.historical.persistence.enabled }}
{{- 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 }}
Expand Down
21 changes: 21 additions & 0 deletions incubator/druid/templates/middleManager/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- 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 }}
Loading

0 comments on commit 4f25072

Please sign in to comment.