Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f38e00f
first successful install
bachgg Feb 27, 2026
28ddb96
install argocd namespace
bachgg Feb 27, 2026
b3937c5
add subcommands
bachgg Mar 2, 2026
b49cbc3
prevent downgrading
bachgg Mar 2, 2026
fb9ba97
cleane up
bachgg Mar 2, 2026
37834da
add yaml resources
bachgg Mar 4, 2026
db46c28
put resources into proper places
bachgg Mar 4, 2026
48d9c14
some basic testing
bachgg Mar 4, 2026
bc209e8
use current kubecontext to apply resource yaml
bachgg Mar 4, 2026
473380a
apply post-install resources and add some logging
bachgg Mar 5, 2026
5eebf55
pass everything into cli args for simplicity
bachgg Mar 6, 2026
00cac5a
chore(docs): Auto-update docs and licenses
bachgg Mar 6, 2026
e23e649
change command to `oms beta install argocd`
bachgg Mar 6, 2026
3d013d4
add postinstall hint
bachgg Mar 6, 2026
87b5e4f
install latest chart if no version is provided
bachgg Mar 6, 2026
766bc05
Merge branch 'main' into bach/install-argocd
bachgg Mar 6, 2026
035a472
remove outdated docs
bachgg Mar 6, 2026
0ce9320
fix updated formatExamples function
bachgg Mar 6, 2026
adfab7c
chore(docs): Auto-update docs and licenses
bachgg Mar 6, 2026
6dedfcd
fix wrong install command
bachgg Mar 6, 2026
2748472
chore(docs): Auto-update docs and licenses
bachgg Mar 6, 2026
3559622
fix linting problems
bachgg Mar 6, 2026
56d9ed1
add DC 7 (new dev cluster on OVH) to AppProject
bachgg Mar 6, 2026
03f8a8d
add option for fullinstall
bachgg Mar 9, 2026
7001207
Merge branch 'main' into bach/install-argocd
bachgg Mar 9, 2026
13b9f15
use same context
bachgg Mar 10, 2026
98370cd
argocd 2
bachgg Mar 11, 2026
bc7fe9f
rename
bachgg Mar 11, 2026
4cbba45
add tests
bachgg Mar 11, 2026
fcbd1be
now complete testing
bachgg Mar 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
640 changes: 635 additions & 5 deletions NOTICE

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions cli/cmd/argocd.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// Copyright (c) Codesphere Inc. SPDX-License-Identifier: Apache-2.0

package cmd

import (
"fmt"

packageio "github.com/codesphere-cloud/cs-go/pkg/io"
"github.com/codesphere-cloud/oms/internal/installer"
"github.com/spf13/cobra"
)

// InstallArgoCDCmd represents the argocd command
type InstallArgoCDCmd struct {
cmd *cobra.Command
Opts InstallArgoCDOpts
}

type InstallArgoCDOpts struct {
*GlobalOptions
Version string
DatacenterId string
GitPassword string
RegistryPassword string
FullInstall bool
}

func (c *InstallArgoCDCmd) RunE(_ *cobra.Command, args []string) error {
if c.Opts.FullInstall {
requiredFlags := map[string]string{
"git-password": c.Opts.GitPassword,
"registry-password": c.Opts.RegistryPassword,
"dc-id": c.Opts.DatacenterId,
}

for flagName, value := range requiredFlags {
if value == "" {
return fmt.Errorf("flag --%s is required when --full-install is true", flagName)
}
}
}
install, err := installer.NewArgoCD(c.Opts.Version, c.Opts.DatacenterId, c.Opts.RegistryPassword, c.Opts.GitPassword, c.Opts.FullInstall)
if err != nil {
return fmt.Errorf("failed to initialize ArgoCD installer")
}
err = install.Install()
if err != nil {
return fmt.Errorf("failed to install chart ArgoCD: %w", err)
}

return nil
}

