Skip to content

Commit

Permalink
Add ci jsonschema patch for ssh-authorized-keys
Browse files Browse the repository at this point in the history
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
  • Loading branch information
afbjorklund committed Apr 9, 2024
1 parent 2d45b03 commit b860d26
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/cidata/schemas/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 16 additions & 0 deletions pkg/cidata/schemas/schema-cloud-config-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
27 changes: 27 additions & 0 deletions pkg/cidata/schemas/ssh-authorized-keys.patch
Original file line number Diff line number Diff line change
@@ -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",

0 comments on commit b860d26

Please sign in to comment.