Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-43972: OCPBUGS-43674: ABI cluster installation fails for external OCI platform #9141

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 3 additions & 0 deletions pkg/asset/agent/manifests/agentclusterinstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ func (a *AgentClusterInstall) Generate(_ context.Context, dependencies asset.Par
PlatformName: installConfig.Config.Platform.External.PlatformName,
}
}
if installConfig.Config.Platform.Name() == external.Name && installConfig.Config.Platform.External.PlatformName == agent.ExternalPlatformNameOci {
agentClusterInstall.Spec.ExternalPlatformSpec.CloudControllerManager = external.CloudControllerManagerTypeExternal
}

if installConfig.Config.Platform.Name() == none.Name || installConfig.Config.Platform.Name() == external.Name {
logrus.Debugf("Setting UserManagedNetworking to true for %s platform", installConfig.Config.Platform.Name())
Expand Down
3 changes: 2 additions & 1 deletion pkg/asset/agent/manifests/agentclusterinstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ func TestAgentClusterInstall_Generate(t *testing.T) {
goodExternalOCIPlatformACI.Spec.Networking.UserManagedNetworking = &val
goodExternalOCIPlatformACI.Spec.PlatformType = hiveext.ExternalPlatformType
goodExternalOCIPlatformACI.Spec.ExternalPlatformSpec = &hiveext.ExternalPlatformSpec{
PlatformName: agent.ExternalPlatformNameOci,
PlatformName: agent.ExternalPlatformNameOci,
CloudControllerManager: externaltype.CloudControllerManagerTypeExternal,
}
goodExternalOCIPlatformACI.SetAnnotations(map[string]string{
installConfigOverrides: `{"platform":{"external":{"platformName":"oci","cloudControllerManager":"External"}}}`,
Expand Down