diff options
Diffstat (limited to 'kubernetes')
-rw-r--r-- | kubernetes/cds/.helmignore (renamed from kubernetes/common/controller-blueprints/.helmignore) | 0 | ||||
-rw-r--r-- | kubernetes/cds/Chart.yaml | 19 | ||||
-rw-r--r-- | kubernetes/cds/README.md | 20 | ||||
-rwxr-xr-x | kubernetes/cds/charts/blueprints-processor/Chart.yaml (renamed from kubernetes/common/blueprints-processor/Chart.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/blueprints-processor/requirements.yaml (renamed from kubernetes/common/blueprints-processor/requirements.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/blueprints-processor/resources/config/application.properties (renamed from kubernetes/common/blueprints-processor/resources/config/application.properties) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/blueprints-processor/resources/config/logback.xml (renamed from kubernetes/common/blueprints-processor/resources/config/logback.xml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/blueprints-processor/templates/configmap.yaml (renamed from kubernetes/common/blueprints-processor/templates/configmap.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml (renamed from kubernetes/common/blueprints-processor/templates/deployment.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml (renamed from kubernetes/common/blueprints-processor/templates/secrets.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/blueprints-processor/templates/service.yaml (renamed from kubernetes/common/blueprints-processor/templates/service.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/blueprints-processor/values.yaml (renamed from kubernetes/common/blueprints-processor/values.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/cds/charts/controller-blueprints/.helmignore | 21 | ||||
-rw-r--r-- | kubernetes/cds/charts/controller-blueprints/Chart.yaml (renamed from kubernetes/common/controller-blueprints/Chart.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/cds/charts/controller-blueprints/requirements.yaml (renamed from kubernetes/common/controller-blueprints/requirements.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/controller-blueprints/resources/config/application.properties (renamed from kubernetes/common/controller-blueprints/resources/config/application.properties) | 0 | ||||
-rw-r--r-- | kubernetes/cds/charts/controller-blueprints/resources/config/logback.xml (renamed from kubernetes/common/controller-blueprints/resources/config/logback.xml) | 0 | ||||
-rw-r--r-- | kubernetes/cds/charts/controller-blueprints/templates/configmap.yaml (renamed from kubernetes/common/controller-blueprints/templates/configmap.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml (renamed from kubernetes/common/controller-blueprints/templates/deployment.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml (renamed from kubernetes/common/controller-blueprints/templates/secrets.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/controller-blueprints/templates/service.yaml (renamed from kubernetes/common/controller-blueprints/templates/service.yaml) | 0 | ||||
-rwxr-xr-x | kubernetes/cds/charts/controller-blueprints/values.yaml (renamed from kubernetes/common/controller-blueprints/values.yaml) | 0 | ||||
-rw-r--r-- | kubernetes/cds/requirements.yaml | 19 | ||||
-rw-r--r-- | kubernetes/cds/templates/deployment.yaml | 99 | ||||
-rw-r--r-- | kubernetes/cds/templates/service.yaml | 39 | ||||
-rw-r--r-- | kubernetes/cds/values.yaml | 90 | ||||
-rw-r--r-- | kubernetes/policy/charts/policy-api/Chart.yaml | 22 | ||||
-rw-r--r-- | kubernetes/policy/charts/policy-api/requirements.yaml | 22 | ||||
-rw-r--r-- | kubernetes/policy/charts/policy-api/resources/config/config.json | 26 | ||||
-rw-r--r-- | kubernetes/policy/charts/policy-api/templates/configmap.yaml | 25 | ||||
-rw-r--r-- | kubernetes/policy/charts/policy-api/templates/deployment.yaml | 66 | ||||
-rw-r--r-- | kubernetes/policy/charts/policy-api/templates/service.yaml | 43 | ||||
-rw-r--r-- | kubernetes/policy/charts/policy-api/values.yaml | 68 | ||||
-rw-r--r-- | kubernetes/sdnc/requirements.yaml | 3 | ||||
-rw-r--r-- | kubernetes/sdnc/values.yaml | 3 |
35 files changed, 584 insertions, 1 deletions
diff --git a/kubernetes/common/controller-blueprints/.helmignore b/kubernetes/cds/.helmignore index f0c1319444..f0c1319444 100644 --- a/kubernetes/common/controller-blueprints/.helmignore +++ b/kubernetes/cds/.helmignore diff --git a/kubernetes/cds/Chart.yaml b/kubernetes/cds/Chart.yaml new file mode 100644 index 0000000000..fa430d2f78 --- /dev/null +++ b/kubernetes/cds/Chart.yaml @@ -0,0 +1,19 @@ +# Copyright © 2017 Amdocs, Bell Canada +# Modifications Copyright © 2018 Orange +# +# 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 +description: ONAP Common Design Studio +name: cds +version: 4.0.0 diff --git a/kubernetes/cds/README.md b/kubernetes/cds/README.md new file mode 100644 index 0000000000..6619b8f2c3 --- /dev/null +++ b/kubernetes/cds/README.md @@ -0,0 +1,20 @@ +# CDS + +## Introduction + +CDS stands for Common Design Studio. It helps developping service specific +artifacts for pre instanciation and post configuration. + +Full description is on [ONAP Read the Doc](https://docs.onap.org/en/latest/submodules/ccsdk/cds.git/docs/index.html). + +Charts has an UI and blueprints processort and controllers. +Trigger to enable it is on SDNC chart has of today. + +## Requirements + +CDS needs the following ONAP projects to work: + +- AAI +- SO +- SDC +- SDNC diff --git a/kubernetes/common/blueprints-processor/Chart.yaml b/kubernetes/cds/charts/blueprints-processor/Chart.yaml index 389097437c..389097437c 100755 --- a/kubernetes/common/blueprints-processor/Chart.yaml +++ b/kubernetes/cds/charts/blueprints-processor/Chart.yaml diff --git a/kubernetes/common/blueprints-processor/requirements.yaml b/kubernetes/cds/charts/blueprints-processor/requirements.yaml index 1d06a389a8..1d06a389a8 100755 --- a/kubernetes/common/blueprints-processor/requirements.yaml +++ b/kubernetes/cds/charts/blueprints-processor/requirements.yaml diff --git a/kubernetes/common/blueprints-processor/resources/config/application.properties b/kubernetes/cds/charts/blueprints-processor/resources/config/application.properties index 9d1c957b8f..9d1c957b8f 100755 --- a/kubernetes/common/blueprints-processor/resources/config/application.properties +++ b/kubernetes/cds/charts/blueprints-processor/resources/config/application.properties diff --git a/kubernetes/common/blueprints-processor/resources/config/logback.xml b/kubernetes/cds/charts/blueprints-processor/resources/config/logback.xml index b73db7145f..b73db7145f 100755 --- a/kubernetes/common/blueprints-processor/resources/config/logback.xml +++ b/kubernetes/cds/charts/blueprints-processor/resources/config/logback.xml diff --git a/kubernetes/common/blueprints-processor/templates/configmap.yaml b/kubernetes/cds/charts/blueprints-processor/templates/configmap.yaml index 873acee237..873acee237 100755 --- a/kubernetes/common/blueprints-processor/templates/configmap.yaml +++ b/kubernetes/cds/charts/blueprints-processor/templates/configmap.yaml diff --git a/kubernetes/common/blueprints-processor/templates/deployment.yaml b/kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml index 5629913826..5629913826 100755 --- a/kubernetes/common/blueprints-processor/templates/deployment.yaml +++ b/kubernetes/cds/charts/blueprints-processor/templates/deployment.yaml diff --git a/kubernetes/common/blueprints-processor/templates/secrets.yaml b/kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml index f21363d087..f21363d087 100755 --- a/kubernetes/common/blueprints-processor/templates/secrets.yaml +++ b/kubernetes/cds/charts/blueprints-processor/templates/secrets.yaml diff --git a/kubernetes/common/blueprints-processor/templates/service.yaml b/kubernetes/cds/charts/blueprints-processor/templates/service.yaml index 4c1c32c1ed..4c1c32c1ed 100755 --- a/kubernetes/common/blueprints-processor/templates/service.yaml +++ b/kubernetes/cds/charts/blueprints-processor/templates/service.yaml diff --git a/kubernetes/common/blueprints-processor/values.yaml b/kubernetes/cds/charts/blueprints-processor/values.yaml index 2edcc8a4ec..2edcc8a4ec 100755 --- a/kubernetes/common/blueprints-processor/values.yaml +++ b/kubernetes/cds/charts/blueprints-processor/values.yaml diff --git a/kubernetes/cds/charts/controller-blueprints/.helmignore b/kubernetes/cds/charts/controller-blueprints/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/cds/charts/controller-blueprints/.helmignore @@ -0,0 +1,21 @@ +# 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 +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/kubernetes/common/controller-blueprints/Chart.yaml b/kubernetes/cds/charts/controller-blueprints/Chart.yaml index 5e8b3f35df..5e8b3f35df 100644 --- a/kubernetes/common/controller-blueprints/Chart.yaml +++ b/kubernetes/cds/charts/controller-blueprints/Chart.yaml diff --git a/kubernetes/common/controller-blueprints/requirements.yaml b/kubernetes/cds/charts/controller-blueprints/requirements.yaml index cefe3d3bdf..cefe3d3bdf 100644 --- a/kubernetes/common/controller-blueprints/requirements.yaml +++ b/kubernetes/cds/charts/controller-blueprints/requirements.yaml diff --git a/kubernetes/common/controller-blueprints/resources/config/application.properties b/kubernetes/cds/charts/controller-blueprints/resources/config/application.properties index 7eec7f9115..7eec7f9115 100755 --- a/kubernetes/common/controller-blueprints/resources/config/application.properties +++ b/kubernetes/cds/charts/controller-blueprints/resources/config/application.properties diff --git a/kubernetes/common/controller-blueprints/resources/config/logback.xml b/kubernetes/cds/charts/controller-blueprints/resources/config/logback.xml index b73db7145f..b73db7145f 100644 --- a/kubernetes/common/controller-blueprints/resources/config/logback.xml +++ b/kubernetes/cds/charts/controller-blueprints/resources/config/logback.xml diff --git a/kubernetes/common/controller-blueprints/templates/configmap.yaml b/kubernetes/cds/charts/controller-blueprints/templates/configmap.yaml index a8489681df..a8489681df 100644 --- a/kubernetes/common/controller-blueprints/templates/configmap.yaml +++ b/kubernetes/cds/charts/controller-blueprints/templates/configmap.yaml diff --git a/kubernetes/common/controller-blueprints/templates/deployment.yaml b/kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml index ef8b38fc10..ef8b38fc10 100755 --- a/kubernetes/common/controller-blueprints/templates/deployment.yaml +++ b/kubernetes/cds/charts/controller-blueprints/templates/deployment.yaml diff --git a/kubernetes/common/controller-blueprints/templates/secrets.yaml b/kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml index b4ab161809..b4ab161809 100644 --- a/kubernetes/common/controller-blueprints/templates/secrets.yaml +++ b/kubernetes/cds/charts/controller-blueprints/templates/secrets.yaml diff --git a/kubernetes/common/controller-blueprints/templates/service.yaml b/kubernetes/cds/charts/controller-blueprints/templates/service.yaml index e0a66d2483..e0a66d2483 100755 --- a/kubernetes/common/controller-blueprints/templates/service.yaml +++ b/kubernetes/cds/charts/controller-blueprints/templates/service.yaml diff --git a/kubernetes/common/controller-blueprints/values.yaml b/kubernetes/cds/charts/controller-blueprints/values.yaml index 02b5685fa4..02b5685fa4 100755 --- a/kubernetes/common/controller-blueprints/values.yaml +++ b/kubernetes/cds/charts/controller-blueprints/values.yaml diff --git a/kubernetes/cds/requirements.yaml b/kubernetes/cds/requirements.yaml new file mode 100644 index 0000000000..d7b38dc0b1 --- /dev/null +++ b/kubernetes/cds/requirements.yaml @@ -0,0 +1,19 @@ +# Copyright © 2017 Amdocs, Bell Canada +# Modifications Copyright © 2018 Orange +# +# 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: ~4.x-0 + repository: '@local' diff --git a/kubernetes/cds/templates/deployment.yaml b/kubernetes/cds/templates/deployment.yaml new file mode 100644 index 0000000000..134e6b7443 --- /dev/null +++ b/kubernetes/cds/templates/deployment.yaml @@ -0,0 +1,99 @@ +# Copyright © 2018 Orange +# Modifications Copyright © 2018 Amdocs, Bell Canada +# +# 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: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + name: {{ include "common.fullname" . }} + spec: + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{ if .Values.liveness.enabled }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end }} + env: + - name: HOST + value: 0.0.0.0 + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + resources: +{{ include "common.resources" . | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + # side car containers + # - name: filebeat-onap + # image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" + # imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + # volumeMounts: + # - mountPath: /usr/share/filebeat/filebeat.yml + # name: filebeat-conf + # subPath: filebeat.yml + # - mountPath: /home/esr/works/logs + # name: esr-server-logs + # - mountPath: /usr/share/filebeat/data + # name: esr-server-filebeat + volumes: + - name: localtime + hostPath: + path: /etc/localtime + # - name: filebeat-conf + # configMap: + # name: {{ include "common.fullname" . }}-esr-filebeat + # - name: esr-server-logs + # emptyDir: {} + # - name: esr-server-filebeat + # emptyDir: {} + # - name: esrserver-log + # configMap: + # name: {{ include "common.fullname" . }}-esr-esrserver-log + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/cds/templates/service.yaml b/kubernetes/cds/templates/service.yaml new file mode 100644 index 0000000000..f8e91120eb --- /dev/null +++ b/kubernetes/cds/templates/service.yaml @@ -0,0 +1,39 @@ +# Copyright © 2017 Amdocs, Bell Canada, Orange +# +# 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: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }}-{{ .Values.service.internalPort }} + {{- else -}} + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/cds/values.yaml b/kubernetes/cds/values.yaml new file mode 100644 index 0000000000..3815d9af21 --- /dev/null +++ b/kubernetes/cds/values.yaml @@ -0,0 +1,90 @@ +# Copyright © 2018 Orange +# Modifications Copyright © 2018 Amdocs, Bell Canada +# +# 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. + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 303 + readinessRepository: oomk8s + readinessImage: readiness-check:1.1.0 + loggingRepository: docker.elastic.co + loggingImage: beats/filebeat:5.5.0 + +subChartsOnly: + enabled: true + +# application image +repository: nexus3.onap.org:10001 +image: onap/ccsdk-cds-ui:1.0.0-STAGING-latest +pullPolicy: Always + +# application configuration +config: + + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + httpGet: + path: / + port: 3000 + initialDelaySeconds: 30 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + httpGet: + path: /ping + port: 3000 + initialDelaySeconds: 30 + periodSeconds: 10 + +service: + type: NodePort + portName: ui + name: cds + nodePort: 97 + internalPort: 3000 + +ingress: + enabled: false +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 1 + memory: 1Gi + requests: + cpu: 10m + memory: 100Mi + large: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 200m + memory: 200Mi + unlimited: {} diff --git a/kubernetes/policy/charts/policy-api/Chart.yaml b/kubernetes/policy/charts/policy-api/Chart.yaml new file mode 100644 index 0000000000..a50c8d9a58 --- /dev/null +++ b/kubernetes/policy/charts/policy-api/Chart.yaml @@ -0,0 +1,22 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 AT&T Intellectual Property. 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========================================================= + +apiVersion: v1 +description: ONAP Policy Design API +name: policy-api +version: 4.0.0 diff --git a/kubernetes/policy/charts/policy-api/requirements.yaml b/kubernetes/policy/charts/policy-api/requirements.yaml new file mode 100644 index 0000000000..768bdb372d --- /dev/null +++ b/kubernetes/policy/charts/policy-api/requirements.yaml @@ -0,0 +1,22 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 AT&T Intellectual Property. 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========================================================= + +dependencies: + - name: common + version: ~4.x-0 + repository: '@local' diff --git a/kubernetes/policy/charts/policy-api/resources/config/config.json b/kubernetes/policy/charts/policy-api/resources/config/config.json new file mode 100644 index 0000000000..9fef1998d1 --- /dev/null +++ b/kubernetes/policy/charts/policy-api/resources/config/config.json @@ -0,0 +1,26 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 AT&T Intellectual Property. 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========================================================= +{ + "name":"ApiGroup", + "restServerParameters":{ + "host":"0.0.0.0", + "port":6969, + "userName":"healthcheck", + "password":"zb!XztG34" + } +} diff --git a/kubernetes/policy/charts/policy-api/templates/configmap.yaml b/kubernetes/policy/charts/policy-api/templates/configmap.yaml new file mode 100644 index 0000000000..d90b0c93dc --- /dev/null +++ b/kubernetes/policy/charts/policy-api/templates/configmap.yaml @@ -0,0 +1,25 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 AT&T Intellectual Property. 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========================================================= + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/config.json").AsConfig . | indent 2 }} diff --git a/kubernetes/policy/charts/policy-api/templates/deployment.yaml b/kubernetes/policy/charts/policy-api/templates/deployment.yaml new file mode 100644 index 0000000000..2d16b5e857 --- /dev/null +++ b/kubernetes/policy/charts/policy-api/templates/deployment.yaml @@ -0,0 +1,66 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ include "common.name" . }} + image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["/opt/app/policy/api/bin/policy-api.sh"] + args: ["/opt/app/policy/api/etc/mounted/config.json"] + ports: + - containerPort: {{ .Values.service.internalPort }} + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/app/policy/api/etc/mounted + name: apiconfig + resources: +{{ include "common.resources" . | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: apiconfig + configMap: + name: {{ include "common.fullname" . }}-configmap + defaultMode: 0755 + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/policy/charts/policy-api/templates/service.yaml b/kubernetes/policy/charts/policy-api/templates/service.yaml new file mode 100644 index 0000000000..81789f26ca --- /dev/null +++ b/kubernetes/policy/charts/policy-api/templates/service.yaml @@ -0,0 +1,43 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 AT&T Intellectual Property. 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========================================================= + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.portName }} + {{- else -}} + - port: {{ .Values.service.internalPort }} + targetPort: {{ .Values.service.internalPort }} + name: {{ .Values.service.portName }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} diff --git a/kubernetes/policy/charts/policy-api/values.yaml b/kubernetes/policy/charts/policy-api/values.yaml new file mode 100644 index 0000000000..92960a2d56 --- /dev/null +++ b/kubernetes/policy/charts/policy-api/values.yaml @@ -0,0 +1,68 @@ +# ============LICENSE_START======================================================= +# Copyright (C) 2019 AT&T Intellectual Property. 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========================================================= + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 304 + persistence: {} + +################################################################# +# Application configuration defaults. +################################################################# +# application image +repository: nexus3.onap.org:10001 +image: onap/policy-api:2.0.0-SNAPSHOT-latest +pullPolicy: Always + +# flag to enable debugging - application support required +debugEnabled: false + +# application configuration + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 20 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 20 + periodSeconds: 10 + +service: + type: ClusterIP + name: policy-api + portName: policy-api + internalPort: 6969 + nodePort: 40 + +ingress: + enabled: false + +resources: {} diff --git a/kubernetes/sdnc/requirements.yaml b/kubernetes/sdnc/requirements.yaml index d144d76f93..56e20672f7 100644 --- a/kubernetes/sdnc/requirements.yaml +++ b/kubernetes/sdnc/requirements.yaml @@ -16,9 +16,10 @@ dependencies: - name: common version: ~4.x-0 repository: '@local' - - name: controller-blueprints + - name: cds version: ~4.x-0 repository: '@local' + condition: cds.enabled - name: mysql version: ~4.x-0 repository: '@local' diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 20f20af3ec..7faba15a57 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -60,6 +60,9 @@ config: javaHome: /usr/lib/jvm/java-1.8-openjdk # dependency / sub-chart configuration +cds: + enabled: true + dmaap-listener: nameOverride: sdnc-dmaap-listener config: |