Skip to content

Commit

Permalink
Chore: change CBWP 'Ip' to 'IP'
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenma committed Jun 16, 2024
1 parent 03645e9 commit e22ad86
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions apis/cloudbuild/v1alpha1/conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func Convert_NetworkConfig_API_v1_To_KRM(in *cloudbuildpb.PrivatePoolV1Config_Ne
}

out.PeeredNetwork = in.PeeredNetwork
out.PeeredNetworkIpRange = in.PeeredNetworkIpRange
out.PeeredNetworkIPRange = in.PeeredNetworkIpRange
return nil
}

Expand Down Expand Up @@ -119,7 +119,7 @@ func Convert_PrivatePoolV1Config_NetworkConfig_KRM_To_API_v1(in *NetworkConfig,
return nil
}
obj := in.DeepCopy()
out.PeeredNetworkIpRange = obj.PeeredNetworkIpRange
out.PeeredNetworkIpRange = obj.PeeredNetworkIPRange

// custom
switch obj.EgressOption {
Expand Down
4 changes: 2 additions & 2 deletions apis/cloudbuild/v1alpha1/workerpool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type NetworkConfig struct {
// +optional
EgressOption string `json:"egressOption,omitempty"`
// +optional
PeeredNetworkIpRange string `json:"peeredNetworkIpRange,omitempty"`
PeeredNetworkIPRange string `json:"PeeredNetworkIPRange,omitempty"`
}

// CloudBuildWorkerPoolStatus defines the observed state of Instance
Expand Down Expand Up @@ -96,7 +96,7 @@ type NetworkConfigState struct {
// +optional
EgressOption string `json:"egressOption,omitempty"`
// +optional
PeeredNetworkIpRange string `json:"peeredNetworkIpRange,omitempty"`
PeeredNetworkIPRange string `json:"peeredNetworkIPRange,omitempty"`
}

// +kubebuilder:metadata:labels="cnrm.cloud.google.com/managed-by-kcc=true";"cnrm.cloud.google.com/stability-level=beta"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ spec:
properties:
networkConfig:
properties:
egressOption:
PeeredNetworkIPRange:
type: string
peeredNetworkIpRange:
egressOption:
type: string
peeredNetworkRef:
oneOf:
Expand Down Expand Up @@ -186,7 +186,7 @@ spec:
type: string
peeredNetwork:
type: string
peeredNetworkIpRange:
peeredNetworkIPRange:
type: string
type: object
updateTime:
Expand Down

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

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

2 changes: 1 addition & 1 deletion pkg/controller/direct/cloudbuild/workerpool_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (a *Adapter) Update(ctx context.Context, u *unstructured.Unstructured) erro
updateMask.Paths = append(updateMask.Paths, "private_pool_v1_config.network_config.egress_option")
}
}
expectedIPRange := desiredConfig.NetworkConfig.PeeredNetworkIpRange
expectedIPRange := desiredConfig.NetworkConfig.PeeredNetworkIPRange
if expectedIPRange != "" && !reflect.DeepEqual(expectedIPRange, actualConfig.NetworkConfig.PeeredNetworkIpRange) {
updateMask.Paths = append(updateMask.Paths, "private_pool_v1_config.network_config.peered_network_ip_range")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ spec:
location: us-central1
privatePoolV1Config:
networkConfig:
PeeredNetworkIPRange: /29
egressOption: NO_PUBLIC_EGRESS
peeredNetworkIpRange: /29
peeredNetworkRef:
external: projects/${projectId}/global/networks/computenetwork-${uniqueId}
workerConfig:
Expand All @@ -36,7 +36,7 @@ status:
networkConfig:
egressOption: NO_PUBLIC_EGRESS
peeredNetwork: projects/${projectId}/global/networks/computenetwork-${uniqueId}
peeredNetworkIpRange: /29
peeredNetworkIPRange: /29
updateTime: "1970-01-01T00:00:00Z"
workerConfig:
diskSizeGb: 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ spec:
peeredNetworkRef:
external: projects/${projectId}/global/networks/computenetwork-${uniqueId}
egressOption: NO_PUBLIC_EGRESS
peeredNetworkIpRange: /29
PeeredNetworkIPRange: /29

Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ spec:
peeredNetworkRef:
external: projects/${projectId}/global/networks/computenetwork-${uniqueId}
egressOption: NO_PUBLIC_EGRESS
peeredNetworkIpRange: /29
PeeredNetworkIPRange: /29

0 comments on commit e22ad86

Please sign in to comment.