X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=it%2Fdep.git;a=blobdiff_plain;f=smo-install%2Foran_oom%2Fdmaapmediatorservice%2Ftemplates%2F_helpers.tpl;fp=smo-install%2Foran_oom%2Fnonrtric-common%2Ftemplates%2F_a1simulator.tpl;h=4f3b0b1eb8c7cc39e0ca8f58433822e592279ebb;hp=d15ee939c809714376a766f18537ed5c529147df;hb=918108f729c368db61fe904024129f21269e19b7;hpb=c9ace66e2b4635918c4c4c473dfc7bcbeb41b7ae diff --git a/smo-install/oran_oom/nonrtric-common/templates/_a1simulator.tpl b/smo-install/oran_oom/dmaapmediatorservice/templates/_helpers.tpl similarity index 58% rename from smo-install/oran_oom/nonrtric-common/templates/_a1simulator.tpl rename to smo-install/oran_oom/dmaapmediatorservice/templates/_helpers.tpl index d15ee939..4f3b0b1e 100644 --- a/smo-install/oran_oom/nonrtric-common/templates/_a1simulator.tpl +++ b/smo-install/oran_oom/dmaapmediatorservice/templates/_helpers.tpl @@ -1,5 +1,6 @@ +{{/* ################################################################################ -# Copyright (c) 2020 Nordix Foundation. # +# Copyright (c) 2024 NYCU WINLab. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License. # @@ -13,18 +14,34 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ +*/}} -{{- define "common.name.a1simulator" -}} - {{- printf "a1simulator" -}} +{{- define "dmaapTopic.initContainer" -}} +- name: dmaap-topic-init + image: alpine:3.19.1 + command: + - sh + - -c + - apk add --no-cache curl jq; sh /app/dmaap-topic-init.sh; + volumeMounts: + - name: dmaap-topic-init + mountPath: /app {{- end -}} -{{- define "common.fullname.a1simulator" -}} - {{- $name := ( include "common.name.a1simulator" . ) -}} - {{- $namespace := ( include "common.namespace.nonrtric" . ) -}} - {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} +{{- define "dmaapTopic.initConfigMap" -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.name" . }}-dmaap-topic-init + namespace: {{ include "common.namespace" . }} + labels: {{- include "common.labels" . | nindent 4 }} +data: + dmaap-topic-init.sh: | + {{- tpl (.Files.Get "resources/dmaap-topic-init.sh") . | nindent 4 }} +{{- end }} -{{- define "common.containername.a1simulator" -}} - {{- $name := ( include "common.fullname.a1simulator" . ) -}} - {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} +{{- define "dmaapTopic.initVolume" -}} +- name: dmaap-topic-init + configMap: + name: {{ include "common.name" . }}-dmaap-topic-init +{{- end }}