You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "senlizishi (via GitHub)" <gi...@apache.org> on 2023/04/19 10:09:14 UTC

[GitHub] [incubator-streampark] senlizishi opened a new issue, #2662: [Improve] Need to change to use v1 API to create Ingress

senlizishi opened a new issue, #2662:
URL: https://github.com/apache/incubator-streampark/issues/2662

   ### Search before asking
   
   - [X] I had searched in the [feature](https://github.com/apache/incubator-streampark/issues?q=is%3Aissue+label%3A%22Feature%22) and found no similar feature requirement.
   
   
   ### Description
   
   According to the documentation  [Deprecated API Migration Guide](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122) . The `extensions/v1beta1` and `networking.k8s.io/v1beta1` API versions of Ingress is no longer served as of **v1.22**. Therefore, we need to use the `v1` API to create Ingress. 
   
   ### Usage Scenario
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] senlizishi commented on issue #2662: [Improve] Need to change to use v1 API to create Ingress

Posted by "senlizishi (via GitHub)" <gi...@apache.org>.
senlizishi commented on issue #2662:
URL: https://github.com/apache/incubator-streampark/issues/2662#issuecomment-1514519147

   I tested and deployed Ingress under the v1.20 cluster. There are currently no v1.22+ clusters for validation. 
   The reference is modified as follows:
   ```scala
   import io.fabric8.kubernetes.api.model.networking.v1.IngressBuilder
   
   val ingress = new IngressBuilder()
             .withNewMetadata()
             .withName(clusterId)
             .addToAnnotations(annotMap.asJava)
             .addToLabels(labelsMap.asJava)
             .addToOwnerReferences(ownerReference) // Add OwnerReference
             .endMetadata()
             .withNewSpec()
             .addNewRule()
             .withHost(domainName)
             .withNewHttp()
             .addNewPath()
             .withPath(s"/$nameSpace/$clusterId/")
             .withPathType("ImplementationSpecific")
             .withNewBackend()
             .withNewService()
             .withName(s"$clusterId-rest")
             .withNewPort()
             .withName("rest")
             .endPort()
             .endService()
             .endBackend()
             .endPath()
             .addNewPath()
             .withPath(s"/$nameSpace/$clusterId" + "(/|$)(.*)")
             .withPathType("ImplementationSpecific")
             .withNewBackend()
             .withNewService()
             .withName(s"$clusterId-rest")
             .withNewPort()
             .withName("rest")
             .endPort()
             .endService()
             .endBackend()
             .endPath()
             .endHttp()
             .endRule()
             .endSpec()
             .build();
           client.network.v1.ingresses().inNamespace(nameSpace).create(ingress)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-streampark] Al-assad closed issue #2662: [Improve] Need to change to use v1 API to create Ingress

Posted by "Al-assad (via GitHub)" <gi...@apache.org>.
Al-assad closed issue #2662: [Improve] Need to change to use v1 API to create Ingress
URL: https://github.com/apache/incubator-streampark/issues/2662


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org