You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought that helm charts were supposed to be included in a porter-generated CNAB, but I am not seeing them, even when I export the bundle for an air-gapped install of my bundle. This is my porter manifest:
# Optional indicator of the resource type of this fileschemaType: Bundle# Version of the porter.yaml schema used by this fileschemaVersion: 1.0.1# Name of the bundlename: example-app-stack# Version of the bundle. Change this each time you modify a published bundleversion: 0.1.0# Description of the bundle and what it doesdescription: "An example Porter configuration to install an application stack"# Registry where the bundle is published by defaultregistry: "docker.io/steve973"# Declare and optionally configure the mixins used by the bundlemixins:
- exec
- helm3:
clientVersion: v3.14.4repositories:
arangodb-charts:
url: "https://arangodb.github.io/kube-arangodb"redpanda-charts:
url: "https://charts.redpanda.com"traefik-charts:
url: "https://traefik.github.io/charts"install:
- helm3:
description: Install ArangoDB from the vendor chartname: arangodbchart: arangodb-charts/kube-arangodbversion: $arangodb-helm-chart-versionset:
global.name: arangodbnamespace: $arangodb-namespace
- helm3:
description: Install Redpanda from the vendor chartname: redpandachart: redpanda-charts/redpanda/redpandaversion: $redpanda-helm-chart-versionset:
global.name: redpandanamespace: $redpanda-namespace
- helm3:
description: Install Traefik from the vendor chartname: traefikchart: traefik-charts/traefik/traefikversion: $traefik-helm-chart-versionset:
global.name: traefiknamespace: $traefik-namespaceupgrade:
- helm3:
description: Upgrade ArangoDB from the vendor chartname: arangodbchart: arangodb-charts/kube-arangodbversion: $arangodb-helm-chart-versionset:
global.name: arangodbnamespace: $arangodb-namespace
- helm3:
description: Upgrade Redpanda from the vendor chartname: redpandachart: redpanda-charts/redpanda/redpandaversion: $redpanda-helm-chart-versionset:
global.name: redpandanamespace: $redpanda-namespace
- helm3:
description: Upgrade Traefik from the vendor chartname: traefikchart: traefik-charts/traefik/traefikversion: $traefik-helm-chart-versionset:
global.name: traefiknamespace: $traefik-namespaceuninstall:
- helm3:
description: "Uninstall ArangoDB"namespace: $arangodb-namespacereleases:
- "arangodb"
- helm3:
description: "Uninstall Redpanda"namespace: $redpanda-namespacereleases:
- "redpanda"
- helm3:
description: "Uninstall Traefik"namespace: $traefik-namespacereleases:
- "traefik"parameters:
- name: arangodb-helm-chart-versiontype: stringdefault: 1.2.40
- name: arangodb-namespacetype: stringdefault: arangodb
- name: redpanda-helm-chart-versiontype: stringdefault: 5.7.39
- name: redpanda-namespacetype: stringdefault: redpanda
- name: traefik-helm-chart-versiontype: stringdefault: 27.0.2
- name: traefik-namespacetype: stringdefault: traefik
Note that this is not complete, because I need to add the parameters for the charts.
I have a shell script that I am using to build and export the bundle, and then create an archive with porter and the exported bundle:
#!/bin/bash# Download the Porter CLI binary
PORTER_OS=$(uname -s | tr '[:upper:]''[:lower:]')
PORTER_OS=${PORTER_OS:-linux}case"$PORTER_OS"in
linux*) PORTER_OS=linux;;
darwin*) PORTER_OS=darwin;;
cygwin*) PORTER_OS=windows;;
mingw*) PORTER_OS=windows;;
*) echo"Unsupported operating system: $(uname -s)"&&exit 1
esacif [ "$PORTER_OS"=="linux" ];then
PORTER_FILENAME="porter-linux-amd64"elif [ "$PORTER_OS"=="darwin" ];then
PORTER_FILENAME="porter-darwin-amd64"elif [ "$PORTER_OS"=="windows" ];then
PORTER_FILENAME="porter-windows-amd64.exe"elseecho"Unsupported operating system: $PORTER_OS"exit 1
fi# Get the latest Porter version
PORTER_VERSION=$(porter version | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+')# Get the Porter bundle name
BUNDLE_NAME=$(cat ./porter.yaml | grep "name:"| head -n 1 | cut -d':' -f2 | xargs)
BUNDLE_VERSION=$(cat ./porter.yaml | grep "version:"| head -n 1 | cut -d':' -f2 | xargs)
BUNDLE_REGISTRY=$(grep -E '^registry:' porter.yaml | sed 's/"//g'| cut -d':' -f2,3 | xargs)# Create the "dist" directory if nonexistent
mkdir -p dist
# Switch to the distribution directorypushd dist ||exit 1
# Clear any previous distribution files
rm -rf *# Download the Porter CLI binary for use on systems that do not have Porter installed
curl -L https://cdn.porter.sh/v${PORTER_VERSION}/$PORTER_FILENAME -o ./porter
chmod +x ./porter
# Build the bundle
porter build --dir ../
porter publish --force --dir ../ --reference ${BUNDLE_REGISTRY}/${BUNDLE_NAME}:v${BUNDLE_VERSION}
porter archive ${BUNDLE_NAME}.tgz --reference ${BUNDLE_REGISTRY}/${BUNDLE_NAME}:v${BUNDLE_VERSION}# Package the CLI and the bundle in a distributable archive
tar -czf ./${BUNDLE_NAME}-bundle.tar.gz porter ${BUNDLE_NAME}.tgz
popd
When I run the script, this is the output that I am seeing:
The charts do not seem to be included anywhere. I am assuming that this is a job for the helm3 mixin, but please let me know if I am wrong about that. Also, if I am doing something wrong that prevents the charts from being downloaded and included, please let me know. I have read and re-read the documentation for both porter and for the helm3 mixin, but I could have missed something. And if you need more information, I'll provide whatever I can.
Thank you for reporting this ... I will take a look
No problem! Please don't hesitate to ask if you need anything from me. I am implementing a workaround where I simply download the charts and package them up with my bundle. But if your plugin could do that, that would be so perfect!
I thought that helm charts were supposed to be included in a porter-generated CNAB, but I am not seeing them, even when I export the bundle for an air-gapped install of my bundle. This is my porter manifest:
Note that this is not complete, because I need to add the parameters for the charts.
I have a shell script that I am using to build and export the bundle, and then create an archive with porter and the exported bundle:
When I run the script, this is the output that I am seeing:
The charts do not seem to be included anywhere. I am assuming that this is a job for the helm3 mixin, but please let me know if I am wrong about that. Also, if I am doing something wrong that prevents the charts from being downloaded and included, please let me know. I have read and re-read the documentation for both porter and for the helm3 mixin, but I could have missed something. And if you need more information, I'll provide whatever I can.
As a convenience, I have pushed this up to a git repo to make it easier: https://github.com/Steve973/porter-example-app-stack
The text was updated successfully, but these errors were encountered: