Skip to content

Commit

Permalink
Merge branch 'rabbitmq-workload-api-fix' of github.com:goruha/charts …
Browse files Browse the repository at this point in the history
…into rabbitmq-workload-api-fix

* 'rabbitmq-workload-api-fix' of github.com:goruha/charts: (75 commits)
  [stable/odoo] Add carrodher as owner (helm#4856)
  [stable/jasperreports] Release 1.0.3 (helm#5107)
  Add doc about redis data only persistence (helm#4965)
  [sentry] add nodeSelector, affinity & tolerations (helm#4264)
  [stable/sonarqube] Adding support for Service annotations (helm#4060)
  [incubator/schema-registry] Updating GroupID, and moving to using kafka coordinator master election (helm#5019)
  quote boolean S3 environment variables (helm#5066)
  Fix graceful shutdown of brokers, more settings, version bump (helm#5082)
  apiVersion shouldn't be hardcoded (helm#5060)
  [stable/phabricator] Release 1.0.4 (helm#5068)
  [stable/testlink] Release 1.0.5 (helm#5050)
  [stable/redis] fixed a typo into NOTES (helm#5070)
  [etcd-operator] readiness/liveness checks for operator (helm#4609)
  Annotations and checksum (helm#5067)
  Add OWNERS file to schema-registry (helm#5054)
  [stable/mongodb-replicaset] Use security context on pod level (helm#5055)
  Typo fix in sonarqube/README.md (helm#5045)
  Typo fix in sonatype-nexus/README.md (helm#5042)
  [sonarqube] nodeSelector, affinity & tolerations. also separate resoruces for plugin pod (helm#4265)
  [stable/sonarqube] upgrade to LTS version (6.7.3) (helm#5029)
  ...
  • Loading branch information
goruha committed Apr 19, 2018
2 parents 7620c13 + 1651aa5 commit f1e6979
Show file tree
Hide file tree
Showing 205 changed files with 2,319 additions and 708 deletions.
2 changes: 1 addition & 1 deletion incubator/drone/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: drone
home: https://drone.io/
icon: https://drone.io/apple-touch-icon.png
version: 0.4.3
version: 0.5.0
appVersion: 0.8.4
description: Drone is a Continuous Delivery system built on container technology
keywords:
Expand Down
4 changes: 4 additions & 0 deletions incubator/drone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@ The following table lists the configurable parameters of the drone charts and th
| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` |
| `persistence.size` | Size of data volume | `1Gi` |
| `sharedSecret` | Drone server and agent shared secret (Note: The Default random value changes on every `helm upgrade` causing a rolling update of server and agents) | `(random value)` |
| `rbac.create` | Specifies whether RBAC resources should be created. | `true` |
| `rbac.apiVersion` | RBAC API version | `v1` |
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created. | `true` |
| `serviceAccount.name` | The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template. | `(fullname template)` |
11 changes: 11 additions & 0 deletions incubator/drone/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,14 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- $name := default "drone" .Values.nameOverride -}}
{{ printf "%s-%s" .Release.Name $name | trunc 63 -}}
{{ end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "drone.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "drone.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
3 changes: 2 additions & 1 deletion incubator/drone/templates/deployment-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ spec:
affinity:
{{ toYaml .Values.agent.affinity | indent 8 }}
{{- end }}
serviceAccountName: {{ template "drone.serviceAccountName" . }}
containers:
- name: {{ template "drone.fullname" . }}-agent
image: "{{ .Values.images.agent.repository }}:{{ .Values.images.agent.tag }}"
Expand Down Expand Up @@ -72,4 +73,4 @@ spec:
volumes:
- name: docker-graph-storage
emptyDir: {}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions incubator/drone/templates/deployment-server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
affinity:
{{ toYaml .Values.server.affinity | indent 8 }}
{{- end }}
serviceAccountName: {{ template "drone.serviceAccountName" . }}
containers:
- name: {{ template "drone.fullname" . }}-server
image: "{{ .Values.images.server.repository }}:{{ .Values.images.server.tag }}"
Expand Down
19 changes: 19 additions & 0 deletions incubator/drone/templates/role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
kind: RoleBinding
metadata:
name: {{ template "drone.fullname" . }}
labels:
app: {{ template "drone.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "drone.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "drone.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{ end }}
21 changes: 21 additions & 0 deletions incubator/drone/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{ if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/{{ required "A valid .Values.rbac.apiVersion entry required!" .Values.rbac.apiVersion }}
kind: Role
metadata:
name: {{ template "drone.fullname" . }}
labels:
app: {{ template "drone.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
rules:
- apiGroups:
- extensions
resources:
- deployments
verbs:
- get
- list
- patch
- update
{{ end }}
11 changes: 11 additions & 0 deletions incubator/drone/templates/service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{ if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "drone.serviceAccountName" . }}
labels:
app: {{ template "drone.name" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{ end }}
13 changes: 13 additions & 0 deletions incubator/drone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,16 @@ persistence:
## the agents and servers, otherwise this will be auto-generated.
##
# sharedSecret: supersecret

rbac:
## Specifies whether RBAC resources should be created
create: true
## RBAC api version (v1, v1beta1, or v1alpha1)
apiVersion: v1

serviceAccount:
## Specifies whether a ServiceAccount should be created
create: true
## The name of the ServiceAccount to use.
## If not set and create is true, a name is generated using the fullname template
name:
2 changes: 1 addition & 1 deletion incubator/elasticsearch-curator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "5.4.1"
description: A Helm chart for Elasticseach Curator
name: elasticsearch-curator
version: 0.1.0
version: 0.1.1
home: https://github.com/elastic/curator
keywords:
- curator
Expand Down
3 changes: 3 additions & 0 deletions incubator/elasticsearch-curator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ This directory contains a Kubernetes chart to deploy the [Elasticsearch Curator]

* Elasticsearch

* The `elasticsearch-curator` cron job requires [K8s CronJob](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/) support:
> You need a working Kubernetes cluster at version >= 1.8 (for CronJob). For previous versions of cluster (< 1.8) you need to explicitly enable `batch/v2alpha1` API by passing `--runtime-config=batch/v2alpha1=true` to the API server ([see Turn on or off an API version for your cluster for more](https://kubernetes.io/docs/admin/cluster-management/#turn-on-or-off-an-api-version-for-your-cluster)).
## Chart Details

This chart will do the following:
Expand Down
11 changes: 11 additions & 0 deletions incubator/elasticsearch-curator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{{/* vim: set filetype=mustache: */}}

{{/*
Return the appropriate apiVersion for cronjob APIs.
*/}}
{{- define "cronjob.apiVersion" -}}
{{- if semverCompare "< 1.8-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "batch/v2alpha1" }}
{{- else if semverCompare ">=1.8-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "batch/v1beta1" }}
{{- end -}}
{{- end -}}

{{/*
Expand the name of the chart.
*/}}
Expand Down
4 changes: 2 additions & 2 deletions incubator/elasticsearch-curator/templates/cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: batch/v1beta1
apiVersion: {{ template "cronjob.apiVersion" . }}
kind: CronJob
metadata:
name: {{ template "elasticsearch-curator.fullname" . }}
Expand All @@ -19,7 +19,7 @@ spec:
spec:
volumes:
- name: config-volume
configMap:
configMap:
name: curator-config
restartPolicy: Never
containers:
Expand Down
4 changes: 2 additions & 2 deletions incubator/kafka/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v1
description: Apache Kafka is publish-subscribe messaging rethought as a distributed
commit log.
name: kafka
version: 0.4.8
appVersion: 4.0.0
version: 0.5.2
appVersion: 4.0.1
keywords:
- kafka
- zookeeper
Expand Down
18 changes: 14 additions & 4 deletions incubator/kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ following configurable parameters:
| `replicas` | Kafka Brokers | `3` |
| `component` | Kafka k8s selector key | `kafka` |
| `resources` | Kafka resource requests and limits | `{}` |
| `kafkaHeapOptions` | Kafka broker JVM heap options | `-Xmx1G-Xms1G` |
| `logSubPath` | Subpath under `persistence.mountPath` where kafka logs will be placed. | `logs` |
| `schedulerName` | Name of Kubernetes scheduler (other than the default) | `nil` |
| `affinity` | Pod scheduling preferences | `{}` |
Expand All @@ -71,18 +72,27 @@ following configurable parameters:
| `external.domain` | Domain in which to advertise Kafka external listeners. | `cluster.local` |
| `external.init` | External init container settings. | (see `values.yaml`) |
| `configurationOverrides` | `Kafka ` [configuration setting][brokerconfigs] overrides in the dictionary format | `{ offsets.topic.replication.factor: 3 }` |
| `jmxPort` | The jmx port to use for brokers. Will expose both the port and set the KAFKA_JMX_PORT env variable. | blank |
| `additionalPorts` | Additional ports to expose on brokers. Useful when the image exposes metrics (like prometheus, etc.) through a javaagent instead of a sidecar | `{}` |
| `additionalPorts` | Additional ports to expose on brokers. Useful when the image exposes metrics (like prometheus, etc.) through a javaagent instead of a sidecar | `{}` |
| `readinessProbe.initialDelaySeconds` | Number of seconds before probe is initiated. | `30` |
| `readinessProbe.periodSeconds` | How often (in seconds) to perform the probe. | `10` |
| `readinessProbe.timeoutSeconds` | Number of seconds after which the probe times out. | `5` |
| `readinessProbe.successThreshold` | Minimum consecutive successes for the probe to be considered successful after having failed. | `1` |
| `readinessProbe.failureThreshold` | After the probe fails this many times, pod will be marked Unready. | `3` |
| `terminationGracePeriodSeconds` | Wait up to this many seconds for a broker to shut down gracefully, after which it is killed | `60` |
| `updateStrategy` | StatefulSet update strategy to use. | `{ type: "OnDelete" }` |
| `podManagementPolicy` | Start and stop pods in Parallel or OrderedReady (one-by-one.) Can not change after first release. | `OrderedReady` |
| `persistence.enabled` | Use a PVC to persist data | `true` |
| `persistence.size` | Size of data volume | `1Gi` |
| `persistence.mountPath` | Mount path of data volume | `/opt/kafka/data` |
| `persistence.storageClass` | Storage class of backing PVC | `nil` |
| `metrics.jmx.enabled` | Whether or not to expose JMX metrics to Prometheus | `false` |
| `metrics.jmx.image` | JMX Exporter container image | `solsson/kafka-prometheus-jmx-exporter@sha256` |
| `metrics.jmx.imageTag` | JMX Exporter container image tag | `a23062396cd5af1acdf76512632c20ea6be76885dfc20cd9ff40fb23846557e8` |
| `metrics.jmx.port` | The jmx port to use for brokers. Will expose both the port and set the KAFKA_JMX_PORT env variable. | `5555` |
| `metrics.jmx.kafkaConfig` | Rules to apply to the Kafka JMX Exporter | `Rather complex object. Check values.yaml` |
| `metrics.kafka.enabled` | Whether or not to create a separate Kafka exporter | `false` |
| `metrics.kafka.image` | Kafka Exporter container image | `danielqsj/kafka-exporter` |
| `metrics.kafka.imageTag` | Kafka Exporter container image tag | `v1.0.1` |
| `zookeeper.enabled` | If True, installs Zookeeper Chart | `true` |
| `zookeeper.resources` | Zookeeper resource requests and limits | `{}` |
| `zookeeper.heap` | JVM heap size to allocate to Zookeeper | `1G` |
Expand Down Expand Up @@ -129,9 +139,9 @@ Where `my-release` is the name of your helm release.

## Extensions

Kafka has a rich ecosystem, with lots of tools. This sections is intended to compile all of those tools for which a corresponding Helm chart has already been created.
Kafka has a rich ecosystem, with lots of tools. This sections is intended to compile all of those tools for which a corresponding Helm chart has already been created.

- [Schema-registry](https://github.com/kubernetes/charts/tree/master/incubator/schema-registry) - A confluent project that provides a serving layer for your metadata. It provides a RESTful interface for storing and retrieving Avro schemas.
- [Schema-registry](https://github.com/kubernetes/charts/tree/master/incubator/schema-registry) - A confluent project that provides a serving layer for your metadata. It provides a RESTful interface for storing and retrieving Avro schemas.

### Connecting to Kafka from outside Kubernetes

Expand Down
16 changes: 16 additions & 0 deletions incubator/kafka/templates/jmx-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.metrics.jmx.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "kafka.fullname" . }}-metrics
labels:
app: "{{ template "kafka.name" . }}"
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
data:
jmx-kafka-prometheus.yml: |+
{{- if .Values.metrics.jmx.kafkaConfig }}
{{ toYaml .Values.metrics.jmx.kafkaConfig | indent 4 }}
{{- end }}
{{- end }}
31 changes: 31 additions & 0 deletions incubator/kafka/templates/kafka-exporter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{- if .Values.metrics.kafka.enabled }}
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "kafka.fullname" . }}-exporter
labels:
app: "{{ template "kafka.name" . }}"
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "kafka.fullname" . }}-exporter
template:
metadata:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9308"
labels:
app: {{ template "kafka.fullname" . }}-exporter
spec:
containers:
- image: "{{ .Values.metrics.kafka.image }}:{{ .Values.metrics.kafka.imageTag }}"
name: kafka-exporter
args:
- --kafka.server={{ template "kafka.fullname" . }}:9092
ports:
- containerPort: 9308
{{- end }}
Loading

0 comments on commit f1e6979

Please sign in to comment.