Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

[stable/nginx-ingress] containerPort setting isn't work in helm chart #14605

@chrono2002

Description

@chrono2002

Hello guys!
Looks like containerPort directive doesn't work in helm chart.
I've set a strict PSP looked like this (so users won't run under root):

apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
  name: mypsp
  annotations:
    seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
    seccomp.security.alpha.kubernetes.io/defaultProfileName:  'docker/default'
spec:
  privileged: false
  allowPrivilegeEscalation: false
  requiredDropCapabilities:
    - ALL
  allowedCapabilities:
  - NET_BIND_SERVICE
  volumes:
    - 'configMap'
    - 'emptyDir'
    - 'projected'
    - 'secret'
    - 'downwardAPI'
    - 'persistentVolumeClaim'

Then I've set this in my custom-values.yaml:

controller:
  # Configures the ports the nginx-controller listens on
  containerPort:
    http: 10080
    https: 10443

Then i've executed:
$ helm install stable/nginx-ingress --namespace test_ns --name test_nginx --tls --values=custom-values.yaml

It doesn't even set in Deployment until i make a chart copy and execute like this:
$ helm ./nginx-ingress --namespace test_ns --name test_nginx --tls --values=custom-values.yaml

Now I see this:
$ root@server:/# kubectl logs -l 'app=nginx-ingress' -f

W0607 18:06:38.955117       8 queue.go:130] requeuing initial-sync, err 
-------------------------------------------------------------------------------
Error: exit status 1
2019/06/07 18:06:38 [notice] 54#54: ModSecurity-nginx v1.0.0
nginx: the configuration file /tmp/nginx-cfg232993513 syntax is ok
2019/06/07 18:06:38 [emerg] 54#54: bind() to 0.0.0.0:80 failed (13: Permission denied)
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)
nginx: configuration file /tmp/nginx-cfg232993513 test failed

Why still 80 port have seen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions