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

fix targetPort for ProxyHTTPS #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix targetPort for ProxyHTTPS #39

wants to merge 1 commit into from

Conversation

semik
Copy link

@semik semik commented Aug 12, 2024

Patch 747162a introduced bug. targetPort is always proxy-http when LoadBalancer is not used.

Part of values.yaml I'm using:

services:
  directHttp:
    enabled: false
  proxyAJP:
    enabled: false
  proxyHttp:
    enabled: true
    type: ClusterIP
    bindIP: 0.0.0.0
    httpPort: 8081
    httpsPort: 8082

Service helm is creating:

$ helm --namespace test upgrade -i --values=values.yaml ejbca https://keyfactor.github.io/ejbca-community-helm/ejbca-community-helm-1.0.7.tgz --dry-run | grep -A 24 ejbca-community-helm/templates/services.yaml
# Source: ejbca-community-helm/templates/services.yaml
apiVersion: v1
kind: Service
metadata:
  name: ejbca-ejbca-community-helm
  labels:
    helm.sh/chart: ejbca-community-helm-1.0.7
    app.kubernetes.io/name: ejbca-community-helm
    app.kubernetes.io/instance: ejbca
    app.kubernetes.io/version: "8.2.0.1"
    app.kubernetes.io/managed-by: Helm
spec:
  type: ClusterIP
  ports:
    - port: 8081
      targetPort: proxy-http
      protocol: TCP
      name: proxy-http
    - port: 8082
      targetPort: proxy-http
      protocol: TCP
      name: proxy-https
  selector:
    app.kubernetes.io/name: ejbca-community-helm
    app.kubernetes.io/instance: ejbca

It should be:

...
  ports:
    - port: 8081
      targetPort: proxy-http
      protocol: TCP
      name: proxy-http
    - port: 8082
      targetPort: proxy-https
      protocol: TCP
      name: proxy-https

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

Successfully merging this pull request may close these issues.

1 participant