-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Describe the bug
- Namespace creation order problem -Helm sends all manifests from the post-renderer to the Kubernetes API in a single batch. The Namespace object from namespace.yaml is applied at the same time as other namespaced resources, so the namespace does not exist yet when those resources are created.
all.yaml
is not referenced inkustomization.yaml
(onlynamespace.yaml
is), so Helm will be deploying only the chart’s default manifests without the intended overrides.
To Reproduce
Steps to reproduce the behavior:
- Run
install-argocd.sh
Expected behavior
Helm deploys the argocd chart.
Server (please complete the following information):
- Ubuntu 22.04
Additional context
# /opt/genestack/bin/install-argocd.sh
Executing Helm command:
helm upgrade --install argocd oci://registry-1.docker.io/bitnamicharts/argo-cd --namespace=argocd --timeout 120m --post-renderer /etc/genestack/kustomize/kustomize.sh --post-renderer-args argocd/base -f /opt/genestack/base-helm-configs/argocd/helm-argocd-overrides.yaml
Release "argocd" does not exist. Installing it now.
Pulled: registry-1.docker.io/bitnamicharts/argo-cd:10.0.0
Digest: sha256:f98d705cf4983d6635fa0fc63c88e8fb8b7fda8ae2d3e01ee8536649a1c7939e
Error: create: failed to create: namespaces "argocd" not found
Existing contents of install-argocd.sh
.
# cat /opt/genestack/bin/install-argocd.sh
#!/bin/bash
# Default parameter value
TARGET=${1:-base}
# Directory to check for YAML files
CONFIG_DIR="/etc/genestack/helm-configs/argocd"
# Helm command setup
HELM_CMD="helm upgrade --install argocd oci://registry-1.docker.io/bitnamicharts/argo-cd \
--namespace=argocd \
--timeout 120m \
--post-renderer /etc/genestack/kustomize/kustomize.sh \
--post-renderer-args argocd/${TARGET} \
-f /opt/genestack/base-helm-configs/argocd/helm-argocd-overrides.yaml"
# Check if YAML files exist in the specified directory
if compgen -G "${CONFIG_DIR}/*.yaml" > /dev/null; then
# Add all YAML files from the directory to the helm command
for yaml_file in "${CONFIG_DIR}"/*.yaml; do
HELM_CMD+=" -f ${yaml_file}"
done
fi
# Run the helm command
echo "Executing Helm command:"
echo "${HELM_CMD}"
eval "${HELM_CMD}"
Existing kustomization.yaml
configuration for argocd.
# cat /opt/genestack/base-kustomize/argocd/base/kustomization.yaml
sortOptions:
order: fifo
resources:
- namespace.yaml
namespace: argocd
Metadata
Metadata
Assignees
Labels
No labels