-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
name: wave | ||
description: wave chart that runs on kubernetes | ||
version: 1.0.0 | ||
appVersion: v0.4.0 | ||
keywords: | ||
- wave | ||
- kubernetes | ||
home: https://github.com/pusher/wave | ||
sources: | ||
- https://github.com/pusher/wave |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "wave-name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" | lower -}} | ||
{{- 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 "wave-fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "wave-labels.chart" -}} | ||
app: {{ template "wave-name" . }} | ||
release: {{ .Release.Name | quote }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
heritage: {{ .Release.Service | quote }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{{- if .Values.global.rbac.enabled }} | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
labels: | ||
{{ include "wave-labels.chart" . | indent 4 }} | ||
name: {{ template "wave-fullname" . }} | ||
rules: | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
- secrets | ||
verbs: | ||
- list | ||
- get | ||
- update | ||
- patch | ||
- watch | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- events | ||
verbs: | ||
- create | ||
- update | ||
- patch | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- deployments | ||
- daemonsets | ||
- statefulsets | ||
verbs: | ||
- list | ||
- get | ||
- update | ||
- patch | ||
- watch | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{{- if .Values.global.rbac.enabled }} | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
labels: | ||
{{ include "wave-labels.chart" . | indent 4 }} | ||
name: {{ template "wave-fullname" . }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ template "wave-fullname" . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Values.serviceAccount.name | default (include "wave-fullname" .) }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- if gt .Values.replicas 1.0 }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
{{ include "wave-labels.chart" . | indent 4 }} | ||
name: {{ template "wave-fullname" . }} | ||
data: | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
annotations: {{ toYaml .Values.annotations | nindent 4 }} | ||
labels: | ||
{{ include "wave-labels.chart" . | indent 4 }} | ||
name: {{ template "wave-fullname" . }} | ||
spec: | ||
replicas: {{ .Values.replicas }} | ||
selector: | ||
matchLabels: | ||
{{ include "wave-labels.chart" . | indent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{ include "wave-labels.chart" . | indent 8 }} | ||
spec: | ||
containers: | ||
- image: "{{ .Values.image.name }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
name: {{ template "wave-fullname" . }} | ||
args: | ||
{{- if gt .Values.replicas 1.0 }} | ||
- --leader-election=true | ||
- --leader-election-id={{ template "wave-fullname" . }} | ||
- --leader-election-namespace={{ .Release.Namespace }} | ||
{{- end }} | ||
{{- if .Values.syncPeriod }} | ||
- --sync-period={{ .Values.syncPeriod }} | ||
{{- end }} | ||
securityContext: {{ toYaml .Values.securityContext | nindent 8 }} | ||
serviceAccountName: {{ .Values.serviceAccount.name | default (include "wave-fullname" .) }} | ||
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{- if .Values.serviceAccount.create }} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
{{- if .Values.global.imagePullSecrets }} | ||
imagePullSecrets: {{ toYaml .Values.global.imagePullSecrets | nindent 2 }} | ||
{{- end }} | ||
metadata: | ||
labels: | ||
{{ include "wave-labels.chart" . | indent 4 }} | ||
name: {{ .Values.serviceAccount.name | default (include "wave-fullname" .) }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
global: | ||
## Reference to one or more secrets to be used when pulling images | ||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ | ||
## | ||
imagePullSecrets: [] | ||
# - name: "image-pull-secret" | ||
rbac: | ||
enabled: true | ||
|
||
# Annotations for the wave pods | ||
annotations: {} | ||
image: | ||
name: quay.io/pusher/wave | ||
tag: v0.4.0 | ||
pullPolicy: IfNotPresent | ||
|
||
# Node selector for the wave pods | ||
nodeSelector: {} | ||
|
||
# Replicas > 1 will enable leader election | ||
replicas: 1 | ||
|
||
# https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ | ||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
|
||
# Service account config for the agent pods | ||
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: | ||
|
||
# Period for reconciliation | ||
# syncPeriod: 5m |