From 74a6cc78711065a7893fd99f8e9ef063e6661aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Thu, 14 Sep 2023 15:00:26 +0200 Subject: [PATCH] openshift/v4.14: Stabilize 4.14 spec --- config/config.go | 4 ++-- .../{v4_14_exp => v4_14}/result/schema.go | 0 .../openshift/{v4_14_exp => v4_14}/schema.go | 2 +- .../{v4_14_exp => v4_14}/translate.go | 4 ++-- .../{v4_14_exp => v4_14}/translate_test.go | 4 ++-- .../{v4_14_exp => v4_14}/validate.go | 2 +- .../{v4_14_exp => v4_14}/validate_test.go | 2 +- ...v4_14-exp.md => config-openshift-v4_14.md} | 22 ++++--------------- internal/doc/main.go | 4 ++-- 9 files changed, 15 insertions(+), 29 deletions(-) rename config/openshift/{v4_14_exp => v4_14}/result/schema.go (100%) rename config/openshift/{v4_14_exp => v4_14}/schema.go (98%) rename config/openshift/{v4_14_exp => v4_14}/translate.go (99%) rename config/openshift/{v4_14_exp => v4_14}/translate_test.go (99%) rename config/openshift/{v4_14_exp => v4_14}/validate.go (98%) rename config/openshift/{v4_14_exp => v4_14}/validate_test.go (99%) rename docs/{config-openshift-v4_14-exp.md => config-openshift-v4_14.md} (89%) diff --git a/config/config.go b/config/config.go index d9ddc0d9..06867585 100644 --- a/config/config.go +++ b/config/config.go @@ -32,7 +32,7 @@ import ( openshift4_11 "github.com/coreos/butane/config/openshift/v4_11" openshift4_12 "github.com/coreos/butane/config/openshift/v4_12" openshift4_13 "github.com/coreos/butane/config/openshift/v4_13" - openshift4_14_exp "github.com/coreos/butane/config/openshift/v4_14_exp" + openshift4_14 "github.com/coreos/butane/config/openshift/v4_14" openshift4_15_exp "github.com/coreos/butane/config/openshift/v4_15_exp" openshift4_8 "github.com/coreos/butane/config/openshift/v4_8" openshift4_9 "github.com/coreos/butane/config/openshift/v4_9" @@ -72,7 +72,7 @@ func init() { RegisterTranslator("openshift", "4.11.0", openshift4_11.ToConfigBytes) RegisterTranslator("openshift", "4.12.0", openshift4_12.ToConfigBytes) RegisterTranslator("openshift", "4.13.0", openshift4_13.ToConfigBytes) - RegisterTranslator("openshift", "4.14.0-experimental", openshift4_14_exp.ToConfigBytes) + RegisterTranslator("openshift", "4.14.0", openshift4_14.ToConfigBytes) RegisterTranslator("openshift", "4.15.0-experimental", openshift4_15_exp.ToConfigBytes) RegisterTranslator("r4e", "1.0.0", r4e1_0.ToIgn3_3Bytes) RegisterTranslator("r4e", "1.1.0", r4e1_1.ToIgn3_4Bytes) diff --git a/config/openshift/v4_14_exp/result/schema.go b/config/openshift/v4_14/result/schema.go similarity index 100% rename from config/openshift/v4_14_exp/result/schema.go rename to config/openshift/v4_14/result/schema.go diff --git a/config/openshift/v4_14_exp/schema.go b/config/openshift/v4_14/schema.go similarity index 98% rename from config/openshift/v4_14_exp/schema.go rename to config/openshift/v4_14/schema.go index 16d45ab4..a78c3d5a 100644 --- a/config/openshift/v4_14_exp/schema.go +++ b/config/openshift/v4_14/schema.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License.) -package v4_14_exp +package v4_14 import ( fcos "github.com/coreos/butane/config/fcos/v1_6_exp" diff --git a/config/openshift/v4_14_exp/translate.go b/config/openshift/v4_14/translate.go similarity index 99% rename from config/openshift/v4_14_exp/translate.go rename to config/openshift/v4_14/translate.go index bbd05f23..199c9e90 100644 --- a/config/openshift/v4_14_exp/translate.go +++ b/config/openshift/v4_14/translate.go @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License.) -package v4_14_exp +package v4_14 import ( "net/url" "strings" "github.com/coreos/butane/config/common" - "github.com/coreos/butane/config/openshift/v4_14_exp/result" + "github.com/coreos/butane/config/openshift/v4_14/result" cutil "github.com/coreos/butane/config/util" "github.com/coreos/butane/translate" diff --git a/config/openshift/v4_14_exp/translate_test.go b/config/openshift/v4_14/translate_test.go similarity index 99% rename from config/openshift/v4_14_exp/translate_test.go rename to config/openshift/v4_14/translate_test.go index edda5b2c..02745a53 100644 --- a/config/openshift/v4_14_exp/translate_test.go +++ b/config/openshift/v4_14/translate_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License.) -package v4_14_exp +package v4_14 import ( "fmt" @@ -22,7 +22,7 @@ import ( base "github.com/coreos/butane/base/v0_6_exp" "github.com/coreos/butane/config/common" fcos "github.com/coreos/butane/config/fcos/v1_6_exp" - "github.com/coreos/butane/config/openshift/v4_14_exp/result" + "github.com/coreos/butane/config/openshift/v4_14/result" confutil "github.com/coreos/butane/config/util" "github.com/coreos/butane/translate" diff --git a/config/openshift/v4_14_exp/validate.go b/config/openshift/v4_14/validate.go similarity index 98% rename from config/openshift/v4_14_exp/validate.go rename to config/openshift/v4_14/validate.go index 35b41f00..d1becc02 100644 --- a/config/openshift/v4_14_exp/validate.go +++ b/config/openshift/v4_14/validate.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License.) -package v4_14_exp +package v4_14 import ( "github.com/coreos/butane/config/common" diff --git a/config/openshift/v4_14_exp/validate_test.go b/config/openshift/v4_14/validate_test.go similarity index 99% rename from config/openshift/v4_14_exp/validate_test.go rename to config/openshift/v4_14/validate_test.go index 66966bbd..bf46c654 100644 --- a/config/openshift/v4_14_exp/validate_test.go +++ b/config/openshift/v4_14/validate_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License.) -package v4_14_exp +package v4_14 import ( "fmt" diff --git a/docs/config-openshift-v4_14-exp.md b/docs/config-openshift-v4_14.md similarity index 89% rename from docs/config-openshift-v4_14-exp.md rename to docs/config-openshift-v4_14.md index a3eb9c6b..6cb3a7e7 100644 --- a/docs/config-openshift-v4_14-exp.md +++ b/docs/config-openshift-v4_14.md @@ -1,21 +1,19 @@ --- # This file is automatically generated from internal/doc and Ignition's # config/doc. Do not edit. -title: OpenShift v4.14.0-experimental +title: OpenShift v4.14.0 parent: Configuration specifications -nav_order: 150 +nav_order: 143 --- -# OpenShift Specification v4.14.0-experimental - -**Note: This configuration is experimental and has not been stabilized. It is subject to change without warning or announcement.** +# OpenShift Specification v4.14.0 The OpenShift configuration is a YAML document conforming to the following specification, with **_italicized_** entries being optional:
* **variant** (string): used to differentiate configs for different operating systems. Must be `openshift` for this specification. -* **version** (string): the semantic version of the spec for this document. This document is for version `4.14.0-experimental` and generates Ignition configs with version `3.5.0-experimental`. +* **version** (string): the semantic version of the spec for this document. This document is for version `4.14.0` and generates Ignition configs with version `3.5.0-experimental`. * **metadata** (object): metadata about the generated MachineConfig resource. Respected when rendering to a MachineConfig, ignored when rendering directly to an Ignition config. * **name** (string): a unique [name](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names) for this MachineConfig resource. * **labels** (object): string key/value pairs to apply as [Kubernetes labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) to this MachineConfig resource. `machineconfiguration.openshift.io/role` is required. @@ -123,14 +121,11 @@ The OpenShift configuration is a YAML document conforming to the following speci * **_label_** (string): the label of the luks device. * **_uuid_** (string): the uuid of the luks device. * **_options_** (list of strings): any additional options to be passed to `cryptsetup luksFormat`. - * **_discard_** (boolean): whether to issue discard commands to the underlying block device when blocks are freed. Enabling this improves performance and device longevity on SSDs and space utilization on thinly provisioned SAN devices, but leaks information about which disk blocks contain data. If omitted, it defaults to false. - * **_open_options_** (list of strings): any additional options to be passed to `cryptsetup luksOpen`. Supported options will be persistently written to the luks volume. * **_wipe_volume_** (boolean): whether or not to wipe the device before volume creation, see [Ignition's documentation on filesystems](https://coreos.github.io/ignition/operator-notes/#filesystem-reuse-semantics) for more information. * **_clevis_** (object): describes the clevis configuration for the luks device. * **_tang_** (list of objects): describes a tang server. Every server must have a unique `url`. * **url** (string): url of the tang server. * **thumbprint** (string): thumbprint of a trusted signing key. - * **_advertisement_** (string): the advertisement JSON. If not specified, the advertisement is fetched from the tang server during provisioning. * **_tpm2_** (boolean): whether or not to use a tpm2 device. * **_threshold_** (integer): sets the minimum number of pieces required to decrypt the device. Default is 1. * **_custom_** (object): overrides the clevis configuration. The `pin` & `config` will be passed directly to `clevis luks bind`. If specified, all other clevis options must be omitted. @@ -146,33 +141,24 @@ The OpenShift configuration is a YAML document conforming to the following speci * **_enabled_** (boolean): whether or not the service shall be enabled. When true, the service is enabled. When false, the service is disabled. When omitted, the service is unmodified. In order for this to have any effect, the unit must have an install section. * **_mask_** (boolean): whether or not the service shall be masked. When true, the service is masked by symlinking it to `/dev/null`. When false, the service is unmasked by deleting the symlink to `/dev/null` if it exists. * **_contents_** (string): the contents of the unit. Mutually exclusive with `contents_local`. - * **_contents_local_** (string): a local path to the contents of the unit, relative to the directory specified by the `--files-dir` command-line argument. Mutually exclusive with `contents`. * **_dropins_** (list of objects): the list of drop-ins for the unit. Every drop-in must have a unique `name`. * **name** (string): the name of the drop-in. This must be suffixed with ".conf". * **_contents_** (string): the contents of the drop-in. Mutually exclusive with `contents_local`. - * **_contents_local_** (string): a local path to the contents of the drop-in, relative to the directory specified by the `--files-dir` command-line argument. Mutually exclusive with `contents`. * **_passwd_** (object): describes the desired additions to the passwd database. * **_users_** (list of objects): the list of accounts that shall exist. All users must have a unique `name`. * **name** (string): the username for the account. Must be `core`. * **_password_hash_** (string): the hashed password for the account. * **_ssh_authorized_keys_** (list of strings): a list of SSH keys to be added as an SSH key fragment at `.ssh/authorized_keys.d/ignition` in the user's home directory. All SSH keys must be unique. - * **_ssh_authorized_keys_local_** (list of strings): a list of local paths to SSH key files, relative to the directory specified by the `--files-dir` command-line argument, to be added as SSH key fragments at `.ssh/authorized_keys.d/ignition` in the user's home directory. All SSH keys must be unique. Each file may contain multiple SSH keys, one per line. * **_boot_device_** (object): describes the desired boot device configuration. At least one of `luks` or `mirror` must be specified. * **_layout_** (string): the disk layout of the target OS image. Supported values are `aarch64`, `ppc64le`, and `x86_64`. Defaults to `x86_64`. * **_luks_** (object): describes the clevis configuration for encrypting the root filesystem. * **_tang_** (list of objects): describes a tang server. Every server must have a unique `url`. * **url** (string): url of the tang server. * **thumbprint** (string): thumbprint of a trusted signing key. - * **_advertisement_** (string): the advertisement JSON. If not specified, the advertisement is fetched from the tang server during provisioning. * **_tpm2_** (boolean): whether or not to use a tpm2 device. * **_threshold_** (integer): sets the minimum number of pieces required to decrypt the device. Default is 1. - * **_discard_** (boolean): whether to issue discard commands to the underlying block device when blocks are freed. Enabling this improves performance and device longevity on SSDs and space utilization on thinly provisioned SAN devices, but leaks information about which disk blocks contain data. If omitted, it defaults to false. * **_mirror_** (object): describes mirroring of the boot disk for fault tolerance. * **_devices_** (list of strings): the list of whole-disk devices (not partitions) to include in the disk array, referenced by their absolute path. At least two devices must be specified. -* **_grub_** (object): describes the desired GRUB bootloader configuration. - * **_users_** (list of objects): the list of GRUB superusers. - * **name** (string): the user name. - * **password_hash** (string): the PBKDF2 password hash, generated with `grub2-mkpasswd-pbkdf2`. * **_openshift_** (object): describes miscellaneous OpenShift configuration. Respected when rendering to a MachineConfig, ignored when rendering directly to an Ignition config. * **_kernel_type_** (string): which kernel to use on the node. Must be `default` or `realtime`. * **_kernel_arguments_** (list of strings): arguments to be added to the kernel command line. diff --git a/internal/doc/main.go b/internal/doc/main.go index 623f95e6..d3b25064 100644 --- a/internal/doc/main.go +++ b/internal/doc/main.go @@ -49,7 +49,7 @@ import ( openshift4_11 "github.com/coreos/butane/config/openshift/v4_11" openshift4_12 "github.com/coreos/butane/config/openshift/v4_12" openshift4_13 "github.com/coreos/butane/config/openshift/v4_13" - openshift4_14_exp "github.com/coreos/butane/config/openshift/v4_14_exp" + openshift4_14 "github.com/coreos/butane/config/openshift/v4_13" openshift4_15_exp "github.com/coreos/butane/config/openshift/v4_15_exp" openshift4_8 "github.com/coreos/butane/config/openshift/v4_8" openshift4_9 "github.com/coreos/butane/config/openshift/v4_9" @@ -122,13 +122,13 @@ func generate(dir string) error { []version{ // inverse order of website navbar {"4.15.0-experimental", openshift4_15_exp.Config{}}, - {"4.14.0-experimental", openshift4_14_exp.Config{}}, {"4.8.0", openshift4_8.Config{}}, {"4.9.0", openshift4_9.Config{}}, {"4.10.0", openshift4_10.Config{}}, {"4.11.0", openshift4_11.Config{}}, {"4.12.0", openshift4_12.Config{}}, {"4.13.0", openshift4_13.Config{}}, + {"4.14.0", openshift4_14.Config{}}, }, }, {