diff --git a/pkg/cidata/schemas/Makefile b/pkg/cidata/schemas/Makefile index ebaec7727c8..7807fb8e9fd 100644 --- a/pkg/cidata/schemas/Makefile +++ b/pkg/cidata/schemas/Makefile @@ -5,3 +5,4 @@ all: versions.schema.cloud-config.json schema-cloud-config-v1.json %.json: curl -fsSLO https://raw.githubusercontent.com/canonical/cloud-init/$(CLOUD_INIT_VERSION)/cloudinit/config/schemas/$@ + if [ "$@" = "schema-cloud-config-v1.json" ]; then patch -N $@ ssh-authorized-keys.patch; fi diff --git a/pkg/cidata/schemas/schema-cloud-config-v1.json b/pkg/cidata/schemas/schema-cloud-config-v1.json index ff61dcaa60b..5b900b0d1a3 100644 --- a/pkg/cidata/schemas/schema-cloud-config-v1.json +++ b/pkg/cidata/schemas/schema-cloud-config-v1.json @@ -361,6 +361,22 @@ }, "minItems": 1 }, + "ssh-authorized-keys": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + { + "deprecated": true, + "deprecated_version": "18.3", + "deprecated_description": "Use ``ssh_authorized_keys`` instead." + } + ] + }, "ssh_import_id": { "description": "List of ssh ids to import for user. Can not be combined with ``ssh_redirect_user``. See the man page[1] for more details. [1] https://manpages.ubuntu.com/manpages/noble/en/man1/ssh-import-id.1.html", "type": "array", diff --git a/pkg/cidata/schemas/ssh-authorized-keys.patch b/pkg/cidata/schemas/ssh-authorized-keys.patch new file mode 100644 index 00000000000..8d1afd244c8 --- /dev/null +++ b/pkg/cidata/schemas/ssh-authorized-keys.patch @@ -0,0 +1,27 @@ +diff --git a/cloudinit/config/schemas/schema-cloud-config-v1.json b/cloudinit/config/schemas/schema-cloud-config-v1.json +index ff61dcaa6..73e54ebaf 100644 +--- a/cloudinit/config/schemas/schema-cloud-config-v1.json ++++ b/cloudinit/config/schemas/schema-cloud-config-v1.json +@@ -361,6 +361,22 @@ + }, + "minItems": 1 + }, ++ "ssh-authorized-keys": { ++ "allOf": [ ++ { ++ "type": "array", ++ "items": { ++ "type": "string" ++ }, ++ "minItems": 1 ++ }, ++ { ++ "deprecated": true, ++ "deprecated_version": "18.3", ++ "deprecated_description": "Use ``ssh_authorized_keys`` instead." ++ } ++ ] ++ }, + "ssh_import_id": { + "description": "List of ssh ids to import for user. Can not be combined with ``ssh_redirect_user``. See the man page[1] for more details. [1] https://manpages.ubuntu.com/manpages/noble/en/man1/ssh-import-id.1.html", + "type": "array",