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

Merge branch 'ST-515-safe-instance-name' into 'master'

ST-515 - Make instance names k8s safe

See merge request ska-telescope/ska-docker!45
parents 7678985c a2b25615
No related branches found
No related tags found
No related merge requests found
...@@ -2,12 +2,12 @@ apiVersion: v2 ...@@ -2,12 +2,12 @@ apiVersion: v2
appVersion: "1.0" appVersion: "1.0"
description: A Helm chart for deploying the HDB++ archiver for the MVP on Kubernetes description: A Helm chart for deploying the HDB++ archiver for the MVP on Kubernetes
name: archiver name: archiver
version: 0.2.8 version: 0.2.9
appVersion: 1.16.0 appVersion: 1.16.0
icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png
dependencies: dependencies:
- name: tango-util - name: tango-util
version: 0.2.5 version: 0.2.6
repository: file://../tango-util repository: file://../tango-util
# The archiver cannot have the tango-base since we allow only one level in the chart hierarchies # The archiver cannot have the tango-base since we allow only one level in the chart hierarchies
# - name: tango-base # - name: tango-base
......
...@@ -10,6 +10,6 @@ dependencies: ...@@ -10,6 +10,6 @@ dependencies:
repository: file://../tango-base repository: file://../tango-base
condition: tango-base.enabled,global.sub-system.tango-base.enabled condition: tango-base.enabled,global.sub-system.tango-base.enabled
- name: archiver - name: archiver
version: 0.2.8 version: 0.2.9
repository: file://../archiver repository: file://../archiver
condition: archiver.enabled,global.sub-system.archiver.enabled condition: archiver.enabled,global.sub-system.archiver.enabled
...@@ -6,5 +6,5 @@ version: 0.2.9 ...@@ -6,5 +6,5 @@ version: 0.2.9
icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png
dependencies: dependencies:
- name: tango-util - name: tango-util
version: 0.2.5 version: 0.2.6
repository: file://../tango-util repository: file://../tango-util
...@@ -2,8 +2,8 @@ apiVersion: v2 ...@@ -2,8 +2,8 @@ apiVersion: v2
description: A Helm chart library of utilities for TANGO deployents description: A Helm chart library of utilities for TANGO deployents
name: tango-util name: tango-util
type: library type: library
appVersion: 0.2.5 appVersion: 0.2.6
version: 0.2.5 version: 0.2.6
icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png icon: https://www.skatelescope.org/wp-content/uploads/2016/07/09545_NEW_LOGO_2014.png
maintainers: maintainers:
- name: Matteo Di Carlo - name: Matteo Di Carlo
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
{{ $tango_host := tpl (coalesce .local.Values.global.tango_host .local.Values.tango_host $default_tango_host | toString) .local }} {{ $tango_host := tpl (coalesce .local.Values.global.tango_host .local.Values.tango_host $default_tango_host | toString) .local }}
{{ $dsconfig := coalesce .local.Values.global.dsconfig .local.Values.dsconfig}} {{ $dsconfig := coalesce .local.Values.global.dsconfig .local.Values.dsconfig}}
{{ $chart := .local }} {{ $chart := .local }}
{{ $safe_instance := .instance |toString | replace "_" "-" }}
# Device Server Service # Device Server Service
# Parameter: deviceserver struct, global.Values.dsconfig struct, project image struct # Parameter: deviceserver struct, global.Values.dsconfig struct, project image struct
...@@ -13,11 +14,11 @@ ...@@ -13,11 +14,11 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{tpl (.deviceserver.name | toString) $chart }}-{{ .instance | toString }} name: {{tpl (.deviceserver.name | toString) $chart }}-{{ $safe_instance }}
namespace: {{ .local.Release.Namespace }} namespace: {{ .local.Release.Namespace }}
labels: labels:
{{ toYaml $labels | indent 4 }} {{ toYaml $labels | indent 4 }}
component: {{tpl (.deviceserver.name | toString) $chart }}-{{ .instance | toString }} component: {{tpl (.deviceserver.name | toString) $chart }}-{{ $safe_instance }}
function: {{ .deviceserver.function }} function: {{ .deviceserver.function }}
domain: {{ .deviceserver.domain }} domain: {{ .deviceserver.domain }}
subsystem: {{ .local.Values.subsystem }} subsystem: {{ .local.Values.subsystem }}
...@@ -26,18 +27,18 @@ metadata: ...@@ -26,18 +27,18 @@ metadata:
spec: spec:
selector: selector:
subsystem: {{ .local.Values.subsystem }} subsystem: {{ .local.Values.subsystem }}
component: {{tpl (.deviceserver.name | toString) $chart }}-{{ .instance | toString }} component: {{tpl (.deviceserver.name | toString) $chart }}-{{ $safe_instance }}
clusterIP: None clusterIP: None
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: {{tpl (.deviceserver.name | toString) $chart }}-{{ .instance | toString }} name: {{tpl (.deviceserver.name | toString) $chart }}-{{ $safe_instance }}
namespace: {{ .local.Release.Namespace }} namespace: {{ .local.Release.Namespace }}
labels: labels:
{{ toYaml $labels | indent 4 }} {{ toYaml $labels | indent 4 }}
component: {{tpl (.deviceserver.name | toString) $chart }}-{{ .instance | toString }} component: {{tpl (.deviceserver.name | toString) $chart }}-{{ $safe_instance }}
function: {{ .deviceserver.function }} function: {{ .deviceserver.function }}
domain: {{ .deviceserver.domain }} domain: {{ .deviceserver.domain }}
subsystem: {{ .local.Values.subsystem }} subsystem: {{ .local.Values.subsystem }}
...@@ -46,14 +47,14 @@ metadata: ...@@ -46,14 +47,14 @@ metadata:
spec: spec:
selector: selector:
matchLabels: matchLabels:
component: {{tpl (.deviceserver.name | toString) $chart }}-{{ .instance | toString }} component: {{tpl (.deviceserver.name | toString) $chart }}-{{ $safe_instance }}
subsystem: {{ .local.Values.subsystem }} subsystem: {{ .local.Values.subsystem }}
serviceName: {{tpl (.deviceserver.name | toString) $chart }}-{{ .instance | toString }} serviceName: {{tpl (.deviceserver.name | toString) $chart }}-{{ $safe_instance }}
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
component: {{tpl (.deviceserver.name | toString) $chart }}-{{ .instance | toString }} component: {{tpl (.deviceserver.name | toString) $chart }}-{{ $safe_instance }}
function: {{ .deviceserver.function }} function: {{ .deviceserver.function }}
domain: {{ .deviceserver.domain }} domain: {{ .deviceserver.domain }}
subsystem: {{ .local.Values.subsystem }} subsystem: {{ .local.Values.subsystem }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment