charts_already_exists=()
-COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice rappcatalogueenhancedservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager orufhrecovery ransliceassurance capifcore rappmanager dmeparticipant"
+COMPONENTS="
+a1controller \
+a1simulator \
+capifcore \
+controlpanel \
+dmaapadapterservice \
+dmaapmediatorservice \
+dmeparticipant \
+helmmanager \
+informationservice \
+nonrtricgateway \
+orufhrecovery \
+policymanagementservice \
+ransliceassurance \
+rappcatalogueenhancedservice \
+rappcatalogueservice \
+rappmanager \
+servicemanager \
+"
+
for component in $COMPONENTS; do
echo "Packaging NONRTRIC component [$component]"
helm dep up $ROOT_DIR/../nonrtric/helm/$component
if ! kubectl get ns ${NONRTRIC_NAMESPACE:-nonrtric}> /dev/null 2>&1; then
kubectl create ns ${NONRTRIC_NAMESPACE:-nonrtric}
fi
+
if ! kubectl get ns onap > /dev/null 2>&1; then
kubectl create ns onap
fi
+HELM_NAME_OPT=""
+if [ -z $IS_HELM3 ];then
+ HELM_NAME_OPT="--name"
+fi
+
echo "Install Kong- $INSTALL_KONG"
if [ "$INSTALL_KONG" = true ];then
- echo "Installing Kong"
- helm repo add kong https://charts.konghq.com --force-update
- helm repo update
- helm install kong-nonrtric --namespace ${NONRTRIC_NAMESPACE:-nonrtric} kong/kong --set ingressController.installCRDs=false --set admin.enabled=true
+ echo "Install kongstorage through helm"
+ helm install kongstorage -n "${NONRTRIC_NAMESPACE:-nonrtric}" ${HELM_NAME_OPT} "$ROOT_DIR/../nonrtric/helm/kongstorage"
+
+ echo "Installing Kong"
+ helm repo add kong https://charts.konghq.com --force-update
+ helm repo update
+ helm install kong-nonrtric kong/kong -n ${NONRTRIC_NAMESPACE:-nonrtric} -f dep/nonrtric/helm/kongstorage/kongvalues.yaml
fi
kubectl create configmap -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe --from-file=recipe=$OVERRIDEYAML
echo "install-ranpm.sh completed"
fi
-HELM_NAME_OPT=""
-if [ -z $IS_HELM3 ];then
- HELM_NAME_OPT="--name"
-fi
-
echo "helm install -f $OVERRIDEYAML --namespace ${NONRTRIC_NAMESPACE:-nonrtric} ${HELM_NAME_OPT} ${RELEASE_PREFIX} $ROOT_DIR/../nonrtric/helm/nonrtric"
-helm install -f $OVERRIDEYAML --namespace "${NONRTRIC_NAMESPACE:-nonrtric}" ${HELM_NAME_OPT} "${RELEASE_PREFIX}" "$ROOT_DIR/../nonrtric/helm/nonrtric"
+helm install -f $OVERRIDEYAML -n "${NONRTRIC_NAMESPACE:-nonrtric}" ${HELM_NAME_OPT} "${RELEASE_PREFIX}" "$ROOT_DIR/../nonrtric/helm/nonrtric"
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
echo "** $ROOT_DIR"
-COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice rappcatalogueenhancedservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager orufhrecovery ransliceassurance capifcore ranpm"
+COMPONENTS="
+a1controller \
+a1simulator \
+capifcore \
+controlpanel \
+dmaapadapterservice \
+dmaapmediatorservice \
+dmeparticipant \
+helmmanager \
+informationservice \
+nonrtricgateway \
+orufhrecovery \
+policymanagementservice \
+ransliceassurance \
+rappcatalogueenhancedservice \
+rappcatalogueservice \
+rappmanager \
+servicemanager \
+"
+
RECIPE_NAMESPACE=$(kubectl get cm --all-namespaces | grep nonrtric-recipe | awk '{print $1}')
kubectl get configmap -n $RECIPE_NAMESPACE nonrtric-recipe -o jsonpath='{.data.recipe}' > /tmp/recipe.yaml
INSTALL_RANPM=$(cat /tmp/recipe.yaml | awk '/^ installRanpm:/{print $2}')
if [ "$INSTALL_KONG" = true ];then
- echo "Uninstalling Kong"
- helm delete kong-nonrtric --namespace kong
+ echo "Warning - deleting Kong routes and services for ServiceManager"
+ SERVICEMANAGER_POD=$(kubectl get pods -o custom-columns=NAME:.metadata.name -l app=nonrtric-servicemanager --no-headers -n ${NONRTRIC_NAMESPACE:-nonrtric})
+ if [[ -n $SERVICEMANAGER_POD ]]; then
+ kubectl exec $SERVICEMANAGER_POD -n ${NONRTRIC_NAMESPACE:-nonrtric} -- ./kongclearup
+ else
+ echo "Error - Servicemanager pod not found, didn't delete Kong routes and services for ServiceManager"
+ fi
+ echo "Uninstalling kongstorage"
+ helm delete kongstorage -n "${NONRTRIC_NAMESPACE:-nonrtric}"
+ echo "Uninstalling Kong"
+ helm delete kong-nonrtric -n ${NONRTRIC_NAMESPACE:-nonrtric}
fi
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
installRappcatalogueservice: true
installRappcatalogueenhancedservice: true
installNonrtricgateway: true
- installKong: false
+ installKong: true
installDmaapadapterservice: true
installDmaapmediatorservice: true
installHelmmanager: true
installOrufhrecovery: true
installRansliceassurance: true
installCapifcore: true
+ installServicemanager: true
installRanpm: false
# rApp Manager functionality relies on ACM for its operation
installrAppmanager: true
oru_to_odu_map_file: "o-ru-to-o-du-map.csv"
log_level: "Info"
-
capifcore:
capifcore:
imagePullPolicy: IfNotPresent
chart_museum_url: "http://chartmuseum:8080"
repo_name: "capifcore"
+servicemanager:
+ servicemanager:
+ imagePullPolicy: IfNotPresent
+ image:
+ registry: "nexus3.o-ran-sc.org:10004/o-ran-sc"
+ name: nonrtric-plt-servicemanager
+ tag: 0.1.0
+
rappmanager:
rappmanager:
imagePullPolicy: IfNotPresent
--- /dev/null
+################################################################################
+# Copyright (c) 2024 OpenInfra Foundation Europe. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+apiVersion: v1
+appVersion: "2.0.0"
+description: A Helm chart for kongstorage
+name: kongstorage
+version: 1.0.0
--- /dev/null
+
+# ============LICENSE_START===============================================
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+#
+# Default values for Kong's Helm Chart.
+#
+# Sections:
+# - Deployment parameters
+# - Kong parameters
+# - Ingress Controller parameters
+# - Postgres sub-chart parameters
+# - Miscellaneous parameters
+# For a detailed example of values.yaml, please see https://github.com/Kong/charts/blob/main/charts/kong/values.yaml
+# -----------------------------------------------------------------------------
+# Deployment parameters
+# -----------------------------------------------------------------------------
+deployment:
+ kong:
+ enabled: true
+ serviceAccount:
+ create: true
+ automountServiceAccountToken: false
+# -----------------------------------------------------------------------------
+# Kong parameters
+# -----------------------------------------------------------------------------
+env:
+ database: "postgres"
+# Specify Kong's Docker image and repository details here
+image:
+ repository: kong
+ tag: "3.4"
+ pullPolicy: IfNotPresent
+# Specify Kong admin API service and listener configuration
+admin:
+ enabled: true
+ type: NodePort
+ http:
+ # Enable plaintext HTTP listen for the admin API
+ enabled: true
+ servicePort: 8001
+ containerPort: 8001
+ nodePort: 32081
+ parameters: []
+ tls:
+ # Enable HTTPS listen for the admin API
+ enabled: false
+ servicePort: 8444
+ containerPort: 8444
+ nodePort: 32444
+ parameters:
+ - http2
+ ingress:
+ enabled: false
+# Specify Kong proxy service configuration
+proxy:
+ # Enable creating a Kubernetes service for the proxy
+ enabled: true
+ type: LoadBalancer
+ loadBalancerClass:
+ nameOverride: ""
+ annotations: {}
+ labels:
+ enable-metrics: "true"
+ http:
+ # Enable plaintext HTTP listen for the proxy
+ enabled: true
+ servicePort: 80
+ containerPort: 8000
+ # Set a nodePort which is available if service type is NodePort
+ nodePort: 32080
+ parameters: []
+ tls:
+ # Enable HTTPS listen for the proxy
+ enabled: false
+ servicePort: 443
+ containerPort: 8443
+ parameters:
+ - http2
+# -----------------------------------------------------------------------------
+# Ingress Controller parameters
+# -----------------------------------------------------------------------------
+ingressController:
+ enabled: true
+ installCRDs: false
+ image:
+ repository: kong/kubernetes-ingress-controller
+ tag: "3.0"
+ env:
+ kong_admin_tls_skip_verify: true
+# -----------------------------------------------------------------------------
+# Postgres sub-chart parameters
+# -----------------------------------------------------------------------------
+postgresql:
+ enabled: true
+ auth:
+ username: kong
+ database: kong
+ password: kong
+ postgresPassword: kong
+ image:
+ # use postgres < 14 until is https://github.com/Kong/kong/issues/8533 resolved
+ tag: 13.11.0-debian-11-r20
+ service:
+ ports:
+ postgresql: "5432"
+ volumePermissions:
+ enabled: true
+ primary:
+ persistence:
+ existingClaim: kongpvc
+# -----------------------------------------------------------------------------
+# Miscellaneous parameters
+# -----------------------------------------------------------------------------
+waitImage:
+ enabled: true
+ pullPolicy: IfNotPresent
+replicaCount: 1
--- /dev/null
+# ============LICENSE_START===============================================
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+#
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+ name: kongpv
+ labels:
+ type: local
+spec:
+ capacity:
+ storage: "{{ .Values.kongpv.persistence.size }}"
+ accessModes:
+ - "{{ .Values.kongpv.persistence.accessMode }}"
+ hostPath:
+ path: "{{ .Values.kongpv.persistence.path }}"
+ persistentVolumeReclaimPolicy: "{{ .Values.kongpv.persistence.volumeReclaimPolicy }}"
--- /dev/null
+# ============LICENSE_START===============================================
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+#
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: kongpvc
+spec:
+ accessModes:
+ - "{{ .Values.kongpvc.persistence.accessMode }}"
+ resources:
+ requests:
+ storage: "{{ .Values.kongpvc.persistence.size }}"
+ volumeName: kongpv
--- /dev/null
+# ============LICENSE_START===============================================
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+
+# Default values for Kong PV and PVC
+
+kongpv:
+ enabled: true # Disabled for Minikube
+ persistence:
+ volumeReclaimPolicy: Delete
+ accessMode: ReadWriteOnce
+ size: 2Gi
+ path: "/tmp/kongpv"
+
+kongpvc:
+ persistence:
+ volumeReclaimPolicy: Delete
+ accessMode: ReadWriteOnce
+ size: 2Gi
repository: "@local"
condition: nonrtric.installCapifcore
+ - name: servicemanager
+ version: ~1.0.0
+ repository: "@local"
+ condition: nonrtric.installServicemanager
+
- name: rappmanager
version: ~1.0.0
repository: "@local"
installOrufhrecovery: true
installRansliceassurance: true
installCapifcore: true
+ installServicemanager: false
installRanpm: true
installrAppmanager: true
installDmeParticipant: true
--- /dev/null
+################################################################################
+# Copyright (c) 2024 OpenInfra Foundation Europe. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+apiVersion: v1
+appVersion: "2.0.0"
+description: A Helm chart for ServiceManager
+name: servicemanager
+version: 1.0.0
--- /dev/null
+################################################################################
+# Copyright (c) 2024 OpenInfra Foundation Europe. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+dependencies:
+ - name: nonrtric-common
+ version: ^2.0.0
+ repository: "@local"
--- /dev/null
+################################################################################
+# Copyright (c) 2024 OpenInfra Foundation Europe. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: servicemanager-configmap
+data:
+{{- range $key, $value := .Values.data }}
+ {{ $key }}: |
+{{ $value | indent 4 }}
+{{- end }}
--- /dev/null
+################################################################################
+# Copyright (c) 2024 OpenInfra Foundation Europe. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+ name: {{ include "common.name.servicemanager" . }}
+ namespace: {{ include "common.namespace.nonrtric" . }}
+ generation: 1
+ labels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.servicemanager" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+ annotations:
+ deployment.kubernetes.io/revision: '1'
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.servicemanager" . }}
+ release: {{ .Release.Name }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.servicemanager" . }}
+ release: {{ .Release.Name }}
+ spec:
+ hostname: {{ include "common.name.servicemanager" . }}
+ containers:
+ - name: {{ include "common.container.servicemanager" . }}
+ image: {{ .Values.servicemanager.image.registry }}/{{ .Values.servicemanager.image.name }}:{{ .Values.servicemanager.image.tag }}
+ imagePullPolicy: {{ .Values.servicemanager.imagePullPolicy }}
+ resources:
+ limits:
+ memory: 256Mi
+ cpu: "250m"
+ requests:
+ memory: 128Mi
+ cpu: "80m"
+ volumeMounts:
+ - name: servicemanager-config-volume
+ mountPath: /app/servicemanager/.env
+ subPath: .env
+ volumes:
+ - name: servicemanager-config-volume
+ configMap:
+ name: servicemanager-configmap
--- /dev/null
+################################################################################
+# Copyright (c) 2024 OpenInfra Foundation Europe. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+kind: Service
+apiVersion: v1
+metadata:
+ name: {{ include "common.name.servicemanager" . }}
+ namespace: {{ include "common.namespace.nonrtric" . }}
+ labels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.servicemanager" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ ports:
+ {{if eq .Values.servicemanager.service.allowHttp true -}}
+ - name: {{ index .Values.servicemanager.service.httpName }}
+ port: {{ .Values.servicemanager.service.port }}
+ targetPort: {{ .Values.servicemanager.service.targetPort }}
+ {{if eq .Values.servicemanager.service.type "NodePort" -}}
+ nodePort: {{ .Values.servicemanager.service.nodePort }}
+ {{- end }}
+ protocol: TCP
+ {{- end }}
+ selector:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.servicemanager" . }}
+ release: {{ .Release.Name }}
+ type: {{ .Values.servicemanager.service.type }}
--- /dev/null
+# ============LICENSE_START===============================================
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
+# ========================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=================================================
+
+# Default values for Servicemanager
+
+servicemanager:
+ imagePullPolicy: IfNotPresent
+ image:
+ registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc'
+ name: nonrtric-plt-servicemanager
+ tag: 0.1.0
+ apiVersion: v1
+ kind: ConfigMap
+ metadataName: servicemanager-configmap
+ service:
+ httpName: http
+ allowHttp: true
+ port: 8095
+ targetPort: 8095
+ nodePort: 31575
+ type: NodePort
+ SERVICE_MANAGER_ENV: ""
+
+data:
+ .env: |
+ KONG_DOMAIN: "kong"
+ KONG_PROTOCOL: "http"
+ KONG_IPV4: "kong-nonrtric-kong-admin.nonrtric.svc.cluster.local"
+ KONG_DATA_PLANE_PORT: "80"
+ KONG_CONTROL_PLANE_PORT: "8001"
+ CAPIF_PROTOCOL: "http"
+ CAPIF_IPV4: "capifcore.nonrtric.svc.cluster.local"
+ CAPIF_PORT: "8090"
+ LOG_LEVEL: "Debug"
+ SERVICE_MANAGER_PORT: "8095"
--- /dev/null
+################################################################################
+# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+{{- define "common.name.servicemanager" -}}
+ {{- printf "servicemanager" -}}
+{{- end -}}
+{{- define "common.container.servicemanager" -}}
+ {{- $name := ( include "common.name.servicemanager" . ) -}}
+ {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}