Skip to content

Commit

Permalink
(misc) support latest kubernetes, init container for streaming
Browse files Browse the repository at this point in the history
Signed-off-by: R.I.Pienaar <[email protected]>
  • Loading branch information
ripienaar committed Nov 2, 2020
1 parent 4bc81ff commit 94b2ea7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/aaasvc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: aaasvc
version: 0.0.2
version: 0.0.3
appVersion: 0.3.3
description: Choria AAA Server
keywords:
Expand Down
12 changes: 8 additions & 4 deletions charts/aaasvc/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.aaasvc.createIngress }}
---
apiVersion: networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ template "aaasvc.fullname" . }}
Expand All @@ -25,7 +25,11 @@ spec:
- host: {{ required "ingressHostname is required" .Values.aaasvc.ingressHostname }}
http:
paths:
- backend:
serviceName: {{ template "aaasvc.fullname" . }}
servicePort: 80
- path: /
pathType: Prefix
backend:
service:
name: {{ template "aaasvc.fullname" . }}
port:
number: 80
{{- end }}
2 changes: 1 addition & 1 deletion charts/broker/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: broker
version: 0.0.14
version: 0.0.15
appVersion: 0.14.0
description: Choria Network Broker
keywords:
Expand Down
13 changes: 13 additions & 0 deletions charts/broker/templates/streaming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@ spec:
fsGroup: {{ .Values.securityContext.fsGroup }}
{{- end }}

{{- if and .Values.streaming.storageInit .Values.streaming.storageClassName }}
initContainers:
- name: storage-init
image: busybox
command: ["/bin/chown", "-R", "{{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }}", "/data"]
volumeMounts:
{{- if .Values.streaming.storageClassName }}
- mountPath: "/data"
name: {{ .Values.streaming.pvcName }}
readOnly: false
{{- end }}
{{- end }}

containers:
- name: stream
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
2 changes: 2 additions & 0 deletions charts/broker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ streaming:
eventRetention: 24h
# How long to retain Autonomous Agent events - including Scout events, 0 disables
stateRetention: 24h
# Use an init container to set the correct permissions for the mount
storageInit: false

# Broker specific settings
broker:
Expand Down

0 comments on commit 94b2ea7

Please sign in to comment.