Merge "[MULTICLOUD] Update multicloud k8s image to 0.7.0"
diff --git a/kubernetes/Makefile b/kubernetes/Makefile
index b25381f..dfad45f 100644
--- a/kubernetes/Makefile
+++ b/kubernetes/Makefile
@@ -19,6 +19,7 @@
 OUTPUT_DIR := $(ROOT_DIR)/dist
 PACKAGE_DIR := $(OUTPUT_DIR)/packages
 SECRET_DIR := $(OUTPUT_DIR)/secrets
+HELM_VER := $(shell helm version --template "{{.Version}}")
 
 ifneq ($(SKIP_LINT),TRUE)
 	HELM_LINT_CMD := helm lint
@@ -65,7 +66,12 @@
 
 package-%: lint-%
 	@mkdir -p $(PACKAGE_DIR)
+ifeq "$(findstring v3,$(HELM_VER))" "v3"
+	@if [ -f $*/Chart.yaml ]; then PACKAGE_NAME=$$(helm package -d $(PACKAGE_DIR) $* | cut -d":" -f2) && helm push -f $$PACKAGE_NAME local; fi
+else
 	@if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+endif
+
 	@helm repo index $(PACKAGE_DIR)
 
 clean:
diff --git a/kubernetes/clamp/components/clamp-backend/templates/deployment.yaml b/kubernetes/clamp/components/clamp-backend/templates/deployment.yaml
index f86c636..e0b441b 100644
--- a/kubernetes/clamp/components/clamp-backend/templates/deployment.yaml
+++ b/kubernetes/clamp/components/clamp-backend/templates/deployment.yaml
@@ -65,7 +65,7 @@
           - -c
           - |
             export $(grep '^cadi_' {{ .Values.certInitializer.credsPath }}/org.onap.clamp.cred.props | xargs -0)
-            java -Djava.security.egd=file:/dev/./urandom -Xms256m -Xmx1g -jar ./app.jar
+            java -Djava.security.egd=file:/dev/./urandom -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=75 -jar ./app.jar
           {{- else }}
           args:
           - ""
diff --git a/kubernetes/clamp/components/clamp-backend/values.yaml b/kubernetes/clamp/components/clamp-backend/values.yaml
index 97eebeb..c3fee5d 100644
--- a/kubernetes/clamp/components/clamp-backend/values.yaml
+++ b/kubernetes/clamp/components/clamp-backend/values.yaml
@@ -66,7 +66,7 @@
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/clamp-backend:5.1.2
+image: onap/clamp-backend:5.1.3
 pullPolicy: Always
 
 # flag to enable debugging - application support required
@@ -105,6 +105,7 @@
 liveness:
   initialDelaySeconds: 120
   periodSeconds: 10
+  timeoutSeconds: 3
   # necessary to disable liveness probe when setting breakpoints
   # in debugger so K8s doesn't restart unresponsive container
   enabled: true
@@ -112,7 +113,7 @@
 readiness:
   initialDelaySeconds: 10
   periodSeconds: 10
-
+  timeoutSeconds: 3
 
 service:
   type: ClusterIP
@@ -139,15 +140,15 @@
   small:
     limits:
       cpu: 1
-      memory: 1.2Gi
+      memory: 1Gi
     requests:
       cpu: 10m
-      memory: 800Mi
+      memory: 1Gi
   large:
     limits:
       cpu: 1
-      memory: 1.2Gi
+      memory: 3Gi
     requests:
       cpu: 10m
-      memory: 800Mi
+      memory: 3Gi
   unlimited: {}
diff --git a/kubernetes/clamp/components/clamp-mariadb/values.yaml b/kubernetes/clamp/components/clamp-mariadb/values.yaml
index 492145a..f9a31b6 100644
--- a/kubernetes/clamp/components/clamp-mariadb/values.yaml
+++ b/kubernetes/clamp/components/clamp-mariadb/values.yaml
@@ -55,15 +55,17 @@
 
 # probe configuration parameters
 liveness:
-  initialDelaySeconds: 10
+  initialDelaySeconds: 30
   periodSeconds: 10
