diff --git a/k8s/cilium-policy.yaml b/k8s/cilium-policy.yaml new file mode 100644 index 0000000..34c7cf2 --- /dev/null +++ b/k8s/cilium-policy.yaml @@ -0,0 +1,19 @@ +apiVersion: cilium.io/v2 +kind: CiliumNetworkPolicy +metadata: + name: gate-web-l7 + namespace: rtz-gate-demo +spec: + endpointSelector: + matchLabels: {app: gate-web} + ingress: + - fromEndpoints: + - matchLabels: {"k8s:io.kubernetes.pod.namespace": rtz-gate-demo} + toPorts: + - ports: + - port: "8080" + protocol: TCP + rules: + http: + - {method: GET, path: "/.*"} + diff --git a/k8s/service.yaml b/k8s/service.yaml index 7fc4107..8236dc7 100644 --- a/k8s/service.yaml +++ b/k8s/service.yaml @@ -3,6 +3,8 @@ kind: Service metadata: name: gate-web namespace: rtz-gate-demo + annotations: + service.cilium.io/lb-algorithm: roundrobin spec: type: ClusterIP selector: {app: gate-web}