[SO] Cleanup of SO charts

Remove AAF and TLS related chart entries
Use OOM templates for deployment and service definitions
Remove so-appc-orchestrator, as it is not supported anymore

Issue-ID: OOM-3106

Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
Change-Id: I6256aa0fbbe172752cc3d8f83edde0880de7f629
diff --git a/kubernetes/so/components/so-sdc-controller/templates/configmap.yaml b/kubernetes/so/components/so-sdc-controller/templates/configmap.yaml
index 050aab9..cb40c08 100755
--- a/kubernetes/so/components/so-sdc-controller/templates/configmap.yaml
+++ b/kubernetes/so/components/so-sdc-controller/templates/configmap.yaml
@@ -14,10 +14,6 @@
 # limitations under the License.
 */}}
 apiVersion: v1
-data:
-  LOG_PATH: {{ index .Values.logPath }}
-  APP: {{ index .Values.app }}
-  ACTIVE_PROFILE: {{ include "so.helpers.profileProperty" (dict "condition" .Values.global.security.aaf.enabled "value1" "aaf" "value2" "basic")}}
 kind: ConfigMap
 metadata:
   name: {{ include "common.fullname" . }}-configmap
@@ -27,6 +23,10 @@
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
+data:
+  LOG_PATH: {{ index .Values.logPath }}
+  APP: {{ index .Values.app }}
+  ACTIVE_PROFILE: "basic"
 ---
 apiVersion: v1
 kind: ConfigMap
diff --git a/kubernetes/so/components/so-sdc-controller/templates/deployment.yaml b/kubernetes/so/components/so-sdc-controller/templates/deployment.yaml
index 6ee0b25..4becf41 100755
--- a/kubernetes/so/components/so-sdc-controller/templates/deployment.yaml
+++ b/kubernetes/so/components/so-sdc-controller/templates/deployment.yaml
@@ -15,17 +15,9 @@
 */}}
 apiVersion: apps/v1
 kind: Deployment
-metadata:
-  name: {{ include "common.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.fullname" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
 spec:
-  selector:
-    matchLabels:
-      app: {{ include "common.name" . }}
+  selector: {{- include "common.selectors" . | nindent 4 }}
   replicas: {{ index .Values.replicaCount }}
   minReadySeconds: {{ index .Values.minReadySeconds }}
   strategy:
@@ -34,30 +26,14 @@
       maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
       maxSurge: {{ index .Values.updateStrategy.maxSurge }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.name" . }}
-        release: {{ include "common.release" . }}
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
       initContainers:
-      {{ include "so.certificate.container_importer" . | indent 6 | trim }}
       {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
       containers:
       - name: {{ include "common.name" . }}
         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
         resources: {{ include "common.resources" . | nindent 10 }}
-        {{- if .Values.global.aafEnabled }}
-        command:
-        - sh
-        args:
-        - -c
-        - |
-          export $(cat {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
-          {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
-          {{- end }}
-          /app/start-app.sh
-        {{- end }}
         env:
         - name: DB_HOST
           value: {{ include "common.mariadbService" . }}
@@ -77,12 +53,11 @@
           value: {{ .Values.config.kafka.saslMechanism }}
         - name: SASL_JAAS_CONFIG
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-sdc-kafka-secret" "key" "sasl.jaas.config") | indent 10 }}
-        {{ include "so.certificates.env" . | indent 8 | trim }}
         envFrom:
         - configMapRef:
             name: {{ include "common.fullname" . }}-configmap
         imagePullPolicy:  {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        volumeMounts: {{ include "so.certificate.volumeMount" . | nindent 8 }}
+        volumeMounts:
         - name: logs
           mountPath: /app/logs
         - name: config
@@ -91,14 +66,11 @@
         - name: {{ include "common.fullname" . }}-logs
           mountPath: /var/log/onap
 {{ include "so.helpers.livenessProbe" .| indent 8 }}
-        ports:
-        - containerPort: {{ index .Values.containerPort }}
-          name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
-          protocol: TCP
+        ports: {{- include "common.containerPorts" . | nindent 10  }}
       # Filebeat sidecar container
       {{ include "common.log.sidecar" . | nindent 6 }}
       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
-      volumes: {{ include "so.certificate.volumes" . | nindent 6 }}
+      volumes:
       - name: logs
         emptyDir: {}
       - name: config
diff --git a/kubernetes/so/components/so-sdc-controller/templates/service.yaml b/kubernetes/so/components/so-sdc-controller/templates/service.yaml
index 5b8dee0..495f828 100755
--- a/kubernetes/so/components/so-sdc-controller/templates/service.yaml
+++ b/kubernetes/so/components/so-sdc-controller/templates/service.yaml
@@ -13,28 +13,4 @@
 # 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: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-spec:
-  type: {{ .Values.service.type }}
-  ports:
-    {{if eq .Values.service.type "NodePort" -}}
-    - port: {{ .Values.service.internalPort }}
-      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-      name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
-    {{- else -}}
-    - port: {{ .Values.service.externalPort }}
-      targetPort: {{ .Values.service.internalPort }}
-      name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
-    {{- end}}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
+{{ include "common.service" . }}
\ No newline at end of file