diff options
author | Eric Multanen <eric.w.multanen@intel.com> | 2021-06-24 20:45:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-06-24 20:45:24 +0000 |
commit | cec17f07ca594b45e9781438f0d9b9f9d60f2961 (patch) | |
tree | 86fad4b7b5b22311604b01fb585e5e35a1406ff3 /kud/deployment_infra/emco/examples/04-addon-resources-app.yaml | |
parent | 3c09e032b06c18426e59ec38d925e2b4ace24abc (diff) | |
parent | 741d0b2bf25ee68eab05c5a768f60515131bb852 (diff) |
Merge "Refactor EMCO deploy of addons"
Diffstat (limited to 'kud/deployment_infra/emco/examples/04-addon-resources-app.yaml')
-rw-r--r-- | kud/deployment_infra/emco/examples/04-addon-resources-app.yaml | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/kud/deployment_infra/emco/examples/04-addon-resources-app.yaml b/kud/deployment_infra/emco/examples/04-addon-resources-app.yaml new file mode 100644 index 00000000..92fd9539 --- /dev/null +++ b/kud/deployment_infra/emco/examples/04-addon-resources-app.yaml @@ -0,0 +1,110 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2020 Intel Corporation + +--- +#creating composite app entry +version: emco/v2 +resourceContext: + anchor: projects/{{ .ProjectName }}/composite-apps +metadata : + name: {{ .AddonResourcesApp }} + description: "KUD addons" +spec: + version: v1 + +{{- range $index, $addon := .AddonResources }} +--- +#adding app to the composite app +version: emco/v2 +resourceContext: + anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.AddonResourcesApp }}/v1/apps +metadata : + name: {{ $addon }} +file: + {{ $.PackagesPath }}/{{ $addon }}.tar.gz +{{- end }} + +--- +#creating composite profile entry +version: emco/v2 +resourceContext: + anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/composite-profiles +metadata : + name: {{ .AddonResourcesProfile }} + +{{- range $index, $addon := .AddonResources }} +--- +#adding app profiles to the composite profile +version: emco/v2 +resourceContext: + anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.AddonResourcesApp }}/v1/composite-profiles/{{ $.AddonResourcesProfile }}/profiles +metadata : + name: {{ $addon }}-profile +spec: + app-name: {{ $addon }} +file: + {{ $.PackagesPath }}/{{ $addon }}_profile.tar.gz +{{- end }} + +--- +#create deployment intent group +version: emco/v2 +resourceContext: + anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/deployment-intent-groups +metadata : + name: {{ .AddonResourcesDeploymentIntentGroup }} + description: "description" +spec: + profile: {{ .AddonResourcesProfile }} + version: r1 + logical-cloud: {{ .LogicalCloud }} + override-values: [] + +--- +#create intent in deployment intent group +version: emco/v2 +resourceContext: + anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/deployment-intent-groups/{{ .AddonResourcesDeploymentIntentGroup }}/intents +metadata : + name: {{ .AddonResourcesDeploymentIntent }} +spec: + intent: + genericPlacementIntent: {{ .AddonResourcesPlacementIntent }} + +--- +#create the generic placement intent +version: emco/v2 +resourceContext: + anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/deployment-intent-groups/{{ .AddonResourcesDeploymentIntentGroup }}/generic-placement-intents +metadata : + name: {{ .AddonResourcesPlacementIntent }} +spec: + logical-cloud: {{ .LogicalCloud }} + +{{- range $index, $addon := .AddonResources }} +--- +#add the app placement intent to the generic placement intent +version: emco/v2 +resourceContext: + anchor: projects/{{ $.ProjectName }}/composite-apps/{{ $.AddonResourcesApp }}/v1/deployment-intent-groups/{{ $.AddonResourcesDeploymentIntentGroup }}/generic-placement-intents/{{ $.AddonResourcesPlacementIntent }}/app-intents +metadata: + name: {{ $addon }}-placement-intent +spec: + app-name: {{ $addon }} + intent: + allOf: + - provider-name: {{ $.ClusterProvider }} + cluster-label-name: {{ $.ClustersLabel }} +{{- end }} + +--- +#Approve +version: emco/v2 +resourceContext: + anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/deployment-intent-groups/{{ .AddonResourcesDeploymentIntentGroup }}/approve + +--- +#Instantiate +version: emco/v2 +resourceContext: + anchor: projects/{{ .ProjectName }}/composite-apps/{{ .AddonResourcesApp }}/v1/deployment-intent-groups/{{ .AddonResourcesDeploymentIntentGroup }}/instantiate |