Skip to content

Commit

Permalink
OCPBUGS-43674: ABI cluster installation fails for external OCI platform
Browse files Browse the repository at this point in the history
Correctly maps agentClusterInstall with cloudControllerManager value
Updated integrations tests
  • Loading branch information
pawanpinjarkar committed Oct 24, 2024
1 parent 694d083 commit cf33a4d
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ exists $WORK/boot-artifacts/agent.x86_64-rootfs.img
exists $WORK/auth/kubeconfig
exists $WORK/auth/kubeadmin-password

isocmp agent.x86_64.iso /etc/assisted/manifests/agent-cluster-install.yaml expected/agent-cluster-install.yaml

-- install-config.yaml --
apiVersion: v1
baseDomain: test.metalkube.org
Expand Down Expand Up @@ -45,3 +47,41 @@ metadata:
namespace: cluster0
rendezvousIP: 192.168.111.20
bootArtifactsBaseURL: http://user-specified-infra.com

-- expected/agent-cluster-install.yaml --
apiVersion: extensions.hive.openshift.io/v1beta1
kind: AgentClusterInstall
metadata:
annotations:
agent-install.openshift.io/install-config-overrides: '{"platform":{"external":{"platformName":"oci","cloudControllerManager":"External"}}}'
creationTimestamp: null
name: ostest
namespace: cluster0
spec:
clusterDeploymentRef:
name: ostest
external:
cloudControllerManager: External
platformName: oci
imageSetRef:
name: openshift-was not built correctly
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 192.168.111.0/24
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
userManagedNetworking: true
platformType: External
provisionRequirements:
controlPlaneAgents: 3
sshPublicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDK6UTEydcEKzuNdPaofn8Z2DwgHqdcionLZBiPf/zIRNco++etLsat7Avv7yt04DINQd5zjxIFgG8jblaUB5E5C9ClUcMwb52GO0ay2Y9v1uBv1a4WhI3peKktAzYNk0EBMQlJtXPjRMrC9ylBPh+DsBHMu+KmDnfk7PIwyN4efC8k5kSRuPWoNdme1rz2+umU8FSmaWTHIajrbspf4GQbsntA5kuKEtDbfoNCU97o2KrRnUbeg3a8hwSjfh3u6MhlnGcg5K2Ij+zivEsWGCLKYUtE1ErqwfIzwWmJ6jnV66XCQGHf4Q1iIxqF7s2a1q24cgG2Z/iDXfqXrCIfy4P7b/Ztak3bdT9jfAdVZtdO5/r7I+O5hYhF86ayFlDWzZWP/ByiSb+q4CQbfVgK3BMmiAv2MqLHdhesmD/SmIcoOWUF6rFmRKZVFFpKpt5ATNTgUJ3JRowoXrrDruVXClUGRiCS6Zabd1rZ3VmTchaPJwtzQMdfIWISXj+Ig+C4UK0=
status:
debugInfo:
eventsURL: ""
logsURL: ""
progress:
totalPercentage: 0
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ exists $WORK/agent.x86_64.iso
exists $WORK/auth/kubeconfig
exists $WORK/auth/kubeadmin-password

isocmp agent.x86_64.iso /etc/assisted/manifests/agent-cluster-install.yaml expected/agent-cluster-install.yaml

-- install-config.yaml --
apiVersion: v1
baseDomain: test.metalkube.org
Expand Down Expand Up @@ -43,3 +45,41 @@ metadata:
name: ostest
namespace: cluster0
rendezvousIP: 192.168.111.20

-- expected/agent-cluster-install.yaml --
apiVersion: extensions.hive.openshift.io/v1beta1
kind: AgentClusterInstall
metadata:
annotations:
agent-install.openshift.io/install-config-overrides: '{"platform":{"external":{"platformName":"oci","cloudControllerManager":"External"}}}'
creationTimestamp: null
name: ostest
namespace: cluster0
spec:
clusterDeploymentRef:
name: ostest
external:
cloudControllerManager: External
platformName: oci
imageSetRef:
name: openshift-was not built correctly
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 192.168.111.0/24
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
userManagedNetworking: true
platformType: External
provisionRequirements:
controlPlaneAgents: 3
sshPublicKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDK6UTEydcEKzuNdPaofn8Z2DwgHqdcionLZBiPf/zIRNco++etLsat7Avv7yt04DINQd5zjxIFgG8jblaUB5E5C9ClUcMwb52GO0ay2Y9v1uBv1a4WhI3peKktAzYNk0EBMQlJtXPjRMrC9ylBPh+DsBHMu+KmDnfk7PIwyN4efC8k5kSRuPWoNdme1rz2+umU8FSmaWTHIajrbspf4GQbsntA5kuKEtDbfoNCU97o2KrRnUbeg3a8hwSjfh3u6MhlnGcg5K2Ij+zivEsWGCLKYUtE1ErqwfIzwWmJ6jnV66XCQGHf4Q1iIxqF7s2a1q24cgG2Z/iDXfqXrCIfy4P7b/Ztak3bdT9jfAdVZtdO5/r7I+O5hYhF86ayFlDWzZWP/ByiSb+q4CQbfVgK3BMmiAv2MqLHdhesmD/SmIcoOWUF6rFmRKZVFFpKpt5ATNTgUJ3JRowoXrrDruVXClUGRiCS6Zabd1rZ3VmTchaPJwtzQMdfIWISXj+Ig+C4UK0=
status:
debugInfo:
eventsURL: ""
logsURL: ""
progress:
totalPercentage: 0
1 change: 1 addition & 0 deletions pkg/asset/agent/manifests/agentclusterinstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ func (a *AgentClusterInstall) Generate(_ context.Context, dependencies asset.Par
if agentClusterInstall.Spec.PlatformType == hiveext.ExternalPlatformType {
agentClusterInstall.Spec.ExternalPlatformSpec = &hiveext.ExternalPlatformSpec{
PlatformName: installConfig.Config.Platform.External.PlatformName,
CloudControllerManager: external.CloudControllerManagerTypeExternal,
}
}

Expand Down

0 comments on commit cf33a4d

Please sign in to comment.