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

Revert "Use ClusterIP for GHProxy deployment" #6577

Conversation

petr-muller
Copy link
Member

Reverts #6573

Our auto-applier fails on this:

oc apply -f core-services/prow/03_deployment/ghproxy.yaml: failed to apply
The Service \"ghproxy\" is invalid: 
* spec.ports[0].nodePort: Forbidden: may not be used when `type` is 'ClusterIP'
* spec.ports[1].nodePort: Forbidden: may not be used when `type` is 'ClusterIP'

https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/logs/branch-ci-openshift-release-master-core-apply/2088#1:build-log.txt%3A60

Not sure how to fix this, therefore reverting (googling suggests this may be a bug and may need manual intervention with oc replace or something similar)

/cc @stevekuznetsov

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 7, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: petr-muller

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 7, 2020
@bbguimaraes
Copy link
Contributor

My guess is apply merges the new definition with the existing (which was assigned a random nodePort) and we get this conflict:

$ oc -n ci get svc ghproxy -o yaml | yq .spec.ports
- name: main
  nodePort: 31997
  port: 80
  protocol: TCP
  targetPort: 8888
- name: metrics
  nodePort: 31308
  port: 9090
  protocol: TCP
  targetPort: 9090

I don't know if apply is supposed to handle these cases, but replaceing it should be enough.

@petr-muller
Copy link
Member Author

oc replace does not work either:

The Service "ghproxy" is invalid: spec.clusterIP: Invalid value: "": field is immutable

@hongkailiu
Copy link
Member

Tried with kubernetes/kubectl#221 (comment)

oc get svc -n ci ghproxy -o  yaml
apiVersion: v1
kind: Service
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"prow","component":"ghproxy"},"name":"ghproxy","namespace":"ci"},"spec":{"ports":[{"name":"main","port":80,"protocol":"TCP","targetPort":8888},{"name":"metrics","port":9090,"protocol":"TCP","targetPort":9090}],"selector":{"app":"prow","component":"ghproxy"},"type":"NodePort"}}
  creationTimestamp: "2018-12-03T18:32:10Z"
  labels:
    app: prow
    component: ghproxy
  name: ghproxy
  namespace: ci
  resourceVersion: "411112505"
  selfLink: /api/v1/namespaces/ci/services/ghproxy
  uid: bf264a9e-f729-11e8-8637-42010a8e0004
spec:
  clusterIP: 172.30.199.140
  ports:
  - name: main
    port: 80
    protocol: TCP
    targetPort: 8888
  - name: metrics
    port: 9090
    protocol: TCP
    targetPort: 9090
  selector:
    app: prow
    component: ghproxy
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

Rerunning the job

@petr-muller
Copy link
Member Author

/close

@openshift-ci-robot
Copy link
Contributor

@petr-muller: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants