Skip to content

Commit

Permalink
GCP: Update test code for rendering Machine configs
Browse files Browse the repository at this point in the history
Added tests to accomodate GCP in-cluster DNS config
  • Loading branch information
sadasu committed Jan 27, 2025
1 parent 5dde91f commit 91d44ca
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controller/template/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ var (
"nutanix": "./test_data/controller_config_nutanix.yaml",
"network-forwarding-sdn": "./test_data/controller_config_forwarding_sdn.yaml",
"network-forwarding-ovn": "./test_data/controller_config_forwarding_ovn.yaml",
"gcp-custom-dns": "./test_data/controller_config_gcp_custom_dns.yaml",
"gcp-platform-default": "./test_data/controller_config_gcp_platform_default.yaml",
}
)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: "machineconfigurations.openshift.io/v1"
kind: "ControllerConfig"
spec:
clusterDNSIP: "10.3.0.10"
cloudProviderConfig: ""
etcdInitialCount: 3
etcdCAData: ZHVtbXkgZXRjZC1jYQo=
rootCAData: ZHVtbXkgcm9vdC1jYQo=
pullSecret:
data: ZHVtbXkgZXRjZC1jYQo=
images:
etcd: image/etcd:1
setupEtcdEnv: image/setupEtcdEnv:1
infraImage: image/infraImage:1
kubeClientAgentImage: image/kubeClientAgentImage:1
infra:
apiVersion: config.openshift.io/v1
kind: Infrastructure
status:
apiServerInternalURI: https://api-int.my-test-cluster.installer.team.coreos.systems:6443
apiServerURL: https://api.my-test-cluster.installer.team.coreos.systems:6443
etcdDiscoveryDomain: my-test-cluster.installer.team.coreos.systems
infrastructureName: my-test-cluster
platformStatus:
type: "GCP"
gcp:
cloudLoadBalancerConfig:
dnsType: "ClusterHosted"
clusterHosted:
apiLoadBalancerIPs:
- 20.20.20.20
apiIntLoadBalancerIPs:
- 10.10.10.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: "machineconfigurations.openshift.io/v1"
kind: "ControllerConfig"
spec:
clusterDNSIP: "10.3.0.10"
cloudProviderConfig: ""
etcdInitialCount: 3
etcdCAData: ZHVtbXkgZXRjZC1jYQo=
rootCAData: ZHVtbXkgcm9vdC1jYQo=
pullSecret:
data: ZHVtbXkgZXRjZC1jYQo=
images:
etcd: image/etcd:1
setupEtcdEnv: image/setupEtcdEnv:1
infraImage: image/infraImage:1
kubeClientAgentImage: image/kubeClientAgentImage:1
infra:
apiVersion: config.openshift.io/v1
kind: Infrastructure
status:
apiServerInternalURI: https://api-int.my-test-cluster.installer.team.coreos.systems:6443
apiServerURL: https://api.my-test-cluster.installer.team.coreos.systems:6443
etcdDiscoveryDomain: my-test-cluster.installer.team.coreos.systems
infrastructureName: my-test-cluster
platformStatus:
type: "GCP"
gcp:
cloudLoadBalancerConfig:
dnsType: "PlatformDefault"

0 comments on commit 91d44ca

Please sign in to comment.