-
Notifications
You must be signed in to change notification settings - Fork 71
Description
We've upgraded the Controller from v0.0.15 to v0.0.16 and now one of the Lattice Services the Controller manages has an extraneous Rule not described in any K8S resources. I think what's happening is that the naming conventions of the resources created by the Controller changed and it doesn't recognize the rules its former self-created before the upgrade. Regardless of the mechanism, the issue is that the v0.0.16 Controller does not ensure that the Lattice resources correspond to their K8S resource counterparts.
The first rule (Priority 1) below is the extraneous rule -- nowhere to be found in the K8S resources for this Lattice Service. The resulting service does not work because the Lattice Target Groupk8s-traffic-exemplar-traffic-exemplar is no longer even managed by the Controller and thus contains stale IPs.
Listener: traffic-exemplar-traffic-exemplar-4433-https
Routing:
- k8s-1693522631-rule-1:
- Condition: Path (Prefix): / (case sensitive)
- Action: Forward to k8s-traffic-exemplar-traffic-exemplar: 1 (100%)
- Priority: 1
- k8s-1693522637-rule-1:
- Condition: Header (Exact): target-group-type Value: staging-health-aws (case insensitive), Path (Prefix): / (case sensitive)
- Action: Forward to k8s-traffic-exemplar-health-aws-traffic-exemplar-https-http2: 1 (100%)
- Priority: 3
- k8s-1693522633-rule-1:
- Condition: Path (Prefix): / (case sensitive)
- Action: Forward to k8s-traffic-exemplar-traffic-exemplar-https-http2 : 1 (100%)
- Priority: 2
K8S Services:
apiVersion: v1
kind: Service
metadata:
name: traffic-exemplar
namespace: traffic-exemplar
spec:
clusterIP: None
ports:
- port: 4433
protocol: TCP
targetPort: 4433
selector:
app: traffic-exemplar
envoy-target-group-type: staging
---
apiVersion: v1
kind: Service
metadata:
name: traffic-exemplar-health-aws
namespace: traffic-exemplar
spec:
clusterIP: None
ports:
- port: 4433
protocol: TCP
targetPort: 4433
selector:
app: traffic-exemplar
envoy-target-group-type: staging-health-awsK8S HTTPRoutes:
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: traffic-exemplar
namespace: traffic-exemplar
spec:
parentRefs:
- name: square
namespace: lattice
sectionName: http
- name: square
namespace: lattice
sectionName: https
rules:
- backendRefs:
- kind: Service
name: traffic-exemplar-health-aws
port: 8080
weight: 1
matches:
- headers:
- name: target-group-type
type: Exact
value: development-health-aws
path:
type: PathPrefix
value: /
- backendRefs:
- kind: Service
name: traffic-exemplar
port: 8080
weight: 1
matches:
- path:
type: PathPrefix
value: /K8S TargetGroupPolicies
apiVersion: application-networking.k8s.aws/v1alpha1
kind: TargetGroupPolicy
metadata:
name: traffic-exemplar
namespace: traffic-exemplar
spec:
targetRef:
group: ""
kind: Service
name: traffic-exemplar
protocol: HTTPS
protocolVersion: HTTP2
healthCheck:
enabled: true
intervalSeconds: 10
timeoutSeconds: 5
healthyThresholdCount: 3
unhealthyThresholdCount: 2
path: "/_status"
protocolVersion: HTTP2
statusMatch: "200,403"
---
apiVersion: application-networking.k8s.aws/v1alpha1
kind: TargetGroupPolicy
metadata:
name: traffic-exemplar-health-aws
namespace: traffic-exemplar
spec:
targetRef:
group: ""
kind: Service
name: traffic-exemplar-health-aws
protocol: HTTPS
protocolVersion: HTTP2
healthCheck:
enabled: true
intervalSeconds: 10
timeoutSeconds: 5
healthyThresholdCount: 3
unhealthyThresholdCount: 2
path: "/_status"
protocolVersion: HTTP2
statusMatch: "200,403"