-
Notifications
You must be signed in to change notification settings - Fork 293
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
I am trying to create an Internal HTTP Load Balancer (for https redirect purposes). Even though I have specifed a Target HTTP Proxy for the Forwarding Rule, I get this error:
Warning UpdateFailed 35s (x10 over 8m46s) computeforwardingrule-controller Update call failed: error applying desired state: summary: Error creating ForwardingRule: googleapi: Error 400: Invalid value for field 'resource.target': ''. No target or backend service specified for forwarding rule., invalid
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeForwardingRule
metadata:
name: https-redirect-foo
spec:
loadBalancingScheme: INTERNAL_MANAGED
ipAddress:
addressRef:
name: foo-ilb
target:
targetHTTPProxyRef:
name: https-redirect-proxy-foo # <-----------------------------
networkRef:
external: https://www.googleapis.com/compute/v1/projects/my-project/global/networks/default
location: us-central1
portRange: "80"
ipProtocol: "TCP"
ipVersion: "IPV4"
Additional Diagnostic Information
Kubernetes Cluster Version
Client Version: v1.22.4
Server Version: v1.21.5-gke.1302
Config Connector Version
1.71.0
Config Connector Mode
Deployed from the install-bundles/install-bundle-workload-identity/
directory in this repo.
Log Output
{"severity":"error","timestamp":"2022-01-21T16:44:49.937Z","logger":"computeforwardingrule-controller","msg":"error applying desired state","resource":{"namespace":"default","name":"https-redirect-foo"},"error":"summary: Error creating ForwardingRule: googleapi: Error 400: Invalid value for field 'resource.target': ''. No target or backend service specified for forwarding rule., invalid"}
Steps to Reproduce
Steps to reproduce the issue
Apply the yaml below replacing my-project
.
YAML snippets
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeBackendService
metadata:
name: https-redirect-empty-backend-foo
spec:
loadBalancingScheme: INTERNAL_MANAGED
location: us-central1
protocol: HTTP
logConfig:
enable: false
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeURLMap
metadata:
name: https-redirect-foo
spec:
location: us-central1
defaultService:
backendServiceRef:
name: https-redirect-empty-backend-foo
hostRule:
- hosts:
- "*"
pathMatcher: "all"
pathMatcher:
- name: "all"
defaultUrlRedirect:
hostRedirect: 10.128.0.33:443
pathRedirect: /
redirectResponseCode: PERMANENT_REDIRECT
httpsRedirect: true
stripQuery: false
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeTargetHTTPProxy
metadata:
name: https-redirect-proxy-foo
spec:
proxyBind: true
location: us-central1
urlMapRef:
name: https-redirect-foo
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeAddress
metadata:
name: foo-ilb
spec:
addressType: INTERNAL
location: us-central1
purpose: SHARED_LOADBALANCER_VIP
ipVersion: IPV4
subnetworkRef:
external: https://www.googleapis.com/compute/v1/projects/my-project/regions/us-central1/subnetworks/default
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeForwardingRule
metadata:
name: https-redirect-foo
spec:
loadBalancingScheme: INTERNAL_MANAGED
ipAddress:
addressRef:
name: foo-ilb
target:
targetHTTPProxyRef:
name: https-redirect-proxy-foo
networkRef:
external: https://www.googleapis.com/compute/v1/projects/my-project/global/networks/default
location: us-central1
portRange: "80"
ipProtocol: "TCP"
ipVersion: "IPV4"
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeForwardingRule
metadata:
name: https-redirect-foo
spec:
loadBalancingScheme: INTERNAL_MANAGED
ipAddress:
addressRef:
name: foo-ilb
target:
targetHTTPProxyRef:
name: https-redirect-proxy-foo # <------ This appears to not be recognized.
networkRef:
external: https://www.googleapis.com/compute/v1/projects/my-project/global/networks/default
location: us-central1
portRange: "80"
ipProtocol: "TCP"
ipVersion: "IPV4"
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working