From: wrider Date: Tue, 18 Jun 2019 02:57:38 +0000 (-0400) Subject: Add external service endpoints X-Git-Tag: 0.0.2~85^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=7907349292a23a3cd138dd64d9d7966edbefbb88;p=it%2Fdep.git Add external service endpoints Defining external endpoints as services so they can be available to in-cluster components by their service name, for example http://r0-ext.ricaux.svc.cluster.local, or http://r-ext for short. Change-Id: Iddb4082f0ee48865bb9d52ba0de2df5503511c99 Signed-off-by: wrider --- diff --git a/ric-aux/85-Ext-Services/bin/install b/ric-aux/85-Ext-Services/bin/install new file mode 100755 index 00000000..d4a538de --- /dev/null +++ b/ric-aux/85-Ext-Services/bin/install @@ -0,0 +1,59 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + + +OVERRIDEYAML=$1 + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +source $DIR/../etc/ext.conf + +if [ -z "$RICAUX_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICAUX_RELEASE_NAME +fi +if [ -z "$RICAUX_NAMESPACE" ];then + NAMESPACE=$namespace +else + NAMESPACE=$RICAUX_NAMESPACE +fi + +RICAUX_COMPONENTS="ext" + +echo "Deploying RIC AUX components [$RICAUX_COMPONENTS]" +echo "Platform Namespace: $NAMESPACE" +echo "Helm Release Name: $RELEASE_NAME" + + +COMMON_CHART_VERSION=$(cat $DIR/../../../ric-platform/50-RIC-Platform/helm/common/Chart.yaml | grep version | awk '{print $2}') + +helm package -d /tmp $DIR/../../../ric-platform/50-RIC-Platform/helm/common + + +for component in $RICAUX_COMPONENTS; do + echo "Preparing chart for comonent $component" + mkdir -p $DIR/../helm/$component/charts/ + cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/ + if [ -z $OVERRIDEYAML ]; then + helm install --debug --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component + else + helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component + fi +done diff --git a/ric-aux/85-Ext-Services/bin/uninstall b/ric-aux/85-Ext-Services/bin/uninstall new file mode 100755 index 00000000..97edfa22 --- /dev/null +++ b/ric-aux/85-Ext-Services/bin/uninstall @@ -0,0 +1,48 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + + + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + + +source $DIR/../etc/ext.conf + +if [ -z "$RICAUX_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICAUX_RELEASE_NAME +fi +if [ -z "$RICAUX_NAMESPACE" ];then + NAMESPACE=$namespace +else + NAMESPACE=$RICAUX_NAMESPACE +fi + +RICAUX_COMPONENTS="ext" + +echo "Undeploying RIC AUX components [$RICAUX_COMPONENTS]" +echo "Platform Namespace: $NAMESPACE" +echo "Helm Release Name: $RELEASE_NAME" + + + +for component in $RICAUX_COMPONENTS; do + helm delete --purge "${RELEASE_NAME}-$component" +done diff --git a/ric-aux/85-Ext-Services/etc/ext.conf b/ric-aux/85-Ext-Services/etc/ext.conf new file mode 100644 index 00000000..0ee625be --- /dev/null +++ b/ric-aux/85-Ext-Services/etc/ext.conf @@ -0,0 +1,25 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + + +# helm_release_name defines the release name helm will use to deploy RIC +# It will be overrided by RICAUX_RELEASE_NAME +helm_release_name=r0 + +# namespace defines the namespace that helm will use to deploy RIC +# It will be overrided by RICAUX_NAMESPACE +namespace=ricaux diff --git a/ric-aux/85-Ext-Services/helm/ext/Chart.yaml b/ric-aux/85-Ext-Services/helm/ext/Chart.yaml new file mode 100644 index 00000000..d6e6bb6a --- /dev/null +++ b/ric-aux/85-Ext-Services/helm/ext/Chart.yaml @@ -0,0 +1,23 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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: "1.0" +description: A Helm chart for setting up external endpoints as k8s services +name: ext +version: 0.1.0 + diff --git a/ric-aux/85-Ext-Services/helm/ext/requirements.yaml b/ric-aux/85-Ext-Services/helm/ext/requirements.yaml new file mode 100644 index 00000000..aa94575b --- /dev/null +++ b/ric-aux/85-Ext-Services/helm/ext/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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: common + version: ~1.1.0 diff --git a/ric-aux/85-Ext-Services/helm/ext/templates/_helper.tpl b/ric-aux/85-Ext-Services/helm/ext/templates/_helper.tpl new file mode 100644 index 00000000..64a5876c --- /dev/null +++ b/ric-aux/85-Ext-Services/helm/ext/templates/_helper.tpl @@ -0,0 +1,51 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ext.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 "ext.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 "ext.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + diff --git a/ric-aux/85-Ext-Services/helm/ext/templates/services.yaml b/ric-aux/85-Ext-Services/helm/ext/templates/services.yaml new file mode 100644 index 00000000..e9b894a3 --- /dev/null +++ b/ric-aux/85-Ext-Services/helm/ext/templates/services.yaml @@ -0,0 +1,74 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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.ingressurl.ricplt" . }} + namespace: {{ include "common.namespace" . }} +spec: + ports: + - name: {{ include "common.ingressurl.ricplt" . }}-http-ingress-port + protocol: "TCP" + port: 80 + - name: {{ include "common.ingressurl.ricplt" . }}-https-ingress-port + protocol: "TCP" + port: 443 +--- +kind: "Endpoints" +apiVersion: "v1" +metadata: + # match with the selector-less service + name: {{ include "common.ingressurl.ricplt" . }} + namespace: {{ include "common.namespace" . }} +subsets: + - addresses: + - ip: "{{ .Values.ext.ip }}" + ports: + - port: {{ include "common.ingresshttpport.ricplt" . }} + name: {{ include "common.ingressurl.ricplt" . }}-http-ingress-port + - port: {{ include "common.ingresshttpsport.ricplt" . }} + name: {{ include "common.ingressurl.ricplt" . }}-https-ingress-port +--- +kind: "Service" +apiVersion: "v1" +metadata: + name: {{ include "common.ingressurl.ricxapp" . }} + namespace: {{ include "common.namespace" . }} +spec: + ports: + - name: {{ include "common.ingressurl.ricxapp" . }}-http-ingress-port + protocol: "TCP" + port: 80 + - name: {{ include "common.ingressurl.ricxapp" . }}-https-ingress-port + protocol: "TCP" + port: 443 +--- +kind: "Endpoints" +apiVersion: "v1" +metadata: + # match with the selector-less service + name: {{ include "common.ingressurl.ricxapp" . }} + namespace: {{ include "common.namespace" . }} +subsets: + - addresses: + - ip: "{{ .Values.ext.ip }}" + ports: + - port: {{ include "common.ingresshttpport.ricxapp" . }} + name: {{ include "common.ingressurl.ricxapp" . }}-http-ingress-port + - port: {{ include "common.ingresshttpsport.ricxapp" . }} + name: {{ include "common.ingressurl.ricxapp" . }}-https-ingress-port \ No newline at end of file diff --git a/ric-aux/85-Ext-Services/helm/ext/values.yaml b/ric-aux/85-Ext-Services/helm/ext/values.yaml new file mode 100644 index 00000000..08b71570 --- /dev/null +++ b/ric-aux/85-Ext-Services/helm/ext/values.yaml @@ -0,0 +1,23 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + + +# Default values for ves. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +ext: + ip: "192.168.130.84" \ No newline at end of file diff --git a/ric-platform/55-Ext-Services/bin/install b/ric-platform/55-Ext-Services/bin/install new file mode 100755 index 00000000..d4a538de --- /dev/null +++ b/ric-platform/55-Ext-Services/bin/install @@ -0,0 +1,59 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + + +OVERRIDEYAML=$1 + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +source $DIR/../etc/ext.conf + +if [ -z "$RICAUX_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICAUX_RELEASE_NAME +fi +if [ -z "$RICAUX_NAMESPACE" ];then + NAMESPACE=$namespace +else + NAMESPACE=$RICAUX_NAMESPACE +fi + +RICAUX_COMPONENTS="ext" + +echo "Deploying RIC AUX components [$RICAUX_COMPONENTS]" +echo "Platform Namespace: $NAMESPACE" +echo "Helm Release Name: $RELEASE_NAME" + + +COMMON_CHART_VERSION=$(cat $DIR/../../../ric-platform/50-RIC-Platform/helm/common/Chart.yaml | grep version | awk '{print $2}') + +helm package -d /tmp $DIR/../../../ric-platform/50-RIC-Platform/helm/common + + +for component in $RICAUX_COMPONENTS; do + echo "Preparing chart for comonent $component" + mkdir -p $DIR/../helm/$component/charts/ + cp /tmp/common-$COMMON_CHART_VERSION.tgz $DIR/../helm/$component/charts/ + if [ -z $OVERRIDEYAML ]; then + helm install --debug --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component + else + helm install -f $OVERRIDEYAML --namespace "${NAMESPACE}" --name "${RELEASE_NAME}-$component" $DIR/../helm/$component + fi +done diff --git a/ric-platform/55-Ext-Services/bin/uninstall b/ric-platform/55-Ext-Services/bin/uninstall new file mode 100755 index 00000000..97edfa22 --- /dev/null +++ b/ric-platform/55-Ext-Services/bin/uninstall @@ -0,0 +1,48 @@ +#!/bin/bash +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + + + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + + +source $DIR/../etc/ext.conf + +if [ -z "$RICAUX_RELEASE_NAME" ];then + RELEASE_NAME=$helm_release_name +else + RELEASE_NAME=$RICAUX_RELEASE_NAME +fi +if [ -z "$RICAUX_NAMESPACE" ];then + NAMESPACE=$namespace +else + NAMESPACE=$RICAUX_NAMESPACE +fi + +RICAUX_COMPONENTS="ext" + +echo "Undeploying RIC AUX components [$RICAUX_COMPONENTS]" +echo "Platform Namespace: $NAMESPACE" +echo "Helm Release Name: $RELEASE_NAME" + + + +for component in $RICAUX_COMPONENTS; do + helm delete --purge "${RELEASE_NAME}-$component" +done diff --git a/ric-platform/55-Ext-Services/etc/ext.conf b/ric-platform/55-Ext-Services/etc/ext.conf new file mode 100644 index 00000000..5eb5b4a4 --- /dev/null +++ b/ric-platform/55-Ext-Services/etc/ext.conf @@ -0,0 +1,25 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + + +# helm_release_name defines the release name helm will use to deploy RIC +# It will be overrided by RICAUX_RELEASE_NAME +helm_release_name=r0 + +# namespace defines the namespace that helm will use to deploy RIC +# It will be overrided by RICAUX_NAMESPACE +namespace=ricplt diff --git a/ric-platform/55-Ext-Services/helm/ext/Chart.yaml b/ric-platform/55-Ext-Services/helm/ext/Chart.yaml new file mode 100644 index 00000000..d6e6bb6a --- /dev/null +++ b/ric-platform/55-Ext-Services/helm/ext/Chart.yaml @@ -0,0 +1,23 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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: "1.0" +description: A Helm chart for setting up external endpoints as k8s services +name: ext +version: 0.1.0 + diff --git a/ric-platform/55-Ext-Services/helm/ext/requirements.yaml b/ric-platform/55-Ext-Services/helm/ext/requirements.yaml new file mode 100644 index 00000000..aa94575b --- /dev/null +++ b/ric-platform/55-Ext-Services/helm/ext/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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: common + version: ~1.1.0 diff --git a/ric-platform/55-Ext-Services/helm/ext/templates/_helper.tpl b/ric-platform/55-Ext-Services/helm/ext/templates/_helper.tpl new file mode 100644 index 00000000..64a5876c --- /dev/null +++ b/ric-platform/55-Ext-Services/helm/ext/templates/_helper.tpl @@ -0,0 +1,51 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ext.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 "ext.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 "ext.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + diff --git a/ric-platform/55-Ext-Services/helm/ext/templates/services.yaml b/ric-platform/55-Ext-Services/helm/ext/templates/services.yaml new file mode 100644 index 00000000..fc6029a9 --- /dev/null +++ b/ric-platform/55-Ext-Services/helm/ext/templates/services.yaml @@ -0,0 +1,45 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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.ingressurl.ricaux" . }} + namespace: {{ include "common.namespace" . }} +spec: + ports: + - name: {{ include "common.ingressurl.ricaux" . }}-http-ingress-port + protocol: "TCP" + port: 80 + - name: {{ include "common.ingressurl.ricaux" . }}-https-ingress-port + protocol: "TCP" + port: 443 +--- +kind: "Endpoints" +apiVersion: "v1" +metadata: + # match with the selector-less service + name: {{ include "common.ingressurl.ricaux" . }} + namespace: {{ include "common.namespace" . }} +subsets: + - addresses: + - ip: "{{ .Values.ext.ip }}" + ports: + - port: {{ include "common.ingresshttpport.ricaux" . }} + name: {{ include "common.ingressurl.ricaux" . }}-http-ingress-port + - port: {{ include "common.ingresshttpport.ricaux" . }} + name: {{ include "common.ingressurl.ricaux" . }}-https-ingress-port \ No newline at end of file diff --git a/ric-platform/55-Ext-Services/helm/ext/values.yaml b/ric-platform/55-Ext-Services/helm/ext/values.yaml new file mode 100644 index 00000000..580be7fa --- /dev/null +++ b/ric-platform/55-Ext-Services/helm/ext/values.yaml @@ -0,0 +1,23 @@ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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. # +################################################################################ + + +# Default values for ves. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +ext: + ip: "192.168.130.118"