kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.37k stars 8.23k forks source link

HOw do I specify Command-line Arguments when I am using helm chart #6894

Closed yasra002 closed 2 years ago

yasra002 commented 3 years ago

Hi,

We deploy nginx ingress via helm chart and I want to apply one command-line argument to nginx-ingress. I am not sure how to do that. Would adding a the value to config map e.g controller.config.<SOMETHING> works?

The options I can specify in Config maps seems to be different from the options I can specify in command-line arguments. Even though there are some similarities.

/triage support

k8s-ci-robot commented 3 years ago

@yasra002: The label(s) triage/support cannot be applied, because the repository doesn't have them

In response to [this](https://github.com/kubernetes/ingress-nginx/issues/6894): >Hi, > >We deploy nginx ingress via helm chart andI want to apply one [command-line argument](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/command-line-arguments/#) to nginx-ingress. I am not sure how to do that. Would adding a the value to config map e.g `controller.config.´ works? > > > > > >/triage support > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
kundan2707 commented 3 years ago

@yasra002 you can install nginx-ingress using helm with smiliar option of your desired parameters as mentioned below.

elm install my-release nginx-stable/nginx-ingress --set controller.image.repository=myregistry.example.com/nginx-plus-ingress --set controller.nginxplus=true
kundan2707 commented 3 years ago

@yasra002 Can you close this issue if its resolved now?

yasra002 commented 3 years ago

@kundan2707 Thanks for your reply. However, I am not sure if I understood your answer correctly. My question is about how can I apply a particular a command-line argument from this list using helm chart. If e.g I want to set -nginx-status false which is set to true by default. How would I do that when using helm chart.

kundan2707 commented 3 years ago

@yasra002 If you’re using Helm to install the Ingress Controller, modify the parameters of the Helm chart that correspond to the command-line arguments. You can find parameters corresponding to these arguments in charts.

inge4pres commented 3 years ago

@yasra002 set this in Helm values, adding the args you want

controller:
  extraArgs:
    arg1: value1
    arg2: value2
    arg3: ""

The template:

https://github.com/kubernetes/ingress-nginx/blob/master/charts/ingress-nginx/templates/controller-deployment.yaml#L111

Be aware that those arguments are ingress-nginx-controller arguments, not nginx arguments as you mentioned, but the arguments to nginx binary can be added as controller arguments

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

iamNoah1 commented 3 years ago

@yasra002 is still an issue for you?

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 2 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-ci-robot commented 2 years ago

@k8s-triage-robot: Closing this issue.

In response to [this](https://github.com/kubernetes/ingress-nginx/issues/6894#issuecomment-951025342): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues and PRs according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue or PR with `/reopen` >- Mark this issue or PR as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.