aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/charts/pap
diff options
context:
space:
mode:
authorBruno Sakoto <bruno.sakoto@bell.ca>2020-05-20 07:25:41 -0400
committerBruno Sakoto <bruno.sakoto@bell.ca>2020-05-21 11:45:25 +0000
commitade49400588823a2f43ac82b4c2457438d6308fb (patch)
tree72d046761923df252715c25acfdcc2c8dc703ea8 /kubernetes/policy/charts/pap
parent81abcdbe8080fb1b91587b8e6777f0ce7b02b4aa (diff)
Make Policy PAP exposition configurable
Policy PAP endpoint exposition is made configurable using helm override values when deploying. Available options for service type are: * Cluster IP (default value) * Node Port (by overriding policy.pap.service.type value with NodePort) Issue-ID: POLICY-2514 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: Ifc3ac09aeb9e8836c0ef15a8b5b60bd8e31dca03 (cherry picked from commit 425d5be006c212b3c02fb79405282e6148250eb2)
Diffstat (limited to 'kubernetes/policy/charts/pap')
-rw-r--r--kubernetes/policy/charts/pap/templates/service.yaml8
-rw-r--r--kubernetes/policy/charts/pap/values.yaml3
2 files changed, 11 insertions, 0 deletions
diff --git a/kubernetes/policy/charts/pap/templates/service.yaml b/kubernetes/policy/charts/pap/templates/service.yaml
index a23352a17e..b6deb5c75e 100644
--- a/kubernetes/policy/charts/pap/templates/service.yaml
+++ b/kubernetes/policy/charts/pap/templates/service.yaml
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (C) 2019 Nordix Foundation.
# Modifications Copyright (C) 2019 AT&T Intellectual Property.
+# Modifications Copyright (C) 2020 Bell Canada.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -28,10 +29,17 @@ metadata:
release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
spec:
+ type: {{ .Values.service.type }}
ports:
+ {{if eq .Values.service.type "NodePort" -}}
+ - port: {{ .Values.service.internalPort }}
+ nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }}
+ name: {{ .Values.service.portName }}
+ {{- else -}}
- port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
name: {{ .Values.service.portName }}
+ {{- end}}
selector:
app: {{ include "common.name" . }}
release: {{ include "common.release" . }}
diff --git a/kubernetes/policy/charts/pap/values.yaml b/kubernetes/policy/charts/pap/values.yaml
index 630b2055fa..e5eef01e54 100644
--- a/kubernetes/policy/charts/pap/values.yaml
+++ b/kubernetes/policy/charts/pap/values.yaml
@@ -1,6 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (C) 2019 Nordix Foundation.
# Modifications Copyright (C) 2019-2020 AT&T Intellectual Property.
+# Modifications Copyright (C) 2020 Bell Canada.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,6 +22,7 @@
# Global configuration defaults.
#################################################################
global:
+ nodePortPrefixExt: 304
persistence: {}
envsubstImage: dibi/envsubst
@@ -105,6 +107,7 @@ service:
portName: policy-pap
internalPort: 6969
externalPort: 6969
+ nodePort: 42
ingress:
enabled: false
ht: bold } /* Literal.Number.Integer.Long */
<!--
  ============LICENSE_START=======================================================
   Copyright (C) 2022 Ericsson. All rights reserved.
   Modifications Copyright (C) 2018-2022 AT&T Intellectual Property. All rights reserved.
   Modifications Copyright (C) 2019-2024 Nordix Foundation.
   Modifications Copyright (C) 2022 Bell Canada. 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.

  SPDX-License-Identifier: Apache-2.0
  ============LICENSE_END=========================================================
-->
<project
        xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                            http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.onap.policy.common</groupId>
        <artifactId>common-modules</artifactId>
        <version>3.0.0</version>
    </parent>

    <artifactId>policy-endpoints</artifactId>
    <name>policy-endpoints</name>
    <description>Endpoints</description>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.glassfish.jersey</groupId>
                <artifactId>jersey-bom</artifactId>
                <version>${version.jersey}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.onap.policy.common</groupId>
            <artifactId>capabilities</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.common</groupId>
            <artifactId>gson</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.common</groupId>
            <artifactId>utils</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.common</groupId>
            <artifactId>common-parameters</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.onap.policy.common</groupId>
            <artifactId>utils-test</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.containers</groupId>
            <artifactId>jersey-container-servlet-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-server</artifactId>
            <version>${version.jersey}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.inject</groupId>
            <artifactId>jersey-hk2</artifactId>
            <version>${version.jersey}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-jexl3</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-annotations</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.opentelemetry.instrumentation</groupId>
            <artifactId>opentelemetry-kafka-clients-2.6</artifactId>
        </dependency>
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-jaxrs2-jakarta</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.swagger.core.v3</groupId>
            <artifactId>swagger-jaxrs2-servlet-initializer-v2-jakarta</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient_hotspot</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient_servlet_jakarta</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>