+  timeoutSeconds: 3
   # necessary to disable liveness probe when setting breakpoints
   # in debugger so K8s doesn't restart unresponsive container
   enabled: true
 
 readiness:
-  initialDelaySeconds: 10
+  initialDelaySeconds: 30
   periodSeconds: 10
+  timeoutSeconds: 3
 
 ## Persist data to a persitent volume
 persistence:
diff --git a/kubernetes/clamp/values.yaml b/kubernetes/clamp/values.yaml
index 7a76099..0a8a7b6 100644
--- a/kubernetes/clamp/values.yaml
+++ b/kubernetes/clamp/values.yaml
@@ -93,7 +93,7 @@
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/clamp-frontend:5.1.2
+image: onap/clamp-frontend:5.1.3
 pullPolicy: Always
 
 # flag to enable debugging - application support required
@@ -123,6 +123,7 @@
 liveness:
   initialDelaySeconds: 120
   periodSeconds: 10
+  timeoutSeconds: 3
   # necessary to disable liveness probe when setting breakpoints
   # in debugger so K8s doesn't restart unresponsive container
   enabled: true
@@ -130,7 +131,7 @@
 readiness:
   initialDelaySeconds: 10
   periodSeconds: 10
-
+  timeoutSeconds: 3
 
 service:
   type: NodePort
diff --git a/kubernetes/common/mongo/templates/statefulset.yaml b/kubernetes/common/mongo/templates/statefulset.yaml
index abc71b3..df922ed 100644
--- a/kubernetes/common/mongo/templates/statefulset.yaml
+++ b/kubernetes/common/mongo/templates/statefulset.yaml
@@ -71,8 +71,7 @@
           volumeMounts:
           - name: {{ include "common.fullname" . }}-data
             mountPath: /var/lib/mongo
-          resources:
-{{ include "common.resources" . | indent 12 }}
+          resources: {{ include "common.resources" . | nindent 12 }}
 {{ include "common.containerSecurityContext" . | indent 10 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
diff --git a/kubernetes/common/mongo/values.yaml b/kubernetes/common/mongo/values.yaml
index d8988c3..b21b0bf 100644
--- a/kubernetes/common/mongo/values.yaml
+++ b/kubernetes/common/mongo/values.yaml
@@ -90,7 +90,6 @@
 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
@@ -101,13 +100,22 @@
   # 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
+resources:
+  small:
+    limits:
+      cpu: 100m
+      memory: 200Mi
+    requests:
+      cpu: 10m
+      memory: 50Mi
+  large:
+    limits:
+      cpu: 2
+      memory: 4Gi
+    requests:
+      cpu: 1
+      memory: 2Gi
+  unlimited: {}
 
 sdnctlPrefix: mongo
 
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/service.yaml b/kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/service.yaml
index ed76137..c01612e 100755
--- a/kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/service.yaml
+++ b/kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/service.yaml
@@ -31,7 +31,7 @@
     - port: {{ .Values.service.internalPort }}
       nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }}
     {{- else -}}
-    - port: {{ .Values.service.externalPort }}
+    - port: {{ .Values.service.internalPort }}
       targetPort: {{ .Values.service.internalPort }}
     {{- end}}
   selector:
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/values.yaml b/kubernetes/contrib/components/netbox/charts/netbox-nginx/values.yaml
index f67ff06..e94e50b 100755
--- a/kubernetes/contrib/components/netbox/charts/netbox-nginx/values.yaml
+++ b/kubernetes/contrib/components/netbox/charts/netbox-nginx/values.yaml
@@ -75,7 +75,7 @@
   staticPvName: netbox-static
 
 service:
-  type: NodePort
+  type: ClusterIP
   name: netbox-nginx
   portName: netbox-nginx
   internalPort: 8080
diff --git a/kubernetes/onap/resources/overrides/environment.yaml b/kubernetes/onap/resources/overrides/environment.yaml
index 5f23363..61b1838 100644
--- a/kubernetes/onap/resources/overrides/environment.yaml
+++ b/kubernetes/onap/resources/overrides/environment.yaml
@@ -92,6 +92,11 @@
     initialDelaySeconds: 60
   readiness:
     initialDelaySeconds: 60
