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
A helm install command with --namespace=autopilot will fail if the autopilot namespace doesn't exist. This doesn't allow the user to create the namespace automatically through Helm and install the helm chart in that same namespace
Steps To Reproduce
Made sure autopilot namespace did not exist:
$ kubectl get namespace autopilot
Error from server (NotFound): namespaces "autopilot" not found
Ran command to have the helm release create the namespace for me and targeted the namespace so it was not installed in default:
$ helm upgrade autopilot autopilot/autopilot --install --create-namespace --namespace=autopilot -f autopilot-cfg.yaml
Release "autopilot" does not exist. Installing it now.
Error: 1 error occurred:
* namespaces "autopilot" already exists
I checked if pods were there anyways, and they were:
Checked status of autopilot via helm, it was saying it was failed:
$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
autopilot autopilot 1 2024-09-25 17:09:56.366324 -0400 EDT failed autopilot-v1.9.0 latest
Ran above command again and it went w/o issues and the helm status changed to deployed...
$ helm upgrade autopilot autopilot/autopilot --install --create-namespace --namespace=autopilot -f autopilot-cfg.yaml
Release "autopilot" has been upgraded. Happy Helming!
NAME: autopilot
LAST DEPLOYED: Wed Sep 25 17:11:02 2024
NAMESPACE: autopilot
STATUS: deployed
REVISION: 2
TEST SUITE: None
NOTES:
Autopilot DaemonSet deployed.
$ helm list
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
autopilot autopilot 2 2024-09-25 17:11:02.781032 -0400 EDT deployed autopilot-v1.9.0 latest
Expected behavior
Be able to install autopilot in the autopilot namespace
Evidence
See steps to reproduce
Proposed Solution
Remove the create: option in the config.yaml for the namespace, and let it be decided through the Helm cli
Additional context
The installer will still work as expected if the helm chart install namespace is different from autopilot AND the namespace doesn't exist already.
Thanks to Kevin O'Connor for finding this. All the commands above are reported by him.
The text was updated successfully, but these errors were encountered:
I now remember why I did it that way.. This shows that Helm doesn't allow to add labels or annotations to the namespace. So it's either we make it helm friendly and add openshift.io/cluster-monitoring: "true" through oc/kubectl, or make it helm unfriendly and create the namespace with the label. The label is only openshift specific, so taking that out of the way it would make the tool more kubernetes-native..
We decided to remove the namespace creation from the yaml templates and let the user create that through the helm cli.
Further info to enable prometheus scrape metrics from the autopilot repository, will be added in the readme
Summary
A
helm install
command with--namespace=autopilot
will fail if theautopilot
namespace doesn't exist. This doesn't allow the user to create the namespace automatically through Helm and install the helm chart in that same namespaceSteps To Reproduce
Made sure autopilot namespace did not exist:
$ kubectl get namespace autopilot Error from server (NotFound): namespaces "autopilot" not found
Ran command to have the helm release create the namespace for me and targeted the namespace so it was not installed in default:
I checked if pods were there anyways, and they were:
Checked status of autopilot via helm, it was saying it was failed:
Ran above command again and it went w/o issues and the helm status changed to deployed...
Expected behavior
Be able to install autopilot in the autopilot namespace
Evidence
See steps to reproduce
Proposed Solution
Remove the
create:
option in theconfig.yaml
for the namespace, and let it be decided through the Helm cliAdditional context
The installer will still work as expected if the helm chart install namespace is different from
autopilot
AND the namespace doesn't exist already.Thanks to Kevin O'Connor for finding this. All the commands above are reported by him.
The text was updated successfully, but these errors were encountered: