From: John Keeney Date: Tue, 14 May 2024 16:23:25 +0000 (+0000) Subject: Merge "ICS producer-consumer sample app Helm chart" X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=46f5295920d6e1909dedc056f5169c14a70f528d;hp=3a4561d445fff624a893283f76744dece0fe3acf;p=nonrtric.git Merge "ICS producer-consumer sample app Helm chart" --- diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-consumer/.helmignore b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-consumer/Chart.yaml b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/Chart.yaml new file mode 100644 index 00000000..8b972e82 --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: ics-consumer +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.16.0" diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-consumer/templates/consumer-deployment.yaml b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/templates/consumer-deployment.yaml new file mode 100644 index 00000000..9c107fee --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/templates/consumer-deployment.yaml @@ -0,0 +1,41 @@ +# +# ========================LICENSE_START================================= +# O-RAN-SC +# +# 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. +# ========================LICENSE_END=================================== +# +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.consumer.name }} +spec: + replicas: {{ .Values.consumer.replicaCount }} + selector: + matchLabels: + app: {{ .Values.consumer.name }} + template: + metadata: + labels: + app: {{ .Values.consumer.name }} + spec: + containers: + - name: {{ .Values.consumer.name }} + image: "{{ .Values.consumer.image.repository }}:{{ .Values.consumer.image.tag }}" + ports: + - containerPort: {{ .Values.consumer.service.port }} + env: + - name: KAFKA_SERVERS + value: "{{ .Values.kafka.host }}:{{ .Values.kafka.port }}" diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-consumer/templates/consumer-service.yaml b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/templates/consumer-service.yaml new file mode 100644 index 00000000..6b338380 --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/templates/consumer-service.yaml @@ -0,0 +1,31 @@ +# +# ========================LICENSE_START================================= +# O-RAN-SC +# +# 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. +# ========================LICENSE_END=================================== +# +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.consumer.name }} +spec: + type: NodePort + ports: + - port: {{ .Values.consumer.service.port }} + targetPort: {{ .Values.consumer.service.port }} + nodePort: {{ .Values.consumer.service.nodePort }} + selector: + app: {{ .Values.consumer.name }} diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-consumer/values.yaml b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/values.yaml new file mode 100644 index 00000000..5e6c5b02 --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-consumer/values.yaml @@ -0,0 +1,32 @@ +# +# ========================LICENSE_START================================= +# O-RAN-SC +# +# 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. +# ========================LICENSE_END=================================== +# +consumer: + name: kafka-consumer + replicaCount: 1 + image: + repository: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-sample-icsconsumer + tag: 0.0.1 + service: + port: 8081 + nodePort: 30081 + +kafka: + host: kafka-service + port: 9092 diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-producer/.helmignore b/sample-services/ics-producer-consumer/helm-chart/ics-producer/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-producer/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-producer/Chart.yaml b/sample-services/ics-producer-consumer/helm-chart/ics-producer/Chart.yaml new file mode 100644 index 00000000..e26165bd --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-producer/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: ics-producer +description: A Helm chart for Kubernetes +type: application +version: 0.1.0 +appVersion: "1.16.0" diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-producer/templates/producer-deployment.yaml b/sample-services/ics-producer-consumer/helm-chart/ics-producer/templates/producer-deployment.yaml new file mode 100644 index 00000000..b7433fcb --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-producer/templates/producer-deployment.yaml @@ -0,0 +1,41 @@ +# +# ========================LICENSE_START================================= +# O-RAN-SC +# +# 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. +# ========================LICENSE_END=================================== +# +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.producer.name }} +spec: + replicas: {{ .Values.producer.replicaCount }} + selector: + matchLabels: + app: {{ .Values.producer.name }} + template: + metadata: + labels: + app: {{ .Values.producer.name }} + spec: + containers: + - name: {{ .Values.producer.name }} + image: "{{ .Values.producer.image.repository }}:{{ .Values.producer.image.tag }}" + ports: + - containerPort: {{ .Values.producer.service.port }} + env: + - name: KAFKA_SERVERS + value: "{{ .Values.kafka.host }}:{{ .Values.kafka.port }}" diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-producer/templates/producer-service.yaml b/sample-services/ics-producer-consumer/helm-chart/ics-producer/templates/producer-service.yaml new file mode 100644 index 00000000..8e17906f --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-producer/templates/producer-service.yaml @@ -0,0 +1,31 @@ +# +# ========================LICENSE_START================================= +# O-RAN-SC +# +# 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. +# ========================LICENSE_END=================================== +# +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.producer.name }} +spec: + type: NodePort + ports: + - port: {{ .Values.producer.service.port }} + targetPort: {{ .Values.producer.service.port }} + nodePort: {{ .Values.producer.service.nodePort }} + selector: + app: {{ .Values.producer.name }} diff --git a/sample-services/ics-producer-consumer/helm-chart/ics-producer/values.yaml b/sample-services/ics-producer-consumer/helm-chart/ics-producer/values.yaml new file mode 100644 index 00000000..9a711980 --- /dev/null +++ b/sample-services/ics-producer-consumer/helm-chart/ics-producer/values.yaml @@ -0,0 +1,32 @@ +# +# ========================LICENSE_START================================= +# O-RAN-SC +# +# 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. +# ========================LICENSE_END=================================== +# +producer: + name: kafka-producer + replicaCount: 1 + image: + repository: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-sample-icsproducer + tag: 0.0.1 + service: + port: 8080 + nodePort: 30080 + +kafka: + host: kafka-service + port: 9092