func AddArgoCDCmd(parentCmd *cobra.Command, opts *GlobalOptions) {
argocd := InstallArgoCDCmd{
cmd: &cobra.Command{
Use: "argocd",
Short: "Install an ArgoCD helm release",
Long: packageio.Long(`Install an ArgoCD helm release`),
Example: formatExamples("install ArgoCD", []packageio.Example{
{Cmd: "", Desc: "Install an ArgoCD helm release of chart https://argoproj.github.io/argo-helm/argo-cd "},
{Cmd: "--version <version>", Desc: "Version of the ArgoCD helm chart to install"},
}),
},
}
argocd.cmd.Flags().StringVar(&argocd.Opts.GitPassword, "git-password", "", "Password/token to read from the git repo where ArgoCD Application manifests are stored")
argocd.cmd.Flags().StringVar(&argocd.Opts.RegistryPassword, "registry-password", "", "Password/token to read from the OCI registry (e.g. ghcr.io) where Helm chart artifacts are stored")
argocd.cmd.Flags().StringVar(&argocd.Opts.DatacenterId, "dc-id", "", "Codesphere Datacenter ID where this ArgoCD is installed")
argocd.cmd.Flags().StringVarP(&argocd.Opts.Version, "version", "v", "", "Version of the ArgoCD helm chart to install")
argocd.cmd.Flags().BoolVar(&argocd.Opts.FullInstall, "full-install", false, "Install other resources (AppProjects, Repo Creds, ...) after installing the chart")
argocd.cmd.RunE = argocd.RunE

parentCmd.AddCommand(argocd.cmd)
}
1 change: 1 addition & 0 deletions cli/cmd/beta.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ func AddBetaCmd(rootCmd *cobra.Command, opts *GlobalOptions) {

AddExtendCmd(beta.cmd, opts)
AddBootstrapGcpCmd(beta.cmd, opts)
AddBetaInstallCmd(beta.cmd, opts)
}
24 changes: 24 additions & 0 deletions cli/cmd/beta_install.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) Codesphere Inc.
// SPDX-License-Identifier: Apache-2.0

package cmd

import (
"github.com/spf13/cobra"
)

// BetaInstallCmd represents the install command
type BetaInstallCmd struct {
cmd *cobra.Command
}

func AddBetaInstallCmd(rootCmd *cobra.Command, opts *GlobalOptions) {
install := BetaInstallCmd{
cmd: &cobra.Command{
Use: "install",
Short: "Install beta components",
},
}
rootCmd.AddCommand(install.cmd)
AddArgoCDCmd(install.cmd, opts)
}
1 change: 1 addition & 0 deletions docs/oms_beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ Be aware that that usage and behavior may change as the features are developed.
* [oms](oms.md) - Codesphere Operations Management System (OMS)
* [oms beta bootstrap-gcp](oms_beta_bootstrap-gcp.md) - Bootstrap GCP infrastructure for Codesphere
* [oms beta extend](oms_beta_extend.md) - Extend Codesphere ressources such as base images.
* [oms beta install](oms_beta_install.md) - Install beta components

15 changes: 15 additions & 0 deletions docs/oms_beta_install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## oms beta install

Install beta components

### Options

```
-h, --help help for install
```

### SEE ALSO

* [oms beta](oms_beta.md) - Commands for early testing
* [oms beta install argocd](oms_beta_install_argocd.md) - Install an ArgoCD helm release

37 changes: 37 additions & 0 deletions docs/oms_beta_install_argocd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## oms beta install argocd

Install an ArgoCD helm release

### Synopsis

Install an ArgoCD helm release

```
oms beta install argocd [flags]
```

### Examples

```
# Install an ArgoCD helm release of chart https://argoproj.github.io/argo-helm/argo-cd
$ oms install ArgoCD

# Version of the ArgoCD helm chart to install
$ oms install ArgoCD --version <version>

```

### Options

```
--dc-id string Codesphere Datacenter ID where this ArgoCD is installed
-c, --git-password string Password/token to read from the git repo where ArgoCD Application manifests are stored
-h, --help help for argocd
--registry-password string Password/token to read from the OCI registry (e.g. ghcr.io) where Helm chart artifacts are stored
-v, --version string Version of the ArgoCD helm chart to install
```

