[CONTRIB] Uses new tpls for repos / images

This commit makes Contrib chart to use the new generator for repositories and
images.
As new templates doesn't work well with "sub charts", we move also
subcharts to components folder.

Issue-ID: OOM-2364
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: I33ca36a2b25e67fd9f74ae408cd34f58405d6b80
diff --git a/kubernetes/contrib/Makefile b/kubernetes/contrib/Makefile
index 32386fc..4d35146 100644
--- a/kubernetes/contrib/Makefile
+++ b/kubernetes/contrib/Makefile
@@ -1,4 +1,4 @@
-# Copyright © 2018  AT&T Intellectual Property.  All rights reserved.
+# Copyright © 2020 Samsung Electronics
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -11,22 +11,41 @@
 # 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := dns-server-for-vhost-ingress-testing ingress-nginx-post-inst metallb-loadbalancer-inst tools
 HELM_BIN := helm
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
 
-make-contrib: make-contrib-awx make-contrib-netbox make-contrib-ejbca make-contrib-core
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
 
-make-contrib-awx:
-	cd components && $(HELM_BIN) dep up awx && $(HELM_BIN) lint awx
+all: $(HELM_CHARTS)
 
-make-contrib-ejbca:
-	cd components && $(HELM_BIN) dep up ejbca && $(HELM_BIN) lint ejbca
+$(HELM_CHARTS):
+	@echo "\n[$@]"
+	@make package-$@
 
-make-contrib-netbox:
-	cd components && $(HELM_BIN) dep up netbox && $(HELM_BIN) lint netbox
+make-%:
+	@if [ -f $*/Makefile ]; then make -C $*; fi
 
-make-contrib-core:
-	$(HELM_BIN) dep up . && $(HELM_BIN) lint .
+dep-%: make-%
+	@if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+	@mkdir -p $(PACKAGE_DIR)
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+	@$(HELM_BIN) repo index $(PACKAGE_DIR)
 
 clean:
-	@find . -type f -name '*.tgz' -delete
-	@find . -type f -name '*.lock' -delete
+	@rm -f */requirements.lock
+	@rm -f *tgz */charts/*tgz
+	@rm -rf $(PACKAGE_DIR)
+%:
+	@:
diff --git a/kubernetes/contrib/components/Makefile b/kubernetes/contrib/components/Makefile
new file mode 100644
index 0000000..bf267b7
--- /dev/null
+++ b/kubernetes/contrib/components/Makefile
@@ -0,0 +1,51 @@
+# Copyright © 2020 Samsung Electronics
+#
+# 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES :=
+HELM_BIN := helm
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+	@echo "\n[$@]"
+	@make package-$@
+
+make-%:
+	@if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+	@if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+	@mkdir -p $(PACKAGE_DIR)
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+	@$(HELM_BIN) repo index $(PACKAGE_DIR)
+
+clean:
+	@rm -f */requirements.lock
+	@rm -f *tgz */charts/*tgz
+	@rm -rf $(PACKAGE_DIR)
+%:
+	@:
diff --git a/kubernetes/contrib/components/awx/Makefile b/kubernetes/contrib/components/awx/Makefile
index cb88b57..4c79718 100644
--- a/kubernetes/contrib/components/awx/Makefile
+++ b/kubernetes/contrib/components/awx/Makefile
@@ -1,4 +1,4 @@
-# Copyright © 2019 Bell Canada
+# Copyright © 2020 Samsung Electronics
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -11,7 +11,41 @@
 # 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.
-HELM_BIN := helm
 
-make-awx:
-	cd charts && $(HELM_BIN) dep up awx-postgres
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := dist resources templates charts docker
+HELM_BIN := helm
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+	@echo "\n[$@]"
+	@make package-$@
+
+make-%:
+	@if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+	@if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+	@mkdir -p $(PACKAGE_DIR)
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+	@$(HELM_BIN) repo index $(PACKAGE_DIR)
+
+clean:
+	@rm -f */requirements.lock
+	@rm -f *tgz */charts/*tgz
+	@rm -rf $(PACKAGE_DIR)
+%:
+	@:
diff --git a/kubernetes/contrib/components/awx/charts/awx/values.yaml b/kubernetes/contrib/components/awx/charts/awx/values.yaml
deleted file mode 100755
index fd77a12..0000000
--- a/kubernetes/contrib/components/awx/charts/awx/values.yaml
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright © 2019 Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Default values for mariadb.
-# This is a YAML-formatted file.
-# Declare variables to be passed into your templates.
-
-global: # global defaults
-  nodePortPrefixExt: 304
-  persistence: {}
-
-# application image
-repository: ansible
-image:
-  web: awx_web:9.0.1
-  task: awx_task:9.0.1
-  rabbitmq: awx_rabbitmq:3.7.4
-  memcached: memcached:1.5.20
-pullPolicy: Always
-
-# application configuration
-config:
-  postgresUser: awx
-  postgresPassword: awx
-  postgresDB: awx
-# RabbitMQ Configuration
-  rabbitmqUser: awx
-  rabbitmqPassword: awxpass
-  rabbitmqVhost: awx
-  rabbitmqErlangCookie: cookiemonster3
-# This will create or update a default admin (superuser) account in AWX, if not provided
-# then these default values are used
-  awxAdminUser: admin
-  awxAdminPassword: password
-  awxAdminEmail: cds@onap.org
-# AWX Secret key
-# It's *very* important that this stay the same between upgrades or you will lose the ability to decrypt
-# your credentials
-  secretKey: awxsecret
-
-ingress:
-  enabled: false
-
-# default number of instances
-replicaCount: 1
-
-nodeSelector: {}
-
-affinity: {}
-
-# probe configuration parameters
-liveness:
-  initialDelaySeconds: 10
-  periodSeconds: 10
-  enabled: true
-
-## Persist data to a persitent volume
-persistence:
-  enabled: true
-  volumeReclaimPolicy: Retain
-
-  # Uncomment the storageClass parameter to use an existing PV
-  # that will match the following class.
-  # When uncomment the storageClass, the PV is not created anymore.
-
-  # storageClass: "nfs-dev-sc"
-
-  accessMode: ReadWriteOnce
-  size: 5Gi
-
-  # When using storage class, mountPath and mountSubPath are
-  # simply ignored.
-
-  mountPath: /dockerdata-nfs
-  mountSubPath: awx/pgdata
-
-service:
-  rmqmgmt:
-    type: ClusterIP
-    portName: rmqmgmt
-    internalPort: 15672
-    externalPort: 15672
-  web:
-    type: NodePort
-    portName: web
-    internalPort: 8052
-    externalPort: 80
-    nodePort: 78
-  rabbitmq:
-    type: ClusterIP
-    http:
-      portName: http
-      internalPort: 15672
-      externalPort: 15672
-    amqp:
-      portName: amqp
-      internalPort: 5672
-      externalPort: 5672
-
-resources: {}
diff --git a/kubernetes/contrib/components/awx/components/Makefile b/kubernetes/contrib/components/awx/components/Makefile
new file mode 100644
index 0000000..bf267b7
--- /dev/null
+++ b/kubernetes/contrib/components/awx/components/Makefile
@@ -0,0 +1,51 @@
+# Copyright © 2020 Samsung Electronics
+#
+# 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES :=
+HELM_BIN := helm
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+	@echo "\n[$@]"
+	@make package-$@
+
+make-%:
+	@if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+	@if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+	@mkdir -p $(PACKAGE_DIR)
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+	@$(HELM_BIN) repo index $(PACKAGE_DIR)
+
+clean:
+	@rm -f */requirements.lock
+	@rm -f *tgz */charts/*tgz
+	@rm -rf $(PACKAGE_DIR)
+%:
+	@:
diff --git a/kubernetes/contrib/components/awx/charts/awx-postgres/Chart.yaml b/kubernetes/contrib/components/awx/components/awx-postgres/Chart.yaml
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx-postgres/Chart.yaml
rename to kubernetes/contrib/components/awx/components/awx-postgres/Chart.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx/Chart.yaml b/kubernetes/contrib/components/awx/components/awx-postgres/requirements.yaml
similarity index 78%
rename from kubernetes/contrib/components/awx/charts/awx/Chart.yaml
rename to kubernetes/contrib/components/awx/components/awx-postgres/requirements.yaml
index 00dca3f..a93a429 100755
--- a/kubernetes/contrib/components/awx/charts/awx/Chart.yaml
+++ b/kubernetes/contrib/components/awx/components/awx-postgres/requirements.yaml
@@ -12,7 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: v1
-description: Ansible AWX application
-name: awx
-version: 6.0.0
+dependencies:
+  - name: common
+    version: ~6.x-0
+    repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/contrib/components/awx/charts/awx-postgres/templates/NOTES.txt b/kubernetes/contrib/components/awx/components/awx-postgres/templates/NOTES.txt
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx-postgres/templates/NOTES.txt
rename to kubernetes/contrib/components/awx/components/awx-postgres/templates/NOTES.txt
diff --git a/kubernetes/contrib/components/awx/charts/awx-postgres/templates/deployment.yaml b/kubernetes/contrib/components/awx/components/awx-postgres/templates/deployment.yaml
similarity index 96%
rename from kubernetes/contrib/components/awx/charts/awx-postgres/templates/deployment.yaml
rename to kubernetes/contrib/components/awx/components/awx-postgres/templates/deployment.yaml
index 6b3ca1a..c0c6b91 100755
--- a/kubernetes/contrib/components/awx/charts/awx-postgres/templates/deployment.yaml
+++ b/kubernetes/contrib/components/awx/components/awx-postgres/templates/deployment.yaml
@@ -37,7 +37,7 @@
     spec:
       containers:
       - name: {{ include "common.name" . }}
-        image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         ports:
         - containerPort: {{ .Values.service.internalPort }}
diff --git a/kubernetes/contrib/components/awx/charts/awx-postgres/templates/pv.yaml b/kubernetes/contrib/components/awx/components/awx-postgres/templates/pv.yaml
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx-postgres/templates/pv.yaml
rename to kubernetes/contrib/components/awx/components/awx-postgres/templates/pv.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx-postgres/templates/pvc.yaml b/kubernetes/contrib/components/awx/components/awx-postgres/templates/pvc.yaml
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx-postgres/templates/pvc.yaml
rename to kubernetes/contrib/components/awx/components/awx-postgres/templates/pvc.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx-postgres/templates/service.yaml b/kubernetes/contrib/components/awx/components/awx-postgres/templates/service.yaml
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx-postgres/templates/service.yaml
rename to kubernetes/contrib/components/awx/components/awx-postgres/templates/service.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx-postgres/values.yaml b/kubernetes/contrib/components/awx/components/awx-postgres/values.yaml
similarity index 98%
rename from kubernetes/contrib/components/awx/charts/awx-postgres/values.yaml
rename to kubernetes/contrib/components/awx/components/awx-postgres/values.yaml
index 09012ea..a7234ca 100755
--- a/kubernetes/contrib/components/awx/charts/awx-postgres/values.yaml
+++ b/kubernetes/contrib/components/awx/components/awx-postgres/values.yaml
@@ -21,7 +21,6 @@
   persistence: {}
 
 # application image
-repository: docker.io
 image: postgres:10.4-alpine
 pullPolicy: Always
 
diff --git a/kubernetes/contrib/components/awx/requirements.yaml b/kubernetes/contrib/components/awx/requirements.yaml
index a748aff..5eda4db 100755
--- a/kubernetes/contrib/components/awx/requirements.yaml
+++ b/kubernetes/contrib/components/awx/requirements.yaml
@@ -15,4 +15,10 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
\ No newline at end of file
+    repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
+  - name: awx-postgres    
+    version: ~6.x-0
+    repository: 'file://components/awx-postgres'
diff --git a/kubernetes/contrib/components/awx/charts/awx/resources/config/credentials.py b/kubernetes/contrib/components/awx/resources/config/credentials.py
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx/resources/config/credentials.py
rename to kubernetes/contrib/components/awx/resources/config/credentials.py
diff --git a/kubernetes/contrib/components/awx/charts/awx/resources/config/environment.sh b/kubernetes/contrib/components/awx/resources/config/environment.sh
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx/resources/config/environment.sh
rename to kubernetes/contrib/components/awx/resources/config/environment.sh
diff --git a/kubernetes/contrib/components/awx/charts/awx/templates/configmap.yaml b/kubernetes/contrib/components/awx/templates/configmap.yaml
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx/templates/configmap.yaml
rename to kubernetes/contrib/components/awx/templates/configmap.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx/templates/job.yaml b/kubernetes/contrib/components/awx/templates/job.yaml
similarity index 95%
rename from kubernetes/contrib/components/awx/charts/awx/templates/job.yaml
rename to kubernetes/contrib/components/awx/templates/job.yaml
index 74c02bc..f974f44 100644
--- a/kubernetes/contrib/components/awx/charts/awx/templates/job.yaml
+++ b/kubernetes/contrib/components/awx/templates/job.yaml
@@ -37,7 +37,7 @@
       restartPolicy: Never
       initContainers:
       - name: {{ include "common.name" . }}-init-readiness
-        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
         - /app/ready.py
@@ -53,7 +53,7 @@
       containers:
       - command: ["/bin/sh","-c"]
         args: ["/etc/tower/job-entrypoint.sh"]
-        image: "{{ .Values.repository }}/{{ .Values.image.task }}"
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image.task }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-mgnt
         resources:
diff --git a/kubernetes/contrib/components/awx/charts/awx/templates/secret.yaml b/kubernetes/contrib/components/awx/templates/secret.yaml
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx/templates/secret.yaml
rename to kubernetes/contrib/components/awx/templates/secret.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx/templates/service.yaml b/kubernetes/contrib/components/awx/templates/service.yaml
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx/templates/service.yaml
rename to kubernetes/contrib/components/awx/templates/service.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx/templates/serviceaccout.yaml b/kubernetes/contrib/components/awx/templates/serviceaccout.yaml
similarity index 100%
rename from kubernetes/contrib/components/awx/charts/awx/templates/serviceaccout.yaml
rename to kubernetes/contrib/components/awx/templates/serviceaccout.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx/templates/statefulset.yaml b/kubernetes/contrib/components/awx/templates/statefulset.yaml
similarity index 93%
rename from kubernetes/contrib/components/awx/charts/awx/templates/statefulset.yaml
rename to kubernetes/contrib/components/awx/templates/statefulset.yaml
index 6023bb4..46747cd 100644
--- a/kubernetes/contrib/components/awx/charts/awx/templates/statefulset.yaml
+++ b/kubernetes/contrib/components/awx/templates/statefulset.yaml
@@ -44,7 +44,7 @@
 
       initContainers:
       - name: {{ include "common.name" . }}-init-readiness
-        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
         - /app/ready.py
@@ -60,7 +60,7 @@
 
       containers:
 
-      - image: "{{ .Values.repository }}/{{ .Values.image.web }}"
+      - image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image.web }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-web
         ports:
@@ -88,7 +88,7 @@
         - name: AWX_SKIP_MIGRATIONS
           value: "1"
 
-        image: "{{ .Values.repository }}/{{ .Values.image.task }}"
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image.task }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-celery
         resources:
@@ -127,7 +127,7 @@
         - name: K8S_SERVICE_NAME
           value: {{ include "common.servicename" . }}-rabbitmq
 
-        image: "{{ .Values.repository }}/{{ .Values.image.rabbitmq }}"
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image.rabbitmq }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-rabbit
         livenessProbe:
@@ -165,7 +165,7 @@
         - mountPath: /etc/rabbitmq
           name: rabbitmq-config
 
-      - image: "{{ .Values.image.memcached }}"
+      - image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image.memcached }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-memcached
         resources:
diff --git a/kubernetes/contrib/components/awx/values.yaml b/kubernetes/contrib/components/awx/values.yaml
index 1ed35c2..a29866d 100755
--- a/kubernetes/contrib/components/awx/values.yaml
+++ b/kubernetes/contrib/components/awx/values.yaml
@@ -12,28 +12,100 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#################################################################
-# Global configuration defaults.
-#################################################################
-global:
-  readinessRepository: nexus3.onap.org:10001
+# Default values for mariadb.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+global: # global defaults
   nodePortPrefixExt: 304
   commonConfigPrefix: awx
-  readinessImage: onap/oom/readiness:3.0.1
+  persistence: {}
 
-#################################################################
-# Application configuration defaults.
-#################################################################
 # application image
-repository: hub.docker.io
+image:
+  web: ansible/awx_web:9.0.1
+  task: ansible/awx_task:9.0.1
+  rabbitmq: ansible/awx_rabbitmq:3.7.4
+  memcached: memcached:1.5.20
 pullPolicy: Always
 
-# default number of instances
-replicaCount: 1
-nodeSelector: {}
-affinity: {}
+# application configuration
+config:
+  postgresUser: awx
+  postgresPassword: awx
+  postgresDB: awx
+# RabbitMQ Configuration
+  rabbitmqUser: awx
+  rabbitmqPassword: awxpass
+  rabbitmqVhost: awx
+  rabbitmqErlangCookie: cookiemonster3
+# This will create or update a default admin (superuser) account in AWX, if not provided
+# then these default values are used
+  awxAdminUser: admin
+  awxAdminPassword: password
+  awxAdminEmail: cds@onap.org
+# AWX Secret key
+# It's *very* important that this stay the same between upgrades or you will lose the ability to decrypt
+# your credentials
+  secretKey: awxsecret
 
 ingress:
   enabled: false
 
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  enabled: true
+
+## Persist data to a persitent volume
+persistence:
+  enabled: true
+  volumeReclaimPolicy: Retain
+
+  # Uncomment the storageClass parameter to use an existing PV
+  # that will match the following class.
+  # When uncomment the storageClass, the PV is not created anymore.
+
+  # storageClass: "nfs-dev-sc"
+
+  accessMode: ReadWriteOnce
+  size: 5Gi
+
+  # When using storage class, mountPath and mountSubPath are
+  # simply ignored.
+
+  mountPath: /dockerdata-nfs
+  mountSubPath: awx/pgdata
+
+service:
+  rmqmgmt:
+    type: ClusterIP
+    portName: rmqmgmt
+    internalPort: 15672
+    externalPort: 15672
+  web:
+    type: NodePort
+    portName: web
+    internalPort: 8052
+    externalPort: 80
+    nodePort: 78
+  rabbitmq:
+    type: ClusterIP
+    http:
+      portName: http
+      internalPort: 15672
+      externalPort: 15672
+    amqp:
+      portName: amqp
+      internalPort: 5672
+      externalPort: 5672
+
 resources: {}
diff --git a/kubernetes/contrib/components/ejbca/requirements.yaml b/kubernetes/contrib/components/ejbca/requirements.yaml
index e87bc08..0054203 100644
--- a/kubernetes/contrib/components/ejbca/requirements.yaml
+++ b/kubernetes/contrib/components/ejbca/requirements.yaml
@@ -23,3 +23,6 @@
     version: ~6.x-0
     repository: '@local'
     condition: not global.mariadbGalera.localCluster
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
diff --git a/kubernetes/contrib/components/ejbca/templates/deployment.yaml b/kubernetes/contrib/components/ejbca/templates/deployment.yaml
index 55de54f..a10b059 100644
--- a/kubernetes/contrib/components/ejbca/templates/deployment.yaml
+++ b/kubernetes/contrib/components/ejbca/templates/deployment.yaml
@@ -40,11 +40,11 @@
             fieldRef:
               apiVersion: v1
               fieldPath: metadata.namespace
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
       containers:
       - name: {{ include "common.name" . }}-ejbca
-        image: {{ .Values.ejbca.image }}
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.ejbca.image }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         lifecycle:
           postStart:
diff --git a/kubernetes/contrib/components/ejbca/values.yaml b/kubernetes/contrib/components/ejbca/values.yaml
index 35160e4..c26bfe2 100644
--- a/kubernetes/contrib/components/ejbca/values.yaml
+++ b/kubernetes/contrib/components/ejbca/values.yaml
@@ -12,8 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 global:
-  readinessImage: onap/oom/readiness:3.0.1
-  mariadbGalera: &mariadbGalera 
+  mariadbGalera: &mariadbGalera
     #This flag allows EJBCA to instantiate its own mariadb-galera cluster
     localCluster: false
     service: mariadb-galera
@@ -37,7 +36,6 @@
     password: '{{ .Values.config.ejbca.clientIak }}'
 
 # application configuration
-repository: nexus3.onap.org:10001
 config:
   db:
     userName: ejbca
diff --git a/kubernetes/contrib/components/netbox/Makefile b/kubernetes/contrib/components/netbox/Makefile
index da18203..4c79718 100644
--- a/kubernetes/contrib/components/netbox/Makefile
+++ b/kubernetes/contrib/components/netbox/Makefile
@@ -1,4 +1,4 @@
-# Copyright © 2018 Amdocs, Bell Canada
+# Copyright © 2020 Samsung Electronics
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -11,7 +11,41 @@
 # 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.
-HELM_BIN := helm
 
-make-netbox:
-	cd charts && $(HELM_BIN) dep up netbox-postgres && $(HELM_BIN) dep up netbox-nginx && $(HELM_BIN) dep up netbox-app
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES := dist resources templates charts docker
+HELM_BIN := helm
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+	@echo "\n[$@]"
+	@make package-$@
+
+make-%:
+	@if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+	@if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+	@mkdir -p $(PACKAGE_DIR)
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+	@$(HELM_BIN) repo index $(PACKAGE_DIR)
+
+clean:
+	@rm -f */requirements.lock
+	@rm -f *tgz */charts/*tgz
+	@rm -rf $(PACKAGE_DIR)
+%:
+	@:
diff --git a/kubernetes/contrib/components/netbox/components/Makefile b/kubernetes/contrib/components/netbox/components/Makefile
new file mode 100644
index 0000000..bf267b7
--- /dev/null
+++ b/kubernetes/contrib/components/netbox/components/Makefile
@@ -0,0 +1,51 @@
+# Copyright © 2020 Samsung Electronics
+#
+# 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.
+
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+OUTPUT_DIR := $(ROOT_DIR)/../../dist
+PACKAGE_DIR := $(OUTPUT_DIR)/packages
+SECRET_DIR := $(OUTPUT_DIR)/secrets
+
+EXCLUDES :=
+HELM_BIN := helm
+HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+
+.PHONY: $(EXCLUDES) $(HELM_CHARTS)
+
+all: $(HELM_CHARTS)
+
+$(HELM_CHARTS):
+	@echo "\n[$@]"
+	@make package-$@
+
+make-%:
+	@if [ -f $*/Makefile ]; then make -C $*; fi
+
+dep-%: make-%
+	@if [ -f $*/requirements.yaml ]; then $(HELM_BIN) dep up $*; fi
+
+lint-%: dep-%
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) lint $*; fi
+
+package-%: lint-%
+	@mkdir -p $(PACKAGE_DIR)
+	@if [ -f $*/Chart.yaml ]; then $(HELM_BIN) package -d $(PACKAGE_DIR) $*; fi
+	@$(HELM_BIN) repo index $(PACKAGE_DIR)
+
+clean:
+	@rm -f */requirements.lock
+	@rm -f *tgz */charts/*tgz
+	@rm -rf $(PACKAGE_DIR)
+%:
+	@:
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/.helmignore b/kubernetes/contrib/components/netbox/components/netbox-app/.helmignore
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/.helmignore
rename to kubernetes/contrib/components/netbox/components/netbox-app/.helmignore
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/Chart.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/Chart.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/Chart.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-app/Chart.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx/Chart.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/requirements.yaml
similarity index 73%
copy from kubernetes/contrib/components/awx/charts/awx/Chart.yaml
copy to kubernetes/contrib/components/netbox/components/netbox-app/requirements.yaml
index 00dca3f..9a0c10d 100755
--- a/kubernetes/contrib/components/awx/charts/awx/Chart.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-app/requirements.yaml
@@ -1,4 +1,4 @@
-# Copyright © 2019 Bell Canada
+# Copyright © 2018 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,7 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: v1
-description: Ansible AWX application
-name: awx
-version: 6.0.0
+dependencies:
+  - name: common
+    version: ~6.x-0
+    repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/configuration/configuration.py b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/configuration/configuration.py
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/configuration/configuration.py
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/configuration/configuration.py
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/configuration/gunicorn_config.py b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/configuration/gunicorn_config.py
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/configuration/gunicorn_config.py
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/configuration/gunicorn_config.py
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/configuration/ldap_config.py b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/configuration/ldap_config.py
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/configuration/ldap_config.py
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/configuration/ldap_config.py
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/initializers/custom_fields.yml b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/initializers/custom_fields.yml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/initializers/custom_fields.yml
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/initializers/custom_fields.yml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/initializers/groups.yml b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/initializers/groups.yml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/initializers/groups.yml
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/initializers/groups.yml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/initializers/users.yml b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/initializers/users.yml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/initializers/users.yml
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/initializers/users.yml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/provisioning/provision.sh b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/provisioning/provision.sh
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/provisioning/provision.sh
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/provisioning/provision.sh
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/startup_scripts/00_users.py b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/startup_scripts/00_users.py
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/startup_scripts/00_users.py
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/startup_scripts/00_users.py
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/startup_scripts/10_groups.py b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/startup_scripts/10_groups.py
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/startup_scripts/10_groups.py
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/startup_scripts/10_groups.py
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/startup_scripts/20_custom_fields.py b/kubernetes/contrib/components/netbox/components/netbox-app/resources/config/startup_scripts/20_custom_fields.py
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/resources/config/startup_scripts/20_custom_fields.py
rename to kubernetes/contrib/components/netbox/components/netbox-app/resources/config/startup_scripts/20_custom_fields.py
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/NOTES.txt b/kubernetes/contrib/components/netbox/components/netbox-app/templates/NOTES.txt
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/templates/NOTES.txt
rename to kubernetes/contrib/components/netbox/components/netbox-app/templates/NOTES.txt
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/configmap.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/templates/configmap.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/templates/configmap.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-app/templates/configmap.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/deployment.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/templates/deployment.yaml
similarity index 98%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/templates/deployment.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-app/templates/deployment.yaml
index 0d401d8..f1209cd 100755
--- a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/deployment.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-app/templates/deployment.yaml
@@ -37,7 +37,7 @@
     spec:
       containers:
       - name: {{ include "common.name" . }}
-        image: {{ .Values.repository }}/{{ .Values.image }}
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         ports:
         - containerPort: {{ .Values.service.internalPort }}
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/job.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/templates/job.yaml
similarity index 91%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/templates/job.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-app/templates/job.yaml
index ed6518e..3b367a3 100644
--- a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/job.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-app/templates/job.yaml
@@ -35,7 +35,7 @@
       restartPolicy: Never
       initContainers:
       - name: {{ include "common.name" . }}-init-readiness
-        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
         - /app/ready.py
@@ -50,7 +50,7 @@
               fieldPath: metadata.namespace
       containers:
       - name: {{ include "common.name" . }}-provisioning-job
-        image: "{{ .Values.global.dockerHubRepository }}/{{ .Values.global.curlImage }}"
+        image: {{ include "repositoryGenerator.image.curl" . }}
         volumeMounts:
         - name: {{ include "common.fullname" . }}-provisioning
           mountPath: /tmp
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/pv.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/templates/pv.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/templates/pv.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-app/templates/pv.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/pvc.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/templates/pvc.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/templates/pvc.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-app/templates/pvc.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/secrets.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/templates/secrets.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/templates/secrets.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-app/templates/secrets.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/templates/service.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/templates/service.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/templates/service.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-app/templates/service.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-app/values.yaml b/kubernetes/contrib/components/netbox/components/netbox-app/values.yaml
similarity index 95%
rename from kubernetes/contrib/components/netbox/charts/netbox-app/values.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-app/values.yaml
index ff02e27..92f97c2 100755
--- a/kubernetes/contrib/components/netbox/charts/netbox-app/values.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-app/values.yaml
@@ -42,11 +42,7 @@
   superuserName: admin
   superuserEmail: admin@onap.org
 
-  curlImage: curlimages/curl:7.69.1
-  dockerHubRepository: docker.io
-
-repository: netboxcommunity
-image: netbox:v2.5.8
+image: netboxcommunity/netbox:v2.5.8
 
 # probe configuration parameters
 liveness:
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/.helmignore b/kubernetes/contrib/components/netbox/components/netbox-nginx/.helmignore
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-nginx/.helmignore
rename to kubernetes/contrib/components/netbox/components/netbox-nginx/.helmignore
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/Chart.yaml b/kubernetes/contrib/components/netbox/components/netbox-nginx/Chart.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-nginx/Chart.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-nginx/Chart.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx/Chart.yaml b/kubernetes/contrib/components/netbox/components/netbox-nginx/requirements.yaml
similarity index 73%
copy from kubernetes/contrib/components/awx/charts/awx/Chart.yaml
copy to kubernetes/contrib/components/netbox/components/netbox-nginx/requirements.yaml
index 00dca3f..9a0c10d 100755
--- a/kubernetes/contrib/components/awx/charts/awx/Chart.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-nginx/requirements.yaml
@@ -1,4 +1,4 @@
-# Copyright © 2019 Bell Canada
+# Copyright © 2018 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,7 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: v1
-description: Ansible AWX application
-name: awx
-version: 6.0.0
+dependencies:
+  - name: common
+    version: ~6.x-0
+    repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/resources/config/nginx.conf b/kubernetes/contrib/components/netbox/components/netbox-nginx/resources/config/nginx.conf
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-nginx/resources/config/nginx.conf
rename to kubernetes/contrib/components/netbox/components/netbox-nginx/resources/config/nginx.conf
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/NOTES.txt b/kubernetes/contrib/components/netbox/components/netbox-nginx/templates/NOTES.txt
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/NOTES.txt
rename to kubernetes/contrib/components/netbox/components/netbox-nginx/templates/NOTES.txt
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/configmap.yaml b/kubernetes/contrib/components/netbox/components/netbox-nginx/templates/configmap.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/configmap.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-nginx/templates/configmap.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/deployment.yaml b/kubernetes/contrib/components/netbox/components/netbox-nginx/templates/deployment.yaml
similarity index 96%
rename from kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/deployment.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-nginx/templates/deployment.yaml
index 623e7fc..7bdf46f 100755
--- a/kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/deployment.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-nginx/templates/deployment.yaml
@@ -37,7 +37,7 @@
     spec:
       containers:
       - name: {{ include "common.name" . }}
-        image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command: ["nginx"]
         args: ["-c", "/etc/netbox-nginx/nginx.conf","-g", "daemon off;"]
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/service.yaml b/kubernetes/contrib/components/netbox/components/netbox-nginx/templates/service.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-nginx/templates/service.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-nginx/templates/service.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-nginx/values.yaml b/kubernetes/contrib/components/netbox/components/netbox-nginx/values.yaml
similarity index 98%
rename from kubernetes/contrib/components/netbox/charts/netbox-nginx/values.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-nginx/values.yaml
index e94e50b..de131d3 100755
--- a/kubernetes/contrib/components/netbox/charts/netbox-nginx/values.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-nginx/values.yaml
@@ -22,7 +22,6 @@
   pullPolicy: Always
 
 # application image
-repository: docker.io
 image: nginx:1.15-alpine
 pullPolicy: Always
 
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-postgres/.helmignore b/kubernetes/contrib/components/netbox/components/netbox-postgres/.helmignore
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-postgres/.helmignore
rename to kubernetes/contrib/components/netbox/components/netbox-postgres/.helmignore
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-postgres/Chart.yaml b/kubernetes/contrib/components/netbox/components/netbox-postgres/Chart.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-postgres/Chart.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-postgres/Chart.yaml
diff --git a/kubernetes/contrib/components/awx/charts/awx/Chart.yaml b/kubernetes/contrib/components/netbox/components/netbox-postgres/requirements.yaml
similarity index 73%
copy from kubernetes/contrib/components/awx/charts/awx/Chart.yaml
copy to kubernetes/contrib/components/netbox/components/netbox-postgres/requirements.yaml
index 00dca3f..9a0c10d 100755
--- a/kubernetes/contrib/components/awx/charts/awx/Chart.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-postgres/requirements.yaml
@@ -1,4 +1,4 @@
-# Copyright © 2019 Bell Canada
+# Copyright © 2018 Amdocs, Bell Canada
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -12,7 +12,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: v1
-description: Ansible AWX application
-name: awx
-version: 6.0.0
+dependencies:
+  - name: common
+    version: ~6.x-0
+    repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
\ No newline at end of file
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/NOTES.txt b/kubernetes/contrib/components/netbox/components/netbox-postgres/templates/NOTES.txt
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/NOTES.txt
rename to kubernetes/contrib/components/netbox/components/netbox-postgres/templates/NOTES.txt
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/configmap.yaml b/kubernetes/contrib/components/netbox/components/netbox-postgres/templates/configmap.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/configmap.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-postgres/templates/configmap.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/deployment.yaml b/kubernetes/contrib/components/netbox/components/netbox-postgres/templates/deployment.yaml
similarity index 96%
rename from kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/deployment.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-postgres/templates/deployment.yaml
index bfd3b39..2caddeb 100755
--- a/kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/deployment.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-postgres/templates/deployment.yaml
@@ -37,7 +37,7 @@
     spec:
       containers:
       - name: {{ include "common.name" . }}
-        image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+        image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         ports:
         - containerPort: {{ .Values.service.internalPort }}
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/pv.yaml b/kubernetes/contrib/components/netbox/components/netbox-postgres/templates/pv.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/pv.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-postgres/templates/pv.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/pvc.yaml b/kubernetes/contrib/components/netbox/components/netbox-postgres/templates/pvc.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/pvc.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-postgres/templates/pvc.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/service.yaml b/kubernetes/contrib/components/netbox/components/netbox-postgres/templates/service.yaml
similarity index 100%
rename from kubernetes/contrib/components/netbox/charts/netbox-postgres/templates/service.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-postgres/templates/service.yaml
diff --git a/kubernetes/contrib/components/netbox/charts/netbox-postgres/values.yaml b/kubernetes/contrib/components/netbox/components/netbox-postgres/values.yaml
similarity index 98%
rename from kubernetes/contrib/components/netbox/charts/netbox-postgres/values.yaml
rename to kubernetes/contrib/components/netbox/components/netbox-postgres/values.yaml
index 1db2457..572e23d 100755
--- a/kubernetes/contrib/components/netbox/charts/netbox-postgres/values.yaml
+++ b/kubernetes/contrib/components/netbox/components/netbox-postgres/values.yaml
@@ -21,7 +21,6 @@
   persistence: {}
 
 # application image
-repository: docker.io
 image: postgres:10.4-alpine
 pullPolicy: Always
 
diff --git a/kubernetes/contrib/components/netbox/requirements.yaml b/kubernetes/contrib/components/netbox/requirements.yaml
index 6e0025e..29cf5e2 100755
--- a/kubernetes/contrib/components/netbox/requirements.yaml
+++ b/kubernetes/contrib/components/netbox/requirements.yaml
@@ -15,4 +15,16 @@
 dependencies:
   - name: common
     version: ~6.x-0
-    repository: '@local'
\ No newline at end of file
+    repository: '@local'
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'
+  - name: netbox-app
+    version: ~6.x-0
+    repository: 'file://components/netbox-app'
+  - name: netbox-nginx
+    version: ~6.x-0
+    repository: 'file://components/netbox-nginx'
+  - name: netbox-postgres
+    version: ~6.x-0
+    repository: 'file://components/netbox-postgres'
\ No newline at end of file
diff --git a/kubernetes/contrib/components/netbox/values.yaml b/kubernetes/contrib/components/netbox/values.yaml
index 5dc4535..04d2f27 100755
--- a/kubernetes/contrib/components/netbox/values.yaml
+++ b/kubernetes/contrib/components/netbox/values.yaml
@@ -16,16 +16,13 @@
 # Global configuration defaults.
 #################################################################
 global:
-  readinessRepository: nexus3.onap.org:10001
   nodePortPrefixExt: 304
   commonConfigPrefix: netbox
-  readinessImage: onap/oom/readiness:3.0.1
 
 #################################################################
 # Application configuration defaults.
 #################################################################
 # application image
-repository: hub.docker.io
 pullPolicy: Always
 
 # default number of instances
diff --git a/kubernetes/contrib/dns-server-for-vhost-ingress-testing/bind9dns/templates/deployment.yaml b/kubernetes/contrib/dns-server-for-vhost-ingress-testing/bind9dns/templates/deployment.yaml
index 1a76ba0..7640be6 100644
--- a/kubernetes/contrib/dns-server-for-vhost-ingress-testing/bind9dns/templates/deployment.yaml
+++ b/kubernetes/contrib/dns-server-for-vhost-ingress-testing/bind9dns/templates/deployment.yaml
@@ -36,7 +36,7 @@
     spec:
       containers:
         - name: {{ .Chart.Name }}
-          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+          image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
           imagePullPolicy: {{ .Values.image.pullPolicy }}
           env:
             - name: DNS_FORWARDER
diff --git a/kubernetes/contrib/requirements.yaml b/kubernetes/contrib/requirements.yaml
index b173931..7e60bfa 100644
--- a/kubernetes/contrib/requirements.yaml
+++ b/kubernetes/contrib/requirements.yaml
@@ -28,3 +28,6 @@
     version: ~6.x-0
     repository: 'file://components/netbox'
     condition: netbox.enabled
+  - name: repositoryGenerator
+    version: ~6.x-0
+    repository: '@local'