Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master:
  Add Fluent Bit chart. (helm#895)
  Existing PVC support for stable/drupal (helm#1084)
  [stable/nginx-ingress] - Adding in support for the publish-service parameter (helm#975)
  [stable/prometheus] Add extraHostPathMounts config (helm#862)
  • Loading branch information
lachie83 committed Jun 2, 2017
2 parents d3ac2c3 + 9d3676a commit bbdfb4d
Show file tree
Hide file tree
Showing 21 changed files with 287 additions and 4 deletions.
5 changes: 3 additions & 2 deletions stable/drupal/Chart.yaml
@@ -1,5 +1,6 @@
name: drupal
version: 0.5.4
version: 0.6.0
appVersion: 8.3.2
description: One of the most versatile open source content management systems.
keywords:
- drupal
Expand All @@ -14,6 +15,6 @@ icon: https://bitnami.com/assets/stacks/drupal/img/drupal-stack-220x234.png
sources:
- https://github.com/bitnami/bitnami-docker-drupal
maintainers:
- name: Bitnami
- name: bitnami-bot
email: containers@bitnami.com
engine: gotpl
10 changes: 10 additions & 0 deletions stable/drupal/README.md
Expand Up @@ -64,6 +64,7 @@ The following tables lists the configurable parameters of the Drupal chart and t
| `persistence.apache.size` | PVC Storage Request for Apache volume | `1Gi` |
| `persistence.drupal.storageClass` | PVC Storage Class for Drupal volume | `nil` (uses alpha storage class annotation) |
| `persistence.drupal.accessMode` | PVC Access Mode for Drupal volume | `ReadWriteOnce` |
| `persistence.drupal.existingClaim`| An Existing PVC name | `nil` |
| `persistence.drupal.size` | PVC Storage Request for Drupal volume | `8Gi` |
| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` |

Expand Down Expand Up @@ -93,3 +94,12 @@ The [Bitnami Drupal](https://github.com/bitnami/bitnami-docker-drupal) image sto

Persistent Volume Claims are used to keep the data across deployments. This is known to work in GCE, AWS, and minikube.
See the [Configuration](#configuration) section to configure the PVC or to disable persistence.

### Existing PersistentVolumeClaim

1. Create the PersistentVolume
1. Create the PersistentVolumeClaim
1. Install the chart
```bash
$ helm install --name my-release --set persistence.drupal.existingClaim=PVC_NAME stable/drupal
```
2 changes: 1 addition & 1 deletion stable/drupal/templates/deployment.yaml
Expand Up @@ -65,7 +65,7 @@ spec:
- name: drupal-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "fullname" . }}-drupal
claimName: {{ .Values.persistence.drupal.existingClaim | default (printf "%s-drupal" (include "fullname" .)) }}
{{- else }}
emptyDir: {}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion stable/drupal/templates/drupal-pvc.yaml
@@ -1,4 +1,4 @@
{{- if .Values.persistence.enabled -}}
{{- if and .Values.persistence.enabled (not .Values.persistence.drupal.existingClaim) -}}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
Expand Down
6 changes: 6 additions & 0 deletions stable/drupal/values.yaml
Expand Up @@ -93,6 +93,12 @@ persistence:
accessMode: ReadWriteOnce
size: 8Gi

## A manually managed Persistent Volume Claim
## Requires persistence.enabled: true
## If defined, PVC must be created manually before volume will be bound
##
# existingClaim:

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
Expand Down
16 changes: 16 additions & 0 deletions stable/fluent-bit/Chart.yaml
@@ -0,0 +1,16 @@
name: fluent-bit
version: 0.1.0
appVersion: 0.11.7
description: Fast and Lightweight Log/Data Forwarder for Linux, BSD and OSX
keywords:
- fluent
- bit
sources:
- http://fluentbit.io
icon: http://fluentbit.io/assets/img/logo1-default.png
home: http://fluentbit.io
maintainers:
- name: edsiper
email: eduardo@treasure-data.com
- name: kfox1111
email: Kevin.Fox@pnnl.gov
31 changes: 31 additions & 0 deletions stable/fluent-bit/README.md
@@ -0,0 +1,31 @@
# fluent-bit Chart

[Fluent Bit](http://fluentbit.io/) is an open source and multi-platform Log Forwarder.

## Chart Details
This chart will do the following:

* Install a configmap for fluent bit
* Install a daemonset that provisions the fluent bit [per-host architecture]

## Installing the Chart

To install the chart with the release name `my-release`:

```bash
$ helm install --name my-release stable/fluent-bit
```

## Configuration

Configurable values are documented in the `values.yaml`.

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```bash
$ helm install --name my-release -f values.yaml stable/fluent-bit
```

> **Tip**: You can use the default [values.yaml](values.yaml)
9 changes: 9 additions & 0 deletions stable/fluent-bit/templates/NOTES.txt
@@ -0,0 +1,9 @@
fluent-bit is now running.

{{- if eq .Values.backend.type "forward" }}

It will forward all container logs to the svc named {{ .Values.backend.forward.host }} on port: {{ .Values.backend.forward.port }}
{{- else if eq .Values.backend.type "es" }}

It will forward all container logs to the svc named {{ .Values.backend.es.host }} on port: {{ .Values.backend.es.port }}
{{- end }}
16 changes: 16 additions & 0 deletions stable/fluent-bit/templates/_helpers.tpl
@@ -0,0 +1,16 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "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).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
47 changes: 47 additions & 0 deletions stable/fluent-bit/templates/config.yaml
@@ -0,0 +1,47 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "fullname" . }}-config
labels:
app: {{ template "fullname" . }}
data:
fluent-bit.conf: |-
[SERVICE]
Flush 1
Daemon Off
Log_Level info
Parsers_File parsers.conf
[INPUT]
Name tail
Path /var/log/containers/*.log
Parser docker
Tag kube.*
Refresh_Interval 5
Mem_Buf_Limit 5MB
[FILTER]
Name kubernetes
Match kube.*
{{ if eq .Values.backend.type "test" }}
[OUTPUT]
Name file
Match *
Path /tmp/fluent-bit.log
{{ else if eq .Values.backend.type "forward" }}
[OUTPUT]
Name forward
Match *
Host {{ .Values.backend.forward.host }}
Port {{ .Values.backend.forward.port }}
Retry_Limit False
{{ else if eq .Values.backend.type "es" }}
[OUTPUT]
Name es
Match *
Host {{ .Values.backend.es.host }}
Port {{ .Values.backend.es.port }}
Logstash_Format On
Retry_Limit False
{{- end }}
50 changes: 50 additions & 0 deletions stable/fluent-bit/templates/daemonset.yaml
@@ -0,0 +1,50 @@
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: fluent-bit
labels:
app: {{ template "fullname" . }}
spec:
template:
metadata:
labels:
app: {{ template "fullname" . }}
spec:
containers:
- name: fluent-bit
image: "{{ .Values.image.fluent_bit.repository }}:{{ .Values.image.fluent_bit.tag }}"
imagePullPolicy: "{{ .Values.image.pullPolicy}}"
env:
{{ toYaml .Values.env | indent 10 }}
resources:
{{ toYaml .Values.resources | indent 10 }}
volumeMounts:
- name: varlog
mountPath: /var/log
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
- name: config
mountPath: /fluent-bit/etc/fluent-bit.conf
subPath: fluent-bit.conf
{{ if .Values.on_minikube }}
- name: mnt
mountPath: /mnt
readOnly: true
{{ end }}
terminationGracePeriodSeconds: 10
volumes:
- name: varlog
hostPath:
path: /var/log
- name: varlibdockercontainers
hostPath:
path: /var/lib/docker/containers
- name: config
configMap:
name: {{ template "fullname" . }}-config
{{ if .Values.on_minikube }}
- name: mnt
hostPath:
path: /mnt
{{ end }}
27 changes: 27 additions & 0 deletions stable/fluent-bit/values.yaml
@@ -0,0 +1,27 @@
# Minikube stores its logs in a seperate directory.
# enable if started in minikube.
on_minikube: false

image:
fluent_bit:
repository: fluent/fluent-bit
tag: 0.11.7
pullPolicy: IfNotPresent

backend:
type: forward
forward:
host: fluentd
port: 24284
es:
host: elasticsearch
port: 9200

env: []

resources:
limits:
memory: 100Mi
requests:
cpu: 100m
memory: 100Mi
2 changes: 2 additions & 0 deletions stable/nginx-ingress/README.md
Expand Up @@ -60,6 +60,8 @@ Parameter | Description | Default
`controller.replicaCount` | desired number of controller pods | `1`
`controller.resources` | controller pod resource requests & limits | `{}`
`controller.service.annotations` | annotations for controller service | `{}`
`controller.publishService.enabled` | if true, the controller will set the endpoint records on the ingress objects to reflect those on the service | `false`
`controller.publishService.pathOverride` | override of the default publish-service name | `""`
`controller.service.clusterIP` | internal controller cluster service IP | `""`
`controller.service.externalIPs` | controller service external IP addresses | `[]`
`controller.service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""`
Expand Down
15 changes: 15 additions & 0 deletions stable/nginx-ingress/templates/_helpers.tpl
Expand Up @@ -24,6 +24,21 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- printf "%s-%s-%s" .Release.Name $name .Values.controller.name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Construct the path for the publish-service.
By convention this will simply use the <namesapce>/<controller-name> to match the name of the
service generated.
Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride`
*/}}
{{- define "controller.publishServicePath" -}}
{{- $defServiceName := printf "%s/%s" .Release.Namespace (include "controller.fullname" .) -}}
{{- $servicePath := default $defServiceName .Values.controller.publishService.pathOverride }}
{{- print $servicePath | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified default backend name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
Expand Down
3 changes: 3 additions & 0 deletions stable/nginx-ingress/templates/controller-daemonset.yaml
Expand Up @@ -28,6 +28,9 @@ spec:
args:
- /nginx-ingress-controller
- --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }}
{{- if and (contains "0.9" .Values.controller.image.tag) .Values.controller.publishService.enabled }}
- --publish-service={{ template "controller.publishServicePath" . }}
{{- end}}
{{- if (contains "0.9" .Values.controller.image.tag) }}
- --configmap={{ .Release.Namespace }}/{{ template "controller.fullname" . }}
{{- else }}
Expand Down
3 changes: 3 additions & 0 deletions stable/nginx-ingress/templates/controller-deployment.yaml
Expand Up @@ -29,6 +29,9 @@ spec:
args:
- /nginx-ingress-controller
- --default-backend-service={{ if .Values.defaultBackend.enabled }}{{ .Release.Namespace }}/{{ template "defaultBackend.fullname" . }}{{ else }}{{ .Values.controller.defaultBackendService }}{{ end }}
{{- if and (contains "0.9" .Values.controller.image.tag) .Values.controller.publishService.enabled }}
- --publish-service={{ template "controller.publishServicePath" . }}
{{- end}}
{{- if (contains "0.9" .Values.controller.image.tag) }}
- --configmap={{ .Release.Namespace }}/{{ template "controller.fullname" . }}
{{- else }}
Expand Down
9 changes: 9 additions & 0 deletions stable/nginx-ingress/values.yaml
Expand Up @@ -15,6 +15,15 @@ controller:
##
defaultBackendService: ""

## Allows customization of the external service
## the ingress will be bound to via DNS
publishService:
enabled: false
## Allows overriding of the publish service to bind to
## Must be <namespace>/<service_name>
##
pathOverride: ""

## Limit the scope of the controller
##
scope:
Expand Down
2 changes: 2 additions & 0 deletions stable/prometheus/README.md
Expand Up @@ -101,6 +101,7 @@ Parameter | Description | Default
`nodeExporter.image.tag` | node-exporter container image tag | `v0.13.0`
`nodeExporter.image.pullPolicy` | node-exporter container image pull policy | `IfNotPresent`
`nodeExporter.extraArgs` | Additional node-exporter container arguments | `{}`
`nodeExporter.extraHostPathMounts` | Additional node-exporter hostPath mounts | `[]`
`nodeExporter.nodeSelector` | node labels for node-exporter pod assignment | `{}`
`nodeExporter.podAnnotations` | annotations to be added to node-exporter pods | `{}`
`nodeExporter.resources` | node-exporter resource requests and limits (YAML) | `{}`
Expand All @@ -117,6 +118,7 @@ Parameter | Description | Default
`server.image.pullPolicy` | Prometheus server container image pull policy | `IfNotPresent`
`server.alertmanagerURL` | (optional) alertmanager URL; only used if alertmanager.enabled = false | `""`
`server.extraArgs` | Additional Prometheus server container arguments | `{}`
`server.extraHostPathMounts` | Additional Prometheus server hostPath mounts | `[]`
`server.ingress.enabled` | If true, Prometheus server Ingress will be created | `false`
`server.ingress.annotations` | Prometheus server Ingress annotations | `[]`
`server.ingress.hosts` | Prometheus server Ingress hostnames | `[]`
Expand Down
10 changes: 10 additions & 0 deletions stable/prometheus/templates/node-exporter-daemonset.yaml
Expand Up @@ -44,6 +44,11 @@ spec:
- name: sys
mountPath: /host/sys
readOnly: true
{{- range .Values.nodeExporter.extraHostPathMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
{{- end }}
hostNetwork: true
hostPID: true
{{- if .Values.nodeExporter.nodeSelector }}
Expand All @@ -57,4 +62,9 @@ spec:
- name: sys
hostPath:
path: /sys
{{- range .Values.nodeExporter.extraHostPathMounts }}
- name: {{ .name }}
hostPath:
path: {{ .hostPath }}
{{- end }}
{{- end -}}
10 changes: 10 additions & 0 deletions stable/prometheus/templates/server-deployment.yaml
Expand Up @@ -65,6 +65,11 @@ spec:
- name: storage-volume
mountPath: {{ .Values.alertmanager.persistentVolume.mountPath }}
subPath: "{{ .Values.server.persistentVolume.subPath }}"
{{- range .Values.server.extraHostPathMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
readOnly: {{ .readOnly }}
{{- end }}
{{- if .Values.server.nodeSelector }}
nodeSelector:
{{ toYaml .Values.server.nodeSelector | indent 8 }}
Expand All @@ -81,3 +86,8 @@ spec:
{{- else }}
emptyDir: {}
{{- end -}}
{{- range .Values.server.extraHostPathMounts }}
- name: {{ .name }}
hostPath:
path: {{ .hostPath }}
{{- end }}

0 comments on commit bbdfb4d

Please sign in to comment.