Skip to content

Conversation

@jwierzbo
Copy link
Collaborator

No description provided.

@jwierzbo jwierzbo changed the title [Feature] Multi-arch image discovery [WiP] [Feature] Multi-arch image discovery Mar 14, 2022

// ArchitectureTypesInUse returns ArchitectureType list which is really used by the members
func (s DeploymentSpec) ArchitectureTypesInUse(membersStatuses DeploymentStatusMemberElements) (ArangoDeploymentArchitecture, error) {
var exists = struct{}{}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not bool?

}

if len(result) == 0 {
result = append(result, s.Architecture.GetDefault())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default should be always on list

// OldImage holds old image defails
OldImage *ImageInfo `json:"old-image,omitempty"`
// Architecture defines Image architecture type
Architecture ArangoDeploymentArchitectureType `json:"architecture,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use pointer

m.PodSpecVersion = template.PodSpecChecksum
m.ArangoVersion = m.Image.ArangoDBVersion
m.ImageID = m.Image.ImageID
m.ImageID = m.Image.ArchImageID[m.Architecture]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Panic expected

info.ArchImageID[arch] = imgID

// set ImageID for backward compatibility
if imgID, ok := info.ArchImageID[ArangoDeploymentArchitectureDefault]; ok {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default from spec, not from here

@jwierzbo
Copy link
Collaborator Author

Closing - here is the newer version of this PR: #930

@jwierzbo jwierzbo closed this Mar 17, 2022
@jwierzbo jwierzbo deleted the feature/image_discovery branch March 17, 2022 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants