concourse / concourse-chart

Helm chart to install Concourse
Apache License 2.0
145 stars 177 forks source link

Fixes issue with disabling external worker #186

Closed lbenedix closed 3 years ago

lbenedix commented 3 years ago

Changing from type LoadBalancer to ClusterIP was not clearing the nodePort settings. This results in the service not being updated.

UPGRADE FAILED: cannot patch "test-web-worker-gateway" with kind Service: Service "test-web-worker-gateway" is invalid: spec.ports[0].nodePort: Forbidden: may not be used when `type` is 'ClusterIP'
aoldershaw commented 3 years ago

Hmm, I tried to reproduce with the latest chart (14.4.0) but am not seeing that error message.

$ cat values.yaml
web:
  service:
    workerGateway:
      type: NodePort
      NodePort: 30001
$ helm install test concourse/concourse -f values.yaml
...
$ kubectl get svc
test-release-postgresql            ClusterIP   None            <none>        5432/TCP         31s
test-release-postgresql-headless   ClusterIP   None            <none>        5432/TCP         32s
test-release-web                   ClusterIP   None            <none>        8080/TCP         31s
test-release-web-worker-gateway    NodePort    10.12.240.255   <none>        2222:30001/TCP   31s
test-release-worker                ClusterIP   None            <none>        <none>           31s
$ cat new-values.yaml
web:
  service:
    workerGateway:
      type: ClusterIP
$ helm upgrade test concourse/concourse -f new-values.yaml
Error: UPGRADE FAILED: cannot patch "test-release-web-worker-gateway" with kind Service: Service "test-release-web-worker-gateway" is invalid: spec.clusterIP: Invalid value: "None": field is immutable

Setting web.service.workerGateway.clusterIP to null seems to fix it (but makes the service non-headless).

aoldershaw commented 3 years ago

Going to close this for now - feel free to resubmit