+  clamp-mariadb:
+    liveness:
+      initialDelaySeconds: 30
+    readiness:
+      initialDelaySeconds: 30
 dcaegen2:
   dcae-cloudify-manager:
     liveness:
diff --git a/kubernetes/onap/templates/clusterrolebinding.yaml b/kubernetes/onap/templates/clusterrolebinding.yaml
index 2367143..c2f48d9 100644
--- a/kubernetes/onap/templates/clusterrolebinding.yaml
+++ b/kubernetes/onap/templates/clusterrolebinding.yaml
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: rbac.authorization.k8s.io/v1beta1
+apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRoleBinding
 metadata:
   name: {{ include "common.namespace" . }}-binding
diff --git a/kubernetes/policy/components/policy-drools-pdp/values.yaml b/kubernetes/policy/components/policy-drools-pdp/values.yaml
index b723ec2..bf969b0 100755
--- a/kubernetes/policy/components/policy-drools-pdp/values.yaml
+++ b/kubernetes/policy/components/policy-drools-pdp/values.yaml
@@ -39,7 +39,7 @@
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/policy-pdpd-cl:1.7.2
+image: onap/policy-pdpd-cl:1.7.3
 pullPolicy: Always
 
 # flag to enable debugging - application support required
diff --git a/kubernetes/sdnc/components/dmaap-listener/values.yaml b/kubernetes/sdnc/components/dmaap-listener/values.yaml
index 4c8ff39..f3a2b98 100644
--- a/kubernetes/sdnc/components/dmaap-listener/values.yaml
+++ b/kubernetes/sdnc/components/dmaap-listener/values.yaml
@@ -55,7 +55,7 @@
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdnc-dmaap-listener-image:2.0.1
+image: onap/sdnc-dmaap-listener-image:2.0.2
 pullPolicy: Always
 
 # flag to enable debugging - application support required
diff --git a/kubernetes/sdnc/components/sdnc-ansible-server/values.yaml b/kubernetes/sdnc/components/sdnc-ansible-server/values.yaml
index 654867f..e4024c7 100644
--- a/kubernetes/sdnc/components/sdnc-ansible-server/values.yaml
+++ b/kubernetes/sdnc/components/sdnc-ansible-server/values.yaml
@@ -55,7 +55,7 @@
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdnc-ansible-server-image:2.0.1
+image: onap/sdnc-ansible-server-image:2.0.2
 pullPolicy: Always
 
 # flag to enable debugging - application support required
diff --git a/kubernetes/sdnc/components/sdnc-web/values.yaml b/kubernetes/sdnc/components/sdnc-web/values.yaml
index 9eb8495..2c0b3ea 100644
--- a/kubernetes/sdnc/components/sdnc-web/values.yaml
+++ b/kubernetes/sdnc/components/sdnc-web/values.yaml
@@ -27,7 +27,7 @@
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: "onap/sdnc-web-image:2.0.1"
+image: "onap/sdnc-web-image:2.0.2"
 pullPolicy: Always
 
 config:
diff --git a/kubernetes/sdnc/components/ueb-listener/values.yaml b/kubernetes/sdnc/components/ueb-listener/values.yaml
index ad5cbda..a32628d 100644
--- a/kubernetes/sdnc/components/ueb-listener/values.yaml
+++ b/kubernetes/sdnc/components/ueb-listener/values.yaml
@@ -61,7 +61,7 @@
 #################################################################
 # application image
 repository: nexus3.onap.org:10001
-image: onap/sdnc-ueb-listener-image:2.0.1
+image: onap/sdnc-ueb-listener-image:2.0.2
 pullPolicy: Always
 
 # flag to enable debugging - application support required
diff --git a/kubernetes/sdnc/templates/sdnrdb-init-job.yaml b/kubernetes/sdnc/templates/sdnrdb-init-job.yaml
index aa156b5..42b3f25 100755
--- a/kubernetes/sdnc/templates/sdnrdb-init-job.yaml
+++ b/kubernetes/sdnc/templates/sdnrdb-init-job.yaml
@@ -51,7 +51,7 @@
         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command: ["/bin/bash"]
-        args: ["-c", "{{ .Values.config.binDir }}/startODL.oom.sh"]
+        args: ["-c", "{{ .Values.config.binDir }}/startODL.sh"]
         env:
           - name: SDNC_AAF_ENABLED
             value: "{{ .Values.global.aafEnabled}}"
diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml
index 8eec50e..488c050 100644
--- a/kubernetes/sdnc/templates/statefulset.yaml
+++ b/kubernetes/sdnc/templates/statefulset.yaml
@@ -282,8 +282,10 @@
           - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
             name: properties
             subPath: mountpoint-state-provider.properties
+          {{ if .Values.global.cmpv2Enabled }}
           - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
             name: certs
+          {{- end }}
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -334,12 +336,14 @@
         - name: properties
           emptyDir:
             medium: Memory
+        {{ if .Values.global.cmpv2Enabled }}
         - name: certs
           emptyDir:
             medium: Memory
         - name: certservice-tls-volume
           secret:
             secretName: {{ .Values.global.platform.certServiceClient.secret.name }}
+        {{- end }}
   {{ if not .Values.persistence.enabled }}
         - name: {{ include "common.fullname" . }}-data
           emptyDir: {}
diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml
index 52a21ea..c41f5ea 100644
--- a/kubernetes/sdnc/values.yaml
+++ b/kubernetes/sdnc/values.yaml
@@ -135,7 +135,7 @@
 # application images
 repository: nexus3.onap.org:10001
 pullPolicy: Always
-image: onap/sdnc-image:2.0.1
+image: onap/sdnc-image:2.0.2
 busyboxRepository: docker.io
 busyboxImage: busybox:1.30
 
diff --git a/kubernetes/sniro-emulator/templates/deployment.yaml b/kubernetes/sniro-emulator/templates/deployment.yaml
index 2e76895..0a1525c 100644
--- a/kubernetes/sniro-emulator/templates/deployment.yaml
+++ b/kubernetes/sniro-emulator/templates/deployment.yaml
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "common.fullname" . }}
@@ -24,6 +24,10 @@
     heritage: {{ .Release.Service }}
 spec:
   replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+      release: {{ include "common.release" . }}
   template:
     metadata:
       labels:
diff --git a/kubernetes/uui/charts/uui-server/values.yaml b/kubernetes/uui/charts/uui-server/values.yaml
index e8acab2..a43ae6e 100644
--- a/kubernetes/uui/charts/uui-server/values.yaml
+++ b/kubernetes/uui/charts/uui-server/values.yaml
@@ -25,7 +25,7 @@
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/usecase-ui-server:3.0.4
+image: onap/usecase-ui-server:3.0.6
 pullPolicy: Always
 
 # application configuration
diff --git a/kubernetes/uui/values.yaml b/kubernetes/uui/values.yaml
index 758200e..77351f9 100644
--- a/kubernetes/uui/values.yaml
+++ b/kubernetes/uui/values.yaml
@@ -26,7 +26,7 @@
 
 # application image
 repository: nexus3.onap.org:10001
-image: onap/usecase-ui:3.0.4
+image: onap/usecase-ui:3.0.6
 pullPolicy: Always
 
 # application configuration
diff --git a/kubernetes/vfc/charts/vfc-zte-vnfm-driver/values.yaml b/kubernetes/vfc/charts/vfc-zte-vnfm-driver/values.yaml
index 7ebd3a5..8c349e0 100644
--- a/kubernetes/vfc/charts/vfc-zte-vnfm-driver/values.yaml
+++ b/kubernetes/vfc/charts/vfc-zte-vnfm-driver/values.yaml
@@ -28,7 +28,7 @@
 flavor: small
 
 repository: nexus3.onap.org:10001
-image: onap/vfc/ztevnfmdriver:1.3.7
+image: onap/vfc/ztevnfmdriver:1.3.8
 pullPolicy: Always
 
 #Istio sidecar injection policy