### SEE ALSO

* [oms beta install](oms_beta_install.md) - Install beta components

60 changes: 57 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ require (
cloud.google.com/go/iam v1.5.3
cloud.google.com/go/resourcemanager v1.10.7
cloud.google.com/go/serviceusage v1.9.7
github.com/codesphere-cloud/cs-go v0.19.1
github.com/Masterminds/semver/v3 v3.4.0
github.com/codesphere-cloud/cs-go v0.17.2
github.com/creativeprojects/go-selfupdate v1.5.2
github.com/jedib0t/go-pretty/v6 v6.7.8
github.com/lithammer/shortuuid v3.0.0+incompatible
Expand All @@ -21,6 +22,10 @@ require (
golang.org/x/crypto v0.48.0
golang.org/x/term v0.40.0
google.golang.org/api v0.269.0
helm.sh/helm/v4 v4.1.1
k8s.io/api v0.35.1
k8s.io/apimachinery v0.35.1
k8s.io/client-go v0.35.1
google.golang.org/grpc v1.79.2
)

Expand Down Expand Up @@ -503,39 +508,72 @@ require (
mvdan.cc/gofumpt v0.9.2 // indirect
mvdan.cc/unparam v0.0.0-20251027182757-5beb8c8f8f15 // indirect
sigs.k8s.io/kind v0.31.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
sigs.k8s.io/yaml v1.6.0
software.sslmate.com/src/go-pkcs12 v0.7.0 // indirect
)

require (
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/squirrel v1.5.4 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/clipperhouse/stringish v0.1.1 // indirect
github.com/clipperhouse/uax29/v2 v2.4.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/denis-tingaikin/go-header v0.5.0 // indirect
github.com/dylibso/observe-sdk/go v0.0.0-20240819160327-2d926c5d788a // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/extism/go-sdk v1.7.1 // indirect
github.com/fluxcd/cli-utils v0.37.0-flux.1 // indirect
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-gorp/gorp/v3 v3.1.0 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-github/v83 v83.0.0 // indirect
github.com/google/go-licenses/v2 v2.0.1 // indirect
github.com/google/go-querystring v1.2.0 // indirect
github.com/google/licenseclassifier/v2 v2.0.0 // indirect
github.com/google/pprof v0.0.0-20260115054156-294ebfa9ad83 // indirect
github.com/goreleaser/go-shellwords v1.0.13 // indirect
github.com/gosuri/uitable v0.0.4 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/ianlancetaylor/demangle v0.0.0-20250417193237-f615e6bd150b // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/lib/pq v1.11.1 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/mattn/go-runewidth v0.0.19 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/otiai10/copy v1.14.1 // indirect
github.com/otiai10/mint v1.6.3 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/rubenv/sql-migrate v1.8.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/stretchr/objx v0.5.3 // indirect
github.com/tetratelabs/wabin v0.0.0-20230304001439-f6f874872834 // indirect
github.com/tetratelabs/wazero v1.11.0 // indirect
github.com/ulikunitz/xz v0.5.15 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
golang.org/x/mod v0.33.0 // indirect
golang.org/x/net v0.50.0 // indirect
golang.org/x/oauth2 v0.35.0 // indirect
Expand All @@ -544,8 +582,24 @@ require (
golang.org/x/text v0.34.0 // indirect
golang.org/x/tools v0.42.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.35.0 // indirect
k8s.io/apiserver v0.35.0 // indirect
k8s.io/cli-runtime v0.35.1 // indirect
k8s.io/component-base v0.35.0 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e // indirect
k8s.io/kubectl v0.35.0 // indirect
k8s.io/utils v0.0.0-20260106112306-0fe9cd71b2f8 // indirect
oras.land/oras-go/v2 v2.6.0 // indirect
sigs.k8s.io/controller-runtime v0.22.4 // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
sigs.k8s.io/kustomize/api v0.20.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.21.0 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.3.1 // indirect
)

tool (
Expand Down
Loading