Merge pull request #637 from a-bouts/fix-gzip-cloud-init

Allow using Gzip and GzipBase64 encoding in case of cloud-init format
This commit is contained in:
Danil Grigorev 2025-04-29 09:55:38 +00:00 committed by GitHub
commit 0594e60a01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 10 deletions

View File

@ -186,17 +186,17 @@ func (s *RKE2ConfigSpec) validateIgnition(pathPrefix *field.Path) field.ErrorLis
), ),
) )
} }
}
for i, file := range s.Files { for i, file := range s.Files {
if file.Encoding == Gzip || file.Encoding == GzipBase64 { if file.Encoding == Gzip || file.Encoding == GzipBase64 {
allErrs = append( allErrs = append(
allErrs, allErrs,
field.Forbidden( field.Forbidden(
pathPrefix.Child("files").Index(i).Child("encoding"), pathPrefix.Child("files").Index(i).Child("encoding"),
cannotUseWithIgnition, cannotUseWithIgnition,
), ),
) )
}
} }
} }