Giter Club home page Giter Club logo

Comments (2)

jbielick avatar jbielick commented on August 20, 2024

Are you able to submit a minimal reproduction of this issue? Just a values file and helm install command would probably do. At present, I cannot locate the source of the issue you're having and there are many variables to consider.

For what it's worth, there's a passing test case here which asserts that the correct secret name is used to populate the DATABASE_PASSWORD environment variable for the AWX pod containers, which sounds like your case. Does that test look different from what you have?

@test "$name: with postgresqlExistingSecret: provided secret is used for DATABASE_PASSWORD" {
template_with_defaults "$name" --set postgresqlExistingSecret=my-secret
local envs
envs="$(get '.spec.template.spec.containers[] | select(.name == "web").env')"
[ "$(jq -r '.[] | select(.name == "DATABASE_PASSWORD").valueFrom.secretKeyRef | "\(.name).\(.key)"' <<< "$envs")" = "my-secret.DATABASE_PASSWORD" ]
envs="$(get '.spec.template.spec.containers[] | select(.name == "task").env')"
[ "$(jq -r '.[] | select(.name == "DATABASE_PASSWORD").valueFrom.secretKeyRef | "\(.name).\(.key)"' <<< "$envs")" = "my-secret.DATABASE_PASSWORD" ]
}

from charts.

RxJcollins avatar RxJcollins commented on August 20, 2024

From looking at your test, I don't see where my secret would fail. One thing I need to note is I am deploying and running this chart from my ArgoCD Application definition so a minimal reproduction is a little different. But I will try. Essentially I am using the default values file, but passing parameters in to overwrite the values I need to change, specifically setting the postgresqlExistingSecret value to the name of my secret I have created in my cluster. An example of that secret would be as such:
kubectl create secret generic awx-db-user --from-literal=DATABASE_USER=postgres --from-literal=DATABASE_PASSWORD='testpassword' --from-literal=DATABASE_NAME=awx --from-literal=DATABASE_HOST=awx-devops-postgresql --from-literal=DATABASE_PORT=5432 --from-literal=DATABASE_ADMIN_PASSWORD= testpassword -n awx --dry-run=client --output yaml | kubeseal --format=yaml --scope cluster-wide

Once this secret is created and deployed I would think it could be reproduced by running the below helm install command:
helm install awx -f values.yaml --set postgresqlExistingSecret=awx-db-user

But for specificity sake, the exact parameters passed are these:
helm: valueFiles: - values.yaml parameters: - name: secretKeyExistingSecret value: awx-secret-key - name: defaultAdminExistingSecret value: awx-admin-user - name: service.type value: NodePort - name: service.port value: "80" - name: ingress.enabled value: "true" - name: ingress.hosts[0].host value: "awx.internal.local" - name: ingress.hosts[0].paths[0] value: "/" - name: ingress.annotations.kubernetes\.io/ingress\.class value: alb - name: ingress.annotations.alb\.ingress\.kubernetes\.io/scheme value: internal - name: ingress.annotations.alb\.ingress\.kubernetes\.io/group\.name value: awx - name: ingress.annotations.alb\.ingress\.kubernetes\.io/certificate-arn value: "xxxxxxxxx" - name: postgresqlExistingSecret value: awx-db-user

from charts.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.