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

Unable to process requests when deploying with nginx sidecar container #114

Open
rascreid opened this issue Nov 15, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@rascreid
Copy link

Describe the bug
Unable to process requests when deploying with nginx sidecar container

I am unsure if this is a bug or misconfiguration from my side.
From the docs

Docker version and underlying OS

To Reproduce
Steps to reproduce the behavior:

extraContainers: #[]
  - name: nginx-proxy-sidecar
    image: nginx:latest
    ports:
      - name: http-nginx
        containerPort: 80
        protocol: TCP
    volumeMounts:
      - name: nginx-config
        mountPath: /etc/nginx/nginx.conf
        subPath: nginx.conf  # Mount the nginx.conf file from the ConfigMap
        readOnly: true

# extraVolumes -- Define extra Volumes. Allow to add existing claimName
extraVolumes: #[]
    - name: nginx-config
      configMap:
        name: nginx-config-volume  # The name of the ConfigMap created manually

service:
  # service.type -- Type of Kubernetes service to create
  type: ClusterIP
  # service.port -- Port for the Kubernetes service to expose
  port: 80 # 80 for nginx-sidecar  | 9011  - original for application
  # service.annotations -- Extra annotations to add to service object
  targetPort: http-nginx
  annotations: {}
  # service.spec -- Any extra fields to add to the service object spec
  spec: {}

Expected behavior
I am expecting nginx container will be processing requests
targetPort - respected and applied in configuration

I have a workaround that by locally modifying

              service:
                name: {{ $fullName }}
                port:
                  name: {{ $.Values.service.targetPort | default "http" }}
              {{- else }}
              serviceName: {{ $fullName }}
              servicePort: {{ $.Values.service.targetPort | default "http" }}

and

https://github.com/FusionAuth/charts/blob/a2f97bb90d5a55db761a3e9a3a2644bedd88a6ec/chart/templates/service.yaml#L16C1-L20C17

  ports:
    - port: {{ .Values.service.port }}
      targetPort: {{ .Values.service.targetPort | default "http" }}
      protocol: TCP
      name: {{ .Values.service.targetPort | default "http" }}
@rascreid rascreid added the bug Something isn't working label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant