From 1838366d51a172b0240a5e23c5d691b544a7a6be Mon Sep 17 00:00:00 2001 From: Dhrumin Desai Date: Mon, 9 Aug 2021 16:52:04 -0400 Subject: Helm-generator - seedcode delivery for helm chart generation tool from component spec Issue-ID: DCAEGEN2-2694 Change-Id: I3e317e312f90b061c0cdff155b8673967aea414b Signed-off-by: Dhrumin Desai --- .../blueprint/addons/templates/certificates.yaml | 21 +++++ .../src/test/input/blueprint/base/Chart.yaml | 39 +++++++++ .../input/blueprint/base/charts/common-8.0.0.tgz | Bin 0 -> 91901 bytes .../base/charts/dcaegen2-services-common-8.0.0.tgz | Bin 0 -> 28389 bytes .../input/blueprint/base/charts/postgres-8.0.0.tgz | Bin 0 -> 29791 bytes .../blueprint/base/charts/readinessCheck-8.0.0.tgz | Bin 0 -> 24803 bytes .../base/charts/repositoryGenerator-8.0.0.tgz | Bin 0 -> 2755 bytes .../input/blueprint/base/templates/configmap.yaml | 19 ++++ .../input/blueprint/base/templates/deployment.yaml | 18 ++++ .../input/blueprint/base/templates/secret.yaml | 19 ++++ .../input/blueprint/base/templates/service.yaml | 19 ++++ .../src/test/input/blueprint/base/values.yaml | 96 +++++++++++++++++++++ 12 files changed, 231 insertions(+) create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/addons/templates/certificates.yaml create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/Chart.yaml create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/common-8.0.0.tgz create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/dcaegen2-services-common-8.0.0.tgz create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/postgres-8.0.0.tgz create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/readinessCheck-8.0.0.tgz create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/repositoryGenerator-8.0.0.tgz create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/configmap.yaml create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/deployment.yaml create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/secret.yaml create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/service.yaml create mode 100644 mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/values.yaml (limited to 'mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint') diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/addons/templates/certificates.yaml b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/addons/templates/certificates.yaml new file mode 100644 index 0000000..a871343 --- /dev/null +++ b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/addons/templates/certificates.yaml @@ -0,0 +1,21 @@ +{{/* + # ============LICENSE_START======================================================= + # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved. + # ================================================================================ + # 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. + # ============LICENSE_END========================================================= +*/}} + +{{ if and .Values.certDirectory .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }} +{{ include "certManagerCertificate.certificate" . }} +{{ end }} diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/Chart.yaml b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/Chart.yaml new file mode 100644 index 0000000..239978f --- /dev/null +++ b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/Chart.yaml @@ -0,0 +1,39 @@ +# ============LICENSE_START======================================================= +# Copyright (c) 2021 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +apiVersion: v2 +appVersion: "Honolulu" +description: TBD +name: TBD +version: TBD + +dependencies: + - name: common + version: ~8.x-0 + repository: '@local' + - name: repositoryGenerator + version: ~8.x-0 + repository: '@local' + - name: readinessCheck + version: ~8.x-0 + repository: '@local' + - name: dcaegen2-services-common + version: ~8.x-0 + repository: '@local' + - name: postgres + version: ~8.x-0 + repository: '@local' + condition: postgres.enabled diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/common-8.0.0.tgz b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/common-8.0.0.tgz new file mode 100644 index 0000000..910eedd Binary files /dev/null and b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/common-8.0.0.tgz differ diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/dcaegen2-services-common-8.0.0.tgz b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/dcaegen2-services-common-8.0.0.tgz new file mode 100644 index 0000000..0d1ca90 Binary files /dev/null and b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/dcaegen2-services-common-8.0.0.tgz differ diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/postgres-8.0.0.tgz b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/postgres-8.0.0.tgz new file mode 100644 index 0000000..1618016 Binary files /dev/null and b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/postgres-8.0.0.tgz differ diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/readinessCheck-8.0.0.tgz b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/readinessCheck-8.0.0.tgz new file mode 100644 index 0000000..2060b85 Binary files /dev/null and b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/readinessCheck-8.0.0.tgz differ diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/repositoryGenerator-8.0.0.tgz b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/repositoryGenerator-8.0.0.tgz new file mode 100644 index 0000000..c8c5804 Binary files /dev/null and b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/charts/repositoryGenerator-8.0.0.tgz differ diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/configmap.yaml b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/configmap.yaml new file mode 100644 index 0000000..eaa7f34 --- /dev/null +++ b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/configmap.yaml @@ -0,0 +1,19 @@ +{{/* + # ============LICENSE_START======================================================= + # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved. + # ================================================================================ + # 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. + # ============LICENSE_END========================================================= +*/}} + +{{ include "dcaegen2-services-common.configMap" . }} diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/deployment.yaml b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/deployment.yaml new file mode 100644 index 0000000..6d554d3 --- /dev/null +++ b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/deployment.yaml @@ -0,0 +1,18 @@ +{{/* + # ============LICENSE_START======================================================= + # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved. + # ================================================================================ + # 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. + # ============LICENSE_END========================================================= +*/}} +{{ include "dcaegen2-services-common.microserviceDeployment" . }} \ No newline at end of file diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/secret.yaml b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/secret.yaml new file mode 100644 index 0000000..2162630 --- /dev/null +++ b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/secret.yaml @@ -0,0 +1,19 @@ +{{/* + # ============LICENSE_START======================================================= + # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved. + # ================================================================================ + # 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. + # ============LICENSE_END========================================================= +*/}} + +{{ include "common.secretFast" . }} diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/service.yaml b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/service.yaml new file mode 100644 index 0000000..115398a --- /dev/null +++ b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/templates/service.yaml @@ -0,0 +1,19 @@ +{{/* + # ============LICENSE_START======================================================= + # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved. + # ================================================================================ + # 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. + # ============LICENSE_END========================================================= +*/}} + +{{ include "common.service" . }} diff --git a/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/values.yaml b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/values.yaml new file mode 100644 index 0000000..e83afd3 --- /dev/null +++ b/mod2/helm-generator/helmchartgenerator-core/src/test/input/blueprint/base/values.yaml @@ -0,0 +1,96 @@ +# ============LICENSE_START======================================================= +# Copyright (c) 2021 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# 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. +# ============LICENSE_END========================================================= + +################################################################# +# Global configuration defaults. +################################################################# +global: + nodePortPrefix: 302 + nodePortPrefixExt: 304 + +################################################################# +# Filebeat configuration defaults. +################################################################# +filebeatConfig: + logstashServiceName: log-ls + logstashPort: 5044 + +################################################################# +# initContainer images. +################################################################# +tlsImage: onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0 +consulLoaderImage: onap/org.onap.dcaegen2.deployments.consul-loader-container:1.1.0 + +################################################################# +# Application configuration defaults. +################################################################# +# application image +image: TBD #DONE +pullPolicy: Always + +#policy sync image +dcaePolicySyncImage: onap/org.onap.dcaegen2.deployments.dcae-services-policy-sync:1.0.1 + +#postgres enable/disable +postgres: + enabled: false + +# log directory where logging sidecar should look for log files +# if absent, no sidecar will be deployed +#logDirectory: TBD #/opt/app/VESCollector/logs #DONE + +# directory where TLS certs should be stored +# if absent, no certs will be retrieved and stored +#certDirectory: TBD #/opt/app/dcae-certificate #DONE + +# TLS role -- set to true if microservice acts as server +# If true, an init container will retrieve a server cert +# and key from AAF and mount them in certDirectory. +#tlsServer: TBD #DONE + +# dependencies +readinessCheck: + wait_for: + - dcae-config-binding-service + - aaf-cm + +# probe configuration #NEED DISCUSSION +readiness: + initialDelaySeconds: TBD + periodSeconds: TBD + path: TBD + scheme: TBD + port: TBD + +# Resource Limit flavor -By Default using small +flavor: small +# Segregation for Different environment (Small and Large) +resources: + small: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 1 + memory: 1Gi + large: + limits: + cpu: 4 + memory: 4Gi + requests: + cpu: 2 + memory: 2Gi + unlimited: {} -- cgit 1.2.3-korg