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 Dec 11, 2024
1 parent dee215a commit 03699a2
Show file tree
Hide file tree
Showing 34 changed files with 94 additions and 3,630 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
name: computebackendservice-2-${uniqueId}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright 2022 Google LLC
# Copyright 2024 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,20 +13,16 @@
# limitations under the License.

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeForwardingRule
kind: ComputeBackendService
metadata:
labels:
label-one: "value-two"
name: computeglobalforwardingrule-${uniqueId}
name: computetargettcpproxy-dep
spec:
description: "A global forwarding rule"
location: global
target:
targetTCPProxyRef:
name: computetargettcpproxy2-${uniqueId}
portRange: "110"
ipProtocol: "TCP"
loadBalancingScheme: EXTERNAL
ipAddress:
addressRef:
name: computeaddress-${uniqueId}
healthChecks:
- healthCheckRef:
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 2024 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 2024 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 @@ -46,7 +46,6 @@ kind: ComputeTargetTCPProxy
metadata:
annotations:
cnrm.cloud.google.com/project-id: ${projectId}
alpha.cnrm.cloud.google.com/reconciler: "direct"
name: computetargettcpproxy-${uniqueId}
spec:
description: "test description"
Expand All @@ -59,7 +58,6 @@ kind: ComputeTargetTCPProxy
metadata:
annotations:
cnrm.cloud.google.com/project-id: ${projectId}
alpha.cnrm.cloud.google.com/reconciler: "direct"
name: computetargettcpproxy2-${uniqueId}
spec:
description: "other test description"
Expand Down

This file was deleted.

Loading

0 comments on commit 03699a2

Please sign in to comment.