mirror of
https://github.com/submariner-io/submariner-charts.git
synced 2026-09-20 19:10:34 +00:00
The submariner-operator Helm chart deploys Submariner using the Submariner operator: it deploys the CRDs, roles, and SAs required to run the operator and Submariner, then pushes a Submariner CR to instruct the operator to deploy Submariner. This patch also adds a Makefile to validate the deployments; run make deploy to test the Helm charts (this will bring up two clusters, install the broker on one of them and the operator on both, and end with a connectivity test). Fixes: #17 Signed-off-by: Stephen Kitt <skitt@redhat.com>
95 lines
3.2 KiB
Smarty
95 lines
3.2 KiB
Smarty
{{/* vim: set filetype=mustache: */}}
|
|
{{/*
|
|
Expand the name of the chart.
|
|
*/}}
|
|
{{- define "submariner.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).
|
|
If release name contains chart name it will be used as a full name.
|
|
*/}}
|
|
{{- define "submariner.fullname" -}}
|
|
{{- if .Values.fullnameOverride -}}
|
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
|
{{- if contains $name .Release.Name -}}
|
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
|
{{- else -}}
|
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create chart name and version as used by the chart label.
|
|
*/}}
|
|
{{- define "submariner.chart" -}}
|
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create the name of the submariner-operator service account to use
|
|
*/}}
|
|
{{- define "submariner.operatorServiceAccountName" -}}
|
|
{{- if .Values.serviceAccounts.operator.create -}}
|
|
{{ default (printf "%s" (include "submariner.fullname" .)) .Values.serviceAccounts.operator.name }}
|
|
{{- else -}}
|
|
{{ default "default" .Values.serviceAccounts.operator.name }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create the name of the submariner-engine service account to use
|
|
*/}}
|
|
{{- define "submariner.engineServiceAccountName" -}}
|
|
{{- if .Values.serviceAccounts.engine.create -}}
|
|
{{ default (printf "%s-engine" (include "submariner.fullname" .)) .Values.serviceAccounts.engine.name }}
|
|
{{- else -}}
|
|
{{ default "default" .Values.serviceAccounts.engine.name }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create the name of the submariner-route-agent service account to use
|
|
*/}}
|
|
{{- define "submariner.routeAgentServiceAccountName" -}}
|
|
{{- if .Values.serviceAccounts.routeAgent.create -}}
|
|
{{ default (printf "%s-routeagent" (include "submariner.fullname" .)) .Values.serviceAccounts.routeAgent.name }}
|
|
{{- else -}}
|
|
{{ default "default" .Values.serviceAccounts.routeAgent.name }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create the name of the submariner-globalnet service account to use
|
|
*/}}
|
|
{{- define "submariner.globalnetServiceAccountName" -}}
|
|
{{- if .Values.serviceAccounts.globalnet.create -}}
|
|
{{ default (printf "%s:globalnet" (include "submariner.fullname" .)) .Values.serviceAccounts.globalnet.name }}
|
|
{{- else -}}
|
|
{{ default "default" .Values.serviceAccounts.globalnet.name }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create the name of the submariner-lighthouse service account to use
|
|
*/}}
|
|
{{- define "submariner.lighthouseServiceAccountName" -}}
|
|
{{- if .Values.submariner.serviceDiscovery -}}
|
|
{{ default (printf "%s-lighthouse" (include "submariner.fullname" .)) .Values.serviceAccounts.lighthouse.name }}
|
|
{{- else -}}
|
|
{{ default "default" .Values.serviceAccounts.lighthouse.name }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
|
|
{{/*
|
|
Create the name of the submariner-lighthouse-coredns service name to use
|
|
*/}}
|
|
{{- define "submariner.lighthouseDnsName" -}}
|
|
{{- default (printf "%s-lighthouse-coredns" (include "submariner.fullname" .)) .Values.lighthouseCoredns.name }}
|
|
{{- end -}}
|