Skip to content

Commit

Permalink
turn on ComputeTCPProxy direct controller
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmahou committed Nov 20, 2024
1 parent 603f8c8 commit 7121574
Show file tree
Hide file tree
Showing 29 changed files with 92 additions and 1,367 deletions.
2 changes: 1 addition & 1 deletion apis/compute/v1beta1/targettcpproxy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type ComputeTargetTCPProxyObservedState struct {
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:resource:categories=gcp,shortName=gcpcomputetargettcpproxy;gcpcomputetargettcpproxies
// +kubebuilder:subresource:status
// +kubebuilder:metadata:labels="cnrm.cloud.google.com/tf2crd=true";"cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true"
// +kubebuilder:metadata:labels="cnrm.cloud.google.com/stability-level=stable";"cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/system=true"
// +kubebuilder:printcolumn:name="Age",JSONPath=".metadata.creationTimestamp",type="date"
// +kubebuilder:printcolumn:name="Ready",JSONPath=".status.conditions[?(@.type=='Ready')].status",type="string",description="When 'True', the most recent reconcile of the resource succeeded"
// +kubebuilder:printcolumn:name="Status",JSONPath=".status.conditions[?(@.type=='Ready')].reason",type="string",description="The reason for the value in 'Ready'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ metadata:
cnrm.cloud.google.com/managed-by-kcc: "true"
cnrm.cloud.google.com/stability-level: stable
cnrm.cloud.google.com/system: "true"
cnrm.cloud.google.com/tf2crd: "true"
name: computetargettcpproxies.compute.cnrm.cloud.google.com
spec:
group: compute.cnrm.cloud.google.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ kind: ComputeTargetTCPProxy
metadata:
name: computetargettcpproxy-sample
spec:
description: "A sample TCP proxy."
description: "A sample global TCP proxy."
backendServiceRef:
name: computetargettcpproxy-dep
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
# Copyright 2022 Google LLC
# Copyright 2020 Google LLC
#
# Licensed 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
# 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: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeHealthCheck
metadata:
name: computehealthcheck-${uniqueId}
spec:
checkIntervalSec: 10
tcpHealthCheck:
port: 443
location: global
---
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeBackendService
metadata:
name: computebackendservice-${uniqueId}
name: computetargettcpproxy-dep
spec:
healthChecks:
- healthCheckRef:
name: computehealthcheck-${uniqueId}
location: global
name: computetargettcpproxy-dep
location: europe-west4
protocol: TCP

# Default loadBalancingScheme for regional backend service is INTERNAL
# Set to INTERNAL_MANAGED when being referenced by Regional Target TCP Proxy
# googleapi error: Regional Target TCP Proxy cannot be used with BackendServices with schema INTERNAL
loadBalancingScheme: INTERNAL_MANAGED
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 2022 Google LLC
# Copyright 2020 Google LLC
#
# Licensed 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
# 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,
Expand All @@ -13,11 +13,11 @@
# limitations under the License.

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeTargetTCPProxy
kind: ComputeHealthCheck
metadata:
annotations:
cnrm.cloud.google.com/project-id: ${projectId}
name: computetargettcpproxy-${uniqueId}
name: computetargettcpproxy-dep
spec:
backendServiceRef:
name: computebackendservice-${uniqueId}
checkIntervalSec: 10
tcpHealthCheck:
port: 443
location: europe-west4
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 2022 Google LLC
# Copyright 2020 Google LLC
#
# Licensed 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
# 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,
Expand All @@ -15,12 +15,11 @@
apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeTargetTCPProxy
metadata:
annotations:
cnrm.cloud.google.com/project-id: ${projectId}
name: computetargettcpproxy-${uniqueId}
name: computetargettcpproxy-sample
spec:
description: "test target tcp proxy"
description: "A sample regional TCP proxy."
backendServiceRef:
name: computebackendservice-${uniqueId}
name: computetargettcpproxy-dep
proxyBind: false
proxyHeader: NONE
location: europe-west4

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pkg/gvks/supportedgvks/gvks_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/snippet/snippetgeneration/snippetgeneration.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ var preferredSampleForResource = map[string]string{
"computesslcertificate": "global-compute-ssl-certificate",
"computesslpolicy": "modern-tls-1-1-ssl-policy",
"computetargethttpsproxy": "target-https-proxy-with-ssl-certificates",
"computetargettcpproxy": "global-target-tcp-proxy",
"computeurlmap": "global-compute-url-map",
"configcontrollerinstance": "autopilot-config-controller-instance",
"containerattachedcluster": "container-attached-cluster-basic",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeTargetTCPProxy
metadata:
annotations:
alpha.cnrm.cloud.google.com/reconciler: direct
cnrm.cloud.google.com/management-conflict-prevention-policy: none
cnrm.cloud.google.com/project-id: ${projectId}
finalizers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ kind: ComputeTargetTCPProxy
metadata:
annotations:
cnrm.cloud.google.com/project-id: ${projectId}
alpha.cnrm.cloud.google.com/reconciler: "direct"
name: computetargettcpproxy-${uniqueId}
spec:
backendServiceRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ kind: ComputeTargetTCPProxy
metadata:
annotations:
cnrm.cloud.google.com/project-id: ${projectId}
alpha.cnrm.cloud.google.com/reconciler: "direct"
name: computetargettcpproxy-${uniqueId}
spec:
backendServiceRef:
Expand Down

This file was deleted.

Loading

0 comments on commit 7121574

Please sign in to comment.