vmware-tanzu-labs / educates-training-platform

A platform for hosting interactive workshop environments in Kubernetes, or on top of a local container runtime.
https://docs.educates.dev
Apache License 2.0
63 stars 15 forks source link

Use local secrets with create-cluster when --config not used. #432

Closed GrahamDumpleton closed 1 week ago

GrahamDumpleton commented 2 weeks ago

Is your feature request related to a problem? Please describe.

Prior to 3.0, using educates create-cluster to create a local Kind cluster would automatically result in the local secret cache being synced to the cluster, and TLS settings for ingress domain being filled out when the secret cache contained a wildcard secret or CA with annotations indicating it matched the ingress domain. It is not required to remember to supply the --with-local-secrets option to have this done which is easily forgotten.

Describe the solution you'd like

When --config option is not supplied to educates create-cluster, rather than require --with-local-secrets option, assume it is enabled as true instead. Only assumed --with-local-secrets is false when --config option is being used.

Describe alternatives you've considered

No response

Additional information

Also related is https://github.com/vmware-tanzu-labs/educates-training-platform/issues/431 in that annotations on config map storing config values tracking that is hidden local config being used, should also track whether local secrets cache was being used. When using educates admin platform deploy without --config it should also automatically use --with-local-secrets using original value as educates create-cluster if using hidden local config.

GrahamDumpleton commented 2 weeks ago

Alternative is a config value in the local config which says to automatically use local secrets cache. This option would modify what the CLI does and wouldn't affect anything in the cluster.

GrahamDumpleton commented 2 weeks ago

Also have problem now that need to supply --with-local-secrets with educates admin config view command as well if want to capture modified configuration for wildcard certificate and CA secrets.