Support ProviderOptions from the Kairos SDK; export constants for yip stage names (#65)

* conditionally disable ClusterInit to use sqlite for two node clusters
* expose boot.before stage names as constants
* support kairos SDK ProviderOptions; add datastore config
---------

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Arun Sharma <dev.arun2302@gmail.com>
Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
Co-authored-by: Arun Sharma <dev.arun2302@gmail.com>
Co-authored-by: Oz Tiram <oz.tiram@gmail.com>
This commit is contained in:
Tyler Gillson
2024-06-11 14:44:34 -06:00
committed by GitHub
parent bd434c0bc6
commit e0c5ebeade
6 changed files with 102 additions and 61 deletions

View File

@@ -0,0 +1,31 @@
package constants
const (
EnableOpenRCServices = "Enable OpenRC Services"
EnableSystemdServices = "Enable Systemd Services"
InstallK3sConfigFiles = "Install K3s Configuration Files"
ImportK3sImages = "Import K3s Images"
)
// The following are keys provider-k3s supports if present in Cluster.ProviderOptions from the Kairos SDK.
const (
// K3s bind address
BindAddress string = "bind-address"
// If value == 'yes', provider-k3s will use etcd for its datastore.
// If value == 'no' and DatastoreEndpoint is not defined, the sqlite datastore will be used.
// If value == 'no' and DatastoreEndpoint is defined, a custom datastore will be used.
ClusterInit string = "cluster-init"
// A PostgreSQL, MySQL, NATS, or etcd connection string. Used to describe the connection to the datastore.
DatastoreEndpoint string = "datastore-endpoint"
// TLS Certificate Authority (CA) file used to help secure communication with the datastore.
DatastoreCaFile string = "datastore-cafile"
// TLS certificate file used for client certificate based authentication to your datastore.
DatastoreCertFile string = "datastore-certfile"
// TLS key file used for client certificate based authentication to your datastore.
DatastoreKeyFile string = "datastore-keyfile"
)