From d635bdb06f30d243d0a2bfba82f68273143b5e85 Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Mon, 9 Apr 2018 10:14:32 -0700 Subject: Adding Quorum client sub chart for sms SMS uses vault for its backend which needs an unseal operation to proceed. Quorumclient provides the unseal operation via 3 replicas that store each unseal shard and provide it during unseal. Issue-ID: AAF-255 Change-Id: I62db7a450e1e81aa6bfb2cc5b9da29ce99efd24b Signed-off-by: Kiran Kamineni --- charts/aaf-sms/templates/configmap.yaml | 27 +++++++++++ charts/aaf-sms/templates/deployment.yaml | 83 ++++++++++++++++++++++++++++++++ charts/aaf-sms/templates/pv.yaml | 37 ++++++++++++++ charts/aaf-sms/templates/pvc.yaml | 48 ++++++++++++++++++ charts/aaf-sms/templates/service.yaml | 39 +++++++++++++++ 5 files changed, 234 insertions(+) create mode 100644 charts/aaf-sms/templates/configmap.yaml create mode 100644 charts/aaf-sms/templates/deployment.yaml create mode 100644 charts/aaf-sms/templates/pv.yaml create mode 100644 charts/aaf-sms/templates/pvc.yaml create mode 100644 charts/aaf-sms/templates/service.yaml (limited to 'charts/aaf-sms/templates') diff --git a/charts/aaf-sms/templates/configmap.yaml b/charts/aaf-sms/templates/configmap.yaml new file mode 100644 index 0000000..72ce6fb --- /dev/null +++ b/charts/aaf-sms/templates/configmap.yaml @@ -0,0 +1,27 @@ +# Copyright 2018 Intel Corporation, Inc +# +# 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: ConfigMap +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 }} +data: + smsconfig.json: | + {{ .Values.config | toJson }} diff --git a/charts/aaf-sms/templates/deployment.yaml b/charts/aaf-sms/templates/deployment.yaml new file mode 100644 index 0000000..4235ad0 --- /dev/null +++ b/charts/aaf-sms/templates/deployment.yaml @@ -0,0 +1,83 @@ +# Copyright 2018 Intel Corporation, Inc +# +# 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: + - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + name: {{ include "common.name" . }} + imagePullPolicy: {{ .Values.pullPolicy }} + command: ["/sms/bin/sms"] + workingDir: /sms/ + ports: + - containerPort: {{ .Values.service.internalPort }} + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /sms/smsconfig.json + name: {{ include "common.name" .}} + subPath: smsconfig.json + - mountPath: /sms/auth + name: {{ include "common.fullname" . }}-auth + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 10 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 10 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name : {{ include "common.name" . }} + configMap: + name: {{ include "common.fullname" . }} + - name: {{ include "common.fullname" . }}-auth + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aaf-sms/templates/pv.yaml b/charts/aaf-sms/templates/pv.yaml new file mode 100644 index 0000000..37ed28e --- /dev/null +++ b/charts/aaf-sms/templates/pv.yaml @@ -0,0 +1,37 @@ +{{/* +# Copyright 2018 Intel Corporation, Inc +# +# 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.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 }} +{{- end -}} \ No newline at end of file diff --git a/charts/aaf-sms/templates/pvc.yaml b/charts/aaf-sms/templates/pvc.yaml new file mode 100644 index 0000000..e6aacd1 --- /dev/null +++ b/charts/aaf-sms/templates/pvc.yaml @@ -0,0 +1,48 @@ +{{/* +# Copyright 2018 Intel Corporation, Inc +# +# 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.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: + name: {{ include "common.fullname" . }} + 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-sms/templates/service.yaml b/charts/aaf-sms/templates/service.yaml new file mode 100644 index 0000000..18334a3 --- /dev/null +++ b/charts/aaf-sms/templates/service.yaml @@ -0,0 +1,39 @@ +# Copyright 2018 Intel Corporation, Inc +# +# 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.fullname" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - name: {{ .Values.service.PortName }} + {{if eq .Values.service.type "NodePort" -}} + port: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }} + {{- else -}} + port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + {{- end}} + protocol: TCP + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} -- cgit 1.2.3-korg From 0b55eba46b9986ae4b3e5287b674a9624021a813 Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Mon, 14 May 2018 16:59:55 -0700 Subject: Enable https endpoint for SMS SMS got a new SAN certificate and we are using that in this deployment now. Applications will now query on https://aaf-sms.onap This should also fix the failing healthcheck for SMS -P3: Changing liveness and readiness probes to use https instead of tcp which was throwing up TLS error spam on the server Issue-ID: AAF-284 Change-Id: I654eced0bb75c8b5c807c45773f308d824dfb571 Signed-off-by: Kiran Kamineni --- .../charts/aaf-sms-quorumclient/resources/config/config.json | 7 +++++++ .../charts/aaf-sms-quorumclient/templates/configmap.yaml | 3 +-- .../charts/aaf-sms-quorumclient/templates/statefulset.yaml | 4 ++++ charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml | 8 -------- charts/aaf-sms/templates/deployment.yaml | 8 ++++++-- charts/aaf-sms/values.yaml | 12 ++++++------ 6 files changed, 24 insertions(+), 18 deletions(-) create mode 100644 charts/aaf-sms/charts/aaf-sms-quorumclient/resources/config/config.json (limited to 'charts/aaf-sms/templates') diff --git a/charts/aaf-sms/charts/aaf-sms-quorumclient/resources/config/config.json b/charts/aaf-sms/charts/aaf-sms-quorumclient/resources/config/config.json new file mode 100644 index 0000000..3a43f00 --- /dev/null +++ b/charts/aaf-sms/charts/aaf-sms-quorumclient/resources/config/config.json @@ -0,0 +1,7 @@ +{ + "url":"https://aaf-sms.{{ include "common.namespace" . }}:10443", + "cafile": "/quorumclient/certs/aaf_root_ca.cer", + "clientcert":"client.cert", + "clientkey":"client.key", + "timeout":"10s" +} \ No newline at end of file diff --git a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/configmap.yaml b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/configmap.yaml index cacc368..9905a3c 100644 --- a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/configmap.yaml +++ b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/configmap.yaml @@ -23,5 +23,4 @@ metadata: release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: - config.json: | - {{ .Values.config | toJson }} +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml index 483d6c5..281229f 100644 --- a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml +++ b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml @@ -63,6 +63,10 @@ spec: - name : {{ include "common.name" . }} configMap: name: {{ include "common.fullname" . }} + items: + - key: config.json + path: config.json + mode: 0755 - name: {{ include "common.fullname" . }}-auth persistentVolumeClaim: claimName: {{ include "common.fullname" . }} diff --git a/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml b/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml index b528270..768f89f 100644 --- a/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml +++ b/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml @@ -36,14 +36,6 @@ debugEnabled: false # application configuration # Example: -config: - url: "http://aaf-sms:10443" - cafile: "selfsignedca.pem" - clientcert: "server.cert" - clientkey: "server.key" - timeout: "60s" - disable_tls: true - # default number of instances replicaCount: 3 diff --git a/charts/aaf-sms/templates/deployment.yaml b/charts/aaf-sms/templates/deployment.yaml index 4235ad0..4bdb84f 100644 --- a/charts/aaf-sms/templates/deployment.yaml +++ b/charts/aaf-sms/templates/deployment.yaml @@ -40,14 +40,18 @@ spec: - containerPort: {{ .Values.service.internalPort }} {{- if eq .Values.liveness.enabled true }} livenessProbe: - tcpSocket: + httpGet: port: {{ .Values.service.internalPort }} + scheme: HTTPS + path: /v1/sms/quorum/status initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} {{ end -}} readinessProbe: - tcpSocket: + httpGet: port: {{ .Values.service.internalPort }} + scheme: HTTPS + path: /v1/sms/quorum/status initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} volumeMounts: diff --git a/charts/aaf-sms/values.yaml b/charts/aaf-sms/values.yaml index fa01b38..df2b6ab 100644 --- a/charts/aaf-sms/values.yaml +++ b/charts/aaf-sms/values.yaml @@ -38,10 +38,10 @@ debugEnabled: false # Example: config: smsdbaddress: "http://aaf-sms-db:8200" - cafile: "/sms/auth/selfsignedca.pem" - servercert: "/sms/auth/server.cert" - serverkey: "/sms/auth/server.key" - disable_tls: true + cafile: "/sms/certs/aaf_root_ca.cer" + servercert: "/sms/certs/aaf-sms.pub" + serverkey: "/sms/certs/aaf-sms.pr" + password: "c2VjcmV0bWFuYWdlbWVudHNlcnZpY2VzZWNyZXRwYXNzd29yZA==" # subchart configuration vault: @@ -57,14 +57,14 @@ affinity: {} # probe configuration parameters liveness: initialDelaySeconds: 10 - periodSeconds: 20 + periodSeconds: 30 # necessary to disable liveness probe when setting breakpoints # in debugger so K8s doesn't restart unresponsive container enabled: true readiness: initialDelaySeconds: 10 - periodSeconds: 20 + periodSeconds: 30 service: type: NodePort -- cgit 1.2.3-korg From 8b7dcadeed7d680730a5adf85a06d8169680a035 Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Thu, 2 Aug 2018 17:19:27 -0700 Subject: Add readiness step for deployment Using an initContainer and to start SMS only after vault and consul have already started. This prevents restarts of the sms container. Issue-ID: AAF-421 Change-Id: Ied3264711d5d931a1d18523eadcc84e188ededa5 Signed-off-by: Kiran Kamineni --- .../aaf-sms/charts/aaf-sms-quorumclient/values.yaml | 2 +- charts/aaf-sms/templates/deployment.yaml | 19 ++++++++++++++++++- charts/aaf-sms/values.yaml | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) (limited to 'charts/aaf-sms/templates') diff --git a/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml b/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml index c5fd489..768f89f 100644 --- a/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml +++ b/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml @@ -28,7 +28,7 @@ global: ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/smsquorumclient:2.0.0 +image: onap/aaf/smsquorumclient:latest pullPolicy: Always # flag to enable debugging - application support required diff --git a/charts/aaf-sms/templates/deployment.yaml b/charts/aaf-sms/templates/deployment.yaml index 4bdb84f..58fe72f 100644 --- a/charts/aaf-sms/templates/deployment.yaml +++ b/charts/aaf-sms/templates/deployment.yaml @@ -30,10 +30,27 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} spec: + initContainers: + - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + command: + - /root/ready.py + args: + - --container-name + - "aaf-sms-vault" + - --container-name + - "aaf-sms-vault-backend" + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace containers: - image: "{{ include "common.repository" . }}/{{ .Values.image }}" - name: {{ include "common.name" . }} imagePullPolicy: {{ .Values.pullPolicy }} + name: {{ include "common.name" . }} command: ["/sms/bin/sms"] workingDir: /sms/ ports: diff --git a/charts/aaf-sms/values.yaml b/charts/aaf-sms/values.yaml index b75038c..df2b6ab 100644 --- a/charts/aaf-sms/values.yaml +++ b/charts/aaf-sms/values.yaml @@ -28,7 +28,7 @@ global: ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/sms:2.0.0 +image: onap/aaf/sms:latest pullPolicy: Always # flag to enable debugging - application support required -- cgit 1.2.3-korg From f5719737938a4011e2be546bb088570150543085 Mon Sep 17 00:00:00 2001 From: Mandeep Khinda Date: Mon, 24 Sep 2018 15:25:42 +0000 Subject: Updating charts to use common resource template Issue-ID: OOM-1145 Change-Id: I1510339a820802554b6e8b9a201619ef66be17a0 Signed-off-by: Mandeep Khinda --- charts/aaf-cm/templates/deployment.yaml | 2 +- charts/aaf-cs/templates/deployment.yaml | 6 +++--- charts/aaf-fs/templates/deployment.yaml | 2 +- charts/aaf-gui/templates/deployment.yaml | 2 +- charts/aaf-hello/templates/deployment.yaml | 2 +- charts/aaf-locate/templates/deployment.yaml | 2 +- charts/aaf-oauth/templates/deployment.yaml | 2 +- charts/aaf-service/templates/deployment.yaml | 2 +- .../aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml | 2 +- charts/aaf-sms/templates/deployment.yaml | 2 +- templates/job.yaml | 6 +++--- 11 files changed, 15 insertions(+), 15 deletions(-) (limited to 'charts/aaf-sms/templates') diff --git a/charts/aaf-cm/templates/deployment.yaml b/charts/aaf-cm/templates/deployment.yaml index 50c617e..11b0811 100644 --- a/charts/aaf-cm/templates/deployment.yaml +++ b/charts/aaf-cm/templates/deployment.yaml @@ -90,7 +90,7 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-cs/templates/deployment.yaml b/charts/aaf-cs/templates/deployment.yaml index 893c5ac..cfece70 100644 --- a/charts/aaf-cs/templates/deployment.yaml +++ b/charts/aaf-cs/templates/deployment.yaml @@ -64,7 +64,7 @@ spec: lifecycle: postStart: exec: - command: + command: - /bin/sh - -c - > @@ -74,8 +74,8 @@ spec: cqlsh -u root -p root -f init.cql ; cqlsh -u root -p root -f osaaf.cql ; cqlsh -u root -p root -f temp_identity.cql - resources: -{{ toYaml .Values.resources | indent 12 }} + resources: +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-fs/templates/deployment.yaml b/charts/aaf-fs/templates/deployment.yaml index b100bc4..d269dc6 100644 --- a/charts/aaf-fs/templates/deployment.yaml +++ b/charts/aaf-fs/templates/deployment.yaml @@ -90,7 +90,7 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-gui/templates/deployment.yaml b/charts/aaf-gui/templates/deployment.yaml index 1aa632b..b24a008 100644 --- a/charts/aaf-gui/templates/deployment.yaml +++ b/charts/aaf-gui/templates/deployment.yaml @@ -90,7 +90,7 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-hello/templates/deployment.yaml b/charts/aaf-hello/templates/deployment.yaml index c9c8223..c76c084 100644 --- a/charts/aaf-hello/templates/deployment.yaml +++ b/charts/aaf-hello/templates/deployment.yaml @@ -90,7 +90,7 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-locate/templates/deployment.yaml b/charts/aaf-locate/templates/deployment.yaml index 2adb92d..6e69f2c 100644 --- a/charts/aaf-locate/templates/deployment.yaml +++ b/charts/aaf-locate/templates/deployment.yaml @@ -88,7 +88,7 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-oauth/templates/deployment.yaml b/charts/aaf-oauth/templates/deployment.yaml index f236185..fd4ae21 100644 --- a/charts/aaf-oauth/templates/deployment.yaml +++ b/charts/aaf-oauth/templates/deployment.yaml @@ -90,7 +90,7 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-service/templates/deployment.yaml b/charts/aaf-service/templates/deployment.yaml index cff8fb2..a07d06f 100644 --- a/charts/aaf-service/templates/deployment.yaml +++ b/charts/aaf-service/templates/deployment.yaml @@ -90,7 +90,7 @@ spec: initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml index 281229f..5eb7b33 100644 --- a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml +++ b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml @@ -47,7 +47,7 @@ spec: - mountPath: /quorumclient/auth name: {{ include "common.fullname" . }}-auth resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-sms/templates/deployment.yaml b/charts/aaf-sms/templates/deployment.yaml index 58fe72f..189cc0d 100644 --- a/charts/aaf-sms/templates/deployment.yaml +++ b/charts/aaf-sms/templates/deployment.yaml @@ -81,7 +81,7 @@ spec: - mountPath: /sms/auth name: {{ include "common.fullname" . }}-auth resources: -{{ toYaml .Values.resources | indent 12 }} +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/templates/job.yaml b/templates/job.yaml index 85c0940..719b6dc 100644 --- a/templates/job.yaml +++ b/templates/job.yaml @@ -56,7 +56,7 @@ spec: - mountPath: /data name: aaf-persistent-data - mountPath: /data1/etc - name: aaf-etc + name: aaf-etc - mountPath: /data1/data name: aaf-data - mountPath: /data1/public/iframe_denied_test.html @@ -102,8 +102,8 @@ spec: name: aaf-backup - mountPath: /share name: aaf-public - resources: -{{ toYaml .Values.resources | indent 12 }} + resources: +{{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} -- cgit 1.2.3-korg From 449af556fdf4dce596d585dc23d6fc16f880edde Mon Sep 17 00:00:00 2001 From: "dsingh.278" Date: Fri, 21 Sep 2018 05:11:00 -0400 Subject: commiting resource limit for onap-aaf component cleaning up merge conflict implementing template reducing overly large resource limits adding limits to aaf-sms. Issue-ID: OOM-1146 Change-Id: Idac679dc9be94ab92ea95c38f9f237af65307131 Signed-off-by: dsingh.278 Signed-off-by: Mandeep Khinda --- charts/aaf-cm/values.yaml | 38 ++++++++++----------- charts/aaf-cs/values.yaml | 37 ++++++++++---------- charts/aaf-fs/values.yaml | 39 +++++++++++----------- charts/aaf-gui/values.yaml | 39 +++++++++++----------- charts/aaf-hello/values.yaml | 37 ++++++++++---------- charts/aaf-locate/values.yaml | 39 +++++++++++----------- charts/aaf-oauth/values.yaml | 39 +++++++++++----------- charts/aaf-service/values.yaml | 39 +++++++++++----------- .../templates/statefulset.yaml | 2 +- .../charts/aaf-sms-quorumclient/values.yaml | 39 +++++++++++----------- .../aaf-sms-vault/templates/statefulset.yaml | 5 ++- charts/aaf-sms/charts/aaf-sms-vault/values.yaml | 37 ++++++++++---------- charts/aaf-sms/templates/deployment.yaml | 2 +- charts/aaf-sms/values.yaml | 39 +++++++++++----------- values.yaml | 39 +++++++++++----------- 15 files changed, 233 insertions(+), 237 deletions(-) (limited to 'charts/aaf-sms/templates') diff --git a/charts/aaf-cm/values.yaml b/charts/aaf-cm/values.yaml index 1cd5cb4..a149f06 100644 --- a/charts/aaf-cm/values.yaml +++ b/charts/aaf-cm/values.yaml @@ -19,13 +19,14 @@ global: nodePortPrefix: 302 readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 +flavor: small ################################################################# # Application configuration defaults. ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_cm:2.1.2-SNAPSHOT +image: onap/aaf/aaf_cm:2.1.1 pullPolicy: Always # flag to enable debugging - application support required @@ -65,21 +66,20 @@ service: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# 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: {} \ No newline at end of file diff --git a/charts/aaf-cs/values.yaml b/charts/aaf-cs/values.yaml index 83eaf15..73dac29 100644 --- a/charts/aaf-cs/values.yaml +++ b/charts/aaf-cs/values.yaml @@ -17,7 +17,7 @@ ################################################################# global: nodePortPrefix: 302 - +flavor: small ################################################################# # Application configuration defaults. @@ -71,21 +71,20 @@ service: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# 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: {} \ No newline at end of file diff --git a/charts/aaf-fs/values.yaml b/charts/aaf-fs/values.yaml index f484883..0e3a81a 100644 --- a/charts/aaf-fs/values.yaml +++ b/charts/aaf-fs/values.yaml @@ -19,13 +19,13 @@ global: nodePortPrefix: 302 readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 - +flavor: small ################################################################# # Application configuration defaults. ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_fs:2.1.2-SNAPSHOT +image: onap/aaf/aaf_fs:2.1.1 pullPolicy: Always # flag to enable debugging - application support required @@ -65,21 +65,20 @@ service: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# 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: {} \ No newline at end of file diff --git a/charts/aaf-gui/values.yaml b/charts/aaf-gui/values.yaml index 92faa6c..5665d1d 100644 --- a/charts/aaf-gui/values.yaml +++ b/charts/aaf-gui/values.yaml @@ -19,13 +19,13 @@ global: nodePortPrefix: 302 readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 - +flavor: small ################################################################# # Application configuration defaults. ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_gui:2.1.2-SNAPSHOT +image: onap/aaf/aaf_gui:2.1.1 pullPolicy: Always # flag to enable debugging - application support required @@ -66,21 +66,20 @@ service: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# 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: {} \ No newline at end of file diff --git a/charts/aaf-hello/values.yaml b/charts/aaf-hello/values.yaml index 27f59d1..6fcf861 100644 --- a/charts/aaf-hello/values.yaml +++ b/charts/aaf-hello/values.yaml @@ -25,7 +25,7 @@ global: ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_hello:2.1.2-SNAPSHOT +image: onap/aaf/aaf_hello:2.1.1 pullPolicy: Always # flag to enable debugging - application support required @@ -65,21 +65,20 @@ service: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# 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: {} \ No newline at end of file diff --git a/charts/aaf-locate/values.yaml b/charts/aaf-locate/values.yaml index 86d67fc..c924002 100644 --- a/charts/aaf-locate/values.yaml +++ b/charts/aaf-locate/values.yaml @@ -23,13 +23,13 @@ global: # If mountPath is over NFS (e.g. /dockerdata-nfs is NFS mounted between the nodes), uncomment following lines. # persistence: # mountPath: /dockerdata - +flavor: small ################################################################# # Application configuration defaults. ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_locate:2.1.2-SNAPSHOT +image: onap/aaf/aaf_locate:2.1.1 pullPolicy: Always # flag to enable debugging - application support required @@ -69,21 +69,20 @@ service: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# 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: {} \ No newline at end of file diff --git a/charts/aaf-oauth/values.yaml b/charts/aaf-oauth/values.yaml index c349814..943ad16 100644 --- a/charts/aaf-oauth/values.yaml +++ b/charts/aaf-oauth/values.yaml @@ -19,13 +19,13 @@ global: nodePortPrefix: 302 readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 - +flavor: small ################################################################# # Application configuration defaults. ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_oauth:2.1.2-SNAPSHOT +image: onap/aaf/aaf_oauth:2.1.1 pullPolicy: Always # flag to enable debugging - application support required @@ -65,21 +65,20 @@ service: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# 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: {} \ No newline at end of file diff --git a/charts/aaf-service/values.yaml b/charts/aaf-service/values.yaml index 3e0ed61..5ad31ff 100644 --- a/charts/aaf-service/values.yaml +++ b/charts/aaf-service/values.yaml @@ -19,13 +19,13 @@ global: nodePortPrefix: 302 readinessRepository: oomk8s readinessImage: readiness-check:2.0.0 - +flavor: small ################################################################# # Application configuration defaults. ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/aaf_service:2.1.2-SNAPSHOT +image: onap/aaf/aaf_service:2.1.1 pullPolicy: Always # flag to enable debugging - application support required @@ -66,21 +66,20 @@ service: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# 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: {} \ No newline at end of file diff --git a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml index 5eb7b33..0a83e85 100644 --- a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml +++ b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml @@ -47,7 +47,7 @@ spec: - mountPath: /quorumclient/auth name: {{ include "common.fullname" . }}-auth resources: -{{ include "common.resources" . | indent 12 }} +{{ include "common.resources" . | indent 10 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml b/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml index c5fd489..d6ac1cb 100644 --- a/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml +++ b/charts/aaf-sms/charts/aaf-sms-quorumclient/values.yaml @@ -28,7 +28,7 @@ global: ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/smsquorumclient:2.0.0 +image: onap/aaf/smsquorumclient:latest pullPolicy: Always # flag to enable debugging - application support required @@ -54,21 +54,22 @@ persistence: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +flavor: small + +# Configure resource requests and limits +resources: + small: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 10m + memory: 10Mi + large: + limits: + cpu: 400m + memory: 700Mi + requests: + cpu: 10m + memory: 100Mi + unlimited: {} \ No newline at end of file diff --git a/charts/aaf-sms/charts/aaf-sms-vault/templates/statefulset.yaml b/charts/aaf-sms/charts/aaf-sms-vault/templates/statefulset.yaml index ddfc7c6..ab0ad17 100644 --- a/charts/aaf-sms/charts/aaf-sms-vault/templates/statefulset.yaml +++ b/charts/aaf-sms/charts/aaf-sms-vault/templates/statefulset.yaml @@ -45,7 +45,8 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - + resources: +{{ include "common.resources" . | indent 10 }} - image: "{{ include "common.repository" . }}/{{ .Values.image.consul }}" name: {{ include "common.name" . }}-backend imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} @@ -62,6 +63,8 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true + resources: +{{ include "common.resources" . | indent 10 }} volumes: - name: {{ include "common.fullname" . }}-consuldata persistentVolumeClaim: diff --git a/charts/aaf-sms/charts/aaf-sms-vault/values.yaml b/charts/aaf-sms/charts/aaf-sms-vault/values.yaml index 317abcd..58017bd 100644 --- a/charts/aaf-sms/charts/aaf-sms-vault/values.yaml +++ b/charts/aaf-sms/charts/aaf-sms-vault/values.yaml @@ -90,21 +90,22 @@ service: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +flavor: small + +# Configure resource requests and limits +resources: + small: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 10m + memory: 10Mi + large: + limits: + cpu: 400m + memory: 700Mi + requests: + cpu: 10m + memory: 100Mi + unlimited: {} \ No newline at end of file diff --git a/charts/aaf-sms/templates/deployment.yaml b/charts/aaf-sms/templates/deployment.yaml index 189cc0d..ed24f67 100644 --- a/charts/aaf-sms/templates/deployment.yaml +++ b/charts/aaf-sms/templates/deployment.yaml @@ -81,7 +81,7 @@ spec: - mountPath: /sms/auth name: {{ include "common.fullname" . }}-auth resources: -{{ include "common.resources" . | indent 12 }} +{{ include "common.resources" . | indent 10 }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} diff --git a/charts/aaf-sms/values.yaml b/charts/aaf-sms/values.yaml index b75038c..7a25581 100644 --- a/charts/aaf-sms/values.yaml +++ b/charts/aaf-sms/values.yaml @@ -22,13 +22,13 @@ global: loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 persistence: {} - +flavor: small ################################################################# # Application configuration defaults. ################################################################# # application image repository: nexus3.onap.org:10001 -image: onap/aaf/sms:2.0.0 +image: onap/aaf/sms:latest pullPolicy: Always # flag to enable debugging - application support required @@ -84,21 +84,20 @@ persistence: ingress: enabled: false -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# Configure resource requests and limits +resources: + small: + limits: + cpu: 200m + memory: 500Mi + requests: + cpu: 10m + memory: 10Mi + large: + limits: + cpu: 400m + memory: 1Gi + requests: + cpu: 10m + memory: 100Mi + unlimited: {} \ No newline at end of file diff --git a/values.yaml b/values.yaml index c8f0484..931a31d 100644 --- a/values.yaml +++ b/values.yaml @@ -23,7 +23,6 @@ global: ubuntuInitImage: oomk8s/ubuntu-init:2.0.0 persistence: enabled: true - ################################################################# # Application configuration defaults. ################################################################# @@ -38,8 +37,9 @@ config: csServiceName: aaf-cass # gerrit branch where the latest aaf/auth/sample/public code exists gerritProject: http://gerrit.onap.org/r/aaf/authz.git - gerritBranch: master + gerritBranch: 2.0.0-ONAP +flavor: small # default number of instances replicaCount: 1 @@ -83,21 +83,20 @@ persistence: mountPath: /dockerdata-nfs mountSubPath: aaf/data -resources: {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # - # Example: - # Configure resource requests and limits - # ref: http://kubernetes.io/docs/user-guide/compute-resources/ - # Minimum memory for development is 2 CPU cores and 4GB memory - # Minimum memory for production is 4 CPU cores and 8GB memory -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +# Configure resource requests and limits +resources: + small: + limits: + cpu: 2 + memory: 3Gi + requests: + cpu: 2 + memory: 3Gi + large: + limits: + cpu: 4 + memory: 6Gi + requests: + cpu: 4 + memory: 6Gi + unlimited: {} -- cgit 1.2.3-korg From faf65d5b4be50e47c61bde1c38a1b976ba05c3c9 Mon Sep 17 00:00:00 2001 From: Kiran Kamineni Date: Mon, 8 Oct 2018 15:44:37 -0700 Subject: Add sms preload job that preloads secrets Add a preload job that loads secrets from config files into secret management service after it comes up. P1: Includes osdf.json which contains secrets for oof-osdf P2: Add has.json for oof-has Issue-ID: AAF-548 Change-Id: Ib03cf6771a445be8ab00621cf26ca0e902af4ab3 Signed-off-by: Kiran Kamineni --- charts/aaf-sms/resources/config/has.json | 36 ++++++++++++ charts/aaf-sms/resources/config/osdf.json | 98 +++++++++++++++++++++++++++++++ charts/aaf-sms/templates/configmap.yaml | 15 +++++ charts/aaf-sms/templates/job.yaml | 92 +++++++++++++++++++++++++++++ 4 files changed, 241 insertions(+) create mode 100644 charts/aaf-sms/resources/config/has.json create mode 100644 charts/aaf-sms/resources/config/osdf.json create mode 100644 charts/aaf-sms/templates/job.yaml (limited to 'charts/aaf-sms/templates') diff --git a/charts/aaf-sms/resources/config/has.json b/charts/aaf-sms/resources/config/has.json new file mode 100644 index 0000000..9d017f9 --- /dev/null +++ b/charts/aaf-sms/resources/config/has.json @@ -0,0 +1,36 @@ +{ + "domain": { + "name": "has", + "secrets": [ + { + "name": "aai", + "values": { + "username": "OOF", + "password": "OOF" + } + }, + { + "name": "conductor_api", + "values": { + "username": "admin1", + "password": "plan.15" + } + }, + { + "name": "sdnc", + "values": { + "username": "admin", + "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" + } + }, + { + "name": "music_api", + "values": { + "aafuser": "conductor", + "aafpass": "c0nduct0r", + "aafns": "conductor" + } + } + ] + } +} diff --git a/charts/aaf-sms/resources/config/osdf.json b/charts/aaf-sms/resources/config/osdf.json new file mode 100644 index 0000000..0950957 --- /dev/null +++ b/charts/aaf-sms/resources/config/osdf.json @@ -0,0 +1,98 @@ +{ + "domain": { + "name": "osdf", + "secrets": [ + { + "name": "so", + "values": { + "UserName": "", + "Password": "" + } + }, + { + "name": "conductor", + "values": { + "UserName": "admin1", + "Password": "plan.15" + } + }, + { + "name": "policyPlatform", + "values": { + "UserName": "testpdp", + "Password": "alpha123" + } + }, + { + "name": "policyClient", + "values": { + "UserName": "python", + "Password": "test" + } + }, + { + "name": "dmaap", + "values": { + "UserName": "NA", + "Password": "NA" + } + }, + { + "name": "sdc", + "values": { + "UserName": "NA", + "Password": "NA" + } + }, + { + "name": "osdfPlacement", + "values": { + "UserName": "test", + "Password": "testpwd" + } + }, + { + "name": "osdfPlacementSO", + "values": { + "UserName": "so_test", + "Password": "so_testpwd" + } + }, + { + "name": "osdfPlacementVFC", + "values": { + "UserName": "vfc_test", + "Password": "vfc_testpwd" + } + }, + { + "name": "osdfCMScheduler", + "values": { + "UserName": "test1", + "Password": "testpwd1" + } + }, + { + "name": "configDb", + "values": { + "UserName": "osdf", + "Password": "passwd" + } + }, + { + "name": "pciHMS", + "values": { + "UserName": "", + "Password": "" + } + }, + { + "name": "osdfPCIOpt", + "values": { + "UserName": "pci_test", + "Password": "pci_testpwd" + } + } + ] + } +} \ No newline at end of file diff --git a/charts/aaf-sms/templates/configmap.yaml b/charts/aaf-sms/templates/configmap.yaml index 72ce6fb..b513d99 100644 --- a/charts/aaf-sms/templates/configmap.yaml +++ b/charts/aaf-sms/templates/configmap.yaml @@ -1,3 +1,4 @@ +{{/* # Copyright 2018 Intel Corporation, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,6 +12,7 @@ # 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: ConfigMap @@ -25,3 +27,16 @@ metadata: data: smsconfig.json: | {{ .Values.config | toJson }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-preload + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }}-preload + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} diff --git a/charts/aaf-sms/templates/job.yaml b/charts/aaf-sms/templates/job.yaml new file mode 100644 index 0000000..2cee8d5 --- /dev/null +++ b/charts/aaf-sms/templates/job.yaml @@ -0,0 +1,92 @@ +{{/* +# Copyright 2018 Intel Corporation, Inc +# +# 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: batch/v1 +kind: Job +metadata: + name: {{ include "common.fullname" . }}-preload + 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: + initContainers: + - image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + command: + - /root/ready.py + args: + - --container-name + - "aaf-sms" + - --container-name + - "aaf-sms-quorumclient" + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + containers: + - image: "{{ include "common.repository" . }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.pullPolicy }} + name: {{ include "common.name" . }}-preload + command: + - "/sms/bin/preload" + - "-cacert" + - "/sms/certs/aaf_root_ca.cer" + - "-jsondir" + - "/preload/config" + - "-serviceport" + - "{{ .Values.service.internalPort }}" + - "-serviceurl" + - "https://aaf-sms.{{ include "common.namespace" . }}" + workingDir: /sms + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /preload/config + name: {{ include "common.name" . }}-preload + 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 : {{ include "common.name" . }}-preload + configMap: + name: {{ include "common.fullname" . }}-preload + restartPolicy: OnFailure + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" -- cgit 1.2.3-korg From abb13fe77c54bdc876f6b7c4833d113f553c04ac Mon Sep 17 00:00:00 2001 From: dkamdocs Date: Fri, 21 Dec 2018 09:25:53 +0000 Subject: global image pull issue Issue-ID: OOM-1563 Change-Id: I383dbec29291ba5b13d613f60d8eb343b9c59dda Signed-off-by: dkamdocs --- charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml | 2 +- charts/aaf-sms/templates/deployment.yaml | 2 +- charts/aaf-sms/templates/job.yaml | 2 +- charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/job.yaml | 2 +- charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/statefulset.yaml | 2 +- charts/aaf-sshsm/charts/aaf-sshsm-distcenter/templates/job.yaml | 4 ++-- charts/aaf-sshsm/charts/aaf-sshsm-testca/templates/job.yaml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'charts/aaf-sms/templates') diff --git a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml index 0a83e85..16f8092 100644 --- a/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml +++ b/charts/aaf-sms/charts/aaf-sms-quorumclient/templates/statefulset.yaml @@ -34,7 +34,7 @@ spec: containers: - image: "{{ include "common.repository" . }}/{{ .Values.image }}" name: {{ include "common.name" . }} - imagePullPolicy: {{ .Values.pullPolicy }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/quorumclient/bin/quorumclient"] workingDir: /quorumclient/ volumeMounts: diff --git a/charts/aaf-sms/templates/deployment.yaml b/charts/aaf-sms/templates/deployment.yaml index ed24f67..ca35fdc 100644 --- a/charts/aaf-sms/templates/deployment.yaml +++ b/charts/aaf-sms/templates/deployment.yaml @@ -49,7 +49,7 @@ spec: fieldPath: metadata.namespace containers: - image: "{{ include "common.repository" . }}/{{ .Values.image }}" - imagePullPolicy: {{ .Values.pullPolicy }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }} command: ["/sms/bin/sms"] workingDir: /sms/ diff --git a/charts/aaf-sms/templates/job.yaml b/charts/aaf-sms/templates/job.yaml index 2cee8d5..a5446ab 100644 --- a/charts/aaf-sms/templates/job.yaml +++ b/charts/aaf-sms/templates/job.yaml @@ -51,7 +51,7 @@ spec: fieldPath: metadata.namespace containers: - image: "{{ include "common.repository" . }}/{{ .Values.image }}" - imagePullPolicy: {{ .Values.pullPolicy }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} name: {{ include "common.name" . }}-preload command: - "/sms/bin/preload" diff --git a/charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/job.yaml b/charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/job.yaml index 8b2e0b8..5618dd5 100644 --- a/charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/job.yaml +++ b/charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/job.yaml @@ -38,7 +38,7 @@ spec: containers: - name: {{ include "common.name" . }}-job image: "{{ include "common.repository" . }}/{{ .Values.image }}" - imagePullPolicy: {{ .Values.pullPolicy }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/abrmd/bin/initialize_tpm.sh"] workingDir: /abrmd/bin securityContext: diff --git a/charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/statefulset.yaml b/charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/statefulset.yaml index a3a2004..4a1dd5c 100644 --- a/charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/statefulset.yaml +++ b/charts/aaf-sshsm/charts/aaf-sshsm-abrmd/templates/statefulset.yaml @@ -53,7 +53,7 @@ spec: containers: - image: "{{ include "common.repository" . }}/{{ .Values.image }}" name: {{ include "common.name" . }} - imagePullPolicy: {{ .Values.pullPolicy }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/abrmd/bin/run_abrmd.sh"] workingDir: /abrmd/bin securityContext: diff --git a/charts/aaf-sshsm/charts/aaf-sshsm-distcenter/templates/job.yaml b/charts/aaf-sshsm/charts/aaf-sshsm-distcenter/templates/job.yaml index 69a9956..3db88b6 100644 --- a/charts/aaf-sshsm/charts/aaf-sshsm-distcenter/templates/job.yaml +++ b/charts/aaf-sshsm/charts/aaf-sshsm-distcenter/templates/job.yaml @@ -73,7 +73,7 @@ spec: containers: - image: "{{ include "common.repository" . }}/{{ .Values.image }}" name: {{ include "common.name" . }} - imagePullPolicy: {{ .Values.pullPolicy }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/entrypoint.sh"] workingDir: /distcenter volumeMounts: @@ -102,4 +102,4 @@ spec: imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/charts/aaf-sshsm/charts/aaf-sshsm-testca/templates/job.yaml b/charts/aaf-sshsm/charts/aaf-sshsm-testca/templates/job.yaml index 304f974..fc993df 100644 --- a/charts/aaf-sshsm/charts/aaf-sshsm-testca/templates/job.yaml +++ b/charts/aaf-sshsm/charts/aaf-sshsm-testca/templates/job.yaml @@ -70,7 +70,7 @@ spec: containers: - image: "{{ include "common.repository" . }}/{{ .Values.image }}" name: {{ include "common.name" . }} - imagePullPolicy: {{ .Values.pullPolicy }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["./import.sh"] workingDir: /testca/bin env: -- cgit 1.2.3-korg From 54d16145bc0d5704d1bbc95089f0d86904ef600d Mon Sep 17 00:00:00 2001 From: Pawel Wieczorek Date: Sun, 14 Jul 2019 17:38:23 +0200 Subject: Use nodePortPrefix variable in AAF (aaf-sms) charts Issue-ID: AAF-383 Change-Id: I3e2591ca73c8ba559fd39aa1250471b15d1189d2 Signed-off-by: Pawel Wieczorek --- charts/aaf-sms/charts/aaf-sms-vault/templates/service.yaml | 2 +- charts/aaf-sms/templates/service.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'charts/aaf-sms/templates') diff --git a/charts/aaf-sms/charts/aaf-sms-vault/templates/service.yaml b/charts/aaf-sms/charts/aaf-sms-vault/templates/service.yaml index 04e9a5a..de6130c 100644 --- a/charts/aaf-sms/charts/aaf-sms-vault/templates/service.yaml +++ b/charts/aaf-sms/charts/aaf-sms-vault/templates/service.yaml @@ -28,7 +28,7 @@ spec: - name: {{ .Values.service.portName }} {{if eq .Values.service.type "NodePort" -}} port: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} {{- else -}} port: {{ .Values.service.externalPort }} targetPort: {{ .Values.service.internalPort }} diff --git a/charts/aaf-sms/templates/service.yaml b/charts/aaf-sms/templates/service.yaml index 18334a3..5e6bffb 100644 --- a/charts/aaf-sms/templates/service.yaml +++ b/charts/aaf-sms/templates/service.yaml @@ -28,7 +28,7 @@ spec: - name: {{ .Values.service.PortName }} {{if eq .Values.service.type "NodePort" -}} port: {{ .Values.service.internalPort }} - nodePort: {{ .Values.global.nodePortPrefix | default "302" }}{{ .Values.service.nodePort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} {{- else -}} port: {{ .Values.service.externalPort }} targetPort: {{ .Values.service.internalPort }} -- cgit 1.2.3-korg