Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
16 changes: 16 additions & 0 deletions kinds/apis/v1beta1/config_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,15 @@ type Domains struct {
ReplicatedRegistryDomain string `json:"replicatedRegistryDomain,omitempty"`
}

// +kubebuilder:validation:Enum=aarch64;x86_64
// Architecture represents a supported CPU architecture identifier.
type Architecture string

const (
ArchitectureAarch64 Architecture = "aarch64"
ArchitectureX8664 Architecture = "x86_64"
Copy link
Member

Choose a reason for hiding this comment

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

since we're using amd64 all over the codebases, let's just stick with that name instead of X8664? this is a product facing change though, so @ajp-io might have a different opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@marccampbell weighed in early on to express that we should use x86_64 and aarch64 instead of amd64 and arm64

)

// ConfigSpec defines the desired state of Config
type ConfigSpec struct {
Version string `json:"version,omitempty"`
Expand All @@ -160,6 +169,13 @@ type ConfigSpec struct {
UnsupportedOverrides UnsupportedOverrides `json:"unsupportedOverrides,omitempty"`
Extensions Extensions `json:"extensions,omitempty"`
Domains Domains `json:"domains,omitempty"`
// Architecture holds the list of CPU architectures supported by this release.
// If omitted, x86_64 is assumed for backward compatibility.
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MinItems=1
// +kubebuilder:validation:MaxItems=2
// +listType=set
Architecture []Architecture `json:"architecture,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

should the EC lint command be updated? i can easily see users misspelling this :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For sure, I can expand the EC lint command to cover this new field and make sure if anything is included with architecture, its either aarch64/amd64 or x86_64/amd64

}

// OverrideForBuiltIn returns the override for the built-in extension with the
Expand Down
5 changes: 5 additions & 0 deletions kinds/apis/v1beta1/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ spec:
spec:
description: ConfigSpec defines the desired state of Config
properties:
architecture:
description: |-
Architecture holds the list of CPU architectures supported by this release.
If omitted, x86_64 is assumed for backward compatibility.
items:
description: Architecture represents a supported CPU architecture
identifier.
enum:
- aarch64
- x86_64
type: string
maxItems: 2
minItems: 1
type: array
x-kubernetes-list-type: set
binaryOverrideUrl:
type: string
domains:
Expand Down Expand Up @@ -362,6 +377,21 @@ spec:
config:
description: Config holds the configuration used at installation time.
properties:
architecture:
description: |-
Architecture holds the list of CPU architectures supported by this release.
If omitted, x86_64 is assumed for backward compatibility.
items:
description: Architecture represents a supported CPU architecture
identifier.
enum:
- aarch64
- x86_64
type: string
maxItems: 2
minItems: 1
type: array
x-kubernetes-list-type: set
binaryOverrideUrl:
type: string
domains:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@ spec:
spec:
description: ConfigSpec defines the desired state of Config
properties:
architecture:
description: |-
Architecture holds the list of CPU architectures supported by this release.
If omitted, x86_64 is assumed for backward compatibility.
items:
description: Architecture represents a supported CPU architecture
identifier.
enum:
- aarch64
- x86_64
type: string
maxItems: 2
minItems: 1
type: array
x-kubernetes-list-type: set
binaryOverrideUrl:
type: string
domains:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,21 @@ spec:
config:
description: Config holds the configuration used at installation time.
properties:
architecture:
description: |-
Architecture holds the list of CPU architectures supported by this release.
If omitted, x86_64 is assumed for backward compatibility.
items:
description: Architecture represents a supported CPU architecture
identifier.
enum:
- aarch64
- x86_64
type: string
maxItems: 2
minItems: 1
type: array
uniqueItems: true
binaryOverrideUrl:
type: string
domains:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ spec:
config:
description: Config holds the configuration used at installation time.
properties:
architecture:
description: |-
Architecture holds the list of CPU architectures supported by this release.
If omitted, x86_64 is assumed for backward compatibility.
items:
description: Architecture represents a supported CPU architecture
identifier.
enum:
- aarch64
- x86_64
type: string
maxItems: 2
minItems: 1
type: array
uniqueItems: true
binaryOverrideUrl:
type: string
domains:
Expand Down
15 changes: 15 additions & 0 deletions operator/schemas/config-embeddedcluster-v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@
"description": "ConfigSpec defines the desired state of Config",
"type": "object",
"properties": {
"architecture": {
"description": "Architecture holds the list of CPU architectures supported by this release.\nIf omitted, x86_64 is assumed for backward compatibility.",
"type": "array",
"maxItems": 2,
"minItems": 1,
"uniqueItems": true,
"items": {
"description": "Architecture represents a supported CPU architecture identifier.",
"type": "string",
"enum": [
"aarch64",
"x86_64"
]
}
},
"binaryOverrideUrl": {
"type": "string"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@
"description": "Config holds the configuration used at installation time.",
"type": "object",
"properties": {
"architecture": {
"description": "Architecture holds the list of CPU architectures supported by this release.\nIf omitted, x86_64 is assumed for backward compatibility.",
"type": "array",
"maxItems": 2,
"minItems": 1,
"uniqueItems": true,
"items": {
"description": "Architecture represents a supported CPU architecture identifier.",
"type": "string",
"enum": [
"aarch64",
"x86_64"
]
}
},
"binaryOverrideUrl": {
"type": "string"
},
Expand Down
30 changes: 30 additions & 0 deletions pkg/crds/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@ spec:
spec:
description: ConfigSpec defines the desired state of Config
properties:
architecture:
description: |-
Architecture holds the list of CPU architectures supported by this release.
If omitted, x86_64 is assumed for backward compatibility.
items:
description: Architecture represents a supported CPU architecture
identifier.
enum:
- aarch64
- x86_64
type: string
maxItems: 2
minItems: 1
type: array
x-kubernetes-list-type: set
binaryOverrideUrl:
type: string
domains:
Expand Down Expand Up @@ -362,6 +377,21 @@ spec:
config:
description: Config holds the configuration used at installation time.
properties:
architecture:
description: |-
Architecture holds the list of CPU architectures supported by this release.
If omitted, x86_64 is assumed for backward compatibility.
items:
description: Architecture represents a supported CPU architecture
identifier.
enum:
- aarch64
- x86_64
type: string
maxItems: 2
minItems: 1
type: array
x-kubernetes-list-type: set
binaryOverrideUrl:
type: string
domains:
Expand Down
Loading