From 6bd16df0726c8054cc7a05e7085df8093cacffcc Mon Sep 17 00:00:00 2001 From: Manuel Dewald Date: Fri, 27 Feb 2026 15:54:25 +0100 Subject: [PATCH 1/2] feat: update install config generation * Generate managed services config by default * Do not marshal empty issuer type * Minor update: help output of --skip-steps * Add vcluster managed service --- cli/cmd/install_codesphere.go | 2 +- internal/bootstrap/gcp/gcp.go | 16 ---------------- internal/bootstrap/gcp/gcp_test.go | 3 ++- internal/installer/config_manager_profile.go | 18 ++++++++++++++++++ .../installer/config_manager_profile_test.go | 4 ++++ internal/installer/files/config_yaml.go | 2 +- 6 files changed, 26 insertions(+), 19 deletions(-) diff --git a/cli/cmd/install_codesphere.go b/cli/cmd/install_codesphere.go index ebbfa8be..9005adfe 100644 --- a/cli/cmd/install_codesphere.go +++ b/cli/cmd/install_codesphere.go @@ -68,7 +68,7 @@ func AddInstallCodesphereCmd(install *cobra.Command, opts *GlobalOptions) { codesphere.cmd.Flags().BoolVarP(&codesphere.Opts.Force, "force", "f", false, "Enforce package extraction") codesphere.cmd.Flags().StringVarP(&codesphere.Opts.Config, "config", "c", "", "Path to the Codesphere Private Cloud configuration file (yaml)") codesphere.cmd.Flags().StringVarP(&codesphere.Opts.PrivKey, "priv-key", "k", "", "Path to the private key to encrypt/decrypt secrets") - codesphere.cmd.Flags().StringSliceVarP(&codesphere.Opts.SkipSteps, "skip-steps", "s", []string{}, "Steps to be skipped. Must be one of: copy-dependencies, extract-dependencies, load-container-images, ceph, kubernetes") + codesphere.cmd.Flags().StringSliceVarP(&codesphere.Opts.SkipSteps, "skip-steps", "s", []string{}, "Steps to be skipped. E.g. copy-dependencies, extract-dependencies, load-container-images, ceph, kubernetes") util.MarkFlagRequired(codesphere.cmd, "package") util.MarkFlagRequired(codesphere.cmd, "config") diff --git a/internal/bootstrap/gcp/gcp.go b/internal/bootstrap/gcp/gcp.go index 71373096..3248e6d4 100644 --- a/internal/bootstrap/gcp/gcp.go +++ b/internal/bootstrap/gcp/gcp.go @@ -1279,7 +1279,6 @@ func (b *GCPBootstrapper) UpdateInstallConfig() error { } b.Env.InstallConfig.Codesphere.Experiments = b.Env.Experiments b.Env.InstallConfig.Codesphere.Features = b.Env.FeatureFlags - b.Env.InstallConfig.Codesphere.ManagedServices = []files.ManagedServiceConfig{} if !b.Env.ExistingConfigUsed { err := b.icg.GenerateSecrets() @@ -1308,21 +1307,6 @@ func (b *GCPBootstrapper) UpdateInstallConfig() error { } } - b.Env.InstallConfig.Codesphere.ManagedServices = []files.ManagedServiceConfig{ - { - Name: "postgres", - Version: "v1", - }, - { - Name: "babelfish", - Version: "v1", - }, - { - Name: "s3", - Version: "v1", - }, - } - if b.Env.OpenBaoURI != "" { b.Env.InstallConfig.Codesphere.OpenBao = &files.OpenBaoConfig{ Engine: b.Env.OpenBaoEngine, diff --git a/internal/bootstrap/gcp/gcp_test.go b/internal/bootstrap/gcp/gcp_test.go index 4fe6ccea..b6b4af00 100644 --- a/internal/bootstrap/gcp/gcp_test.go +++ b/internal/bootstrap/gcp/gcp_test.go @@ -256,6 +256,8 @@ var _ = Describe("GCP Bootstrapper", func() { Expect(cpNode.GetExternalIP()).To(Equal("1.2.3.4")) Expect(cpNode.GetInternalIP()).To(Equal("10.0.0.1")) } + + Expect(len(bs.Env.InstallConfig.Codesphere.ManagedServices)).To(Equal(4)) }) }) @@ -1188,7 +1190,6 @@ var _ = Describe("GCP Bootstrapper", func() { Expect(cloudDns["project"]).To(Equal(bs.Env.DNSProjectID)) Expect(bs.Env.InstallConfig.Codesphere.OpenBao).To(BeNil()) - Expect(len(bs.Env.InstallConfig.Codesphere.ManagedServices)).To(Equal(3)) }) Context("When Experiments are set in CodesphereEnvironment", func() { BeforeEach(func() { diff --git a/internal/installer/config_manager_profile.go b/internal/installer/config_manager_profile.go index 2709f6a9..087cb444 100644 --- a/internal/installer/config_manager_profile.go +++ b/internal/installer/config_manager_profile.go @@ -103,6 +103,24 @@ func (g *InstallConfig) ApplyProfile(profile string) error { g.Config.ManagedServiceBackends = &files.ManagedServiceBackendsConfig{ Postgres: make(map[string]interface{}), } + g.Config.Codesphere.ManagedServices = []files.ManagedServiceConfig{ + { + Name: "postgres", + Version: "v1", + }, + { + Name: "babelfish", + Version: "v1", + }, + { + Name: "s3", + Version: "v1", + }, + { + Name: "virtual-k8s", + Version: "v1", + }, + } g.Config.Secrets.BaseDir = "/root/secrets" switch profile { diff --git a/internal/installer/config_manager_profile_test.go b/internal/installer/config_manager_profile_test.go index 44243b50..fc5eca8a 100644 --- a/internal/installer/config_manager_profile_test.go +++ b/internal/installer/config_manager_profile_test.go @@ -223,6 +223,10 @@ var _ = Describe("ConfigManagerProfile", func() { Expect(config.ManagedServiceBackends).ToNot(BeNil()) Expect(config.ManagedServiceBackends.Postgres).ToNot(BeNil()) + // Managed service config + Expect(config.Codesphere.ManagedServices).ToNot(BeNil()) + Expect(len(config.Codesphere.ManagedServices)).To(Equal(4)) + // Secrets Expect(config.Secrets.BaseDir).To(Equal("/root/secrets")) }) diff --git a/internal/installer/files/config_yaml.go b/internal/installer/files/config_yaml.go index df130af5..4b49d604 100644 --- a/internal/installer/files/config_yaml.go +++ b/internal/installer/files/config_yaml.go @@ -285,7 +285,7 @@ const ( ) type CertIssuerConfig struct { - Type CertIssuerType `yaml:"type"` + Type CertIssuerType `yaml:"type,omitempty"` Acme *ACMEConfig `yaml:"acme,omitempty"` } From afec623566ca20a6185aeacf384a517550afb083 Mon Sep 17 00:00:00 2001 From: NautiluX <2600004+NautiluX@users.noreply.github.com> Date: Wed, 4 Mar 2026 09:49:23 +0000 Subject: [PATCH 2/2] chore(docs): Auto-update docs and licenses Signed-off-by: NautiluX <2600004+NautiluX@users.noreply.github.com> --- NOTICE | 8 ++++---- docs/oms-cli_install_codesphere.md | 2 +- internal/tmpl/NOTICE | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NOTICE b/NOTICE index 6fcd73a7..13c3dd27 100644 --- a/NOTICE +++ b/NOTICE @@ -23,9 +23,9 @@ License URL: https://github.com/googleapis/google-cloud-go/blob/auth/oauth2adapt ---------- Module: cloud.google.com/go/compute -Version: v1.54.0 +Version: v1.55.0 License: Apache-2.0 -License URL: https://github.com/googleapis/google-cloud-go/blob/compute/v1.54.0/compute/LICENSE +License URL: https://github.com/googleapis/google-cloud-go/blob/compute/v1.55.0/compute/LICENSE ---------- Module: cloud.google.com/go/compute/metadata @@ -95,9 +95,9 @@ License URL: https://github.com/clipperhouse/uax29/blob/v2.4.0/LICENSE ---------- Module: github.com/codesphere-cloud/cs-go -Version: v0.17.2 +Version: v0.19.1 License: Apache-2.0 -License URL: https://github.com/codesphere-cloud/cs-go/blob/v0.17.2/LICENSE +License URL: https://github.com/codesphere-cloud/cs-go/blob/v0.19.1/LICENSE ---------- Module: github.com/codesphere-cloud/oms/internal/tmpl diff --git a/docs/oms-cli_install_codesphere.md b/docs/oms-cli_install_codesphere.md index d99729de..05312891 100644 --- a/docs/oms-cli_install_codesphere.md +++ b/docs/oms-cli_install_codesphere.md @@ -19,7 +19,7 @@ oms-cli install codesphere [flags] -h, --help help for codesphere -p, --package string Package file (e.g. codesphere-v1.2.3-installer.tar.gz) to load binaries, installer etc. from -k, --priv-key string Path to the private key to encrypt/decrypt secrets - -s, --skip-steps strings Steps to be skipped. Must be one of: copy-dependencies, extract-dependencies, load-container-images, ceph, kubernetes + -s, --skip-steps strings Steps to be skipped. E.g. copy-dependencies, extract-dependencies, load-container-images, ceph, kubernetes ``` ### SEE ALSO diff --git a/internal/tmpl/NOTICE b/internal/tmpl/NOTICE index 6fcd73a7..13c3dd27 100644 --- a/internal/tmpl/NOTICE +++ b/internal/tmpl/NOTICE @@ -23,9 +23,9 @@ License URL: https://github.com/googleapis/google-cloud-go/blob/auth/oauth2adapt ---------- Module: cloud.google.com/go/compute -Version: v1.54.0 +Version: v1.55.0 License: Apache-2.0 -License URL: https://github.com/googleapis/google-cloud-go/blob/compute/v1.54.0/compute/LICENSE +License URL: https://github.com/googleapis/google-cloud-go/blob/compute/v1.55.0/compute/LICENSE ---------- Module: cloud.google.com/go/compute/metadata @@ -95,9 +95,9 @@ License URL: https://github.com/clipperhouse/uax29/blob/v2.4.0/LICENSE ---------- Module: github.com/codesphere-cloud/cs-go -Version: v0.17.2 +Version: v0.19.1 License: Apache-2.0 -License URL: https://github.com/codesphere-cloud/cs-go/blob/v0.17.2/LICENSE +License URL: https://github.com/codesphere-cloud/cs-go/blob/v0.19.1/LICENSE ---------- Module: github.com/codesphere-cloud/oms/internal/tmpl