Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

awx-operator installation issue with helm. #907

Closed
rakesh561 opened this issue May 10, 2022 · 8 comments · Fixed by #954
Closed

awx-operator installation issue with helm. #907

rakesh561 opened this issue May 10, 2022 · 8 comments · Fixed by #954

Comments

@rakesh561
Copy link
Contributor

ISSUE TYPE
  • Bug Report
SUMMARY

awx operator is installation through helm is deploying awx-operator into awx namespace.helm list is showing that awx-operator is
installed into required namespace but actual awx-operator is deployed into awx namespace which is created by helm installation

ENVIRONMENT
  • Operator version: 0.21.0
  • Kubernetes version: 1.19.1
  • AWX install method: openshift, minishift, docker on linux, docker for mac, boot2docker
STEPS TO REPRODUCE

helm install my-awx-operator awx-operator/awx-operator

NAME: my-awx-operator
LAST DEPLOYED: Tue May 10 05:00:40 2022
NAMESPACE: helm-awx
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Helm Chart 0.21.0
<!-- Please describe exactly how to reproduce the problem. -->
```
kubectl get deployment -A| grep -i awx
awx            awx-operator-controller-manager             1/1     1            1           4m10s
 helm  list
NAME            NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                                                              APP VERSION
my-awx-operator helm-awx        1               2022-05-10 05:00:40.974195 -0400 EDT    deployed        awx-operator-0.21.0                                                0.21.0
@metabsd
Copy link

metabsd commented May 10, 2022

What you mean is trying to specify a namespace but the operator is deployed in the awx namespace?

@deeco
Copy link

deeco commented May 10, 2022

I have also seen this with latest version, ignores the custom namespace or namespace ENV and deploys into
and creates AWX namespace

@rakesh561
Copy link
Contributor Author

@metabsd that is correct awx operator is getting deployed into awx namespace instead of custom namespace. I have tried several options like installing awx operator into custom namespace using helm. Tried to pass custom namespace in custom values. Yml file etc but its default behavior is ignore namespace that is passed and try to create awx namespace and install awx operator into awx namespace

@metabsd
Copy link

metabsd commented May 11, 2022

I just pulled the helm chart to analyze it and indeed the current chart seems to be a first static version without possibility to define a values.yml. All values hardcoded. The contributor may have planned to make it more custom in the future. For the moment it would be necessary to download the helm and modify it by hand or propose a pull request with this functionality. This explains the result we have. Have a nice day!

@metabsd
Copy link

metabsd commented May 11, 2022

Another solution would be to accept the configuration included by the current helm chart and leave it in the awx namespace.

@rakesh561
Copy link
Contributor Author

@metabsd i did try out some thing like to including namespace: awx values.yaml and then include namespace: {{ .values.Namespace }} ran into some issues i will try to see if i can customize values.yaml so that helm chart can be more re-usable especially around using different versions of awx-operator images it would be nice to have customization

@jbouse
Copy link

jbouse commented May 27, 2022

I've been working with the same version of the helm chart today and from my observation, all the templates are hard-coded with namespace: awx in the metadata. In fact, I couldn't see anything in any of the templates that were dynamic which would explain why values.yaml was empty.

This was not entirely bad as I intended to deploy in a awx namespace already, The issue was when executing the helm install if I provided a namespace it would error out if I gave awx whether you added the --create-namespace option or not. If you did not provide and you created the namespace it would error as it also tried to create the namespace that already exists. If you did provide it would create the namespace to install the helm chart and then error cause it already existed.

It almost seems to me that the best course would be to remove the namespace-awx.yaml template and all references of namespace: awx in the other templates. Then allow the helm install command to dictate which namespace it is installed within.

For now my fix was to have helm install into another namespace, for simplicity I choose kube-system as the aws-load-balancer-controller helm chart was being deployed in there as well. This was just a workaround to be able to use awx namespace as I originally intended.

@DomPolizzi
Copy link

I also have this issue!

bewing added a commit to bewing/awx-operator that referenced this issue Jun 22, 2022
Helm should be able to set the namespace for the operator at deploy time
via the --namespace option.  Use yq to remove all references to
namespaces in the helm chart prior to publishing.

Resolves ansible#907
bewing added a commit to bewing/awx-operator that referenced this issue Jun 23, 2022
Helm should be able to set the namespace for the operator at deploy time
via the --namespace option.  Use yq to remove all references to
namespaces in the helm chart prior to publishing.

Update CI process to create namespace during install.

Resolves ansible#907
miles-w-3 pushed a commit to miles-w-3/awx-operator that referenced this issue Jun 26, 2022
Helm should be able to set the namespace for the operator at deploy time
via the --namespace option.  Use yq to remove all references to
namespaces in the helm chart prior to publishing.

Update CI process to create namespace during install.

Resolves ansible#907
bewing added a commit to bewing/awx-operator that referenced this issue Jun 27, 2022
Helm should be able to set the namespace for the operator at deploy time
via the --namespace option.  Use yq to remove all references to
namespaces in the helm chart prior to publishing.

Update CI process to create namespace during install.

Resolves ansible#907
miles-w-3 pushed a commit to miles-w-3/awx-operator that referenced this issue Jun 27, 2022
Helm should be able to set the namespace for the operator at deploy time
via the --namespace option.  Use yq to remove all references to
namespaces in the helm chart prior to publishing.

Update CI process to create namespace during install.

Resolves ansible#907
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants