Skip to content

Commit

Permalink
Upgrade CSO dependency to v0.1.0-alpha.6
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Hros <roman.hros@dnation.cloud>
  • Loading branch information
chess-knight committed Aug 27, 2024
1 parent 9b8db45 commit c84f3ca
Show file tree
Hide file tree
Showing 539 changed files with 31,385 additions and 29,747 deletions.
1 change: 1 addition & 0 deletions .envrc.sample
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export PATH="$(pwd)/hack/tools/bin/:$PATH"
export KUBECONFIG=$PWD/.mgt-cluster-kubeconfig.yaml
export CLUSTER_TOPOLOGY=true
export EXP_RUNTIME_SDK=true
export CLUSTER_NAME=test-dfkhje
export SECRET_NAME=supersecret
export CLOUD_NAME=test
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ all-tools: get-dependencies $(GOTESTSUM) $(go-cover-treemap) $(go-binsize-treema

env-vars-for-wl-cluster:
ifeq ($(wildcard tilt-settings.yaml),)
@./hack/ensure-env-variables.sh GIT_PROVIDER_B64 GIT_ACCESS_TOKEN_B64 GIT_ORG_NAME_B64 GIT_REPOSITORY_NAME_B64 CLUSTER_TOPOLOGY CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
@./hack/ensure-env-variables.sh GIT_PROVIDER_B64 GIT_ACCESS_TOKEN_B64 GIT_ORG_NAME_B64 GIT_REPOSITORY_NAME_B64 CLUSTER_TOPOLOGY EXP_RUNTIME_SDK CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
else ifeq ($(shell awk '/local_mode:/ {print tolower($$2)}' tilt-settings.yaml),true)
@./hack/ensure-env-variables.sh CLUSTER_TOPOLOGY CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
@./hack/ensure-env-variables.sh CLUSTER_TOPOLOGY EXP_RUNTIME_SDK CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
else
@./hack/ensure-env-variables.sh GIT_PROVIDER_B64 GIT_ACCESS_TOKEN_B64 GIT_ORG_NAME_B64 GIT_REPOSITORY_NAME_B64 CLUSTER_TOPOLOGY CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
@./hack/ensure-env-variables.sh GIT_PROVIDER_B64 GIT_ACCESS_TOKEN_B64 GIT_ORG_NAME_B64 GIT_REPOSITORY_NAME_B64 CLUSTER_TOPOLOGY EXP_RUNTIME_SDK CLUSTER_NAME SECRET_NAME CLOUD_NAME ENCODED_CLOUDS_YAML
endif

.PHONY: cluster
Expand Down
2 changes: 1 addition & 1 deletion Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ settings = {
"preload_images_for_kind": True,
"kind_cluster_name": "cspo",
"capi_version": "v1.6.0",
"cso_version": "v0.1.0-alpha.5",
"cso_version": "v0.1.0-alpha.6",
"capo_version": "v0.9.0",
"cert_manager_version": "v1.13.2",
"kustomize_substitutions": {
Expand Down
8 changes: 4 additions & 4 deletions api/v1alpha1/conditions_const.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ const (
)

const (
// GitAPIAvailableCondition is used when Git API is available.
GitAPIAvailableCondition = "GitAPIAvailable"
// AssetsClientAPIAvailableCondition is used when AssetsClient API is available.
AssetsClientAPIAvailableCondition = "AssetsClientAPIAvailable"

// GitTokenOrEnvVariableNotSetReason is used when user don't specify the token or environment variable.
GitTokenOrEnvVariableNotSetReason = "GitTokenOrEnvVariableNotSet" //#nosec
// FailedCreateAssetsClientReason is used when user don't specify the token or environment variable required for initializing the assets client.
FailedCreateAssetsClientReason = "FailedCreateAssetsClient" //#nosec
)

const (
Expand Down
15 changes: 8 additions & 7 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import (
"os"
"time"

githubclient "github.com/SovereignCloudStack/cluster-stack-operator/pkg/github/client"
"github.com/SovereignCloudStack/cluster-stack-operator/pkg/github/client/fake"
"github.com/SovereignCloudStack/cluster-stack-operator/pkg/assetsclient"
"github.com/SovereignCloudStack/cluster-stack-operator/pkg/assetsclient/fake"
"github.com/SovereignCloudStack/cluster-stack-operator/pkg/assetsclient/github"
apiv1alpha1 "github.com/SovereignCloudStack/cluster-stack-provider-openstack/api/v1alpha1"
"github.com/SovereignCloudStack/cluster-stack-provider-openstack/internal/controller"
"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -69,7 +70,7 @@ func main() {
)
flag.StringVar(&releaseDir, "release-dir", "/tmp/downloads/", "Specify release directory for cluster-stack releases")
flag.IntVar(&imageImportTimeout, "image-import-timeout", 0, "Maximum time in minutes that you allow cspo to import image. If image-import-timeout <= 0, cspo waits forever.")
flag.BoolVar(&localMode, "local", false, "Enable local mode where no release assets will be downloaded from a remote Git repository. Useful for implementing cluster stacks.")
flag.BoolVar(&localMode, "local", false, "Enable local mode where no release assets will be downloaded from a remote repository. Useful for implementing cluster stacks.")

opts := zap.Options{
Development: true,
Expand Down Expand Up @@ -100,18 +101,18 @@ func main() {
// Initialize event recorder.
record.InitFromRecorder(mgr.GetEventRecorderFor("cspo-controller"))

var gitFactory githubclient.Factory
var assetsClientFactory assetsclient.Factory
if localMode {
gitFactory = fake.NewFactory()
assetsClientFactory = fake.NewFactory()
} else {
gitFactory = githubclient.NewFactory()
assetsClientFactory = github.NewFactory()
}

if err = (&controller.OpenStackClusterStackReleaseReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
ReleaseDirectory: releaseDir,
GitHubClientFactory: gitFactory,
AssetsClientFactory: assetsClientFactory,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "OpenStackClusterStackRelease")
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion docs/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If you have any trouble finding the right command, then you can use `make help`

## Toggle between local_mode and remote mode

We can retrieve cluster-stacks in two modes. One way is to let the controller fetch it from GitHub which is remote mode and other is we mount the cluster-stacks inside the container at `/tmp/downloads/cluster-stacks` directory.
We can retrieve cluster-stacks in two modes. One way is to let the controller fetch it from repository which is remote mode and other is we mount the cluster-stacks inside the container at `/tmp/downloads/cluster-stacks` directory.

> [!NOTE]
> Using remote mode is the default behavior.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ start;
repeat
:OpenStackClusterStackRelease controller enqueues a Reconcile call;
if (Release assets have been download into the CSPO container) then (no)
:Create GitHub client;
:Create assets client;
#LightBlue:Download Release assets;
#Pink:Return RequeueError;
note left: make sure that Release can be accessed
Expand Down
Binary file modified docs/images/openstackclusterstackrelease-controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 40 additions & 41 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ go 1.21.6
toolchain go1.22.1

require (
github.com/SovereignCloudStack/cluster-stack-operator v0.1.0-alpha.5
github.com/google/go-github/v52 v52.0.0
github.com/SovereignCloudStack/cluster-stack-operator v0.1.0-alpha.6
github.com/gophercloud/gophercloud/v2 v2.0.0-beta.2
github.com/gophercloud/utils/v2 v2.0.0-20240305212012-b57aefba4cdb
github.com/onsi/ginkgo/v2 v2.17.1
github.com/onsi/gomega v1.32.0
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
github.com/stretchr/testify v1.9.0
k8s.io/api v0.28.4
k8s.io/apimachinery v0.28.4
k8s.io/client-go v0.28.4
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
k8s.io/klog/v2 v2.120.1
sigs.k8s.io/cluster-api v1.6.0
sigs.k8s.io/cluster-api v1.7.2
sigs.k8s.io/cluster-api-provider-openstack v0.9.0
sigs.k8s.io/controller-runtime v0.16.5
sigs.k8s.io/controller-runtime v0.17.5
sigs.k8s.io/yaml v1.4.0
)

Expand All @@ -27,69 +26,69 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.7.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gobuffalo/flect v1.0.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-github/v52 v52.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/gophercloud/gophercloud v1.11.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.25.0 // indirect
golang.org/x/crypto v0.20.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/oauth2 v0.14.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.21.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.28.4 // indirect
k8s.io/component-base v0.28.4 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect
k8s.io/apiextensions-apiserver v0.29.3 // indirect
k8s.io/component-base v0.29.3 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)
Loading

0 comments on commit c84f3ca

Please sign in to comment.