SDFAB-993 Optimize helm values across component and umbrella chart

Also fix an NPE in secret-registry.yaml

Change-Id: I8178cfa050226482c0027b5a093bf4ef61a2b790
diff --git a/VERSION b/VERSION
index a970716..b668c3b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.15
+1.0.16
diff --git a/dbuf/Chart.yaml b/dbuf/Chart.yaml
index 59f7fd7..fa3466d 100644
--- a/dbuf/Chart.yaml
+++ b/dbuf/Chart.yaml
@@ -18,7 +18,7 @@
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
 # Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 0.0.2
+version: 0.0.3
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application. Versions are not expected to
diff --git a/dbuf/values.yaml b/dbuf/values.yaml
index e2cd64e..4043b7b 100644
--- a/dbuf/values.yaml
+++ b/dbuf/values.yaml
@@ -3,8 +3,7 @@
 
 image:
   repository: registry.aetherproject.org/tost/dbuf
-  pullPolicy: Always
-  tag: "latest"
+  tag: "1.0.0"
 
 extraParams:
   - '"-max_queues=1024"'
@@ -33,7 +32,7 @@
 
 # onos inforamtion
 onos:
-  server: sdfabric-onos-classic-hs.sdfabric
+  server: sdfabric-onos-classic-hs
   port: 8181
   username: onos
   password: rocks
diff --git a/di-topology-watchdog/Chart.yaml b/di-topology-watchdog/Chart.yaml
index 7c2e7e0..4a98afb 100644
--- a/di-topology-watchdog/Chart.yaml
+++ b/di-topology-watchdog/Chart.yaml
@@ -4,4 +4,4 @@
 appVersion: "1.0"
 description: A Helm chart for Deep Insight topology watchdog
 name: di-topology-watchdog
-version: 0.0.2
+version: 0.0.3
diff --git a/di-topology-watchdog/values.yaml b/di-topology-watchdog/values.yaml
index 7be7bd8..3ffbcb0 100644
--- a/di-topology-watchdog/values.yaml
+++ b/di-topology-watchdog/values.yaml
@@ -6,7 +6,7 @@
   tag: 4.2.0-ONF
   pullPolicy: Always
 replicas: 1
-onosAddr: sdfabric-onos-classic-hs.tost:8181
+onosAddr: sdfabric-onos-classic-hs:8181
 diAddr: gateway-service-internal.deepinsight:3030
 withEndHost: false
 # k8sSubnet: 10.128.13.0/24 # The cluster subnet
diff --git a/int-host-reporter/Chart.yaml b/int-host-reporter/Chart.yaml
index 0e1431c..4db554d 100644
--- a/int-host-reporter/Chart.yaml
+++ b/int-host-reporter/Chart.yaml
@@ -3,7 +3,7 @@
 ---
 apiVersion: v2
 name: int-host-reporter
-version: 0.0.2
+version: 0.0.3
 type: application
 keywords:
   - In-band Network Telemetry
diff --git a/pfcp-agent/Chart.yaml b/pfcp-agent/Chart.yaml
index edffc8f..fb3a208 100644
--- a/pfcp-agent/Chart.yaml
+++ b/pfcp-agent/Chart.yaml
@@ -5,4 +5,4 @@
 apiVersion: v1
 description: PFCP Agent for SD-Fabric's P4 UPF
 name: pfcp-agent
-version: 0.0.3
+version: 0.0.4
diff --git a/pfcp-agent/values.yaml b/pfcp-agent/values.yaml
index 08a48e1..ec37c12 100644
--- a/pfcp-agent/values.yaml
+++ b/pfcp-agent/values.yaml
@@ -7,9 +7,6 @@
     init: registry.aetherproject.org/tools/busybox:stable
     pfcpiface: "registry.aetherproject.org/proxy/omecproject/upf-epc-pfcpiface:master-fcdbc95"
   pullPolicy: Always
-  # Secrets must be manually created in the namespace.
-  pullSecrets:
-    - "aether.registry"
 
 nodeSelectors:
   enabled: false
@@ -37,9 +34,12 @@
         measure: true
         enable_p4rt: true
         p4rtciface:
+          # Should be the same as s1uAddr in ONOS netcfg for the UP4 app.
           access_ip: "172.17.0.1/32"
+          # Do not change unless you are deploying ONOS in a custom way.
           p4rtc_server: "sdfabric-onos-classic-hs"
           p4rtc_port: "51001"
+
 service:
   type: ClusterIP
   #externalIp:
diff --git a/sdfabric/Chart.yaml b/sdfabric/Chart.yaml
index 682a6c2..59e3cc2 100644
--- a/sdfabric/Chart.yaml
+++ b/sdfabric/Chart.yaml
@@ -7,7 +7,7 @@
 description: A chart to deploy all SD-Fabric components
 kubeVersion: ">=1.18.0"
 type: application
-version: 1.0.15
+version: 1.0.16
 keywords:
   - aether
   - sdn
@@ -27,19 +27,19 @@
     condition: import.stratum.enabled
   - name: pfcp-agent
     repository: file://../pfcp-agent
-    version: 0.0.3
+    version: 0.0.4
     condition: import.pfcp-agent.enabled
   - name: dbuf
     repository: file://../dbuf
-    version: 0.0.2
+    version: 0.0.3
     condition: import.dbuf.enabled
   - name: int-host-reporter
     repository: file://../int-host-reporter
-    version: 0.0.2
+    version: 0.0.3
     condition: import.int-host-reporter.enabled
   - name: di-topology-watchdog
     repository: file://../di-topology-watchdog
-    version: 0.0.2
+    version: 0.0.3
     condition: import.di-topology-watchdog.enabled
   - name: di-metrics-exporter
     repository: file://../di-metrics-exporter
diff --git a/sdfabric/templates/secret-registry.yaml b/sdfabric/templates/secret-registry.yaml
index 60ec716..1ce44dc 100644
--- a/sdfabric/templates/secret-registry.yaml
+++ b/sdfabric/templates/secret-registry.yaml
@@ -4,6 +4,7 @@
 # SPDX-License-Identifier: Apache-2.0
 */}}
 
+{{- if .Values.image }}
 {{- if .Values.image.credential }}
 ---
 kind: Secret
