From f92ec3038efcb0d6f22e04be713a9d44708753d9 Mon Sep 17 00:00:00 2001 From: Mahendra Raghuwanshi Date: Thu, 3 May 2018 12:15:03 +0000 Subject: AAF Charts -PS3-MK -renaming charts to remove hyphen -refactoring service name configuration. It wasn't quite correct the way it was. It was taking the chart name as the service name and not using the values.yaml from the top level chart as intended. -Jonathan asked to name the main app service "aaf-service and cassandra to "aaf-cass" as this is what is in the cert -squashed https://gerrit.onap.org/r/#/c/45923/1 into this commit. -updated robot to the latest settings Robot tests are failing but all pods come up. I think this can be merged and the AAF team investigate the robot health issue in a running system -PS4-MK -reverting sms changes and taking the latest from master -removing repository from the global section of the aaf values. -this was causing all images to be pulled from nexus3.onap.org which was failing to pull images that come from docker hub. There is supposed to be a proxy through nexus3 to dockerhub but maybe we are missing something. -PS5-MK -removing nodeports from non gui related charts. There are conflicts -PS6-Kiran -Adding imagepullsecrets for aaf-sms-vault subchart -updated image repository to pull from nexus3 -tested and works now and should fix the pull errors -PS7-Kiran -Previous patch picked up a couple of unintended changes -Reverting them -PS8-MK -removing names from identities -using https for robot test Issue-ID: OOM-930 Change-Id: I98f40ef5af03dda73aebf12f6fa48d928915ab34 Signed-off-by: Mahendra Raghuwanshi Add Beijing CQLs into OOM Issue-ID: AAF-114 Change-Id: I2c2d46738ba0885c41f710997d4b212b6ce4d2de Signed-off-by: Instrumental Signed-off-by: Mandeep Khinda Signed-off-by: Kiran Kamineni --- charts/aaf-hello/templates/service.yaml | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 charts/aaf-hello/templates/service.yaml (limited to 'charts/aaf-hello/templates/service.yaml') diff --git a/charts/aaf-hello/templates/service.yaml b/charts/aaf-hello/templates/service.yaml new file mode 100644 index 0000000..281aa1c --- /dev/null +++ b/charts/aaf-hello/templates/service.yaml @@ -0,0 +1,41 @@ +# Copyright © 2017 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: 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: + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.externalPort }} + #Example internal target port if required + #targetPort: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .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: {{ .Release.Name }} + type: {{ .Values.service.type }} -- cgit 1.2.3-korg From 47ce43884c98186b4e841e3ded9d50777e13ca64 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Wed, 1 May 2019 14:18:49 -0500 Subject: Apply Cert changes Issue-ID: AAF-822 Change-Id: I3185d827f3f67cb177534f7c7f3281375b77c613 Signed-off-by: Instrumental --- .gitignore | 1 + charts/aaf-cass/.helmignore | 21 +++++ charts/aaf-cass/Chart.yaml | 18 ++++ charts/aaf-cass/templates/NOTES.txt | 33 +++++++ charts/aaf-cass/templates/deployment.yaml | 118 ++++++++++++++++++++++++ charts/aaf-cass/templates/pv.yaml | 44 +++++++++ charts/aaf-cass/templates/pvc.yaml | 48 ++++++++++ charts/aaf-cass/templates/service.yaml | 49 ++++++++++ charts/aaf-cass/values.yaml | 90 ++++++++++++++++++ charts/aaf-cm/templates/deployment.yaml | 89 ++++++++++-------- charts/aaf-cm/templates/service.yaml | 16 +--- charts/aaf-cm/values.yaml | 45 ++++----- charts/aaf-cs/.helmignore | 21 ----- charts/aaf-cs/Chart.yaml | 18 ---- charts/aaf-cs/templates/NOTES.txt | 33 ------- charts/aaf-cs/templates/deployment.yaml | 92 ------------------ charts/aaf-cs/templates/pv.yaml | 44 --------- charts/aaf-cs/templates/pvc.yaml | 48 ---------- charts/aaf-cs/templates/service.yaml | 62 ------------- charts/aaf-cs/values.yaml | 97 ------------------- charts/aaf-fs/templates/deployment.yaml | 84 +++++++++-------- charts/aaf-fs/templates/service.yaml | 16 +--- charts/aaf-fs/values.yaml | 43 ++++----- charts/aaf-gui/templates/deployment.yaml | 88 ++++++++++-------- charts/aaf-gui/templates/service.yaml | 16 +--- charts/aaf-gui/values.yaml | 44 ++++----- charts/aaf-hello/templates/deployment.yaml | 89 ++++++++++-------- charts/aaf-hello/templates/service.yaml | 16 +--- charts/aaf-hello/values.yaml | 47 +++++----- charts/aaf-locate/templates/deployment.yaml | 88 ++++++++++-------- charts/aaf-locate/templates/service.yaml | 16 +--- charts/aaf-locate/values.yaml | 48 +++++----- charts/aaf-oauth/templates/deployment.yaml | 88 ++++++++++-------- charts/aaf-oauth/templates/service.yaml | 14 +-- charts/aaf-oauth/values.yaml | 49 +++++----- charts/aaf-service/templates/deployment.yaml | 91 ++++++++++-------- charts/aaf-service/templates/service.yaml | 16 +--- charts/aaf-service/values.yaml | 49 +++++----- charts/aaf-sms/charts/aaf-sms-vault/values.yaml | 2 +- templates/aaf-config-pv.yaml | 48 ++++++++++ templates/aaf-config-pvc.yaml | 52 +++++++++++ templates/aaf-status-pv.yaml | 48 ++++++++++ templates/aaf-status-pvc.yaml | 52 +++++++++++ values.yaml | 100 ++++++++++++++++---- 44 files changed, 1228 insertions(+), 963 deletions(-) create mode 100644 .gitignore create mode 100644 charts/aaf-cass/.helmignore create mode 100644 charts/aaf-cass/Chart.yaml create mode 100644 charts/aaf-cass/templates/NOTES.txt create mode 100644 charts/aaf-cass/templates/deployment.yaml create mode 100644 charts/aaf-cass/templates/pv.yaml create mode 100644 charts/aaf-cass/templates/pvc.yaml create mode 100644 charts/aaf-cass/templates/service.yaml create mode 100644 charts/aaf-cass/values.yaml delete mode 100644 charts/aaf-cs/.helmignore delete mode 100644 charts/aaf-cs/Chart.yaml delete mode 100644 charts/aaf-cs/templates/NOTES.txt delete mode 100644 charts/aaf-cs/templates/deployment.yaml delete mode 100644 charts/aaf-cs/templates/pv.yaml delete mode 100644 charts/aaf-cs/templates/pvc.yaml delete mode 100644 charts/aaf-cs/templates/service.yaml delete mode 100644 charts/aaf-cs/values.yaml create mode 100644 templates/aaf-config-pv.yaml create mode 100644 templates/aaf-config-pvc.yaml create mode 100644 templates/aaf-status-pv.yaml create mode 100644 templates/aaf-status-pvc.yaml (limited to 'charts/aaf-hello/templates/service.yaml') diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a4f8ba --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/sms/ diff --git a/charts/aaf-cass/.helmignore b/charts/aaf-cass/.helmignore new file mode 100644 index 0000000..daebc7d --- /dev/null +++ b/charts/aaf-cass/.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/charts/aaf-cass/Chart.yaml b/charts/aaf-cass/Chart.yaml new file mode 100644 index 0000000..f06d149 --- /dev/null +++ b/charts/aaf-cass/Chart.yaml @@ -0,0 +1,18 @@ +# 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: v1 +description: ONAP AAF cassandra +name: aaf-cass +version: 4.0.0 diff --git a/charts/aaf-cass/templates/NOTES.txt b/charts/aaf-cass/templates/NOTES.txt new file mode 100644 index 0000000..bd74a42 --- /dev/null +++ b/charts/aaf-cass/templates/NOTES.txt @@ -0,0 +1,33 @@ +# 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. + +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http://{{ . }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.externalPort }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} +{{- end }} diff --git a/charts/aaf-cass/templates/deployment.yaml b/charts/aaf-cass/templates/deployment.yaml new file mode 100644 index 0000000..c664d03 --- /dev/null +++ b/charts/aaf-cass/templates/deployment.yaml @@ -0,0 +1,118 @@ +# Copyright © 2017 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.global.aaf.cass.replicas }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ include "common.name" . }} + image: {{ .Values.global.repository }}/onap/aaf/aaf_cass:{{.Values.global.aaf.imageVersion}} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + # installing with cmd "onap" will not only initialize the DB, but add ONAP bootstrap data as well + command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"] + lifecycle: + preStop: + exec: + command: ["/bin/sh","-c","rm /opt/app/aaf/status/aaf-cass"] + ports: + - name: storage + containerPort: {{.Values.global.aaf.cass.storage_port}} + - name: ssl-storage + containerPort: {{.Values.global.aaf.cass.ssl_storage_port}} + - name: native-trans + containerPort: {{.Values.global.aaf.cass.native_trans_port}} + - name: rpc + containerPort: {{.Values.global.aaf.cass.rpc_port}} + env: + - name: CASSANDRA_CLUSTER_NAME + value: {{.Values.global.aaf.cass.cluster_name}} + - name: CASSANDRA_DC + value: {{.Values.global.aaf.cass.dc}} + - name: HEAP_NEWSIZE + value: {{.Values.global.aaf.cass.heap_new_size}} + - name: MAX_HEAP_SIZE + value: {{.Values.global.aaf.cass.max_heap_size}} + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: MY_POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: MY_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + volumeMounts: + - mountPath: /var/lib/cassandra + name: aaf-cass-vol + - mountPath: /opt/app/aaf/status + name: aaf-status-vol + - mountPath: /etc/localtime + name: localtime + readOnly: true + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{.Values.global.aaf.cass.native_trans_port}} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{.Values.global.aaf.cass.native_trans_port}} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ include "common.resources" . | indent 10 }} + {{- 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: aaf-status-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-status-pvc + - name: aaf-cass-vol + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }}-pvc + {{- else }} + emptyDir: {} + {{- end }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-cass/templates/pv.yaml b/charts/aaf-cass/templates/pv.yaml new file mode 100644 index 0000000..8249d84 --- /dev/null +++ b/charts/aaf-cass/templates/pv.yaml @@ -0,0 +1,44 @@ +{{/* +# Copyright © 2017 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. +*/}} + +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }}-pv + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.size}} + accessModes: + - {{ .Values.persistence.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/charts/aaf-cass/templates/pvc.yaml b/charts/aaf-cass/templates/pvc.yaml new file mode 100644 index 0000000..4f9dac0 --- /dev/null +++ b/charts/aaf-cass/templates/pvc.yaml @@ -0,0 +1,48 @@ +{{/* +# Copyright © 2017 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. +*/}} + +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "common.fullname" .}}-pvc + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app: {{ include "common.name" . }} + accessModes: + - {{ .Values.persistence.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.size }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/charts/aaf-cass/templates/service.yaml b/charts/aaf-cass/templates/service.yaml new file mode 100644 index 0000000..71882b1 --- /dev/null +++ b/charts/aaf-cass/templates/service.yaml @@ -0,0 +1,49 @@ +# Copyright © 2017 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: 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 }} +# annotations: +# service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" +spec: + type: {{ .Values.service.type }} + ports: + - name: storage + protocol: TCP + port: {{.Values.global.aaf.cass.storage_port}} + containerPort: {{.Values.global.aaf.cass.storage_port}} + - name: ssl-storage + protocol: TCP + port: {{.Values.global.aaf.cass.ssl_storage_port}} + containerPort: {{.Values.global.aaf.cass.ssl_storage_port}} + - name: native-trans + protocol: TCP + port: {{.Values.global.aaf.cass.native_trans_port}} + containerPort: {{.Values.global.aaf.cass.native_trans_port}} + - name: rpc + protocol: TCP + port: {{.Values.global.aaf.cass.rpc_port}} + containerPort: {{.Values.global.aaf.cass.rpc_port}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + clusterIP: None diff --git a/charts/aaf-cass/values.yaml b/charts/aaf-cass/values.yaml new file mode 100644 index 0000000..ee05a19 --- /dev/null +++ b/charts/aaf-cass/values.yaml @@ -0,0 +1,90 @@ +# Copyright © 2017 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: 302 +flavor: small + +################################################################# +# Application configuration defaults. +################################################################# +# application configuration +config: {} + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 120 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 5 + periodSeconds: 10 + +service: + name: aaf-cass + type: ClusterIP + portName: aaf-cass + #targetPort + internalPort: 7000 + #port + externalPort: 7000 + + internalPort2: 7001 + externalPort2: 7001 + internalPort3: 9042 + externalPort3: 9042 + internalPort4: 9160 + externalPort4: 9160 + +ingress: + enabled: false + +# Configure resource requests and limits +resources: {} + # Following AAI's advice, and not trying to guess on Cass usage. Guessing just makes it slow +# small: +# limits: +# cpu: "1000m" +# memory: 4096Mi +# requests: +# cpu: 20m +# memory: 2048Mi +# large: +# limits: +# cpu: 400m +# memory: 12000Mi +# requests: +# cpu: 40m +# memory: 9000Mi +# unlimited: {} + +persistence: + enabled: true + #existingClaim: + mountPath: /dockerdata-nfs + mountSubPath: "cass" + volumeReclaimPolicy: Retain + accessMode: ReadWriteOnce + size: 20Gi + storageClass: "manual" diff --git a/charts/aaf-cm/templates/deployment.yaml b/charts/aaf-cm/templates/deployment.yaml index f78dfdc..87bcaa4 100644 --- a/charts/aaf-cm/templates/deployment.yaml +++ b/charts/aaf-cm/templates/deployment.yaml @@ -23,7 +23,7 @@ metadata: name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.global.aaf.cm.replicas }} template: metadata: labels: @@ -32,61 +32,70 @@ spec: spec: initContainers: - name: {{ include "common.name" . }}-config-container - image: "{{ include "common.repository" . }}/{{ .Values.global.configImage }}" + image: {{ .Values.global.repository }}/onap/aaf/aaf_config:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["bash","-c","cd /opt/app/aaf_config && bin/pod_wait.sh config aaf-service remove && bin/agent.sh"] volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol env: - - name: HOSTNAME - value: "{{ .Values.global.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.global.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.global.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.global.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "{{ .Values.global.cadi.cass_host }}" - - name: AAF_LOCATOR_AS - value: "{{ .Values.global.cadi.cadi_locator_as }}" - - name: {{ include "common.name" . }}-readiness - command: - - /root/ready.py - args: - - --container-name - - aaf-locate - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + - name: aaf_env + value: "{{ .Values.global.aaf.aaf_env }}" + - name: cadi_latitude + value: "{{ .Values.global.aaf.cadi_latitude }}" + - name: cadi_longitude + value: "{{ .Values.global.aaf.cadi_longitude }}" + - name: cadi_x509_issuers + value: "{{ .Values.global.aaf.cadi_x509_issuers }}" + - name: aaf_locate_url + value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}" + - name: aaf_locator_container + value: "oom" + - name: aaf_release + value: "{{ .Values.global.aaf.aaf_release }}" + - name: aaf_locator_container_ns + value: "{{ .Release.Namespace }}" + - name: aaf_locator_container + value: "oom" + - name: aaf_locator_public_fqdn + value: "{{.Values.global.aaf.public_fqdn}}" + - name: aaf_locator_name + value: "{{.Values.global.aaf.aaf_locator_name}}" + - name: aaf_locator_name_oom + value: "{{.Values.global.aaf.aaf_locator_name_oom}}" + - name: CASSANDRA_CLUSTER + value: "{{.Values.global.aaf.cass.fqdn}}.{{ .Release.Namespace }}" +# - name: CASSANDRA_USER +# value: "" +# - name: CASSANDRA_PASSWORD +# value: "" +# - name: CASSANDRA_PORT +# value: "" containers: - name: {{ include "common.name" . }} - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_cm","sleep","0","cd /opt/app/aaf;bin/cm"] - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-cm aaf-locate && exec bin/cm"] + image: {{ .Values.global.repository }}/onap/aaf/aaf_cm:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol - mountPath: /etc/localtime name: localtime readOnly: true {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.cm.internal_port }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.cm.internal_port }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: @@ -103,7 +112,11 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: {{ include "common.name" . }}-config-vol - emptyDir: {} + - name: aaf-status-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-status-pvc + - name: aaf-config-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-config-pvc imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-cm/templates/service.yaml b/charts/aaf-cm/templates/service.yaml index 281aa1c..f54c4d8 100644 --- a/charts/aaf-cm/templates/service.yaml +++ b/charts/aaf-cm/templates/service.yaml @@ -24,18 +24,10 @@ metadata: heritage: {{ .Release.Service }} spec: ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.externalPort }} - #Example internal target port if required - #targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - {{- end}} + - port: {{ .Values.global.aaf.cm.internal_port }} + nodePort: {{ .Values.global.aaf.cm.public_port }} + name: aaf-cm selector: app: {{ include "common.name" . }} release: {{ .Release.Name }} - type: {{ .Values.service.type }} + type: "NodePort" diff --git a/charts/aaf-cm/values.yaml b/charts/aaf-cm/values.yaml index ec7de46..6ace7d1 100644 --- a/charts/aaf-cm/values.yaml +++ b/charts/aaf-cm/values.yaml @@ -24,14 +24,6 @@ flavor: small # Application configuration defaults. ################################################################# # application image -repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_cm:2.1.9-SNAPSHOT-latest -aaf_register_as: "aaf-cm.onap" -pullPolicy: Always - - -# default number of instances -replicaCount: 1 nodeSelector: {} @@ -39,14 +31,14 @@ affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 300 + initialDelaySeconds: 120 periodSeconds: 10 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true readiness: - initialDelaySeconds: 30 + initialDelaySeconds: 5 periodSeconds: 10 service: @@ -62,19 +54,20 @@ ingress: enabled: false # Configure resource requests and limits -resources: - small: - limits: - cpu: 200m - memory: 800Mi - requests: - cpu: 20m - memory: 500Mi - large: - limits: - cpu: 400m - memory: 1Gi - requests: - cpu: 40m - memory: 600Mi - unlimited: {} +resources: {} +# Allow END users to do this, if they want. Detrimental to Test services +# small: +# limits: +# cpu: 200m +# memory: 800Mi +# requests: +# cpu: 20m +# memory: 500Mi +# large: +# limits: +# cpu: 400m +# memory: 1Gi +# requests: +# cpu: 40m +# memory: 600Mi +# unlimited: {} diff --git a/charts/aaf-cs/.helmignore b/charts/aaf-cs/.helmignore deleted file mode 100644 index daebc7d..0000000 --- a/charts/aaf-cs/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# 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/charts/aaf-cs/Chart.yaml b/charts/aaf-cs/Chart.yaml deleted file mode 100644 index ff083ac..0000000 --- a/charts/aaf-cs/Chart.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# 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: v1 -description: ONAP AAF cassandra -name: aaf-cs -version: 4.0.0 diff --git a/charts/aaf-cs/templates/NOTES.txt b/charts/aaf-cs/templates/NOTES.txt deleted file mode 100644 index bd74a42..0000000 --- a/charts/aaf-cs/templates/NOTES.txt +++ /dev/null @@ -1,33 +0,0 @@ -# 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. - -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range .Values.ingress.hosts }} - http://{{ . }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ include "common.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "common.name" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ include "common.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ include "common.name" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.namespace" . }} {{ include "common.name" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.externalPort }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ include "common.namespace" . }} -l "app={{ include "common.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort }} -{{- end }} diff --git a/charts/aaf-cs/templates/deployment.yaml b/charts/aaf-cs/templates/deployment.yaml deleted file mode 100644 index 3abdcb3..0000000 --- a/charts/aaf-cs/templates/deployment.yaml +++ /dev/null @@ -1,92 +0,0 @@ -# Copyright © 2017 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 }} - spec: - containers: - - name: {{ include "common.name" . }} - image: "{{ include "common.repository" . }}/{{ .Values.image }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} - command: ["/bin/bash","/opt/app/aaf/cass_init/cmd.sh","onap"] - ports: - - containerPort: {{ .Values.service.externalPort }} - - containerPort: {{ .Values.service.externalPort2 }} - - containerPort: {{ .Values.service.externalPort3 }} - - containerPort: {{ .Values.service.externalPort4 }} - env: - - name: CASSANDRA_CLUSTER_NAME - value: "osaaf" - - name: CASSANDRA_DC - value: "dc1" - - name: HEAP_NEWSIZE - value: "512M" - - name: MAX_HEAP_SIZE - value: "1024M" - volumeMounts: - - mountPath: /var/lib/cassandra - name: cassandra-storage - - mountPath: /etc/localtime - name: localtime - readOnly: true - {{- if eq .Values.liveness.enabled true }} - livenessProbe: - tcpSocket: - port: {{ .Values.service.internalPort3 }} - initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} - periodSeconds: {{ .Values.liveness.periodSeconds }} - {{ end -}} - readinessProbe: - tcpSocket: - port: {{ .Values.service.internalPort3 }} - initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} - periodSeconds: {{ .Values.readiness.periodSeconds }} - resources: -{{ include "common.resources" . | indent 10 }} - {{- 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: cassandra-storage - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ include "common.fullname" . }} - {{- else }} - emptyDir: {} - {{- end }} - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-cs/templates/pv.yaml b/charts/aaf-cs/templates/pv.yaml deleted file mode 100644 index 4209179..0000000 --- a/charts/aaf-cs/templates/pv.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{/* -# Copyright © 2017 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. -*/}} - -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -kind: PersistentVolume -apiVersion: v1 -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 }}" - name: {{ include "common.fullname" . }} -spec: - capacity: - storage: {{ .Values.persistence.size}} - accessModes: - - {{ .Values.persistence.accessMode }} - persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} - hostPath: - path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} \ No newline at end of file diff --git a/charts/aaf-cs/templates/pvc.yaml b/charts/aaf-cs/templates/pvc.yaml deleted file mode 100644 index b102ffa..0000000 --- a/charts/aaf-cs/templates/pvc.yaml +++ /dev/null @@ -1,48 +0,0 @@ -{{/* -# Copyright © 2017 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. -*/}} - -{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: {{ include "common.fullname" . }} - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }} - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" -{{- if .Values.persistence.annotations }} - annotations: -{{ toYaml .Values.persistence.annotations | indent 4 }} -{{- end }} -spec: - selector: - matchLabels: - app: {{ include "common.name" . }} - accessModes: - - {{ .Values.persistence.accessMode }} - resources: - requests: - storage: {{ .Values.persistence.size }} -{{- if .Values.persistence.storageClass }} -{{- if (eq "-" .Values.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- end -}} \ No newline at end of file diff --git a/charts/aaf-cs/templates/service.yaml b/charts/aaf-cs/templates/service.yaml deleted file mode 100644 index b1716e4..0000000 --- a/charts/aaf-cs/templates/service.yaml +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright © 2017 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: 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 }} -# annotations: -# service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" -spec: - type: {{ .Values.service.type }} - ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.externalPort }} - #Example internal target port if required - #targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} - - port: {{ .Values.service.externalPort2 }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }} - name: {{ .Values.service.portName }}2 - - port: {{ .Values.service.externalPort3 }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} - name: {{ .Values.service.portName }}3 - - port: {{ .Values.service.externalPort4 }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} - name: {{ .Values.service.portName }}4 - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - - port: {{ .Values.service.externalPort2 }} - targetPort: {{ .Values.service.internalPort2 }} - name: {{ .Values.service.portName }}2 - - port: {{ .Values.service.externalPort3 }} - targetPort: {{ .Values.service.internalPort3 }} - name: {{ .Values.service.portName }}3 - - port: {{ .Values.service.externalPort4 }} - targetPort: {{ .Values.service.internalPort4 }} - name: {{ .Values.service.portName }}4 - {{- end}} - selector: - app: {{ include "common.name" . }} - release: {{ .Release.Name }} - clusterIP: None diff --git a/charts/aaf-cs/values.yaml b/charts/aaf-cs/values.yaml deleted file mode 100644 index 7783745..0000000 --- a/charts/aaf-cs/values.yaml +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright © 2017 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: 302 -flavor: small - -################################################################# -# Application configuration defaults. -################################################################# -# application image -repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_cass:2.1.9-SNAPSHOT-latest -pullPolicy: Always - -# application configuration -config: {} - -# default number of instances -replicaCount: 1 - -nodeSelector: {} - -affinity: {} - -# probe configuration parameters -liveness: - initialDelaySeconds: 300 - periodSeconds: 10 - # necessary to disable liveness probe when setting breakpoints - # in debugger so K8s doesn't restart unresponsive container - enabled: true - -readiness: - initialDelaySeconds: 120 - periodSeconds: 10 - -service: - name: aaf-cass - type: ClusterIP - portName: aaf-cs - #targetPort - internalPort: 7000 - #port - externalPort: 7000 - - internalPort2: 7001 - externalPort2: 7001 - internalPort3: 9042 - externalPort3: 9042 - internalPort4: 9160 - externalPort4: 9160 - -ingress: - enabled: false - -# Configure resource requests and limits -resources: - small: - limits: - cpu: 200m - memory: 10000Mi - requests: - cpu: 10m - memory: 8500Mi - large: - limits: - cpu: 400m - memory: 12000Mi - requests: - cpu: 40m - memory: 9000Mi - unlimited: {} - -persistence: - enabled: true - #existingClaim: - mountPath: /dockerdata-nfs - mountSubPath: "cass" - volumeReclaimPolicy: Retain - accessMode: ReadWriteOnce - size: 10Gi - storageClass: "manual" diff --git a/charts/aaf-fs/templates/deployment.yaml b/charts/aaf-fs/templates/deployment.yaml index b938448..9f97da9 100644 --- a/charts/aaf-fs/templates/deployment.yaml +++ b/charts/aaf-fs/templates/deployment.yaml @@ -23,7 +23,7 @@ metadata: name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.global.aaf.fs.replicas }} template: metadata: labels: @@ -32,48 +32,56 @@ spec: spec: initContainers: - name: {{ include "common.name" . }}-config-container - image: "{{ include "common.repository" . }}/{{ .Values.global.configImage }}" + image: {{ .Values.global.repository }}/onap/aaf/aaf_config:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["bash","-c","cd /opt/app/aaf_config && bin/pod_wait.sh config aaf-service remove && bin/agent.sh"] volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol env: - - name: HOSTNAME - value: "{{ .Values.global.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.global.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.global.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.global.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "{{ .Values.global.cadi.cass_host }}" - - name: AAF_LOCATOR_AS - value: "{{ .Values.global.cadi.cadi_locator_as }}" - - name: {{ include "common.name" . }}-readiness - command: - - /root/ready.py - args: - - --container-name - - aaf-locate - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + - name: aaf_env + value: "{{ .Values.global.aaf.aaf_env }}" + - name: cadi_latitude + value: "{{ .Values.global.aaf.cadi_latitude }}" + - name: cadi_longitude + value: "{{ .Values.global.aaf.cadi_longitude }}" + - name: cadi_x509_issuers + value: "{{ .Values.global.aaf.cadi_x509_issuers }}" + - name: aaf_locate_url + value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}" + - name: aaf_locator_container + value: "oom" + - name: aaf_release + value: "{{ .Values.global.aaf.aaf_release }}" + - name: aaf_locator_container_ns + value: "{{ .Release.Namespace }}" + - name: aaf_locator_container + value: "oom" + - name: aaf_locator_public_fqdn + value: "{{.Values.global.aaf.public_fqdn}}" + - name: aaf_locator_name + value: "{{.Values.global.aaf.aaf_locator_name}}" + - name: aaf_locator_name_oom + value: "{{.Values.global.aaf.aaf_locator_name_oom}}" + - name: CASSANDRA_CLUSTER + value: "{{.Values.global.aaf.cass.fqdn}}.{{ .Release.Namespace }}" +# - name: CASSANDRA_USER +# value: "" +# - name: CASSANDRA_PASSWORD +# value: "" +# - name: CASSANDRA_PORT containers: - name: {{ include "common.name" . }} - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_fs","sleep","0","cd /opt/app/aaf;bin/fs"] - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-fs aaf-locate && exec bin/fs"] + image: {{ .Values.global.repository }}/onap/aaf/aaf_fs:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol - mountPath: /etc/localtime name: localtime readOnly: true @@ -103,7 +111,11 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: {{ include "common.name" . }}-config-vol - emptyDir: {} + - name: aaf-status-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-status-pvc + - name: aaf-config-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-config-pvc imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-fs/templates/service.yaml b/charts/aaf-fs/templates/service.yaml index 281aa1c..1042afd 100644 --- a/charts/aaf-fs/templates/service.yaml +++ b/charts/aaf-fs/templates/service.yaml @@ -24,18 +24,10 @@ metadata: heritage: {{ .Release.Service }} spec: ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.externalPort }} - #Example internal target port if required - #targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - {{- end}} + - port: {{ .Values.global.aaf.fs.internal_port }} + nodePort: {{ .Values.global.aaf.fs.public_port }} + name: aaf-hello selector: app: {{ include "common.name" . }} release: {{ .Release.Name }} - type: {{ .Values.service.type }} + type: "NodePort" diff --git a/charts/aaf-fs/values.yaml b/charts/aaf-fs/values.yaml index 526a9fd..48ad7c1 100644 --- a/charts/aaf-fs/values.yaml +++ b/charts/aaf-fs/values.yaml @@ -24,29 +24,23 @@ flavor: small # Application configuration defaults. ################################################################# # application image -repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_fs:2.1.9-SNAPSHOT-latest -aaf_register_as: "aaf-fs.onap" pullPolicy: Always -# default number of instances -replicaCount: 1 - nodeSelector: {} affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 300 + initialDelaySeconds: 120 periodSeconds: 10 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true readiness: - initialDelaySeconds: 30 + initialDelaySeconds: 5 periodSeconds: 10 service: @@ -62,19 +56,20 @@ ingress: enabled: false # Configure resource requests and limits -resources: - small: - limits: - cpu: 200m - memory: 600Mi - requests: - cpu: 10m - memory: 300Mi - large: - limits: - cpu: 500m - memory: 700Mi - requests: - cpu: 100m - memory: 400Mi - unlimited: {} +resources: {} +# Allow END users to do this, if they want. Detrimental to Test services +# small: +# limits: +# cpu: 200m +# memory: 800Mi +# requests: +# cpu: 10m +# memory: 300Mi +# large: +# limits: +# cpu: 500m +# memory: 700Mi +# requests: +# cpu: 100m +# memory: 400Mi +# unlimited: {} diff --git a/charts/aaf-gui/templates/deployment.yaml b/charts/aaf-gui/templates/deployment.yaml index 9dd8794..d067b5e 100644 --- a/charts/aaf-gui/templates/deployment.yaml +++ b/charts/aaf-gui/templates/deployment.yaml @@ -23,7 +23,7 @@ metadata: name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.global.aaf.gui.replicas }} template: metadata: labels: @@ -32,61 +32,69 @@ spec: spec: initContainers: - name: {{ include "common.name" . }}-config-container - image: "{{ include "common.repository" . }}/{{ .Values.global.configImage }}" + image: {{ .Values.global.repository }}/onap/aaf/aaf_config:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["bash","-c","cd /opt/app/aaf_config && bin/pod_wait.sh config aaf-service remove && bin/agent.sh"] volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol env: - - name: HOSTNAME - value: "{{ .Values.global.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.global.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.global.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.global.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "{{ .Values.global.cadi.cass_host }}" - - name: AAF_LOCATOR_AS - value: "{{ .Values.global.cadi.cadi_locator_as }}" - - name: {{ include "common.name" . }}-readiness - command: - - /root/ready.py - args: - - --container-name - - aaf-cm - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + - name: aaf_env + value: "{{ .Values.global.aaf.aaf_env }}" + - name: cadi_latitude + value: "{{ .Values.global.aaf.cadi_latitude }}" + - name: cadi_longitude + value: "{{ .Values.global.aaf.cadi_longitude }}" + - name: cadi_x509_issuers + value: "{{ .Values.global.aaf.cadi_x509_issuers }}" + - name: aaf_locate_url + value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}" + - name: aaf_locator_container + value: "oom" + - name: aaf_release + value: "{{ .Values.global.aaf.aaf_release }}" + - name: aaf_locator_container_ns + value: "{{ .Release.Namespace }}" + - name: aaf_locator_container + value: "oom" + - name: aaf_locator_public_fqdn + value: "{{.Values.global.aaf.public_fqdn}}" + - name: aaf_locator_name + value: "{{.Values.global.aaf.aaf_locator_name}}" + - name: aaf_locator_name_oom + value: "{{.Values.global.aaf.aaf_locator_name_oom}}" + - name: CASSANDRA_CLUSTER + value: "{{.Values.global.aaf.cass.fqdn}}.{{ .Release.Namespace }}" +# - name: CASSANDRA_USER +# value: "" +# - name: CASSANDRA_PASSWORD +# value: "" +# - name: CASSANDRA_PORT containers: - name: {{ include "common.name" . }} - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_gui","sleep","0","cd /opt/app/aaf;bin/gui"] - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-gui aaf-locate && exec bin/gui"] + image: {{ .Values.global.repository }}/onap/aaf/aaf_gui:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol - mountPath: /etc/localtime name: localtime readOnly: true {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.gui.internal_port }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.gui.internal_port }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: @@ -103,7 +111,11 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: {{ include "common.name" . }}-config-vol - emptyDir: {} + - name: aaf-status-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-status-pvc + - name: aaf-config-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-config-pvc imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-gui/templates/service.yaml b/charts/aaf-gui/templates/service.yaml index 281aa1c..ea06925 100644 --- a/charts/aaf-gui/templates/service.yaml +++ b/charts/aaf-gui/templates/service.yaml @@ -24,18 +24,10 @@ metadata: heritage: {{ .Release.Service }} spec: ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.externalPort }} - #Example internal target port if required - #targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - {{- end}} + - port: {{ .Values.global.aaf.gui.internal_port }} + nodePort: {{ .Values.global.aaf.gui.public_port }} + name: aaf-gui selector: app: {{ include "common.name" . }} release: {{ .Release.Name }} - type: {{ .Values.service.type }} + type: "NodePort" diff --git a/charts/aaf-gui/values.yaml b/charts/aaf-gui/values.yaml index 145dec1..3068f14 100644 --- a/charts/aaf-gui/values.yaml +++ b/charts/aaf-gui/values.yaml @@ -25,29 +25,23 @@ flavor: small # Application configuration defaults. ################################################################# # application image -repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_gui:2.1.9-SNAPSHOT-latest -aaf_register_as: "aaf-gui.onap" pullPolicy: Always -# default number of instances -replicaCount: 1 - nodeSelector: {} affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 300 + initialDelaySeconds: 120 periodSeconds: 10 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true readiness: - initialDelaySeconds: 30 + initialDelaySeconds: 5 periodSeconds: 10 service: @@ -64,19 +58,21 @@ ingress: enabled: false # Configure resource requests and limits -resources: - small: - limits: - cpu: 100m - memory: 500Mi - requests: - cpu: 10m - memory: 200Mi - large: - limits: - cpu: 200m - memory: 1Gi - requests: - cpu: 100m - memory: 500Mi - unlimited: {} +resources: {} +# Allow END users to do this, if they want. Detrimental to Test services +#resources: +# small: +# limits: +# cpu: 100m +# memory: 500Mi +# requests: +# cpu: 10m +# memory: 200Mi +# large: +# limits: +# cpu: 200m +# memory: 1Gi +# requests: +# cpu: 100m +# memory: 500Mi +# unlimited: {} diff --git a/charts/aaf-hello/templates/deployment.yaml b/charts/aaf-hello/templates/deployment.yaml index c57e57f..9faa580 100644 --- a/charts/aaf-hello/templates/deployment.yaml +++ b/charts/aaf-hello/templates/deployment.yaml @@ -23,7 +23,7 @@ metadata: name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.global.aaf.hello.replicas }} template: metadata: labels: @@ -32,48 +32,60 @@ spec: spec: initContainers: - name: {{ include "common.name" . }}-config-container - image: "{{ include "common.repository" . }}/{{ .Values.global.configImage }}" + image: {{ .Values.global.repository }}/onap/aaf/aaf_agent:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + - mountPath: "/opt/app/osaaf/local" + name: aaf-hello-vol + command: ["bash","-c","/opt/app/aaf_config/bin/pod_wait.sh config nc aaf-cm.{{.Release.Namespace}} 8150 remove && cd /opt/app/osaaf/local && /opt/app/aaf_config/bin/agent.sh"] env: - - name: HOSTNAME - value: "{{ .Values.global.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.global.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.global.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.global.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "{{ .Values.global.cadi.cass_host }}" - - name: AAF_LOCATOR_AS - value: "{{ .Values.global.cadi.cadi_locator_as }}" - - name: {{ include "common.name" . }}-readiness - command: - - /root/ready.py - args: - - --container-name - - aaf-locate - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + - name: aaf_env + value: "{{ .Values.global.aaf.aaf_env }}" + - name: cadi_latitude + value: "{{ .Values.global.aaf.cadi_latitude }}" + - name: cadi_longitude + value: "{{ .Values.global.aaf.cadi_longitude }}" + - name: aaf_locate_url + value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}" + - name: aaf_locator_container + value: "oom" + - name: aaf_release + value: "{{ .Values.global.aaf.aaf_release }}" + - name: aaf_locator_container_ns + value: "{{ .Release.Namespace }}" + - name: aaf_locator_container + value: "oom" + - name: aaf_locator_container_ns + value: "{{ .Release.Namespace }}" + - name: aaf_locator_app_ns + value: "org.osaaf.aaf" + - name: "APP_FQDN" + value: "{{ .Values.global.aaf.hello.fqdn }}" + - name: "APP_FQI" + value: "aaf@aaf.osaaf.org" + - name: "DEPLOY_FQI" + value: "deployer@people.osaaf.org" + - name: "DEPLOY_PASSWORD" + value: "demo123456!" +# Hello specific. Clients don't necessarily need this + - name: aaf_locator_public_fqdn + value: "{{.Values.global.aaf.public_fqdn}}" + - name: aaf_locator_name + value: "{{.Values.global.aaf.aaf_locator_name}}" + - name: aaf_locator_name_oom + value: "{{.Values.global.aaf.aaf_locator_name_oom}}" + - name: aaf_locator_fqdn_oom + value: "%N.%CNS" containers: - name: {{ include "common.name" . }} - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_hello","sleep","0","cd /opt/app/aaf;bin/hello"] - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + command: ["/bin/bash","-c","cd /opt/app/aaf && exec bin/hello"] + image: {{ .Values.global.repository }}/onap/aaf/aaf_hello:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + - mountPath: "/opt/app/osaaf/local" + name: aaf-hello-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol - mountPath: /etc/localtime name: localtime readOnly: true @@ -103,7 +115,10 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: {{ include "common.name" . }}-config-vol + - name: aaf-status-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-status-pvc + - name: aaf-hello-vol emptyDir: {} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-hello/templates/service.yaml b/charts/aaf-hello/templates/service.yaml index 281aa1c..102e85d 100644 --- a/charts/aaf-hello/templates/service.yaml +++ b/charts/aaf-hello/templates/service.yaml @@ -24,18 +24,10 @@ metadata: heritage: {{ .Release.Service }} spec: ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.externalPort }} - #Example internal target port if required - #targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - {{- end}} + - port: {{ .Values.global.aaf.hello.internal_port }} + nodePort: {{ .Values.global.aaf.hello.public_port }} + name: aaf-hello selector: app: {{ include "common.name" . }} release: {{ .Release.Name }} - type: {{ .Values.service.type }} + type: "NodePort" diff --git a/charts/aaf-hello/values.yaml b/charts/aaf-hello/values.yaml index 8c46b80..c3ed9e1 100644 --- a/charts/aaf-hello/values.yaml +++ b/charts/aaf-hello/values.yaml @@ -18,35 +18,28 @@ global: nodePortPrefix: 302 readinessRepository: oomk8s - readinessImage: readiness-check:2.0.0 + readinessImage: readiness-check:2.0.2 flavor: small ################################################################# # Application configuration defaults. ################################################################# # application image -repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_hello:2.1.9-SNAPSHOT-latest -aaf_register_as: "aaf-hello.onap" -pullPolicy: Always -# default number of instances -replicaCount: 1 - nodeSelector: {} affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 300 + initialDelaySeconds: 120 periodSeconds: 10 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true readiness: - initialDelaySeconds: 30 + initialDelaySeconds: 5 periodSeconds: 10 service: @@ -62,19 +55,21 @@ ingress: enabled: false # Configure resource requests and limits -resources: - small: - limits: - cpu: 200m - memory: 500Mi - requests: - cpu: 10m - memory: 200Mi - large: - limits: - cpu: 400m - memory: 1Gi - requests: - cpu: 20m - memory: 500Mi - unlimited: {} +resources: {} +# Allow END users to do this, if they want. Detrimental to Test services +#resources: +# small: +# limits: +# cpu: 200m +# memory: 500Mi +# requests: +# cpu: 10m +# memory: 200Mi +# large: +# limits: +# cpu: 400m +# memory: 1Gi +# requests: +# cpu: 20m +# memory: 500Mi +# unlimited: {} diff --git a/charts/aaf-locate/templates/deployment.yaml b/charts/aaf-locate/templates/deployment.yaml index a2f9f55..f504063 100644 --- a/charts/aaf-locate/templates/deployment.yaml +++ b/charts/aaf-locate/templates/deployment.yaml @@ -23,7 +23,7 @@ metadata: name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.global.aaf.locate.replicas }} template: metadata: labels: @@ -32,61 +32,69 @@ spec: spec: initContainers: - name: {{ include "common.name" . }}-config-container - image: "{{ include "common.repository" . }}/{{ .Values.global.configImage }}" + image: {{ .Values.global.repository }}/onap/aaf/aaf_config:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["bash","-c","cd /opt/app/aaf_config && bin/pod_wait.sh config aaf-service remove && bin/agent.sh"] volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol env: - - name: HOSTNAME - value: "{{ .Values.global.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.global.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.global.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.global.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "{{ .Values.global.cadi.cass_host }}" - - name: AAF_LOCATOR_AS - value: "{{ .Values.global.cadi.cadi_locator_as }}" - - name: {{ include "common.name" . }}-readiness - command: - - /root/ready.py - args: - - --container-name - - aaf-service - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + - name: aaf_env + value: "{{ .Values.global.aaf.aaf_env }}" + - name: cadi_latitude + value: "{{ .Values.global.aaf.cadi_latitude }}" + - name: cadi_longitude + value: "{{ .Values.global.aaf.cadi_longitude }}" + - name: cadi_x509_issuers + value: "{{ .Values.global.aaf.cadi_x509_issuers }}" + - name: aaf_locate_url + value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}" + - name: aaf_locator_container + value: "oom" + - name: aaf_release + value: "{{ .Values.global.aaf.aaf_release }}" + - name: aaf_locator_container_ns + value: "{{ .Release.Namespace }}" + - name: aaf_locator_container + value: "oom" + - name: aaf_locator_public_fqdn + value: "{{.Values.global.aaf.public_fqdn}}" + - name: aaf_locator_name + value: "{{.Values.global.aaf.aaf_locator_name}}" + - name: aaf_locator_name_oom + value: "{{.Values.global.aaf.aaf_locator_name_oom}}" + - name: CASSANDRA_CLUSTER + value: "{{.Values.global.aaf.cass.fqdn}}.{{ .Release.Namespace }}" +# - name: CASSANDRA_USER +# value: "" +# - name: CASSANDRA_PASSWORD +# value: "" +# - name: CASSANDRA_PORT containers: - name: {{ include "common.name" . }} - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_locate","sleep","0","cd /opt/app/aaf;bin/locate"] - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-locate aaf-service && exec bin/locate"] + image: {{ .Values.global.repository }}/onap/aaf/aaf_locate:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol - mountPath: /etc/localtime name: localtime readOnly: true {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.locate.internal_port }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.locate.internal_port }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: @@ -103,7 +111,11 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: {{ include "common.name" . }}-config-vol - emptyDir: {} + - name: aaf-status-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-status-pvc + - name: aaf-config-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-config-pvc imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-locate/templates/service.yaml b/charts/aaf-locate/templates/service.yaml index 281aa1c..606d947 100644 --- a/charts/aaf-locate/templates/service.yaml +++ b/charts/aaf-locate/templates/service.yaml @@ -24,18 +24,10 @@ metadata: heritage: {{ .Release.Service }} spec: ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.externalPort }} - #Example internal target port if required - #targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - {{- end}} + - port: {{ .Values.global.aaf.locate.internal_port }} + nodePort: {{ .Values.global.aaf.locate.public_port }} + name: aaf-locate selector: app: {{ include "common.name" . }} release: {{ .Release.Name }} - type: {{ .Values.service.type }} + type: "NodePort" diff --git a/charts/aaf-locate/values.yaml b/charts/aaf-locate/values.yaml index a323837..c13f834 100644 --- a/charts/aaf-locate/values.yaml +++ b/charts/aaf-locate/values.yaml @@ -24,14 +24,6 @@ flavor: small # Application configuration defaults. ################################################################# # application image -repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_locate:2.1.9-SNAPSHOT-latest -aaf_register_as: "aaf-locate.onap" -pullPolicy: Always - - -# default number of instances -replicaCount: 1 nodeSelector: {} @@ -39,14 +31,14 @@ affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 300 + initialDelaySeconds: 120 periodSeconds: 10 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true readiness: - initialDelaySeconds: 30 + initialDelaySeconds: 5 periodSeconds: 10 service: @@ -56,25 +48,27 @@ service: #targetPort internalPort: 8095 #port - externalPort: 8095 + externalPort: 31111 ingress: enabled: false # Configure resource requests and limits -resources: - small: - limits: - cpu: 200m - memory: 600Mi - requests: - cpu: 20m - memory: 300Mi - large: - limits: - cpu: 400m - memory: 1Gi - requests: - cpu: 40m - memory: 500Mi - unlimited: {} +resources: {} +# Allow END users to do this, if they want. Detrimental to Test services +#resources: +# small: +# limits: +# cpu: 200m +# memory: 600Mi +# requests: +# cpu: 20m +# memory: 300Mi +# large: +# limits: +# cpu: 400m +# memory: 1Gi +# requests: +# cpu: 40m +# memory: 500Mi +# unlimited: {} diff --git a/charts/aaf-oauth/templates/deployment.yaml b/charts/aaf-oauth/templates/deployment.yaml index f7a34f4..cc328d5 100644 --- a/charts/aaf-oauth/templates/deployment.yaml +++ b/charts/aaf-oauth/templates/deployment.yaml @@ -23,7 +23,7 @@ metadata: name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.global.aaf.oauth.replicas }} template: metadata: labels: @@ -32,61 +32,69 @@ spec: spec: initContainers: - name: {{ include "common.name" . }}-config-container - image: "{{ include "common.repository" . }}/{{ .Values.global.configImage }}" + image: {{ .Values.global.repository }}/onap/aaf/aaf_config:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["bash","-c","cd /opt/app/aaf_config && bin/pod_wait.sh config aaf-service remove && bin/agent.sh"] volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol env: - - name: HOSTNAME - value: "{{ .Values.global.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.global.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.global.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.global.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "{{ .Values.global.cadi.cass_host }}" - - name: AAF_LOCATOR_AS - value: "{{ .Values.global.cadi.cadi_locator_as }}" - - name: {{ include "common.name" . }}-readiness - command: - - /root/ready.py - args: - - --container-name - - aaf-locate - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + - name: aaf_env + value: "{{ .Values.global.aaf.aaf_env }}" + - name: cadi_latitude + value: "{{ .Values.global.aaf.cadi_latitude }}" + - name: cadi_longitude + value: "{{ .Values.global.aaf.cadi_longitude }}" + - name: cadi_x509_issuers + value: "{{ .Values.global.aaf.cadi_x509_issuers }}" + - name: aaf_locate_url + value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}" + - name: aaf_locator_container + value: "oom" + - name: aaf_release + value: "{{ .Values.global.aaf.aaf_release }}" + - name: aaf_locator_container_ns + value: "{{ .Release.Namespace }}" + - name: aaf_locator_container + value: "oom" + - name: aaf_locator_public_fqdn + value: "{{.Values.global.aaf.public_fqdn}}" + - name: aaf_locator_name + value: "{{.Values.global.aaf.aaf_locator_name}}" + - name: aaf_locator_name_oom + value: "{{.Values.global.aaf.aaf_locator_name_oom}}" + - name: CASSANDRA_CLUSTER + value: "{{.Values.global.aaf.cass.fqdn}}.{{ .Release.Namespace }}" +# - name: CASSANDRA_USER +# value: "" +# - name: CASSANDRA_PASSWORD +# value: "" +# - name: CASSANDRA_PORT containers: - name: {{ include "common.name" . }} - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_oauth","sleep","0","cd /opt/app/aaf;bin/oauth"] - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + command: ["/bin/bash","-c","cd /opt/app/aaf && /bin/bash bin/pod_wait.sh aaf-oauth aaf-service && exec bin/oauth"] + image: {{ .Values.global.repository }}/onap/aaf/aaf_oauth:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol - mountPath: /etc/localtime name: localtime readOnly: true {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.oauth.internal_port }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.oauth.internal_port }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: @@ -103,7 +111,11 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: {{ include "common.name" . }}-config-vol - emptyDir: {} + - name: aaf-status-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-status-pvc + - name: aaf-config-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-config-pvc imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-oauth/templates/service.yaml b/charts/aaf-oauth/templates/service.yaml index d94bcae..bb4a051 100644 --- a/charts/aaf-oauth/templates/service.yaml +++ b/charts/aaf-oauth/templates/service.yaml @@ -24,16 +24,10 @@ metadata: heritage: {{ .Release.Service }} spec: ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.externalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - {{- end}} + - port: {{ .Values.global.aaf.oauth.internal_port }} + nodePort: {{ .Values.global.aaf.oauth.public_port }} + name: aaf-oauth selector: app: {{ include "common.name" . }} release: {{ .Release.Name }} - type: {{ .Values.service.type }} + type: "NodePort" diff --git a/charts/aaf-oauth/values.yaml b/charts/aaf-oauth/values.yaml index 7cb9f3b..3c29a62 100644 --- a/charts/aaf-oauth/values.yaml +++ b/charts/aaf-oauth/values.yaml @@ -18,35 +18,26 @@ global: nodePortPrefix: 302 readinessRepository: oomk8s - readinessImage: readiness-check:2.0.0 + readinessImage: readiness-check:2.0.2 flavor: small ################################################################# # Application configuration defaults. ################################################################# # application image -repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_oauth:2.1.9-SNAPSHOT-latest -aaf_register_as: "aaf-oauth.onap" -pullPolicy: Always - - -# default number of instances -replicaCount: 1 - nodeSelector: {} affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 300 + initialDelaySeconds: 120 periodSeconds: 10 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true readiness: - initialDelaySeconds: 30 + initialDelaySeconds: 5 periodSeconds: 10 service: @@ -62,19 +53,21 @@ ingress: enabled: false # Configure resource requests and limits -resources: - small: - limits: - cpu: 200m - memory: 400Mi - requests: - cpu: 20m - memory: 200Mi - large: - limits: - cpu: 400m - memory: 600Mi - requests: - cpu: 40m - memory: 200Mi - unlimited: {} +resources: {} +# Allow END users to do this, if they want. Detrimental to Test services +#resources: +# small: +# limits: +# cpu: 200m +# memory: 400Mi +# requests: +# cpu: 20m +# memory: 200Mi +# large: +# limits: +# cpu: 400m +# memory: 600Mi +# requests: +# cpu: 40m +# memory: 200Mi +# unlimited: {} diff --git a/charts/aaf-service/templates/deployment.yaml b/charts/aaf-service/templates/deployment.yaml index 92d2312..1801bfe 100644 --- a/charts/aaf-service/templates/deployment.yaml +++ b/charts/aaf-service/templates/deployment.yaml @@ -23,7 +23,7 @@ metadata: name: {{ include "common.fullname" . }} namespace: {{ include "common.namespace" . }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.global.aaf.service.replicas }} template: metadata: labels: @@ -32,61 +32,72 @@ spec: spec: initContainers: - name: {{ include "common.name" . }}-config-container - image: "{{ include "common.repository" . }}/{{ .Values.global.configImage }}" + image: {{ .Values.global.repository }}/onap/aaf/aaf_config:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: ["bash","-c","cd /opt/app/aaf_config && bin/pod_wait.sh config nc aaf-cass.{{ .Release.Namespace }} 9042 sleep 15 remove && bin/agent.sh"] volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol env: - - name: HOSTNAME - value: "{{ .Values.global.cadi.hostname }}" - - name: AAF_ENV - value: "{{ .Values.global.cadi.aaf_env }}" - - name: AAF_REGISTER_AS - value: "{{ .Values.aaf_register_as }}" - - name: LATITUDE - value: "{{ .Values.global.cadi.cadi_latitude }}" - - name: LONGITUDE - value: "{{ .Values.global.cadi.cadi_longitude }}" - - name: CASS_HOST - value: "{{ .Values.global.cadi.cass_host }}" - - name: AAF_LOCATOR_AS - value: "{{ .Values.global.cadi.cadi_locator_as }}" - - name: {{ include "common.name" . }}-readiness - command: - - /root/ready.py - args: - - --container-name - - aaf-cs - env: - - name: NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" - imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + - name: aaf_env + value: "{{ .Values.global.aaf.aaf_env }}" + - name: cadi_latitude + value: "{{ .Values.global.aaf.cadi_latitude }}" + - name: cadi_longitude + value: "{{ .Values.global.aaf.cadi_longitude }}" + - name: cadi_x509_issuers + value: "{{ .Values.global.aaf.cadi_x509_issuers }}" + - name: aaf_locate_url + value: "https://aaf-locate.{{ .Release.Namespace}}:{{.Values.global.aaf.locate.internal_port}}" + - name: aaf_locator_container + value: "oom" + - name: aaf_release + value: "{{ .Values.global.aaf.aaf_release }}" + - name: aaf_locator_container_ns + value: "{{ .Release.Namespace }}" + - name: aaf_locator_public_fqdn + value: "{{.Values.global.aaf.public_fqdn}}" + - name: aaf_locator_name + value: "{{.Values.global.aaf.aaf_locator_name}}" + - name: aaf_locator_name_oom + value: "{{.Values.global.aaf.aaf_locator_name_oom}}" + - name: CASSANDRA_CLUSTER + value: "{{.Values.global.aaf.cass.fqdn}}.{{ .Release.Namespace }}" +# - name: CASSANDRA_USER +# value: "" +# - name: CASSANDRA_PASSWORD +# value: "" +# - name: CASSANDRA_PORT +# value: "" containers: - name: {{ include "common.name" . }} - command: ["/bin/bash","/opt/app/aaf/pod/pod_wait.sh","aaf_service","sleep","0","cd /opt/app/aaf;bin/service"] - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + command: ["/bin/bash","-c","cd /opt/app/aaf && bin/pod_wait.sh aaf-service aaf-cass && exec bin/service"] + image: {{ .Values.global.repository }}/onap/aaf/aaf_service:{{.Values.global.aaf.imageVersion}} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + lifecycle: + preStop: + exec: + command: ["/bin/sh","-c","rm /opt/app/aaf/status/aaf-service* && echo $HOSTNAME >> aaf-service.hosts"] volumeMounts: - mountPath: "/opt/app/osaaf" - name: {{ include "common.name" . }}-config-vol + name: aaf-config-vol + - mountPath: "/opt/app/aaf/status" + name: aaf-status-vol - mountPath: /etc/localtime name: localtime readOnly: true {{- if eq .Values.liveness.enabled true }} livenessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.service.internal_port }} initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: tcpSocket: - port: {{ .Values.service.internalPort }} + port: {{ .Values.global.aaf.service.internal_port }} initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: @@ -103,7 +114,11 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: {{ include "common.name" . }}-config-vol - emptyDir: {} + - name: aaf-status-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-status-pvc + - name: aaf-config-vol + persistentVolumeClaim: + claimName: {{ .Release.Name }}-aaf-config-pvc imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-service/templates/service.yaml b/charts/aaf-service/templates/service.yaml index 281aa1c..4a318ff 100644 --- a/charts/aaf-service/templates/service.yaml +++ b/charts/aaf-service/templates/service.yaml @@ -24,18 +24,10 @@ metadata: heritage: {{ .Release.Service }} spec: ports: - {{if eq .Values.service.type "NodePort" -}} - - port: {{ .Values.service.externalPort }} - #Example internal target port if required - #targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} - name: {{ .Values.service.portName }} - {{- else -}} - - port: {{ .Values.service.externalPort }} - targetPort: {{ .Values.service.internalPort }} - name: {{ .Values.service.portName }} - {{- end}} + - port: {{ .Values.global.aaf.service.internal_port }} + nodePort: {{ .Values.global.aaf.service.public_port }} + name: aaf-service selector: app: {{ include "common.name" . }} release: {{ .Release.Name }} - type: {{ .Values.service.type }} + type: "NodePort" diff --git a/charts/aaf-service/values.yaml b/charts/aaf-service/values.yaml index 42cebde..8794afe 100644 --- a/charts/aaf-service/values.yaml +++ b/charts/aaf-service/values.yaml @@ -24,14 +24,6 @@ flavor: small # Application configuration defaults. ################################################################# # application image -repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_service:2.1.9-SNAPSHOT-latest -aaf_register_as: "aaf-service.onap" -pullPolicy: Always - - -# default number of instances -replicaCount: 1 nodeSelector: {} @@ -39,14 +31,14 @@ affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 300 + initialDelaySeconds: 120 periodSeconds: 10 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true readiness: - initialDelaySeconds: 30 + initialDelaySeconds: 5 periodSeconds: 10 service: @@ -56,26 +48,27 @@ service: #targetPort internalPort: 8100 #port - externalPort: 8100 - nodePort: 47 + externalPort: 31110 ingress: enabled: false # Configure resource requests and limits -resources: - small: - limits: - cpu: 200m - memory: 600Mi - requests: - cpu: 20m - memory: 300Mi - large: - limits: - cpu: 400m - memory: 1Gi - requests: - cpu: 40m - memory: 300Mi - unlimited: {} +resources: {} +# Allow END users to do this, if they want. Detrimental to Test services +#resources: +# small: +# limits: +# cpu: 200m +# memory: 800Mi +# requests: +# cpu: 20m +# memory: 300Mi +# large: +# limits: +# cpu: 400m +# memory: 1Gi +# requests: +# cpu: 40m +# memory: 300Mi +# unlimited: {} diff --git a/charts/aaf-sms/charts/aaf-sms-vault/values.yaml b/charts/aaf-sms/charts/aaf-sms-vault/values.yaml index 355cd60..360bf42 100644 --- a/charts/aaf-sms/charts/aaf-sms-vault/values.yaml +++ b/charts/aaf-sms/charts/aaf-sms-vault/values.yaml @@ -108,4 +108,4 @@ resources: requests: cpu: 10m memory: 100Mi - unlimited: {} \ No newline at end of file + unlimited: {} diff --git a/templates/aaf-config-pv.yaml b/templates/aaf-config-pv.yaml new file mode 100644 index 0000000..9a1e802 --- /dev/null +++ b/templates/aaf-config-pv.yaml @@ -0,0 +1,48 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## Copyright (c) 2017 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. +## ============LICENSE_END==================================================== +## + +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ .Release.Name }}-aaf-config-pv + namespace: {{ include "common.namespace" . }} + labels: + app: {{ .Chart.Name }}-config + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.config.size}} + accessModes: + - {{ .Values.persistence.config.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.config.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.persistence.config.mountPath }} +{{- if .Values.persistence.config.storageClass }} +{{- if (eq "-" .Values.persistence.config.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.config.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/templates/aaf-config-pvc.yaml b/templates/aaf-config-pvc.yaml new file mode 100644 index 0000000..b22df6d --- /dev/null +++ b/templates/aaf-config-pvc.yaml @@ -0,0 +1,52 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## Copyright (c) 2017 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. +## ============LICENSE_END==================================================== +## +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Release.Name }}-aaf-config-pvc + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app: {{ include "common.name" . }}-config + accessModes: + - {{ .Values.persistence.config.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.config.size }} +{{- if .Values.persistence.config.storageClass }} +{{- if (eq "-" .Values.persistence.config.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.config.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} + diff --git a/templates/aaf-status-pv.yaml b/templates/aaf-status-pv.yaml new file mode 100644 index 0000000..b8d12c5 --- /dev/null +++ b/templates/aaf-status-pv.yaml @@ -0,0 +1,48 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## Copyright (c) 2017 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. +## ============LICENSE_END==================================================== +## + +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ .Release.Name }}-aaf-status-pv + namespace: {{ include "common.namespace" . }} + labels: + app: {{ .Chart.Name }}-status + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} +spec: + capacity: + storage: {{ .Values.persistence.status.size}} + accessModes: + - {{ .Values.persistence.status.accessMode }} + persistentVolumeReclaimPolicy: {{ .Values.persistence.status.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.persistence.status.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.status.mountSubPath }} +{{- if .Values.persistence.status.storageClass }} +{{- if (eq "-" .Values.persistence.status.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.status.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} diff --git a/templates/aaf-status-pvc.yaml b/templates/aaf-status-pvc.yaml new file mode 100644 index 0000000..870ac9c --- /dev/null +++ b/templates/aaf-status-pvc.yaml @@ -0,0 +1,52 @@ +{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}} +######### +## ============LICENSE_START==================================================== +## org.onap.aaf +## =========================================================================== +## Copyright (c) 2017 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. +## ============LICENSE_END==================================================== +## +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ .Release.Name }}-aaf-status-pvc + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- if .Values.persistence.annotations }} + annotations: +{{ toYaml .Values.persistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app: {{ include "common.name" . }}-status + accessModes: + - {{ .Values.persistence.status.accessMode }} + resources: + requests: + storage: {{ .Values.persistence.status.size }} +{{- if .Values.persistence.status.storageClass }} +{{- if (eq "-" .Values.persistence.status.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.status.storageClass }}" +{{- end }} +{{- end }} +{{- end -}} + diff --git a/values.yaml b/values.yaml index 5a095e4..e07f346 100644 --- a/values.yaml +++ b/values.yaml @@ -18,25 +18,83 @@ global: nodePortPrefix: 302 readinessRepository: oomk8s - readinessImage: readiness-check:2.0.0 + readinessImage: readiness-check:2.0.2 ubuntuInitRepository: registry.hub.docker.com ubuntuInitImage: oomk8s/ubuntu-init:2.0.0 - configImage: onap/aaf/aaf_config:2.1.9-SNAPSHOT-latest persistence: enabled: true + pullPolicy: Always + repository: "nexus3.onap.org:10001" + # pullPolicy: IfNotPresent + # repository: "nexus3.onap.org:10003" - cadi: - hostname: "aaf.onap" + aaf: + imageVersion: 2.1.12-SNAPSHOT + #imageVersion: latest + readiness: false + aaf_env: "DEV" + public_fqdn: "aaf.osaaf.org" + aaf_release: "Dublin" + # DUBLIN ONLY - for M4 compatibility with Casablanca + aaf_locator_name: "public.%NS.%N" + aaf_locator_name_oom: "%NS.%N" + # EL ALTO and Beyond + # aaf_locator_name: "%NS.%N" + # aaf_locator_name_oom: "%CNS.%NS.%N" cadi_latitude: "38.0" cadi_longitude: "-72.0" - aaf_env: "DEV" - cass_host: "aaf-cass.onap" - cadi_locator_as: "aaf-locate.onap" + cadi_x509_issuers: "CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US" + + cass: + replicas: 1 + fqdn: "aaf-cass" + cluster_name: "osaaf" + heap_new_size: "512M" + max_heap_size: "1024M" + storage_port: 7000 + ssl_storage_port: 7001 + native_trans_port: 9042 + rpc_port: 9160 + dc: "dc1" + service: + replicas: 1 + fqdn: "aaf-service" + internal_port: 8100 + public_port: 31110 + locate: + replicas: 1 + fqdn: "aaf-locate" + internal_port: 8095 + public_port: 31111 + oauth: + replicas: 1 + fqdn: "aaf0oauth" + internal_port: 8140 + public_port: 31112 + gui: + replicas: 1 + fqdn: "aaf-gui" + internal_port: 8200 + public_port: 31113 + cm: + replicas: 1 + fqdn: "aaf-cm" + internal_port: 8150 + public_port: 31114 + fs: + replicas: 1 + fqdn: "aaf-fs" + internal_port: 8096 + public_port: 31115 + hello: + replicas: 0 + fqdn: "aaf-hello" + internal_port: 8130 + public_port: 31116 ################################################################# # Application configuration defaults. ################################################################# -repository: nexus3.onap.org:10001 flavor: small # default number of instances @@ -48,14 +106,14 @@ affinity: {} # probe configuration parameters liveness: - initialDelaySeconds: 10 + initialDelaySeconds: 350 periodSeconds: 10 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true readiness: - initialDelaySeconds: 10 + initialDelaySeconds: 150 periodSeconds: 10 ingress: @@ -63,31 +121,35 @@ ingress: ## Persist data to a persitent volume persistence: - mountPath: "/mnt/data/aaf" enabled: true config: #existingClaim: - volumeReclaimPolicy: Retain + volumeReclaimPolicy: Delete accessMode: ReadWriteMany size: 2Gi - mountSubPath: "config" storageClass: "manual" + mountPath: "/mnt/data/aaf/config" logs: #existingClaim: volumeReclaimPolicy: Retain accessMode: ReadWriteMany size: 2Gi - mountSubPath: "logs" storageClass: "manual" - -aaf-cs: - persistence: - #existingClaim: + mountPath: "/mnt/data/aaf/logs" + status: + volumeReclaimPolicy: Delete + accessMode: ReadWriteMany + size: 2M + storageClass: "manual" mountPath: /dockerdata-nfs - mountSubPath: "cass" + mountSubPath: "status" + cass: + #existingClaim: volumeReclaimPolicy: Retain accessMode: ReadWriteOnce size: 10Gi storageClass: "manual" + mountPath: /dockerdata-nfs + mountSubPath: "cass" resources: {} -- cgit 1.2.3-korg