| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you 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. |
| # |
| version: '3' |
| |
| vars: |
| TEMPLATES: extract/openwhisk-deploy-kube/helm/openwhisk/templates |
| YAML: "" |
| |
| tasks: |
| install-helm: |
| cmds: |
| - curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash |
| status: |
| - which helm |
| |
| get-openwhisk-chart: |
| cmds: |
| - mkdir -p extract |
| - git clone https://github.com/apache/openwhisk-deploy-kube extract/openwhisk-deploy-kube |
| status: |
| - test -d extract/openwhisk-deploy-kube |
| |
| extract: |
| deps: |
| - install-helm |
| - get-openwhisk-chart |
| cmds: |
| - | |
| if test -z "{{.YAML}}" |
| then ls {{.TEMPLATES}} |
| echo "*** use 'task YAML=... extract' to export the template" |
| else echo "*** extracting {{.YAML}}" |
| helm template {{.TEMPLATES}}/.. -s templates/{{.YAML}} | tee extract/{{.YAML}} |
| echo "*** saved in extract/{{.YAML}}" |
| fi |
| |
| deploy: kubectl -n nuvolaris apply -f deploy/nuvolaris-operator/whisk.yaml |
| |
| undeploy-del: > |
| kubectl -n nuvolaris delete wsk/standalone |
| |
| undeploy-patch: > |
| kubectl -n nuvolaris patch wsk/standalone --type=merge --patch '{"metadata": {"finalizers":[] } }' |
| |
| undeploy: |
| deps: |
| - undeploy-del |
| - undeploy-patch |
| |