@@ -16,3 +17,4 @@
 data:
   .dockerconfigjson: {{ printf `{"auths":{%s:{"auth":"%s"}}}` (.Values.image.credential.registry | quote) (printf "%s:%s" .Values.image.credential.username .Values.image.credential.password | b64enc) | b64enc | quote }}
 {{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/sdfabric/values.yaml b/sdfabric/values.yaml
index 7253cb7..24c4e36 100644
--- a/sdfabric/values.yaml
+++ b/sdfabric/values.yaml
@@ -2,20 +2,13 @@
 #
 # SPDX-License-Identifier: Apache-2.0
 
-image:
-  credential:
-    secretName: &image-secret-name registry-credential
-    registry: registry.aetherproject.org
-    username: changeit
-    password: changeit
-
 import:
   onos-classic:
     enabled: true
   stratum:
     enabled: true
   pfcp-agent:
-    enabled: false
+    enabled: true
   dbuf:
     enabled: false
   int-host-reporter:
@@ -29,8 +22,6 @@
   image:
     repository: registry.aetherproject.org/tost/tost
     tag: 1.0.2
-    pullSecrets:
-      - *image-secret-name
 
   replicas: 3
 
@@ -97,31 +88,29 @@
 
   # Please check the README to learn more
   config:
-    netcfg: >
-      {}
-    componentConfig: {}
-  # netcfg: >
-  #     {
-  #     "devices": {
-  #         "device:leaf1": {
-  #             "segmentrouting": {
-  #                 "ipv4NodeSid": 101,
-  #                 "ipv4Loopback": "10.11.22.33",
-  #                 "routerMac": "aa:bb:cc:dd:ee:ff",
-  #                 "pairDeviceId" : "device:leaf2",
-  #                 "pairLocalPort" : 260,
-  #                 "isEdgeRouter": true,
-  #                 "adjacencySids": []
-  #             }
-  #         }
-  #     }
-  # }
-  # componentConfig:
-  #   "org.onosproject.net.host.impl.HostManager": >
-  #     {
-  #       "monitorHosts": "true",
-  #       "probeRate": "10000"
-  #     }
+    componentConfig:
+      "org.onosproject.net.host.impl.HostManager": >
+        {
+          "monitorHosts": "true",
+          "probeRate": "10000"
+        }
+    # Please check the README to learn more
+    # netcfg: >
+    #     {
+    #     "devices": {
+    #         "device:leaf1": {
+    #             "segmentrouting": {
+    #                 "ipv4NodeSid": 101,
+    #                 "ipv4Loopback": "10.11.22.33",
+    #                 "routerMac": "aa:bb:cc:dd:ee:ff",
+    #                 "pairDeviceId" : "device:leaf2",
+    #                 "pairLocalPort" : 260,
+    #                 "isEdgeRouter": true,
+    #                 "adjacencySids": []
+    #             }
+    #         }
+    #     }
+    # }
 
 stratum:
   image:
@@ -144,16 +133,14 @@
     fluentbit.io/parser: stratum
 
   # Specify nodeSelector to pin Stratum to switches only
-  #
-  # nodeSelector:
-  #   node-role.aetherproject.org: switch
+  nodeSelector:
+    node-role.aetherproject.org: switch
 
   # Override NoSchedule for Stratum to be scheduled on switches
-  #
-  # tolerations:
-  #   - key: node-role.aetherproject.org
-  #     value: switch
-  #     effect: NoSchedule
+  tolerations:
+    - key: node-role.aetherproject.org
+      value: switch
+      effect: NoSchedule
 
   # Please check the README to learn more
   # chassis_config:
@@ -180,131 +167,3 @@
   #       }
   #       node: 1
   #     }
-
-
-pfcp-agent:
-  images:
-    tags:
-      init: registry.aetherproject.org/tools/busybox:stable
-      pfcpiface: "registry.aetherproject.org/proxy/omecproject/upf-epc-pfcpiface:master-fcdbc95"
-    pullPolicy: Always
-    pullSecrets:
-      - *image-secret-name
-  nodeSelectors:
-    enabled: false
-    pfcp:
-      label: omec-upf
-      value: enabled
-  resources:
-    enabled: true
-    pfcpiface:
-      requests:
-        cpu: 256m
-        memory: 128Mi
-      limits:
-        cpu: 256m
-        memory: 128Mi
-  config:
-    coreDump:
-      enabled: false
-      path: /tmp/coredump
-    pfcp:
-      cfgFiles:
-        upf.json:
-          measure: true
-          enable_p4rt: true
-          p4rtciface:
-            # Should be the same as s1uAddr in ONOS netcfg for the UP4 app.
-            access_ip: "172.17.0.1/32"
-            # Do not change unless you are deploying ONOS in a custom way.
-            p4rtc_server: "sdfabric-onos-classic-hs.sdfabric"
-            p4rtc_port: "51001"
-  service:
-    type: ClusterIP
-    #externalIp:
-    #annotations:
-
-dbuf:
-  image:
-    repository: registry.aetherproject.org/tost/dbuf
-    pullPolicy: Always
-    tag: "1.0.0"
-    pullSecrets:
-      - *image-secret-name
-  extraParams:
-    - '"-max_queues=1024"'
-  replicaCount: 1
-  sriovNICSize: 1
-  sriovResourceName: intel_sriov_netdevice
-  # Change both in the same time
-  multusNetworkName: dbuf-sriov
-  podAnnotations:
-    k8s.v1.cni.cncf.io/networks: dbuf-sriov@net0
-  podSecurityContext: {}
-  resources:
-    requests:
-      intel.com/intel_sriov_netdevice: "1"
-    limits:
-      intel.com/intel_sriov_netdevice: "1"
-  nodeSelector: {}
-  tolerations: []
-  affinity: {}
-  # onos inforamtion
-  onos:
-    server: sdfabric-onos-classic-hs.sdfabric
-    port: 8181
-    username: onos
-    password: rocks
-  dataplane:
-    port: 2152
-    interface: "net0"
-  prometheus_enable: true
-  service:
-    stats:
-      port: 8080
-      protocol: TCP
-    grpc:
-      port: 10000
-      protocol: TCP
-  # two options for ipam, dhcp or host-local
-  # static is for host-local ipam
-  network:
-    #  ipam: dhcp
-    ipam: host-local
-    static:
-      subnets: "10.56.217.0/24"
-      gateway: "10.56.217.1"
-    # route the following subnets via sr-iov interface
-    # route: 10.56.215.0/24,10.56.214.0/24
-    route: ""
-    #vlan:
-
-int-host-reporter:
-  image:
-    repository: registry.hub.docker.com/opennetworking/int-host-reporter
-    pullPolicy: Always
-    # Overrides the image tag whose default is the chart appVersion.
-    tag: "latest"
-
-  cni: cilium
-  dataInterface: enp0s8
-  intCollector: 192.168.33.50:30001
-
-  intWatchlistRules:
-    # - protocol: "UDP"
-    #   src-addr: "192.168.99.50/32"
-    #   dst-addr: "192.168.99.20/32"
-    # - protocol: "TCP"
-    #   src-addr: "192.168.99.50/32"
-    #   dst-addr: "192.168.99.20/32"
-
-di-topology-watchdog:
-  image:
-    pullSecrets:
-      - *image-secret-name
-  onosAddr: sdfabric-onos-classic-hs.tost:8181
-
-di-metrics-exporter:
-  image:
-    pullSecrets:
-      - *image-secret-name