Skip to content

Commit 68ce84e

Browse files
committed
Add Kconfig.image.generated to generate_cloud_configs.py
Teach "make cloud-config" and "make cloud-config-oci" to update the Kconfig.image menu with dynamically discovered information. This information is based on what resources are available to the user's tenancy and region subscription. This support is intended to work like the reference implementation under terraform/lambdalabs/ Signed-off-by: Chuck Lever <[email protected]>
1 parent 7066b47 commit 68ce84e

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ terraform/aws/kconfigs/Kconfig.instance.generated
122122
terraform/aws/kconfigs/Kconfig.location.generated
123123
terraform/aws/scripts/__pycache__/
124124

125+
terraform/oci/kconfigs/Kconfig.image.generated
125126
terraform/oci/kconfigs/Kconfig.location.generated
126127
terraform/oci/kconfigs/Kconfig.shape.generated
127128
terraform/oci/scripts/__pycache__/

scripts/dynamic-cloud-kconfig.Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ AWS_KCONFIGS := $(AWS_KCONFIG_AMI) $(AWS_KCONFIG_INSTANCE) $(AWS_KCONFIG_LOCATIO
2222

2323
# OCI dynamic configuration
2424
OCI_KCONFIG_DIR := terraform/oci/kconfigs
25+
OCI_KCONFIG_IMAGE := $(OCI_KCONFIG_DIR)/Kconfig.image.generated
2526
OCI_KCONFIG_LOCATION := $(OCI_KCONFIG_DIR)/Kconfig.location.generated
2627
OCI_KCONFIG_SHAPE := $(OCI_KCONFIG_DIR)/Kconfig.shape.generated
2728

28-
OCI_KCONFIGS := $(OCI_KCONFIG_LOCATION) $(OCI_KCONFIG_SHAPE)
29+
OCI_KCONFIGS := $(OCI_KCONFIG_IMAGE) $(OCI_KCONFIG_LOCATION) $(OCI_KCONFIG_SHAPE)
2930

3031
# Add generated files to mrproper clean list
3132
KDEVOPS_MRPROPER += $(LAMBDALABS_KCONFIGS) $(AWS_KCONFIGS) $(OCI_KCONFIGS)

scripts/generate_cloud_configs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def generate_oci_kconfig() -> bool:
159159

160160
# Define the script-to-output mapping
161161
scripts_to_run = [
162+
("gen_kconfig_image", "Kconfig.image.generated"),
162163
("gen_kconfig_location", "Kconfig.location.generated"),
163164
("gen_kconfig_shape", "Kconfig.shape.generated"),
164165
]

terraform/oci/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ menu "Compute"
1313
comment "Shape selection"
1414
source "terraform/oci/kconfigs/Kconfig.shape.generated"
1515
comment "OS image selection"
16-
source "terraform/oci/kconfigs/Kconfig.image"
16+
source "terraform/oci/kconfigs/Kconfig.image.generated"
1717
endmenu
1818
menu "Storage"
1919
source "terraform/oci/kconfigs/Kconfig.storage"

0 commit comments

Comments
 (0)