Skip to content
Snippets Groups Projects
Commit 6ffb7a94 authored by Matteo Di Carlo's avatar Matteo Di Carlo
Browse files

ST-581 from master

parent 8f600fab
Branches
Tags
No related merge requests found
......@@ -2,10 +2,10 @@ apiVersion: v2
appVersion: "1.0"
description: A Helm chart for deploying the TANGO base system on Kubernetes
name: ska-tango-images
version: 0.1.11
version: 0.1.0
icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png
dependencies:
- name: tango-base
version: 0.2.12
version: 0.2.13
repository: file://../tango-base
condition: tango-base.enabled,global.sub-system.tango-base.enabled
\ No newline at end of file
......@@ -2,9 +2,9 @@ apiVersion: v2
appVersion: "1.0"
description: A Helm chart for deploying the TANGO base system on Kubernetes
name: tango-base
version: 0.2.12
version: 0.2.13
icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png
dependencies:
- name: tango-util
version: 0.2.8
version: 0.2.9
repository: file://../tango-util
......@@ -2,8 +2,8 @@ apiVersion: v2
description: A Helm chart library of utilities for TANGO deployents
name: tango-util
type: library
appVersion: 0.2.8
version: 0.2.8
appVersion: 0.2.9
version: 0.2.9
icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png
maintainers:
- name: Matteo Di Carlo
......
......@@ -5,6 +5,39 @@
{{ $default_tango_host := printf "%s-%s" "databaseds-tango-base-" .Release.Name }}
{{ $tango_host := tpl (coalesce .Values.global.tango_host .Values.tango_host $default_tango_host | toString) . }}
{{ $itango := coalesce .Values.global.itango .Values.itango}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.subsystem }}-sa-{{ .Release.Name }}
namespace: {{ .Release.Namespace }}
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.subsystem }}-role-bind-{{ .Release.Name }}
namespace: {{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: {{ .Values.subsystem }}-sa-{{ .Release.Name }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
name: {{ .Values.subsystem }}-role-{{ .Release.Name }}
apiGroup: rbac.authorization.k8s.io
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.subsystem }}-role-{{ .Release.Name }}
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: ["", "batch", "apps"]
resources: ["jobs"]
verbs: ["list", "get", "watch"]
---
# Device Server configurations
apiVersion: v1
......
......@@ -62,7 +62,20 @@ spec:
annotations:
{{ toYaml $annotations | indent 8 }}
spec:
{{ if $chart.Values.dsconfig.configuration_file }}
serviceAccountName: {{ $chart.Values.subsystem }}-sa-{{ $chart.Release.Name }}
{{ end }}
initContainers:
{{ if $chart.Values.dsconfig.configuration_file }}
- name: wait-for-configuration
image: "bitnami/kubectl:latest"
imagePullPolicy: IfNotPresent
command:
- sh
- -c
args:
- kubectl wait job --for=condition=complete {{ $chart.Values.subsystem }}-configuration-{{ $chart.Release.Name }} {{ if $chart.Values.dsconfig.timeout }} --timeout={{ $chart.Values.dsconfig.timeout }} {{ end }}
{{ end }}
{{ if (.deviceserver.depends_on) }}
{{ range $index, $device := .deviceserver.depends_on }}
{{ if ($device.host) }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment