blob: 0b386f1e1d382776e132c94fb758fdc183af7f12 [file]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: v1
kind: Service
metadata:
name: spring-cloud-test
namespace: shenyu-ingress
annotations:
kubernetes.io/ingress.class: shenyu
shenyu.apache.org/loadbalancer: roundRobin
shenyu.apache.org/plugin-spring-cloud-enabled: 'true'
shenyu.apache.org/plugin-spring-cloud-app-name: springCloud-test
shenyu.apache.org/plugin-spring-cloud-path: /new/feature/get/mapping/path
shenyu.apache.org/plugin-spring-cloud-rpc-type: springCloud
shenyu.apache.org/plugin-spring-cloud-service-name: org.apache.shenyu.examples.springcloud.controller.NewFeatureController
shenyu.apache.org/plugin-spring-cloud-method-name: getMappingUrl
spec:
selector:
app: shenyu-java-examples-springcloud-service
ports:
- port: 8884 # Assuming this is the spring cloud service port
---
apiVersion: v1
kind: Service
metadata:
name: spring-cloud-save
namespace: shenyu-ingress
annotations:
kubernetes.io/ingress.class: shenyu
shenyu.apache.org/loadbalancer: roundRobin
shenyu.apache.org/plugin-spring-cloud-enabled: 'true'
shenyu.apache.org/plugin-spring-cloud-app-name: springCloud-test
shenyu.apache.org/plugin-spring-cloud-path: /order/save
shenyu.apache.org/plugin-spring-cloud-rpc-type: springCloud
shenyu.apache.org/plugin-spring-cloud-service-name: org.apache.shenyu.examples.springcloud.controller.OrderController
shenyu.apache.org/plugin-spring-cloud-method-name: save
shenyu.apache.org/plugin-spring-cloud-params-type: org.apache.shenyu.examples.springcloud.dto.OrderDTO
spec:
selector:
app: shenyu-java-examples-springcloud-service
ports:
- port: 8884 # Assuming this is the Spring Cloud service port
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: shenyu-ingress
labels:
shenyu.apache.org/metadata-labels-1: spring-cloud-test
shenyu.apache.org/metadata-labels-2: spring-cloud-save
annotations:
kubernetes.io/ingress.class: shenyu
shenyu.apache.org/plugin-spring-cloud-enabled: 'true'
shenyu.apache.org/upstreams-protocol: http://,http://
name: demo-ingress
spec:
rules:
- http:
paths:
- backend:
service:
name: shenyu-java-examples-springcloud-service
port:
number: 8884
path: /**
pathType: ImplementationSpecific