Kong / charts

Helm chart for Kong
Apache License 2.0
242 stars 474 forks source link

Cannot specify admin.type as NodePort #960

Closed aldredb closed 8 months ago

aldredb commented 8 months ago

When specifing admin.type as NodePort, the following error occurred:

Error: UPGRADE FAILED: failed to create resource: Service "kong-gateway-admin" is invalid: spec.clusterIPs[0]: Invalid value: "None": may not be set to 'None' for NodePort services

Example values.yaml for kong/ingress

 gateway:
   image:
     repository: kong/kong-gateway
     tag: "3.4.2.0"
   env:
     license_data:
       valueFrom:
         secretKeyRef:
           name: kong-enterprise-license
           key: license
     # So that we can access the Admin GUI from browser using NodePort without any CORS issue
     admin_gui_url: http://kong-manager.k8s.orb.local:31883 
     admin_gui_api_url: https://kong-admin-api.k8s.orb.local:31884

   manager:
    enabled: true
    type: NodePort
    http:
      # Hardcode the nodePort so that we don't have to change admin_gui_url
      nodePort: 31883 

   admin:
    enabled: true
    type: NodePort
    http:
      # Hardcode the nodePort so that we don't have to change admin_gui_api_url
      nodePort: 31884
pmalek commented 8 months ago

Hi @aldredb 👋

The reason for this is that we set None as the default ClusterIP regardless of the type of the Service. #961 should fix this.