diff options
author | 2020-04-03 07:43:11 +0000 | |
---|---|---|
committer | 2020-04-13 16:46:10 +0000 | |
commit | c8ba8f21b68b64b4068f188614dd7c891edf035f (patch) | |
tree | bf7b48d32552a60b6635204c49fd2a3f7665e310 /src/orchestrator/mock_files/mock_profiles | |
parent | 502b61039dbdc9089768a49b87163e654d8cbfb7 (diff) |
Test cases for resolving the helm templates
Added test cases for overriding values and
resolving the helm charts.
Also addressed the merge conflicts
and review comments
Issue-ID: MULTICLOUD-1041
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Change-Id: I511e8e2e71c60e878df434370fc053f09cda1f66
Diffstat (limited to 'src/orchestrator/mock_files/mock_profiles')
6 files changed, 60 insertions, 0 deletions
diff --git a/src/orchestrator/mock_files/mock_profiles/profile1/faulty-dest-manifest.yaml b/src/orchestrator/mock_files/mock_profiles/profile1/faulty-dest-manifest.yaml new file mode 100644 index 00000000..8c61a4e4 --- /dev/null +++ b/src/orchestrator/mock_files/mock_profiles/profile1/faulty-dest-manifest.yaml @@ -0,0 +1,7 @@ +--- +version: v1 +type: + values: "override_values.yaml" + configresource: + - filepath: subdir/p1.yaml + chartpath: testchart1/folderdoesNOTexist/p1.yaml diff --git a/src/orchestrator/mock_files/mock_profiles/profile1/faulty-manifest.yaml b/src/orchestrator/mock_files/mock_profiles/profile1/faulty-manifest.yaml new file mode 100644 index 00000000..a123111a --- /dev/null +++ b/src/orchestrator/mock_files/mock_profiles/profile1/faulty-manifest.yaml @@ -0,0 +1,8 @@ +--- +version: v1 +type: + values: + - override_values.yaml + configresource: + - filepath: subdir/p1.yaml + chartpath: testchart1/templates/p1.yaml diff --git a/src/orchestrator/mock_files/mock_profiles/profile1/faulty-src-manifest.yaml b/src/orchestrator/mock_files/mock_profiles/profile1/faulty-src-manifest.yaml new file mode 100644 index 00000000..eff534bb --- /dev/null +++ b/src/orchestrator/mock_files/mock_profiles/profile1/faulty-src-manifest.yaml @@ -0,0 +1,7 @@ +--- +version: v1 +type: + values: "override_values.yaml" + configresource: + - filepath: subdir/filedoesNOTexist.yaml + chartpath: testchart1/templates/p1.yaml diff --git a/src/orchestrator/mock_files/mock_profiles/profile1/manifest.yaml b/src/orchestrator/mock_files/mock_profiles/profile1/manifest.yaml new file mode 100644 index 00000000..e4beada0 --- /dev/null +++ b/src/orchestrator/mock_files/mock_profiles/profile1/manifest.yaml @@ -0,0 +1,7 @@ +--- +version: v1 +type: + values: "override_values.yaml" + configresource: + - filepath: subdir/p1.yaml + chartpath: testchart1/templates/p1.yaml diff --git a/src/orchestrator/mock_files/mock_profiles/profile1/override_values.yaml b/src/orchestrator/mock_files/mock_profiles/profile1/override_values.yaml new file mode 100644 index 00000000..0186c662 --- /dev/null +++ b/src/orchestrator/mock_files/mock_profiles/profile1/override_values.yaml @@ -0,0 +1,9 @@ +# Default values for subchart. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +# subchart1 +service: + name: nginx + type: ClusterIP + externalPort: 8080 + internalPort: 8080
\ No newline at end of file diff --git a/src/orchestrator/mock_files/mock_profiles/profile1/subdir/p1.yaml b/src/orchestrator/mock_files/mock_profiles/profile1/subdir/p1.yaml new file mode 100644 index 00000000..2dad677a --- /dev/null +++ b/src/orchestrator/mock_files/mock_profiles/profile1/subdir/p1.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }}-override + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + namespace: "{{ .Release.Namespace }}" + release-name: "{{ .Release.Name }}" + release-is-upgrade: "{{ .Release.IsUpgrade }}" + release-is-install: "{{ .Release.IsInstall }}" + kube-version/major: "{{ .Capabilities.KubeVersion.Major }}" + kube-version/minor: "{{ .Capabilities.KubeVersion.Minor }}" + kube-version/gitversion: "v{{ .Capabilities.KubeVersion.Major }}.{{ .Capabilities.KubeVersion.Minor }}.0" +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.externalPort }} + targetPort: {{ .Values.service.internalPort }} + protocol: TCP + name: {{ .Values.service.name }} + selector: + app: {{ .Chart.Name }} |