From b315a839da36d9f99ace5bfa722f2632fbf7c436 Mon Sep 17 00:00:00 2001 From: Vlad Bologa Date: Mon, 18 Sep 2023 14:42:56 +0200 Subject: [PATCH 01/20] Use Openshift golang-1.20 builder image (#1275) --- .openshift-ci/e2e-runtime/Dockerfile | 2 +- Dockerfile | 2 +- probe/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.openshift-ci/e2e-runtime/Dockerfile b/.openshift-ci/e2e-runtime/Dockerfile index 0ed232ab65..267ea5c18f 100644 --- a/.openshift-ci/e2e-runtime/Dockerfile +++ b/.openshift-ci/e2e-runtime/Dockerfile @@ -5,7 +5,7 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial RUN dnf update -y --disablerepo=\* --enablerepo=baseos,appstream && dnf -y install make which git gettext jq gcc && dnf clean all && rm -rf /var/cache/dnf -COPY --from=registry.ci.openshift.org/stolostron/builder:go1.20-linux /usr/local/go /usr/local/go +COPY --from=registry.ci.openshift.org/openshift/release:golang-1.20 /usr/local/go /usr/local/go COPY --from=quay.io/openshift/origin-cli:4.13 /usr/bin/oc /usr/bin COPY --from=quay.io/operator-framework/operator-sdk:v1.25 /usr/local/bin/operator-sdk /usr/local/bin diff --git a/Dockerfile b/Dockerfile index 1e0243b3a2..3b397da0f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS build +FROM registry.ci.openshift.org/openshift/release:golang-1.20 AS build ENV GOFLAGS="-mod=mod" diff --git a/probe/Dockerfile b/probe/Dockerfile index 5029076739..f78e48be43 100644 --- a/probe/Dockerfile +++ b/probe/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.ci.openshift.org/stolostron/builder:go1.20-linux AS build +FROM registry.ci.openshift.org/openshift/release:golang-1.20 AS build ENV GOFLAGS="-mod=mod" From 3af8ea02ba4d15546619667e80874e1fe8d02d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=A4umer?= Date: Mon, 18 Sep 2023 16:36:21 +0200 Subject: [PATCH 02/20] Add kind cluster type (#1256) --- Makefile | 43 ++++++++----------- .../dataplane-cluster-configuration-kind.yaml | 17 ++++++++ dev/env/defaults/05-kind.env | 5 +++ dev/env/defaults/cluster-type-kind/env | 8 ++++ dev/env/scripts/docker.sh | 4 ++ dev/env/scripts/lib.sh | 2 +- 6 files changed, 52 insertions(+), 27 deletions(-) create mode 100644 dev/config/dataplane-cluster-configuration-kind.yaml create mode 100644 dev/env/defaults/05-kind.env create mode 100644 dev/env/defaults/cluster-type-kind/env diff --git a/Makefile b/Makefile index c57ac2f26a..a518d651d8 100644 --- a/Makefile +++ b/Makefile @@ -44,22 +44,13 @@ endif SHORT_IMAGE_REF = "$(IMAGE_NAME):$(image_tag)" PROBE_SHORT_IMAGE_REF = "$(PROBE_IMAGE_NAME):$(image_tag)" -# Default namespace for local deployments -NAMESPACE ?= fleet-manager-${USER} -IMAGE_REGISTRY ?= default-route-openshift-image-registry.apps-crc.testing - -# The name of the image repository needs to start with the name of an existing -# namespace because when the image is pushed to the internal registry of a -# cluster it will assume that that namespace exists and will try to create a -# corresponding image stream inside that namespace. If the namespace doesn't -# exist the push fails. This doesn't apply when the image is pushed to a public -# repository, like `docker.io` or `quay.io`. -image_repository:=$(NAMESPACE)/$(IMAGE_NAME) -probe_image_repository:=$(NAMESPACE)/$(PROBE_IMAGE_NAME) +IMAGE_REGISTRY ?= quay.io/rhacs-eng +image_repository:=$(IMAGE_NAME) +probe_image_repository:=$(PROBE_IMAGE_NAME) # In the development environment we are pushing the image directly to the image # registry inside the development cluster. That registry has a different name -# when it is accessed from outside the cluster and when it is acessed from +# when it is accessed from outside the cluster and when it is accessed from # inside the cluster. We need the external name to push the image, and the # internal name to pull it. external_image_registry:= $(IMAGE_REGISTRY) @@ -287,19 +278,19 @@ pre-commit: # NOTE it may be necessary to use CGO_ENABLED=0 for backwards compatibility with centos7 if not using centos7 fleet-manager: - GOOS="$(GOOS)" GOARCH="$(GOARCH)" $(GO) build $(GOARGS) ./cmd/fleet-manager + GOOS="$(GOOS)" GOARCH="$(GOARCH)" CGO_ENABLED=0 $(GO) build $(GOARGS) ./cmd/fleet-manager .PHONY: fleet-manager fleetshard-sync: - GOOS="$(GOOS)" GOARCH="$(GOARCH)" $(GO) build $(GOARGS) -o fleetshard-sync ./fleetshard + GOOS="$(GOOS)" GOARCH="$(GOARCH)" CGO_ENABLED=0 $(GO) build $(GOARGS) -o fleetshard-sync ./fleetshard .PHONY: fleetshard-sync probe: - GOOS="$(GOOS)" GOARCH="$(GOARCH)" $(GO) build $(GOARGS) -o probe/bin/probe ./probe/cmd/probe + GOOS="$(GOOS)" GOARCH="$(GOARCH)" CGO_ENABLED=0 $(GO) build $(GOARGS) -o probe/bin/probe ./probe/cmd/probe .PHONY: probe acsfleetctl: - GOOS="$(GOOS)" GOARCH="$(GOARCH)" $(GO) build $(GOARGS) -o acsfleetctl ./cmd/acsfleetctl + GOOS="$(GOOS)" GOARCH="$(GOARCH)" CGO_ENABLED=0 $(GO) build $(GOARGS) -o acsfleetctl ./cmd/acsfleetctl .PHONY: acsfleetctl binary: fleet-manager fleetshard-sync probe acsfleetctl @@ -526,6 +517,10 @@ image/build: GOOS=linux image/build: IMAGE_REF ?= "$(external_image_registry)/$(image_repository):$(image_tag)" image/build: fleet-manager fleetshard-sync DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build -t $(IMAGE_REF) -f Dockerfile.hybrid . + $(DOCKER) tag $(IMAGE_REF) $(SHORT_IMAGE_REF) +ifeq ("$(CLUSTER_TYPE)","kind") + kind load docker-image $(SHORT_IMAGE_REF) +endif .PHONY: image/build # Build the image using by specifying a specific image target within the Dockerfile. @@ -599,7 +594,7 @@ image/push/internal: docker/login/internal # build and push the image to an OpenShift cluster's internal registry # namespace used in the image repository must exist on the cluster before running this command. Run `make deploy/project` to create the namespace if not available. -image/build/push/internal: image/build/internal image/push/internal +image/build/push/internal: image/push/internal .PHONY: image/build/push/internal # Build the binary and test image @@ -903,18 +898,14 @@ deploy/bootstrap: ./dev/env/scripts/bootstrap.sh .PHONY: deploy/bootstrap -deploy/dev-fast: GOOS=linux -deploy/dev-fast: deploy/dev-fast/fleet-manager deploy/dev-fast/fleetshard-sync +# Deploy local images fast for development +deploy/dev-fast: image/build deploy/dev-fast/fleet-manager deploy/dev-fast/fleetshard-sync -deploy/dev-fast/fleet-manager: GOOS=linux -deploy/dev-fast/fleet-manager: fleet-manager - DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build -t $(SHORT_IMAGE_REF) -f Dockerfile.hybrid . +deploy/dev-fast/fleet-manager: image/build kubectl -n $(ACSMS_NAMESPACE) set image deploy/fleet-manager fleet-manager=$(SHORT_IMAGE_REF) db-migrate=$(SHORT_IMAGE_REF) kubectl -n $(ACSMS_NAMESPACE) delete pod -l application=fleet-manager -deploy/dev-fast/fleetshard-sync: GOOS=linux -deploy/dev-fast/fleetshard-sync: fleetshard-sync - DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build -t $(SHORT_IMAGE_REF) -f Dockerfile.hybrid . +deploy/dev-fast/fleetshard-sync: image/build kubectl -n $(ACSMS_NAMESPACE) set image deploy/fleetshard-sync fleetshard-sync=$(SHORT_IMAGE_REF) kubectl -n $(ACSMS_NAMESPACE) delete pod -l application=fleetshard-sync diff --git a/dev/config/dataplane-cluster-configuration-kind.yaml b/dev/config/dataplane-cluster-configuration-kind.yaml new file mode 100644 index 0000000000..15ae940fd8 --- /dev/null +++ b/dev/config/dataplane-cluster-configuration-kind.yaml @@ -0,0 +1,17 @@ +--- +#- A list of clusters for fleet manager +#- The `cluster_id` field can not be empty +#- All clusters which are already stored in fleet-manager's DB but are missing in the list will be marked as +# 'deprovisioning' and will later be deleted. +#- This list is ordered, any new cluster should be appended at the end. +clusters: + - name: kind + cluster_id: 1234567890abcdef1234567890abcdef + cloud_provider: standalone + region: standalone + schedulable: true + status: ready + provider_type: standalone + supported_instance_type: "eval,standard" + cluster_dns: kubernetes.docker.internal + central_instance_limit: 5 diff --git a/dev/env/defaults/05-kind.env b/dev/env/defaults/05-kind.env new file mode 100644 index 0000000000..35afb2a0b8 --- /dev/null +++ b/dev/env/defaults/05-kind.env @@ -0,0 +1,5 @@ +# shellcheck shell=bash + +if [[ "$CLUSTER_NAME" == "kind" ]]; then + export CLUSTER_TYPE_DEFAULT="kind" +fi diff --git a/dev/env/defaults/cluster-type-kind/env b/dev/env/defaults/cluster-type-kind/env new file mode 100644 index 0000000000..bb06a4d2bd --- /dev/null +++ b/dev/env/defaults/cluster-type-kind/env @@ -0,0 +1,8 @@ +export KIND="${KIND:-kind}" +export ENABLE_DB_PORT_FORWARDING_DEFAULT="true" +export ENABLE_FM_PORT_FORWARDING_DEFAULT="true" +export OPERATOR_SOURCE_DEFAULT="quay" +export INHERIT_IMAGEPULLSECRETS_DEFAULT="true" # pragma: allowlist secret +export INSTALL_OLM_DEFAULT="true" +export ENABLE_EXTERNAL_CONFIG_DEFAULT="true" +export AWS_AUTH_HELPER_DEFAULT="aws-saml" diff --git a/dev/env/scripts/docker.sh b/dev/env/scripts/docker.sh index fd902bf24a..ab8696e779 100644 --- a/dev/env/scripts/docker.sh +++ b/dev/env/scripts/docker.sh @@ -82,6 +82,10 @@ ensure_fleet_manager_image_exists() { docker_pull "$FLEET_MANAGER_IMAGE" fi + if [[ "${CLUSTER_TYPE}" == "kind" ]]; then + kind load docker-image "$FLEET_MANAGER_IMAGE" + fi + # Verify that the image is there. if ! $DOCKER image inspect "$FLEET_MANAGER_IMAGE" >/dev/null 2>&1; then die "Image ${FLEET_MANAGER_IMAGE} not available in cluster, aborting" diff --git a/dev/env/scripts/lib.sh b/dev/env/scripts/lib.sh index ec48e6eae0..29adea45d6 100644 --- a/dev/env/scripts/lib.sh +++ b/dev/env/scripts/lib.sh @@ -300,7 +300,7 @@ inject_exported_env_vars() { is_local_cluster() { local cluster_type=${1:-} - if [[ "$cluster_type" == "minikube" || "$cluster_type" == "colima" || "$cluster_type" == "rancher-desktop" || "$cluster_type" == "docker" ]]; then + if [[ "$cluster_type" == "minikube" || "$cluster_type" == "colima" || "$cluster_type" == "rancher-desktop" || "$cluster_type" == "docker" || "$cluster_type" == "kind" ]]; then return 0 else return 1 From b0c2b6d92021a5c57a495f37258b8228535d99c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=A4umer?= Date: Tue, 19 Sep 2023 09:51:18 +0200 Subject: [PATCH 03/20] Refactor operator config to use field.Error (#1276) --- fleetshard/pkg/central/operator/config.go | 12 ++-- .../pkg/central/operator/config_test.go | 61 ++++++++++++++++++- fleetshard/pkg/central/operator/upgrade.go | 5 +- 3 files changed, 68 insertions(+), 10 deletions(-) diff --git a/fleetshard/pkg/central/operator/config.go b/fleetshard/pkg/central/operator/config.go index 15bc8c488b..81ab469def 100644 --- a/fleetshard/pkg/central/operator/config.go +++ b/fleetshard/pkg/central/operator/config.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/golang/glog" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/api/private" + "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/yaml" ) @@ -24,17 +25,16 @@ func GetConfig() OperatorConfigs { } // Validate validates the operator configuration and can be used in different life-cycle stages like runtime and deploy time. -func Validate(configs OperatorConfigs) []error { - var errors []error +func Validate(path *field.Path, configs OperatorConfigs) *field.Error { + var validateErr *field.Error manager := ACSOperatorManager{} manifests, err := manager.RenderChart(configs) if err != nil { - errors = append(errors, fmt.Errorf("could not render operator helm charts, got invalid configuration: %s", err.Error())) + validateErr = field.Forbidden(path, fmt.Sprintf("could not render operator helm charts, got invalid configuration: %s", err.Error())) } else if len(manifests) == 0 { - errors = append(errors, fmt.Errorf("operator chart rendering succeed, but no manifests rendered")) + validateErr = field.Forbidden(path, fmt.Sprintf("operator chart rendering succeed, but no manifests were rendered")) } - - return errors + return validateErr } // CRDConfig represents the crd to be installed in the data-plane cluster. The CRD is downloaded automatically diff --git a/fleetshard/pkg/central/operator/config_test.go b/fleetshard/pkg/central/operator/config_test.go index 1fd49ed043..21fb9e49da 100644 --- a/fleetshard/pkg/central/operator/config_test.go +++ b/fleetshard/pkg/central/operator/config_test.go @@ -3,6 +3,7 @@ package operator import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "k8s.io/apimachinery/pkg/util/validation/field" "testing" ) @@ -31,10 +32,64 @@ func TestGetOperatorConfig(t *testing.T) { assert.Equal(t, "quay.io/rhacs-eng/stackrox-operator:4.1.1", conf.Configs[0].Image) } -func TestValidate(t *testing.T) { +func TestValidateShouldSucceed(t *testing.T) { conf, err := parseConfig(getExampleConfig()) require.NoError(t, err) - errors := Validate(conf) - assert.Len(t, errors, 0) + err = Validate(field.NewPath("rhacsOperator"), conf) + require.Nil(t, err) +} + +func TestGetOperatorConfigFailsValidation(t *testing.T) { + testCases := map[string]struct { + getConfig func(*testing.T, OperatorConfigs) OperatorConfigs + contains string + }{ + "should fail with invalid baseURL not able to download CRD": { + getConfig: func(t *testing.T, config OperatorConfigs) OperatorConfigs { + config.CRD.BaseURL = "not an url" + return config + }, + contains: "failed downloading chart files", + }, + "should fail with invalid git ref": { + getConfig: func(t *testing.T, config OperatorConfigs) OperatorConfigs { + config.Configs = []OperatorConfig{ + {GitRef: "%^-invalid", Image: "quay.io/rhacs-eng/test:4.0.0", HelmValues: ""}, + } + return config + }, + contains: "failed to parse images: label selector %^-invalid is not valid", + }, + "should fail with invalid image": { + getConfig: func(t *testing.T, config OperatorConfigs) OperatorConfigs { + config.Configs = []OperatorConfig{ + {GitRef: "4.0.0", Image: "quay.io//invalid", HelmValues: ""}, + } + return config + }, + contains: "failed to parse images: invalid reference format", + }, + "should fail with invalid helm values": { + getConfig: func(t *testing.T, config OperatorConfigs) OperatorConfigs { + config.Configs = []OperatorConfig{ + {GitRef: "4.0.0", Image: "quay.io/rhacs-eng/test:4.0.0", HelmValues: "invalid YAML"}, + } + return config + }, + contains: "Unmarshalling Helm values failed for operator 4.0.0", + }, + } + + for key, testCase := range testCases { + t.Run(key, func(t *testing.T) { + config, err := parseConfig(getExampleConfig()) + require.NoError(t, err) + + err = Validate(field.NewPath("rhacsOperator"), testCase.getConfig(t, config)) + require.NotNil(t, err) + require.NotEmpty(t, testCase.contains) + assert.Contains(t, err.Error(), testCase.contains) + }) + } } diff --git a/fleetshard/pkg/central/operator/upgrade.go b/fleetshard/pkg/central/operator/upgrade.go index 775e78c7a5..2da55db3f5 100644 --- a/fleetshard/pkg/central/operator/upgrade.go +++ b/fleetshard/pkg/central/operator/upgrade.go @@ -118,7 +118,10 @@ func (u *ACSOperatorManager) RenderChart(operators OperatorConfigs) ([]*unstruct } } - u.resourcesChart = charts.MustGetChart("rhacs-operator", dynamicTemplatesUrls) + u.resourcesChart, err = charts.GetChart("rhacs-operator", dynamicTemplatesUrls) + if err != nil { + return nil, fmt.Errorf("failed getting chart: %w", err) + } objs, err := charts.RenderToObjects(releaseName, ACSOperatorNamespace, u.resourcesChart, chartVals) if err != nil { return nil, fmt.Errorf("failed rendering operator chart: %w", err) From 56f96c5538371cc71e7017195c91784306ce4056 Mon Sep 17 00:00:00 2001 From: Johannes Malsam <60240743+johannes94@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:13:39 +0200 Subject: [PATCH 04/20] fix typo causing skip of DNS creation on restore (#1277) --- internal/dinosaur/pkg/services/dinosaur.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/dinosaur/pkg/services/dinosaur.go b/internal/dinosaur/pkg/services/dinosaur.go index 9a397d1be2..5005186a83 100644 --- a/internal/dinosaur/pkg/services/dinosaur.go +++ b/internal/dinosaur/pkg/services/dinosaur.go @@ -3,12 +3,13 @@ package services import ( "context" "fmt" + "sync" + "time" + "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/rhsso" "github.com/stackrox/acs-fleet-manager/pkg/client/iam" dynamicClientAPI "github.com/stackrox/acs-fleet-manager/pkg/client/redhatsso/api" "github.com/stackrox/acs-fleet-manager/pkg/client/redhatsso/dynamicclients" - "sync" - "time" dinosaurConstants "github.com/stackrox/acs-fleet-manager/internal/dinosaur/constants" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/api/dbapi" @@ -812,7 +813,7 @@ func (k *dinosaurService) Restore(ctx context.Context, id string) *errors.Servic "Routes", "Status", "RoutesCreated", - "RouteCreationID", + "RoutesCreationID", "DeletedAt", "DeletionTimestamp", "ClientID", @@ -827,7 +828,7 @@ func (k *dinosaurService) Restore(ctx context.Context, id string) *errors.Servic resetRequest.Status = dinosaurConstants.CentralRequestStatusPreparing.String() resetRequest.CreatedAt = time.Now() - if err := dbConn.Unscoped().Model(¢ralRequest).Select(columnsToReset).Updates(resetRequest).Error; err != nil { + if err := dbConn.Unscoped().Model(resetRequest).Select(columnsToReset).Updates(resetRequest).Error; err != nil { return errors.NewWithCause(errors.ErrorGeneral, err, "Unable to reset CentralRequest status") } From 427ca8f30e8792bdc0af16b66d6d33eb19de0872 Mon Sep 17 00:00:00 2001 From: Ludovic Cleroux Date: Tue, 19 Sep 2023 13:23:58 +0200 Subject: [PATCH 05/20] ROX-19718: Add flag for fleetmanager gitops (#1283) --- Makefile | 10 ++ dev/env/defaults/00-defaults.env | 1 + .../02-fleet-manager-deployment.yaml | 7 ++ .../fleet-manager/04-gitops-config.yaml | 41 +++++++ dev/env/scripts/lib.sh | 3 +- dev/env/scripts/update_gitops_config.sh | 9 ++ e2e/e2e_test.go | 107 +----------------- internal/dinosaur/pkg/gitops/module.go | 25 ++++ internal/dinosaur/pkg/gitops/provider.go | 12 +- pkg/providers/core.go | 2 + 10 files changed, 109 insertions(+), 108 deletions(-) create mode 100644 dev/env/manifests/fleet-manager/04-gitops-config.yaml create mode 100755 dev/env/scripts/update_gitops_config.sh create mode 100644 internal/dinosaur/pkg/gitops/module.go diff --git a/Makefile b/Makefile index a518d651d8..95df341118 100644 --- a/Makefile +++ b/Makefile @@ -909,6 +909,16 @@ deploy/dev-fast/fleetshard-sync: image/build kubectl -n $(ACSMS_NAMESPACE) set image deploy/fleetshard-sync fleetshard-sync=$(SHORT_IMAGE_REF) kubectl -n $(ACSMS_NAMESPACE) delete pod -l application=fleetshard-sync +# When making changes to the gitops configuration for development purposes +# situated here dev/env/manifests/fleet-manager/04-gitops-config.yaml, this +# target will update the gitops configmap on the dev cluster. +# It might take a few seconds/minutes for fleet-manager to observe the changes. +# Changes to the configmap are hot-reloaded +# See https://kubernetes.io/docs/concepts/configuration/configmap/#mounted-configmaps-are-updated-automatically +deploy/dev/update-gitops-config: + ./dev/env/scripts/update_gitops_config.sh +.PHONY: deploy/dev/update-gitops-config + tag: @echo "$(image_tag)" .PHONY: tag diff --git a/dev/env/defaults/00-defaults.env b/dev/env/defaults/00-defaults.env index c738e6bb1a..04ec228141 100644 --- a/dev/env/defaults/00-defaults.env +++ b/dev/env/defaults/00-defaults.env @@ -65,3 +65,4 @@ export ENABLE_EXTERNAL_CONFIG_DEFAULT=false export AWS_AUTH_HELPER_DEFAULT="" export RHACS_TARGETED_OPERATOR_UPGRADES_DEFAULT="false" export RHACS_STANDALONE_MODE_DEFAULT="false" +export RHACS_GITOPS_ENABLED_DEFAULT="true" diff --git a/dev/env/manifests/fleet-manager/02-fleet-manager-deployment.yaml b/dev/env/manifests/fleet-manager/02-fleet-manager-deployment.yaml index 690ea2e8cc..dddf47d49a 100644 --- a/dev/env/manifests/fleet-manager/02-fleet-manager-deployment.yaml +++ b/dev/env/manifests/fleet-manager/02-fleet-manager-deployment.yaml @@ -82,6 +82,9 @@ spec: name: secrets - mountPath: /config name: config + - mountPath: /gitops-config + name: gitops-config + readOnly: true restartPolicy: Always volumes: - name: secrets @@ -91,3 +94,7 @@ spec: - name: config configMap: name: config + - name: gitops-config + configMap: + name: fleet-manager-gitops-config + optional: true diff --git a/dev/env/manifests/fleet-manager/04-gitops-config.yaml b/dev/env/manifests/fleet-manager/04-gitops-config.yaml new file mode 100644 index 0000000000..9812789c28 --- /dev/null +++ b/dev/env/manifests/fleet-manager/04-gitops-config.yaml @@ -0,0 +1,41 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: fleet-manager-gitops-config + namespace: "$ACSMS_NAMESPACE" +data: + config.yaml: | + centrals: + overrides: + - instanceIds: + - "*" + patch: | + spec: + central: + monitoring: + openshift: + enabled: false + resources: + limits: + cpu: null + memory: 1Gi + requests: + cpu: 100m + memory: 200Mi + scanner: + analyzer: + resources: + limits: + cpu: null + memory: 1Gi + requests: + cpu: 100m + memory: 500Mi + db: + resources: + limits: + cpu: null + memory: 1Gi + requests: + cpu: 100m + memory: 500Mi diff --git a/dev/env/scripts/lib.sh b/dev/env/scripts/lib.sh index 29adea45d6..c8236e45aa 100644 --- a/dev/env/scripts/lib.sh +++ b/dev/env/scripts/lib.sh @@ -140,8 +140,9 @@ init() { export DEBUG_PODS=${DEBUG_PODS:-$DEBUG_PODS_DEFAULT} export RHACS_TARGETED_OPERATOR_UPGRADES=${RHACS_TARGETED_OPERATOR_UPGRADES:-$RHACS_TARGETED_OPERATOR_UPGRADES_DEFAULT} export RHACS_STANDALONE_MODE=${RHACS_STANDALONE_MODE:-$RHACS_STANDALONE_MODE_DEFAULT} + export RHACS_GITOPS_ENABLED=${RHACS_GITOPS_ENABLED:-$RHACS_GITOPS_ENABLED_DEFAULT} - local fleet_manager_command="/usr/local/bin/fleet-manager serve --force-leader --api-server-bindaddress=0.0.0.0:8000 --health-check-server-bindaddress=0.0.0.0:8083 --kubeconfig=/secrets/kubeconfig --enable-central-external-certificate=$ENABLE_CENTRAL_EXTERNAL_CERTIFICATE --central-domain-name='$CENTRAL_DOMAIN_NAME'" + local fleet_manager_command="/usr/local/bin/fleet-manager serve --force-leader --api-server-bindaddress=0.0.0.0:8000 --health-check-server-bindaddress=0.0.0.0:8083 --kubeconfig=/secrets/kubeconfig --enable-central-external-certificate=$ENABLE_CENTRAL_EXTERNAL_CERTIFICATE --central-domain-name='$CENTRAL_DOMAIN_NAME' --gitops-config-path='/gitops-config/config.yaml'" FLEET_MANAGER_CONTAINER_COMMAND_DEFAULT="${fleet_manager_command} || { sleep 120; false; }" FLEETSHARD_SYNC_CONTAINER_COMMAND_DEFAULT="/usr/local/bin/fleetshard-sync" if [[ "$DEBUG_PODS" == "true" ]]; then diff --git a/dev/env/scripts/update_gitops_config.sh b/dev/env/scripts/update_gitops_config.sh new file mode 100755 index 0000000000..5279c00390 --- /dev/null +++ b/dev/env/scripts/update_gitops_config.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -eu -o pipefail + +GITROOT="$(git rev-parse --show-toplevel)" +source "${GITROOT}/dev/env/scripts/lib.sh" +init + +apply "$GITROOT/dev/env/manifests/fleet-manager/04-gitops-config.yaml" diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 481dd637bb..dc0c0668ee 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -17,14 +17,12 @@ import ( "github.com/stackrox/acs-fleet-manager/internal/dinosaur/constants" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/api/admin/private" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/api/public" - "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/converters" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/services" "github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager" "github.com/stackrox/rox/operator/apis/platform/v1alpha1" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" apiErrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ctrlClient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/yaml" @@ -322,51 +320,13 @@ var _ = Describe("Central", func() { var createdCentral *private.CentralRequest var namespaceName string - centralResources := private.ResourceRequirements{ - Requests: map[string]string{ - corev1.ResourceCPU.String(): "210m", - corev1.ResourceMemory.String(): "210M", - }, - Limits: map[string]string{ - corev1.ResourceCPU.String(): "310m", - corev1.ResourceMemory.String(): "310M", - }, - } - centralSpec := private.CentralSpec{ - Resources: centralResources, - } - scannerResources := private.ResourceRequirements{ - Requests: map[string]string{ - corev1.ResourceCPU.String(): "210m", - corev1.ResourceMemory.String(): "310M", - }, - Limits: map[string]string{ - corev1.ResourceCPU.String(): "211m", - corev1.ResourceMemory.String(): "311M", - }, - } - scannerScaling := private.ScannerSpecAnalyzerScaling{ - AutoScaling: "Enabled", - Replicas: 1, - MinReplicas: 1, - MaxReplicas: 2, - } - scannerSpec := private.ScannerSpec{ - Analyzer: private.ScannerSpecAnalyzer{ - Resources: scannerResources, - Scaling: scannerScaling, - }, - } - - It("should create central with custom resource configuration", func() { + It("should create central", func() { centralName := newCentralName() request := private.CentralRequestPayload{ Name: centralName, MultiAz: true, CloudProvider: dpCloudProvider, Region: dpRegion, - Central: centralSpec, - Scanner: scannerSpec, } resp, _, err := adminAPI.CreateCentral(context.TODO(), true, request) Expect(err).To(BeNil()) @@ -391,71 +351,6 @@ var _ = Describe("Central", func() { }).WithTimeout(waitTimeout).WithPolling(defaultPolling).Should(Succeed()) }) - It("central resources match configured settings", func() { - if createdCentral == nil { - Fail("central not created") - } - coreV1Resources := central.Spec.Central.DeploymentSpec.Resources - expectedResources, err := converters.ConvertAdminPrivateRequirementsToCoreV1(¢ralResources) - Expect(err).ToNot(HaveOccurred()) - Expect(*coreV1Resources).To(Equal(expectedResources)) - }) - - It("scanner analyzer resources match configured settings", func() { - if createdCentral == nil { - Fail("central not created") - } - coreV1Resources := central.Spec.Scanner.Analyzer.DeploymentSpec.Resources - expectedResources, err := converters.ConvertAdminPrivateRequirementsToCoreV1(&scannerResources) - Expect(err).ToNot(HaveOccurred()) - Expect(*coreV1Resources).To(Equal(expectedResources)) - - scaling := central.Spec.Scanner.Analyzer.Scaling - expectedScaling, err := converters.ConvertAdminPrivateScalingToV1(&scannerScaling) - Expect(err).ToNot(HaveOccurred()) - Expect(*scaling).To(Equal(expectedScaling)) - }) - - It("resources should be updatable", func() { - if createdCentral == nil { - Fail("central not created") - } - updateReq := private.CentralUpdateRequest{ - Central: private.CentralSpec{ - Resources: private.ResourceRequirements{ - Requests: map[string]string{ - corev1.ResourceMemory.String(): "199M", - }, - Limits: map[string]string{ - corev1.ResourceCPU.String(): "315m", - }, - }, - }, - } - newCentralResources := corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("210m"), - corev1.ResourceMemory: resource.MustParse("199M"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("315m"), - corev1.ResourceMemory: resource.MustParse("310M"), - }, - } - - _, _, err = adminAPI.UpdateCentralById(context.TODO(), centralID, updateReq) - Expect(err).ToNot(HaveOccurred()) - Eventually(func() corev1.ResourceRequirements { - central := &v1alpha1.Central{} - err := k8sClient.Get(context.Background(), ctrlClient.ObjectKey{Name: createdCentral.Name, Namespace: namespaceName}, central) - Expect(err).ToNot(HaveOccurred()) - if central.Spec.Central == nil || central.Spec.Central.Resources == nil { - return corev1.ResourceRequirements{} - } - return *central.Spec.Central.Resources - }).WithTimeout(waitTimeout).WithPolling(defaultPolling).Should(Equal(newCentralResources)) - }) - It("should transition central's state to ready", func() { if createdCentral == nil { Fail("central not created") diff --git a/internal/dinosaur/pkg/gitops/module.go b/internal/dinosaur/pkg/gitops/module.go new file mode 100644 index 0000000000..10501c92de --- /dev/null +++ b/internal/dinosaur/pkg/gitops/module.go @@ -0,0 +1,25 @@ +package gitops + +import "github.com/spf13/pflag" + +// Module ... +type Module struct { + ConfigPath string `json:"config_path"` +} + +// NewModule ... +func NewModule() *Module { + return &Module{ + ConfigPath: "", + } +} + +// AddFlags ... +func (s *Module) AddFlags(fs *pflag.FlagSet) { + fs.StringVar(&s.ConfigPath, "gitops-config-path", s.ConfigPath, "GitOps configuration path") +} + +// ReadFiles ... +func (s *Module) ReadFiles() error { + return nil +} diff --git a/internal/dinosaur/pkg/gitops/provider.go b/internal/dinosaur/pkg/gitops/provider.go index 5136c03090..4adc352c96 100644 --- a/internal/dinosaur/pkg/gitops/provider.go +++ b/internal/dinosaur/pkg/gitops/provider.go @@ -23,7 +23,17 @@ type provider struct { } // NewProvider returns a new ConfigProvider. -func NewProvider(reader Reader) ConfigProvider { +func NewProvider(module *Module) ConfigProvider { + + var reader Reader + if len(module.ConfigPath) > 0 { + glog.Infof("Using GitOps configuration from %s", module.ConfigPath) + reader = NewFileReader(module.ConfigPath) + } else { + glog.Infof("Using empty GitOps configuration") + reader = NewEmptyReader() + } + return &provider{ reader: reader, lastWorkingConfig: atomic.Pointer[Config]{}, diff --git a/pkg/providers/core.go b/pkg/providers/core.go index 95bca43997..e5cc3db2f1 100644 --- a/pkg/providers/core.go +++ b/pkg/providers/core.go @@ -3,6 +3,7 @@ package providers import ( "github.com/goava/di" + "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/gitops" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/services" "github.com/stackrox/acs-fleet-manager/pkg/acl" "github.com/stackrox/acs-fleet-manager/pkg/auth" @@ -44,6 +45,7 @@ func CoreConfigProviders() di.Option { di.Provide(auth.NewFleetShardAuthZConfig, di.As(new(environments.ConfigModule))), di.Provide(auth.NewAdminAuthZConfig, di.As(new(environments.ConfigModule))), di.Provide(telemetry.NewTelemetryConfig, di.As(new(environments.ConfigModule))), + di.Provide(gitops.NewModule, di.As(new(environments.ConfigModule))), // Add other core config providers.. sentry.ConfigProviders(), From ec0f65b106baf213f332408611384c66d73cd83c Mon Sep 17 00:00:00 2001 From: Ivan Degtiarenko <78353299+ivan-degtiarenko@users.noreply.github.com> Date: Tue, 19 Sep 2023 13:24:41 +0200 Subject: [PATCH 06/20] Specify reconcile interval in workers (#1265) --- internal/dinosaur/pkg/workers/clusters_mgr.go | 5 ++ pkg/workers/reconciler.go | 5 +- pkg/workers/reconciler_test.go | 3 + pkg/workers/worker_interface.go | 12 +++- ...terface_moq.go => worker_interface_moq.go} | 56 ++++++++++++++++--- test/helper.go | 2 +- 6 files changed, 68 insertions(+), 15 deletions(-) rename pkg/workers/{woker_interface_moq.go => worker_interface_moq.go} (85%) diff --git a/internal/dinosaur/pkg/workers/clusters_mgr.go b/internal/dinosaur/pkg/workers/clusters_mgr.go index b5d1418107..4bfa81281f 100644 --- a/internal/dinosaur/pkg/workers/clusters_mgr.go +++ b/internal/dinosaur/pkg/workers/clusters_mgr.go @@ -5,6 +5,7 @@ import ( "fmt" "strings" "sync" + "time" dinosaurConstants "github.com/stackrox/acs-fleet-manager/internal/dinosaur/constants" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/clusters/types" @@ -134,6 +135,10 @@ func (c *ClusterManager) GetWorkerType() string { return c.workerType } +func (c *ClusterManager) GetRepeatInterval() time.Duration { + return workers.DefaultRepeatInterval +} + // Start initializes the cluster manager to reconcile osd clusters func (c *ClusterManager) Start() { metrics.SetLeaderWorkerMetric(c.workerType, true) diff --git a/pkg/workers/reconciler.go b/pkg/workers/reconciler.go index 93dd23029c..410c3bd4f2 100644 --- a/pkg/workers/reconciler.go +++ b/pkg/workers/reconciler.go @@ -12,9 +12,6 @@ import ( "github.com/golang/glog" ) -// RepeatInterval ... -var RepeatInterval = 30 * time.Second - // Reconciler ... type Reconciler struct { di.Inject @@ -26,7 +23,7 @@ func (r *Reconciler) Start(worker Worker) { worker.GetSyncGroup().Add(1) worker.SetIsRunning(true) - ticker := time.NewTicker(RepeatInterval) + ticker := time.NewTicker(worker.GetRepeatInterval()) go func() { // starts reconcile immediately and then on every repeat interval glog.V(1).Infoln(fmt.Sprintf("Initial reconciliation loop for %T [%s]", worker, worker.GetID())) diff --git a/pkg/workers/reconciler_test.go b/pkg/workers/reconciler_test.go index a4c9cadb4a..521ed1c63b 100644 --- a/pkg/workers/reconciler_test.go +++ b/pkg/workers/reconciler_test.go @@ -36,6 +36,9 @@ func TestReconciler_Wakeup(t *testing.T) { reconcileChan <- time.Now() return errors }, + GetRepeatIntervalFunc: func() time.Duration { + return DefaultRepeatInterval + }, } waitForReconcile := func(d time.Duration) (timeout bool) { diff --git a/pkg/workers/worker_interface.go b/pkg/workers/worker_interface.go index 4d9101c70e..5050c59693 100644 --- a/pkg/workers/worker_interface.go +++ b/pkg/workers/worker_interface.go @@ -2,14 +2,19 @@ package workers import ( "sync" + "time" "github.com/golang/glog" "github.com/stackrox/acs-fleet-manager/pkg/metrics" ) +// DefaultRepeatInterval is default interval with which workers Reconcile() method will be called. +// It is variable and not constant so that we could easily change this value in tests. +var DefaultRepeatInterval = 30 * time.Second + // Worker ... // -//go:generate moq -out woker_interface_moq.go . Worker +//go:generate moq -out worker_interface_moq.go . Worker type Worker interface { GetID() string GetWorkerType() string @@ -20,6 +25,7 @@ type Worker interface { GetSyncGroup() *sync.WaitGroup IsRunning() bool SetIsRunning(val bool) + GetRepeatInterval() time.Duration } // BaseWorker ... @@ -75,3 +81,7 @@ func (b *BaseWorker) StopWorker(w Worker) { metrics.ResetMetricsForCentralManagers() metrics.SetLeaderWorkerMetric(b.WorkerType, false) } + +func (b *BaseWorker) GetRepeatInterval() time.Duration { + return DefaultRepeatInterval +} diff --git a/pkg/workers/woker_interface_moq.go b/pkg/workers/worker_interface_moq.go similarity index 85% rename from pkg/workers/woker_interface_moq.go rename to pkg/workers/worker_interface_moq.go index aa21c8df73..5bbdc89ae5 100644 --- a/pkg/workers/woker_interface_moq.go +++ b/pkg/workers/worker_interface_moq.go @@ -5,6 +5,7 @@ package workers import ( "sync" + "time" ) // Ensure, that WorkerMock does implement Worker. @@ -20,6 +21,9 @@ var _ Worker = &WorkerMock{} // GetIDFunc: func() string { // panic("mock out the GetID method") // }, +// GetRepeatIntervalFunc: func() time.Duration { +// panic("mock out the GetRepeatInterval method") +// }, // GetStopChanFunc: func() *chan struct{} { // panic("mock out the GetStopChan method") // }, @@ -54,6 +58,9 @@ type WorkerMock struct { // GetIDFunc mocks the GetID method. GetIDFunc func() string + // GetRepeatIntervalFunc mocks the GetRepeatInterval method. + GetRepeatIntervalFunc func() time.Duration + // GetStopChanFunc mocks the GetStopChan method. GetStopChanFunc func() *chan struct{} @@ -83,6 +90,9 @@ type WorkerMock struct { // GetID holds details about calls to the GetID method. GetID []struct { } + // GetRepeatInterval holds details about calls to the GetRepeatInterval method. + GetRepeatInterval []struct { + } // GetStopChan holds details about calls to the GetStopChan method. GetStopChan []struct { } @@ -110,15 +120,16 @@ type WorkerMock struct { Stop []struct { } } - lockGetID sync.RWMutex - lockGetStopChan sync.RWMutex - lockGetSyncGroup sync.RWMutex - lockGetWorkerType sync.RWMutex - lockIsRunning sync.RWMutex - lockReconcile sync.RWMutex - lockSetIsRunning sync.RWMutex - lockStart sync.RWMutex - lockStop sync.RWMutex + lockGetID sync.RWMutex + lockGetRepeatInterval sync.RWMutex + lockGetStopChan sync.RWMutex + lockGetSyncGroup sync.RWMutex + lockGetWorkerType sync.RWMutex + lockIsRunning sync.RWMutex + lockReconcile sync.RWMutex + lockSetIsRunning sync.RWMutex + lockStart sync.RWMutex + lockStop sync.RWMutex } // GetID calls GetIDFunc. @@ -148,6 +159,33 @@ func (mock *WorkerMock) GetIDCalls() []struct { return calls } +// GetRepeatInterval calls GetRepeatIntervalFunc. +func (mock *WorkerMock) GetRepeatInterval() time.Duration { + if mock.GetRepeatIntervalFunc == nil { + panic("WorkerMock.GetRepeatIntervalFunc: method is nil but Worker.GetRepeatInterval was just called") + } + callInfo := struct { + }{} + mock.lockGetRepeatInterval.Lock() + mock.calls.GetRepeatInterval = append(mock.calls.GetRepeatInterval, callInfo) + mock.lockGetRepeatInterval.Unlock() + return mock.GetRepeatIntervalFunc() +} + +// GetRepeatIntervalCalls gets all the calls that were made to GetRepeatInterval. +// Check the length with: +// +// len(mockedWorker.GetRepeatIntervalCalls()) +func (mock *WorkerMock) GetRepeatIntervalCalls() []struct { +} { + var calls []struct { + } + mock.lockGetRepeatInterval.RLock() + calls = mock.calls.GetRepeatInterval + mock.lockGetRepeatInterval.RUnlock() + return calls +} + // GetStopChan calls GetStopChanFunc. func (mock *WorkerMock) GetStopChan() *chan struct{} { if mock.GetStopChanFunc == nil { diff --git a/test/helper.go b/test/helper.go index 4dd3187791..de6f993bd1 100644 --- a/test/helper.go +++ b/test/helper.go @@ -127,7 +127,7 @@ func NewHelperWithHooks(t *testing.T, httpServer *httptest.Server, configuration // Set server if provided if httpServer != nil && ocmConfig.MockMode == ocm.MockModeEmulateServer { - workers.RepeatInterval = 1 * time.Second + workers.DefaultRepeatInterval = 1 * time.Second fmt.Printf("Setting OCM base URL to %s\n", httpServer.URL) ocmConfig.BaseURL = httpServer.URL ocmConfig.AmsURL = httpServer.URL From 89877207f6c551a8a47387284ad44def4242c38f Mon Sep 17 00:00:00 2001 From: Ivan Degtiarenko <78353299+ivan-degtiarenko@users.noreply.github.com> Date: Tue, 19 Sep 2023 16:42:29 +0200 Subject: [PATCH 07/20] Add request body to rotate-secrets endpoint (#1272) --- .../pkg/api/admin/private/api/openapi.yaml | 14 +++++++++++ .../pkg/api/admin/private/api_default.go | 7 ++++-- .../model_central_rotate_secrets_request.go | 16 ++++++++++++ .../dinosaur/pkg/handlers/admin_dinosaur.go | 25 +++++++++++++++---- internal/dinosaur/pkg/services/dinosaur.go | 1 - openapi/fleet-manager-private-admin.yaml | 13 ++++++++++ 6 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 internal/dinosaur/pkg/api/admin/private/model_central_rotate_secrets_request.go diff --git a/internal/dinosaur/pkg/api/admin/private/api/openapi.yaml b/internal/dinosaur/pkg/api/admin/private/api/openapi.yaml index 0e9ad735a7..4045a41d9e 100644 --- a/internal/dinosaur/pkg/api/admin/private/api/openapi.yaml +++ b/internal/dinosaur/pkg/api/admin/private/api/openapi.yaml @@ -385,6 +385,13 @@ paths: required: true schema: type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CentralRotateSecretsRequest' + description: Options for secret rotation + required: true responses: "200": description: RHSSO client successfully rotated @@ -618,6 +625,13 @@ components: example: quay.io/rhacs-eng/stackrox-operator:3.74.1 type: string type: object + CentralRotateSecretsRequest: + example: + rotate_rhsso_client_credentials: true + properties: + rotate_rhsso_client_credentials: + type: boolean + type: object Error: allOf: - $ref: '#/components/schemas/ObjectReference' diff --git a/internal/dinosaur/pkg/api/admin/private/api_default.go b/internal/dinosaur/pkg/api/admin/private/api_default.go index 484f0e8783..6563e96c27 100644 --- a/internal/dinosaur/pkg/api/admin/private/api_default.go +++ b/internal/dinosaur/pkg/api/admin/private/api_default.go @@ -146,8 +146,9 @@ func (a *DefaultApiService) ApiRhacsV1AdminCentralsIdRestorePost(ctx _context.Co ApiRhacsV1AdminCentralsIdRotateSecretsPost Rotate RHSSO client of a central tenant - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param id The ID of record + - @param centralRotateSecretsRequest Options for secret rotation */ -func (a *DefaultApiService) ApiRhacsV1AdminCentralsIdRotateSecretsPost(ctx _context.Context, id string) (*_nethttp.Response, error) { +func (a *DefaultApiService) ApiRhacsV1AdminCentralsIdRotateSecretsPost(ctx _context.Context, id string, centralRotateSecretsRequest CentralRotateSecretsRequest) (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -165,7 +166,7 @@ func (a *DefaultApiService) ApiRhacsV1AdminCentralsIdRotateSecretsPost(ctx _cont localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -181,6 +182,8 @@ func (a *DefaultApiService) ApiRhacsV1AdminCentralsIdRotateSecretsPost(ctx _cont if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = ¢ralRotateSecretsRequest r, err := a.client.prepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { return nil, err diff --git a/internal/dinosaur/pkg/api/admin/private/model_central_rotate_secrets_request.go b/internal/dinosaur/pkg/api/admin/private/model_central_rotate_secrets_request.go new file mode 100644 index 0000000000..923a99f7e5 --- /dev/null +++ b/internal/dinosaur/pkg/api/admin/private/model_central_rotate_secrets_request.go @@ -0,0 +1,16 @@ +/* + * Red Hat Advanced Cluster Security Service Fleet Manager Admin API + * + * Red Hat Advanced Cluster Security (RHACS) Service Fleet Manager Admin APIs that can be used by RHACS Managed Service Operations Team. + * + * API version: 0.0.3 + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. +package private + +// CentralRotateSecretsRequest struct for CentralRotateSecretsRequest +type CentralRotateSecretsRequest struct { + RotateRhssoClientCredentials bool `json:"rotate_rhsso_client_credentials,omitempty"` +} diff --git a/internal/dinosaur/pkg/handlers/admin_dinosaur.go b/internal/dinosaur/pkg/handlers/admin_dinosaur.go index 4c16ab8cb4..27ceaf324e 100644 --- a/internal/dinosaur/pkg/handlers/admin_dinosaur.go +++ b/internal/dinosaur/pkg/handlers/admin_dinosaur.go @@ -433,13 +433,28 @@ func (h adminCentralHandler) RotateSecrets(w http.ResponseWriter, r *http.Reques cfg := &handlers.HandlerConfig{ Action: func() (i interface{}, serviceError *errors.ServiceError) { id := mux.Vars(r)["id"] - ctx := r.Context() - centralRequest, err := h.service.Get(ctx, id) + updateBytes, err := io.ReadAll(r.Body) if err != nil { - return nil, err + return nil, errors.NewWithCause(errors.ErrorBadRequest, err, "Reading request body: %s", err.Error()) } - err = h.service.RotateCentralRHSSOClient(ctx, centralRequest) - return nil, err + + rotateSecretsRequest := private.CentralRotateSecretsRequest{} // pragma: allowlist secret + if err := json.Unmarshal(updateBytes, &rotateSecretsRequest); err != nil { + return nil, errors.NewWithCause(errors.ErrorBadRequest, err, "Unmarshalling request body: %s", err.Error()) + } + + ctx := r.Context() + centralRequest, svcErr := h.service.Get(ctx, id) + if svcErr != nil { + return nil, svcErr + } + if rotateSecretsRequest.RotateRhssoClientCredentials { + svcErr = h.service.RotateCentralRHSSOClient(ctx, centralRequest) + if svcErr != nil { + return nil, svcErr + } + } + return nil, nil }, } handlers.Handle(w, r, cfg, http.StatusOK) diff --git a/internal/dinosaur/pkg/services/dinosaur.go b/internal/dinosaur/pkg/services/dinosaur.go index 5005186a83..066d88dfcf 100644 --- a/internal/dinosaur/pkg/services/dinosaur.go +++ b/internal/dinosaur/pkg/services/dinosaur.go @@ -161,7 +161,6 @@ func (k *dinosaurService) RotateCentralRHSSOClient(ctx context.Context, centralR previousAuthConfig := centralRequest.AuthConfig if err := rhsso.AugmentWithDynamicAuthConfig(ctx, centralRequest, k.iamConfig.RedhatSSORealm, k.rhSSODynamicClientsAPI); err != nil { return errors.NewWithCause(errors.ErrorClientRotationFailed, err, "failed to augment auth config") - } if err := k.Update(centralRequest); err != nil { glog.Errorf("Rotating RHSSO client failed: created new RHSSO dynamic client, but failed to update central record, client ID is %s", centralRequest.AuthConfig.ClientID) diff --git a/openapi/fleet-manager-private-admin.yaml b/openapi/fleet-manager-private-admin.yaml index 07cb127298..e8e94cbcc6 100644 --- a/openapi/fleet-manager-private-admin.yaml +++ b/openapi/fleet-manager-private-admin.yaml @@ -264,6 +264,13 @@ paths: summary: Rotate RHSSO client of a central tenant parameters: - $ref: "fleet-manager.yaml#/components/parameters/id" + requestBody: + description: Options for secret rotation + content: + application/json: + schema: + $ref: '#/components/schemas/CentralRotateSecretsRequest' + required: true responses: "200": description: RHSSO client successfully rotated @@ -528,6 +535,12 @@ components: type: string example: "quay.io/rhacs-eng/stackrox-operator:3.74.1" + CentralRotateSecretsRequest: + type: object + properties: + rotate_rhsso_client_credentials: + type: boolean + securitySchemes: Bearer: scheme: bearer From 48c99979e07fa03da115055bb72f72f7897c2195 Mon Sep 17 00:00:00 2001 From: Alex Rukletsov Date: Wed, 20 Sep 2023 21:12:58 +0200 Subject: [PATCH 08/20] Disable automounting for egress proxy (#1286) --- .../charts/data/tenant-resources/templates/egress-proxy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/fleetshard/pkg/central/charts/data/tenant-resources/templates/egress-proxy.yaml b/fleetshard/pkg/central/charts/data/tenant-resources/templates/egress-proxy.yaml index ee460d5cda..944ac098ad 100644 --- a/fleetshard/pkg/central/charts/data/tenant-resources/templates/egress-proxy.yaml +++ b/fleetshard/pkg/central/charts/data/tenant-resources/templates/egress-proxy.yaml @@ -32,6 +32,7 @@ spec: annotations: config-hash: {{ .Files.Get "config/squid.conf" | sha256sum | quote }} spec: + automountServiceAccountToken: false podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - labelSelector: From af2d40ad6b4c4b89794848d82c721e4c7f1ccb45 Mon Sep 17 00:00:00 2001 From: Ludovic Cleroux Date: Thu, 21 Sep 2023 09:31:56 +0200 Subject: [PATCH 09/20] ROX-19808: Remove GitOps admin handler (#1290) Remove GitOps admin handler --- .../dinosaur/pkg/handlers/admin_dinosaur.go | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/internal/dinosaur/pkg/handlers/admin_dinosaur.go b/internal/dinosaur/pkg/handlers/admin_dinosaur.go index 27ceaf324e..19e49a17c7 100644 --- a/internal/dinosaur/pkg/handlers/admin_dinosaur.go +++ b/internal/dinosaur/pkg/handlers/admin_dinosaur.go @@ -459,47 +459,3 @@ func (h adminCentralHandler) RotateSecrets(w http.ResponseWriter, r *http.Reques } handlers.Handle(w, r, cfg, http.StatusOK) } - -type gitOpsAdminHandler struct{} - -var _ AdminCentralHandler = (*gitOpsAdminHandler)(nil) - -func (g gitOpsAdminHandler) Create(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} - -func (g gitOpsAdminHandler) Get(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} - -func (g gitOpsAdminHandler) List(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} - -func (g gitOpsAdminHandler) Update(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} - -func (g gitOpsAdminHandler) Delete(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} - -func (g gitOpsAdminHandler) DbDelete(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} - -func (g gitOpsAdminHandler) SetCentralDefaultVersion(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} - -func (g gitOpsAdminHandler) GetCentralDefaultVersion(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} - -func (g gitOpsAdminHandler) Restore(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} - -func (g gitOpsAdminHandler) RotateSecrets(w http.ResponseWriter, r *http.Request) { - http.Error(w, "not implemented", http.StatusNotImplemented) -} From e650482c87c82da0795da8199cf10f162fe0d121 Mon Sep 17 00:00:00 2001 From: Marcin Owsiany Date: Thu, 21 Sep 2023 10:12:19 +0200 Subject: [PATCH 10/20] ROX-19692: Add a release preparation workflow. (#1284) Prepare release workflow. --- .github/workflows/start-release.yaml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/start-release.yaml diff --git a/.github/workflows/start-release.yaml b/.github/workflows/start-release.yaml new file mode 100644 index 0000000000..3ebe9a2cf3 --- /dev/null +++ b/.github/workflows/start-release.yaml @@ -0,0 +1,45 @@ +name: Start release +on: + workflow_dispatch: + inputs: + commit: + description: 'Commit to merge into the stage branch (branch name, tag name or SHA)' + required: true + default: 'main' + type: string + release_version: + description: 'Release version in the format YYYY-MM-DD.N' + required: true + default: 'YYYY-MM-DD.1' + type: string + +jobs: + prepare-stage-pr: + runs-on: ubuntu-latest + name: Prepare stage PR + steps: + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # action-create-branch does not accept symbolic refs, so we need to parse it here. + - name: Canonicalize the commit ID + run: | + echo "commit_hash=$(git rev-parse --verify --quiet 'remotes/origin/${{ inputs.commit }}' || git rev-parse --verify --quiet '${{ inputs.commit }}')" >> "$GITHUB_ENV" + + - name: Create Release Candidate branch + uses: peterjgrainger/action-create-branch@v2.3.0 + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + branch: 'rc-${{ inputs.release_version }}' + sha: '${{ env.commit_hash }}' + + - name: Open a pull request + uses: tretuna/sync-branches@1.4.0 + with: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + FROM_BRANCH: 'rc-${{ inputs.release_version }}' + TO_BRANCH: 'stage' From 12573149dab2578d7f3efb14d5c3e31dc03265d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=A4umer?= Date: Thu, 21 Sep 2023 11:42:34 +0200 Subject: [PATCH 11/20] ROX-19735 - add operator configs to gitops (#1278) --- .../fleet-manager/04-gitops-config.yaml | 15 ++++++ fleetshard/pkg/central/operator/config.go | 26 ++++------ .../pkg/central/operator/config_test.go | 34 +++++++----- fleetshard/pkg/central/operator/upgrade.go | 16 +++--- .../pkg/central/reconciler/reconciler.go | 26 ---------- .../pkg/central/reconciler/reconciler_test.go | 52 ------------------- fleetshard/pkg/runtime/runtime.go | 12 +++-- internal/dinosaur/pkg/gitops/config.go | 5 +- internal/dinosaur/pkg/gitops/config_test.go | 38 +++++++++++++- .../pkg/handlers/data_plane_dinosaur.go | 24 +++++---- internal/dinosaur/pkg/routes/route_loader.go | 23 ++++---- 11 files changed, 129 insertions(+), 142 deletions(-) diff --git a/dev/env/manifests/fleet-manager/04-gitops-config.yaml b/dev/env/manifests/fleet-manager/04-gitops-config.yaml index 9812789c28..e5cbda9f80 100644 --- a/dev/env/manifests/fleet-manager/04-gitops-config.yaml +++ b/dev/env/manifests/fleet-manager/04-gitops-config.yaml @@ -5,8 +5,23 @@ metadata: namespace: "$ACSMS_NAMESPACE" data: config.yaml: | + rhacsOperators: + crd: + baseURL: https://raw.githubusercontent.com/stackrox/stackrox/{{ .GitRef }}/operator/bundle/manifests/ + gitRef: 4.1.1 + operators: + - gitRef: 4.1.1 + image: "quay.io/rhacs-eng/stackrox-operator:4.1.1" + - gitRef: 4.1.0 + image: "quay.io/rhacs-eng/stackrox-operator:4.1.0" centrals: overrides: + # Set label for all centrals to 4.1.0 + - instanceIds: ["*"] + patch: | + metadata: + labels: + rhacs.redhat.com/version-selector: "4.1.0" - instanceIds: - "*" patch: | diff --git a/fleetshard/pkg/central/operator/config.go b/fleetshard/pkg/central/operator/config.go index 81ab469def..51bda1a1b5 100644 --- a/fleetshard/pkg/central/operator/config.go +++ b/fleetshard/pkg/central/operator/config.go @@ -2,7 +2,6 @@ package operator import ( "fmt" - "github.com/golang/glog" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/api/private" "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/yaml" @@ -17,24 +16,19 @@ func parseConfig(content []byte) (OperatorConfigs, error) { return out, nil } -// GetConfig returns the rhacs operator configurations -func GetConfig() OperatorConfigs { - // TODO: Read config from GitOps configuration - glog.Error("Reading RHACS Operator GitOps configuration not implemented yet") - return OperatorConfigs{} -} - // Validate validates the operator configuration and can be used in different life-cycle stages like runtime and deploy time. -func Validate(path *field.Path, configs OperatorConfigs) *field.Error { - var validateErr *field.Error - manager := ACSOperatorManager{} - manifests, err := manager.RenderChart(configs) +func Validate(path *field.Path, configs OperatorConfigs) field.ErrorList { + manifests, err := RenderChart(configs) if err != nil { - validateErr = field.Forbidden(path, fmt.Sprintf("could not render operator helm charts, got invalid configuration: %s", err.Error())) - } else if len(manifests) == 0 { - validateErr = field.Forbidden(path, fmt.Sprintf("operator chart rendering succeed, but no manifests were rendered")) + return field.ErrorList{ + field.Forbidden(path, fmt.Sprintf("could not render operator helm charts, got invalid configuration: %s", err.Error())), + } + } else if len(configs.Configs) > 0 && len(manifests) == 0 { + return field.ErrorList{ + field.Forbidden(path, fmt.Sprintf("operator chart rendering succeed, but no manifests were rendered")), + } } - return validateErr + return nil } // CRDConfig represents the crd to be installed in the data-plane cluster. The CRD is downloaded automatically diff --git a/fleetshard/pkg/central/operator/config_test.go b/fleetshard/pkg/central/operator/config_test.go index 21fb9e49da..25678e4464 100644 --- a/fleetshard/pkg/central/operator/config_test.go +++ b/fleetshard/pkg/central/operator/config_test.go @@ -32,18 +32,11 @@ func TestGetOperatorConfig(t *testing.T) { assert.Equal(t, "quay.io/rhacs-eng/stackrox-operator:4.1.1", conf.Configs[0].Image) } -func TestValidateShouldSucceed(t *testing.T) { - conf, err := parseConfig(getExampleConfig()) - require.NoError(t, err) - - err = Validate(field.NewPath("rhacsOperator"), conf) - require.Nil(t, err) -} - func TestGetOperatorConfigFailsValidation(t *testing.T) { testCases := map[string]struct { getConfig func(*testing.T, OperatorConfigs) OperatorConfigs contains string + success bool }{ "should fail with invalid baseURL not able to download CRD": { getConfig: func(t *testing.T, config OperatorConfigs) OperatorConfigs { @@ -79,6 +72,19 @@ func TestGetOperatorConfigFailsValidation(t *testing.T) { }, contains: "Unmarshalling Helm values failed for operator 4.0.0", }, + "validate should succeed with example config": { + getConfig: func(t *testing.T, config OperatorConfigs) OperatorConfigs { + return config + }, + success: true, + }, + "should succeed with empty operator configs": { + getConfig: func(t *testing.T, config OperatorConfigs) OperatorConfigs { + config.Configs = []OperatorConfig{} + return config + }, + success: true, + }, } for key, testCase := range testCases { @@ -86,10 +92,14 @@ func TestGetOperatorConfigFailsValidation(t *testing.T) { config, err := parseConfig(getExampleConfig()) require.NoError(t, err) - err = Validate(field.NewPath("rhacsOperator"), testCase.getConfig(t, config)) - require.NotNil(t, err) - require.NotEmpty(t, testCase.contains) - assert.Contains(t, err.Error(), testCase.contains) + errList := Validate(field.NewPath("rhacsOperator"), testCase.getConfig(t, config)) + if testCase.contains != "" { + require.Len(t, errList, 1) + require.NotEmpty(t, testCase.contains) + assert.Contains(t, errList.ToAggregate().Errors()[0].Error(), testCase.contains) + } else { + require.Nil(t, errList) + } }) } } diff --git a/fleetshard/pkg/central/operator/upgrade.go b/fleetshard/pkg/central/operator/upgrade.go index 2da55db3f5..4a75d59ae7 100644 --- a/fleetshard/pkg/central/operator/upgrade.go +++ b/fleetshard/pkg/central/operator/upgrade.go @@ -8,7 +8,6 @@ import ( "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/charts" "golang.org/x/exp/slices" "gopkg.in/yaml.v2" - "helm.sh/helm/v3/pkg/chart" "helm.sh/helm/v3/pkg/chartutil" "html/template" appsv1 "k8s.io/api/apps/v1" @@ -69,13 +68,12 @@ func parseOperatorConfigs(operators OperatorConfigs) ([]chartutil.Values, error) // ACSOperatorManager keeps data necessary for managing ACS Operator type ACSOperatorManager struct { - client ctrlClient.Client - resourcesChart *chart.Chart + client ctrlClient.Client } // InstallOrUpgrade provisions or upgrades an existing ACS Operator from helm chart template func (u *ACSOperatorManager) InstallOrUpgrade(ctx context.Context, operators OperatorConfigs) error { - objs, err := u.RenderChart(operators) + objs, err := RenderChart(operators) if err != nil { return err } @@ -95,7 +93,7 @@ func (u *ACSOperatorManager) InstallOrUpgrade(ctx context.Context, operators Ope } // RenderChart renders the operator helm chart manifests -func (u *ACSOperatorManager) RenderChart(operators OperatorConfigs) ([]*unstructured.Unstructured, error) { +func RenderChart(operators OperatorConfigs) ([]*unstructured.Unstructured, error) { if len(operators.Configs) == 0 { return nil, nil } @@ -112,17 +110,17 @@ func (u *ACSOperatorManager) RenderChart(operators OperatorConfigs) ([]*unstruct var dynamicTemplatesUrls []string if operators.CRD.GitRef != "" { - dynamicTemplatesUrls, err = u.generateCRDTemplateUrls(operators.CRD) + dynamicTemplatesUrls, err = generateCRDTemplateUrls(operators.CRD) if err != nil { return nil, err } } - u.resourcesChart, err = charts.GetChart("rhacs-operator", dynamicTemplatesUrls) + resourcesChart, err := charts.GetChart("rhacs-operator", dynamicTemplatesUrls) if err != nil { return nil, fmt.Errorf("failed getting chart: %w", err) } - objs, err := charts.RenderToObjects(releaseName, ACSOperatorNamespace, u.resourcesChart, chartVals) + objs, err := charts.RenderToObjects(releaseName, ACSOperatorNamespace, resourcesChart, chartVals) if err != nil { return nil, fmt.Errorf("failed rendering operator chart: %w", err) } @@ -213,7 +211,7 @@ func generateDeploymentName(version string) string { return operatorDeploymentPrefix + "-" + version } -func (u *ACSOperatorManager) generateCRDTemplateUrls(crdConfig CRDConfig) ([]string, error) { +func generateCRDTemplateUrls(crdConfig CRDConfig) ([]string, error) { baseURL := defaultCRDBaseURLTemplate if crdConfig.BaseURL != "" { baseURL = crdConfig.BaseURL diff --git a/fleetshard/pkg/central/reconciler/reconciler.go b/fleetshard/pkg/central/reconciler/reconciler.go index 46e1640dfb..9c13c27dd0 100644 --- a/fleetshard/pkg/central/reconciler/reconciler.go +++ b/fleetshard/pkg/central/reconciler/reconciler.go @@ -14,7 +14,6 @@ import ( "sync/atomic" "time" - containerImage "github.com/containers/image/docker/reference" "github.com/golang/glog" "github.com/hashicorp/go-multierror" openshiftRouteV1 "github.com/openshift/api/route/v1" @@ -42,7 +41,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/util/strategicpatch" - "k8s.io/apimachinery/pkg/util/validation" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/utils/pointer" ctrlClient "sigs.k8s.io/controller-runtime/pkg/client" @@ -372,30 +370,6 @@ func (r *CentralReconciler) applyCentralConfig(remoteCentral *private.ManagedCen r.applyProxyConfig(central) r.applyDeclarativeConfig(central) r.applyAnnotations(central) - return r.applyLabelSelector(remoteCentral, central) -} - -func (r *CentralReconciler) applyLabelSelector(remoteCentral *private.ManagedCentral, central *v1alpha1.Central) error { - // apply label selector - if features.TargetedOperatorUpgrades.Enabled() { - // TODO: use GitRef as a LabelSelector - image, err := containerImage.Parse(remoteCentral.Spec.OperatorImage) - if err != nil { - return errors.Wrapf(err, "failed parse labelSelector") - } - var labelSelector string - if tagged, ok := image.(containerImage.Tagged); ok { - labelSelector = tagged.Tag() - } - errs := validation.IsValidLabelValue(labelSelector) - if errs != nil { - return errors.Wrapf(err, "invalid labelSelector %s: %v", labelSelector, errs) - } - if central.Labels == nil { - central.Labels = map[string]string{} - } - central.Labels[ReconcileOperatorSelector] = labelSelector - } return nil } diff --git a/fleetshard/pkg/central/reconciler/reconciler_test.go b/fleetshard/pkg/central/reconciler/reconciler_test.go index 04d158fb3d..d124bfaa69 100644 --- a/fleetshard/pkg/central/reconciler/reconciler_test.go +++ b/fleetshard/pkg/central/reconciler/reconciler_test.go @@ -28,7 +28,6 @@ import ( centralConstants "github.com/stackrox/acs-fleet-manager/internal/dinosaur/constants" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/api/private" "github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager" - "github.com/stackrox/acs-fleet-manager/pkg/features" "github.com/stackrox/rox/operator/apis/platform/v1alpha1" "github.com/stackrox/rox/pkg/declarativeconfig" "github.com/stackrox/rox/pkg/utils" @@ -275,28 +274,6 @@ func TestReconcileCreateWithManagedDB(t *testing.T) { assert.NotEmpty(t, password) } -func TestReconcileCreateWithLabelOperatorVersion(t *testing.T) { - t.Setenv(features.TargetedOperatorUpgrades.EnvVar(), "true") - - fakeClient, _, r := getClientTrackerAndReconciler( - t, - defaultCentralConfig, - nil, - useRoutesReconcilerOptions, - ) - - status, err := r.Reconcile(context.TODO(), simpleManagedCentral) - require.NoError(t, err) - readyCondition, ok := conditionForType(status.Conditions, conditionTypeReady) - require.True(t, ok) - assert.Equal(t, "True", readyCondition.Status, "Ready condition not found in conditions", status.Conditions) - - central := &v1alpha1.Central{} - err = fakeClient.Get(context.TODO(), client.ObjectKey{Name: centralName, Namespace: centralNamespace}, central) - require.NoError(t, err) - assert.Equal(t, operatorVersion, central.ObjectMeta.Labels[ReconcileOperatorSelector]) -} - func TestReconcileCreateWithManagedDBNoCredentials(t *testing.T) { t.Setenv("AWS_ACCESS_KEY", "") t.Setenv("AWS_SECRET_ACCESS_KEY", "") @@ -2135,35 +2112,6 @@ func TestReconciler_applyAnnotations(t *testing.T) { }, c.Spec.Customize.Annotations) } -func TestReconciler_applyLabelSelector_disabledTargetedUpgrades(t *testing.T) { - r := &CentralReconciler{} - mc := &private.ManagedCentral{} - c := &v1alpha1.Central{} - - err := r.applyLabelSelector(mc, c) - - assert.NoError(t, err) - assert.Empty(t, c.Labels) -} - -func TestReconciler_applyLabelSelector_enabledTargetedUpgrades(t *testing.T) { - r := &CentralReconciler{} - mc := &private.ManagedCentral{ - Spec: private.ManagedCentralAllOfSpec{ - OperatorImage: "quay.io/rhacs/rhacs-operator:latest", - }, - } - c := &v1alpha1.Central{} - t.Setenv("RHACS_TARGETED_OPERATOR_UPGRADES", "true") - - err := r.applyLabelSelector(mc, c) - - assert.NoError(t, err) - assert.Equal(t, map[string]string{ - "rhacs.redhat.com/version-selector": "latest", - }, c.Labels) -} - func TestReconciler_getInstanceConfigWithGitops(t *testing.T) { tcs := []struct { diff --git a/fleetshard/pkg/runtime/runtime.go b/fleetshard/pkg/runtime/runtime.go index 75a840c732..ace27ad11f 100644 --- a/fleetshard/pkg/runtime/runtime.go +++ b/fleetshard/pkg/runtime/runtime.go @@ -265,10 +265,16 @@ func (r *Runtime) upgradeOperator(list private.ManagedCentralList) error { if err != nil { glog.Warningf("Failed reading operators configMap: %v", err) } - glog.Infof("Reading operator config map, extracted %d operators from configmap", len(configMapOperators)) - desiredOperatorConfigs = configMapOperators + } else if features.TargetedOperatorUpgrades.Enabled() { + for _, operatorConfig := range list.RhacsOperators.RHACSOperatorConfigs { + desiredOperatorConfigs = append(desiredOperatorConfigs, operator.OperatorConfig{ + Image: operatorConfig.Image, + GitRef: operatorConfig.GitRef, + HelmValues: operatorConfig.HelmValues, + }) + } } else { desiredOperatorConfigs = []operator.OperatorConfig{{ GitRef: "4.1.0", @@ -276,9 +282,9 @@ func (r *Runtime) upgradeOperator(list private.ManagedCentralList) error { }} } - // TODO: Replace with list from API request operators := operator.OperatorConfigs{ Configs: desiredOperatorConfigs, + // TODO: How to get that value? CRD: operator.CRDConfig{ GitRef: "4.1.0", }, diff --git a/internal/dinosaur/pkg/gitops/config.go b/internal/dinosaur/pkg/gitops/config.go index d3a464833c..19d1e66508 100644 --- a/internal/dinosaur/pkg/gitops/config.go +++ b/internal/dinosaur/pkg/gitops/config.go @@ -2,6 +2,7 @@ package gitops import ( + "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/operator" "github.com/stackrox/rox/operator/apis/platform/v1alpha1" "k8s.io/apimachinery/pkg/util/validation/field" "sigs.k8s.io/yaml" @@ -9,7 +10,8 @@ import ( // Config represents the gitops configuration type Config struct { - Centrals CentralsConfig `json:"centrals"` + Centrals CentralsConfig `json:"centrals"` + RHACSOperators operator.OperatorConfigs `json:"rhacsOperators"` } // CentralsConfig represents the declarative configuration for Central instances defaults and overrides. @@ -32,6 +34,7 @@ type CentralOverride struct { func ValidateConfig(config Config) field.ErrorList { var errs field.ErrorList errs = append(errs, validateCentralsConfig(field.NewPath("centrals"), config.Centrals)...) + errs = append(errs, operator.Validate(field.NewPath("rhacsOperators"), config.RHACSOperators)...) return errs } diff --git a/internal/dinosaur/pkg/gitops/config_test.go b/internal/dinosaur/pkg/gitops/config_test.go index a164d63ab8..c311ce2dac 100644 --- a/internal/dinosaur/pkg/gitops/config_test.go +++ b/internal/dinosaur/pkg/gitops/config_test.go @@ -23,6 +23,13 @@ func TestValidateGitOpsConfig(t *testing.T) { require.Empty(t, err) }, yaml: ` +rhacsOperators: + crd: + baseURL: https://raw.githubusercontent.com/stackrox/stackrox/{{ .GitRef }}/operator/bundle/manifests/ + gitRef: 4.1.1 + operators: + - gitRef: 4.1.1 + image: "quay.io/rhacs-eng/stackrox-operator:4.1.1" centrals: overrides: - instanceIds: @@ -36,6 +43,13 @@ centrals: assert.Equal(t, field.Invalid(field.NewPath("centrals", "overrides").Index(0).Child("patch"), "foo", "invalid patch: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal string into Go value of type v1alpha1.Central"), err[0]) }, yaml: ` +rhacsOperators: + crd: + baseURL: https://raw.githubusercontent.com/stackrox/stackrox/{{ .GitRef }}/operator/bundle/manifests/ + gitRef: 4.1.1 + operators: + - gitRef: 4.1.1 + image: "quay.io/rhacs-eng/stackrox-operator:4.1.1" centrals: overrides: - instanceIds: @@ -49,12 +63,34 @@ centrals: assert.Equal(t, field.Invalid(field.NewPath("centrals", "overrides").Index(0).Child("patch"), "spec: 123\n", "invalid patch: error unmarshaling JSON: while decoding JSON: json: cannot unmarshal number into Go struct field Central.spec of type v1alpha1.CentralSpec"), err[0]) }, yaml: ` +rhacsOperators: + crd: + baseURL: https://raw.githubusercontent.com/stackrox/stackrox/{{ .GitRef }}/operator/bundle/manifests/ + gitRef: 4.1.1 + operators: + - gitRef: 4.1.1 + image: "quay.io/rhacs-eng/stackrox-operator:4.1.1" centrals: overrides: - instanceIds: - - id1 patch: | spec: 123 +`, + }, { + name: "invalid operator config and central config", + assert: func(t *testing.T, c *Config, err field.ErrorList) { + require.Len(t, err, 1) + assert.Contains(t, err.ToAggregate().Errors()[0].Error(), "cannot unmarshal string into Go value of type v1alpha1.Central", "central config was not validated") + }, + yaml: ` +rhacsOperators: + crd: + baseURL: invalid +centrals: + overrides: + - instanceIds: + - id1 + patch: invalid `, }, } diff --git a/internal/dinosaur/pkg/handlers/data_plane_dinosaur.go b/internal/dinosaur/pkg/handlers/data_plane_dinosaur.go index 2fb85abe11..36cb259958 100644 --- a/internal/dinosaur/pkg/handlers/data_plane_dinosaur.go +++ b/internal/dinosaur/pkg/handlers/data_plane_dinosaur.go @@ -1,7 +1,7 @@ package handlers import ( - "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/operator" + "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/gitops" "github.com/stackrox/acs-fleet-manager/pkg/features" "net/http" @@ -14,9 +14,10 @@ import ( ) type dataPlaneDinosaurHandler struct { - service services.DataPlaneCentralService - dinosaurService services.DinosaurService - presenter *presenters.ManagedCentralPresenter + service services.DataPlaneCentralService + dinosaurService services.DinosaurService + presenter *presenters.ManagedCentralPresenter + gitopsConfigProvider gitops.ConfigProvider } // NewDataPlaneDinosaurHandler ... @@ -24,11 +25,13 @@ func NewDataPlaneDinosaurHandler( service services.DataPlaneCentralService, dinosaurService services.DinosaurService, presenter *presenters.ManagedCentralPresenter, + gitopsConfigProvider gitops.ConfigProvider, ) *dataPlaneDinosaurHandler { return &dataPlaneDinosaurHandler{ - service: service, - dinosaurService: dinosaurService, - presenter: presenter, + service: service, + dinosaurService: dinosaurService, + presenter: presenter, + gitopsConfigProvider: gitopsConfigProvider, } } @@ -69,9 +72,12 @@ func (h *dataPlaneDinosaurHandler) GetAll(w http.ResponseWriter, r *http.Request Items: []private.ManagedCentral{}, } - // TODO: check that the correct GitOps configuration is added to the response if features.TargetedOperatorUpgrades.Enabled() { - managedDinosaurList.RhacsOperators = operator.GetConfig().ToAPIResponse() + gitopsConfig, err := h.gitopsConfigProvider.Get() + if err != nil { + return nil, errors.GeneralError("failed to get GitOps configuration: %v", err) + } + managedDinosaurList.RhacsOperators = gitopsConfig.RHACSOperators.ToAPIResponse() } for i := range centralRequests { diff --git a/internal/dinosaur/pkg/routes/route_loader.go b/internal/dinosaur/pkg/routes/route_loader.go index 4268668150..747254d63b 100644 --- a/internal/dinosaur/pkg/routes/route_loader.go +++ b/internal/dinosaur/pkg/routes/route_loader.go @@ -5,35 +5,31 @@ import ( "fmt" "net/http" - "github.com/stackrox/acs-fleet-manager/pkg/client/iam" - - "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/presenters" - "github.com/stackrox/acs-fleet-manager/pkg/services/sso" - - "github.com/stackrox/acs-fleet-manager/pkg/logger" - - "github.com/stackrox/acs-fleet-manager/pkg/services/account" - "github.com/stackrox/acs-fleet-manager/pkg/services/authorization" - - "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/config" - "github.com/goava/di" gorillaHandlers "github.com/gorilla/handlers" "github.com/gorilla/mux" pkgerrors "github.com/pkg/errors" + "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/config" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/generated" + "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/gitops" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/handlers" + "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/presenters" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/services" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/routes" "github.com/stackrox/acs-fleet-manager/pkg/acl" "github.com/stackrox/acs-fleet-manager/pkg/api" "github.com/stackrox/acs-fleet-manager/pkg/auth" + "github.com/stackrox/acs-fleet-manager/pkg/client/iam" "github.com/stackrox/acs-fleet-manager/pkg/client/ocm" "github.com/stackrox/acs-fleet-manager/pkg/db" "github.com/stackrox/acs-fleet-manager/pkg/environments" "github.com/stackrox/acs-fleet-manager/pkg/errors" coreHandlers "github.com/stackrox/acs-fleet-manager/pkg/handlers" + "github.com/stackrox/acs-fleet-manager/pkg/logger" "github.com/stackrox/acs-fleet-manager/pkg/server" + "github.com/stackrox/acs-fleet-manager/pkg/services/account" + "github.com/stackrox/acs-fleet-manager/pkg/services/authorization" + "github.com/stackrox/acs-fleet-manager/pkg/services/sso" "github.com/stackrox/acs-fleet-manager/pkg/shared" ) @@ -64,6 +60,7 @@ type options struct { AdminRoleAuthZConfig *auth.AdminRoleAuthZConfig ManagedCentralPresenter *presenters.ManagedCentralPresenter + GitopsProvider gitops.ConfigProvider } // NewRouteLoader ... @@ -205,7 +202,7 @@ func (s *options) buildAPIBaseRouter(mainRouter *mux.Router, basePath string, op // /agent-clusters/{id} dataPlaneClusterHandler := handlers.NewDataPlaneClusterHandler(s.DataPlaneCluster) - dataPlaneCentralHandler := handlers.NewDataPlaneDinosaurHandler(s.DataPlaneCentralService, s.Central, s.ManagedCentralPresenter) + dataPlaneCentralHandler := handlers.NewDataPlaneDinosaurHandler(s.DataPlaneCentralService, s.Central, s.ManagedCentralPresenter, s.GitopsProvider) apiV1DataPlaneRequestsRouter := apiV1Router.PathPrefix("/agent-clusters").Subrouter() apiV1DataPlaneRequestsRouter.HandleFunc("/{id}", dataPlaneClusterHandler.GetDataPlaneClusterConfig). Name(logger.NewLogEvent("get-dataplane-cluster-config", "get dataplane cluster config by id").ToString()). From 7caaafed8c04c888498aa01c33b19d03712831a2 Mon Sep 17 00:00:00 2001 From: Marcin Owsiany Date: Thu, 21 Sep 2023 12:37:12 +0200 Subject: [PATCH 12/20] ROX-19692: New workflow to auto-create production merge PRs. (#1291) New workflow to auto-create production merge PRs. --- .github/workflows/create-prod-pr.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/create-prod-pr.yaml diff --git a/.github/workflows/create-prod-pr.yaml b/.github/workflows/create-prod-pr.yaml new file mode 100644 index 0000000000..2eafc3b4d0 --- /dev/null +++ b/.github/workflows/create-prod-pr.yaml @@ -0,0 +1,18 @@ +name: Create PR to merge stage into production +on: + push: + branches: + - stage + +jobs: + prepare-prod-pr: + runs-on: ubuntu-latest + name: Prepare production PR + steps: + + - name: Open a pull request + uses: tretuna/sync-branches@1.4.0 + with: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + FROM_BRANCH: 'stage' + TO_BRANCH: 'production' From 309f342c017476d3dd416d0c1f8ff9ae3a0b4728 Mon Sep 17 00:00:00 2001 From: Aleksandr Kurlov Date: Thu, 21 Sep 2023 14:20:00 +0200 Subject: [PATCH 13/20] ROX-19810: Bump controller-runtime and stackrox deps (#1292) * Bump controller-runtime and stackrox deps * Bump openshift/api --- go.mod | 106 ++++++++---------- go.sum | 342 ++++++++++++++++----------------------------------------- 2 files changed, 139 insertions(+), 309 deletions(-) diff --git a/go.mod b/go.mod index 730e073e99..defce03f03 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/Nerzal/gocloak/v11 v11.2.0 github.com/antihax/optional v1.0.0 github.com/auth0/go-jwt-middleware/v2 v2.1.0 - github.com/aws/aws-sdk-go v1.44.332 + github.com/aws/aws-sdk-go v1.45.4 github.com/bxcodec/faker/v3 v3.8.1 github.com/caarlos0/env/v6 v6.10.1 github.com/containers/image v3.0.2+incompatible @@ -20,7 +20,7 @@ require ( github.com/goava/di v1.11.1 github.com/gogo/protobuf v1.3.2 github.com/golang-jwt/jwt/v4 v4.5.0 - github.com/golang/glog v1.1.1 + github.com/golang/glog v1.1.2 github.com/golang/protobuf v1.5.3 github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.3.0 @@ -30,10 +30,10 @@ require ( github.com/lib/pq v1.10.9 github.com/mendsley/gojwk v0.0.0-20141217222730-4d5ec6e58103 github.com/olekukonko/tablewriter v0.0.5 - github.com/onsi/ginkgo/v2 v2.11.0 + github.com/onsi/ginkgo/v2 v2.12.0 github.com/onsi/gomega v1.27.10 github.com/openshift-online/ocm-sdk-go v0.1.358 - github.com/openshift/api v3.9.1-0.20191201231411-9f834e337466+incompatible + github.com/openshift/api v0.0.0-20230502160752-c71432710382 github.com/operator-framework/api v0.17.6 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pkg/errors v0.9.1 @@ -46,54 +46,44 @@ require ( github.com/santhosh-tekuri/jsonschema/v3 v3.1.0 github.com/selvatico/go-mocket v1.0.7 github.com/spf13/cobra v1.7.0 - github.com/spf13/pflag v1.0.5 + github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace github.com/spyzhov/ajson v0.9.0 github.com/stackrox/rox v0.0.0-20230323083409-e83503a98fb4 github.com/stretchr/testify v1.8.4 github.com/xeipuuv/gojsonschema v1.2.0 github.com/zgalor/weberr v0.8.2 - golang.org/x/exp v0.0.0-20230321023759-10a507213a29 - golang.org/x/net v0.14.0 + golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea + golang.org/x/net v0.15.0 golang.org/x/oauth2 v0.11.0 - golang.org/x/sys v0.11.0 + golang.org/x/sys v0.12.0 gopkg.in/resty.v1 v1.12.0 gopkg.in/yaml.v2 v2.4.0 gorm.io/driver/postgres v1.5.2 - gorm.io/gorm v1.25.1 - helm.sh/helm/v3 v3.11.3 - k8s.io/api v0.26.5 - k8s.io/apimachinery v0.27.3 - k8s.io/client-go v0.26.5 - k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 - sigs.k8s.io/controller-runtime v0.14.6 + gorm.io/gorm v1.25.4 + helm.sh/helm/v3 v3.12.3 + k8s.io/api v0.28.2 + k8s.io/apimachinery v0.28.2 + k8s.io/client-go v0.28.2 + k8s.io/utils v0.0.0-20230505201702-9f6742963106 + sigs.k8s.io/controller-runtime v0.16.2 sigs.k8s.io/yaml v1.3.0 ) require ( - github.com/BurntSushi/toml v1.3.0 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.2.0 // indirect + github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect - github.com/RoaringBitmap/roaring v1.3.0 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.2.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/blevesearch/bleve v1.0.14 // indirect - github.com/blevesearch/go-porterstemmer v1.0.3 // indirect - github.com/blevesearch/mmap-go v1.0.2 // indirect - github.com/blevesearch/segment v0.9.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cloudflare/cfssl v1.6.4 // indirect - github.com/couchbase/vellum v1.0.2 // indirect - github.com/cyphar/filepath-securejoin v0.2.3 // indirect - github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d // indirect + github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.2+incompatible // indirect - github.com/docker/docker v23.0.5+incompatible // indirect - github.com/edsrzf/mmap-go v1.0.0 // indirect - github.com/emicklei/go-restful/v3 v3.10.1 // indirect + github.com/emicklei/go-restful/v3 v3.10.2 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect @@ -102,27 +92,26 @@ require ( github.com/go-logr/logr v1.2.4 // 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-openapi/swag v0.22.4 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/snappy v0.0.4 // indirect github.com/google/certificate-transparency-go v1.1.6 // indirect - github.com/google/gnostic v0.6.9 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect + github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3 // indirect github.com/gorilla/css v1.0.0 // indirect github.com/gorilla/schema v1.2.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.6 // indirect github.com/huandu/xstrings v1.4.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.14.0 // indirect + github.com/jackc/pgconn v1.14.1 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgproto3/v2 v2.3.2 // indirect @@ -134,7 +123,6 @@ require ( github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect - github.com/jmhodges/levigo v1.0.0 // indirect github.com/jmoiron/sqlx v1.3.5 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -147,52 +135,48 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mschoch/smat v0.2.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/openshift/client-go v0.0.0-20200623090625-83993cebb5ae // indirect + github.com/openshift/client-go v0.0.0-20230120202327-72f107311084 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/prometheus/procfs v0.10.1 // indirect - github.com/rivo/uniseg v0.4.3 // indirect + github.com/rivo/uniseg v0.4.4 // indirect github.com/segmentio/analytics-go/v3 v3.2.1 // indirect github.com/segmentio/backo-go v1.0.1 // indirect github.com/segmentio/ksuid v1.0.4 // indirect github.com/shopspring/decimal v1.3.1 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/stackrox/scanner v0.0.0-20230411230651-f2265de65ce4 // indirect - github.com/steveyen/gtreap v0.1.0 // indirect github.com/tkuchiki/go-timezone v0.2.2 // indirect github.com/weppos/publicsuffix-go v0.20.1-0.20221031080346-e4081aa8a6de // indirect - github.com/willf/bitset v1.1.11 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/zmap/zcrypto v0.0.0-20220402174210-599ec18ecbac // indirect github.com/zmap/zlint/v3 v3.4.0 // indirect - go.etcd.io/bbolt v1.3.7 // indirect go.uber.org/atomic v1.11.0 // indirect - go.uber.org/multierr v1.10.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.12.0 // indirect - golang.org/x/term v0.11.0 // indirect - golang.org/x/text v0.12.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.25.0 // indirect + golang.org/x/crypto v0.13.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.9.3 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + golang.org/x/tools v0.13.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect - google.golang.org/grpc v1.55.0 // indirect + google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect + google.golang.org/grpc v1.58.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/component-base v0.26.5 // indirect + k8s.io/apiextensions-apiserver v0.28.0 // indirect + k8s.io/component-base v0.28.2 // indirect k8s.io/klog/v2 v2.100.1 // indirect - k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) @@ -204,8 +188,8 @@ replace ( github.com/gogo/protobuf => github.com/connorgorman/protobuf v1.2.2-0.20210115205927-b892c1b298f7 github.com/heroku/docker-registry-client => github.com/stackrox/docker-registry-client v0.0.0-20230411213734-d75b95d65d28 github.com/operator-framework/helm-operator-plugins => github.com/stackrox/helm-operator v0.0.12-0.20221003092512-fbf71229411f - github.com/stackrox/rox => github.com/stackrox/stackrox v0.0.0-20230601164127-c2706e2b72bb - go.uber.org/zap => github.com/stackrox/zap v1.15.1-0.20200720133746-810fd602fd0f + github.com/stackrox/rox => github.com/stackrox/stackrox v0.0.0-20230920153536-030bf99625d0 + go.uber.org/zap => github.com/stackrox/zap v1.15.1-0.20230918235618-2bd149903d0e ) exclude k8s.io/client-go v12.0.0+incompatible diff --git a/go.sum b/go.sum index dfe1814a29..5703360730 100644 --- a/go.sum +++ b/go.sum @@ -54,16 +54,9 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= -github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= -github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= -github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= -github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= -github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.0 h1:Ws8e5YmnrGEHzZEzg0YvK/7COGYtTC5PbaH9oSSbgfA= -github.com/BurntSushi/toml v1.3.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= @@ -71,20 +64,14 @@ github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJ github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/Nerzal/gocloak/v11 v11.2.0 h1:i67+hsEhSaolpJi1YKgwqH4dtSd8IdfHiEluxSEMm/U= github.com/Nerzal/gocloak/v11 v11.2.0/go.mod h1:vz59u7bBDKWoCdeTpY8i4LELtdwrLrIynAgPvO5ogQA= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/RoaringBitmap/roaring v1.3.0 h1:aQmu9zQxDU0uhwR8SXOH/OrqEf+X8A0LQmwW3JX8Lcg= -github.com/RoaringBitmap/roaring v1.3.0/go.mod h1:plvDsJQpxOC5bw8LRteu/MLWHsHez/3y6cubLI4/1yE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -92,37 +79,26 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/auth0/go-jwt-middleware/v2 v2.1.0 h1:VU4LsC3aFPoqXVyEp8EixU6FNM+ZNIjECszRTvtGQI8= github.com/auth0/go-jwt-middleware/v2 v2.1.0/go.mod h1:CpzcJoleayAACpv+vt0AP8/aYn5TDngsqzLapV1nM4c= -github.com/aws/aws-sdk-go v1.44.332 h1:Ze+98F41+LxoJUdsisAFThV+0yYYLYw17/Vt0++nFYM= -github.com/aws/aws-sdk-go v1.44.332/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.45.4 h1:6B8oTYNEncxga8EV1C6Q4iJNnpDIqLEigy0v0oh2qYw= +github.com/aws/aws-sdk-go v1.45.4/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/blevesearch/blevex v1.0.0 h1:pnilj2Qi3YSEGdWgLj1Pn9Io7ukfXPoQcpAI1Bv8n/o= -github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= -github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= -github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0= -github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= -github.com/blevesearch/segment v0.9.0 h1:5lG7yBCx98or7gK2cHMKPukPZ/31Kag7nONpoBt22Ac= -github.com/blevesearch/segment v0.9.0/go.mod h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bxcodec/faker/v3 v3.8.1 h1:qO/Xq19V6uHt2xujwpaetgKhraGCapqY2CRWGD/SqcM= github.com/bxcodec/faker/v3 v3.8.1/go.mod h1:DdSDccxF5msjFo5aO4vrobRQ8nIApg8kq3QWPEQD6+o= github.com/caarlos0/env/v6 v6.10.1 h1:t1mPSxNpei6M5yAeu1qtRdPAK29Nbcf/n3G7x+b3/II= github.com/caarlos0/env/v6 v6.10.1/go.mod h1:hvp/ryKXKipEkcuYjs9mI4bBCg+UI0Yhgm5Zu0ddvwc= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= -github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -150,42 +126,24 @@ github.com/connorgorman/protobuf v1.2.2-0.20210115205927-b892c1b298f7 h1:YsgEuC8 github.com/connorgorman/protobuf v1.2.2-0.20210115205927-b892c1b298f7/go.mod h1:4n/qquk+A505mqkK9+o7Xth9+UxUWFc4/5faDXkYyyU= github.com/containers/image v3.0.2+incompatible h1:B1lqAE8MUPCrsBLE86J0gnXleeRq8zJnQryhiiGQNyE= github.com/containers/image v3.0.2+incompatible/go.mod h1:8Vtij257IWSanUQKe1tAeNOm2sRVkSqQTVQ1IlwI3+M= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc/v3 v3.6.0 h1:AKVxfYw1Gmkn/w96z0DbT/B/xFnzTd3MkZvWLjF4n/o= github.com/coreos/go-oidc/v3 v3.6.0/go.mod h1:ZpHUsHBucTUj6WOkrP4E20UPynbLZzhTQ1XKCXkxyPc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/couchbase/vellum v1.0.2 h1:BrbP0NKiyDdndMPec8Jjhy0U47CZ0Lgx3xUC2r9rZqw= -github.com/couchbase/vellum v1.0.2/go.mod h1:FcwrEivFpNi24R3jLOs3n+fs5RnuQnQqCLBJ1uAg1W4= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d h1:SwD98825d6bdB+pEuTxWOXiSjBrHdOl/UVp75eI7JT8= -github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= +github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= +github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.5+incompatible h1:DaxtlTJjFSnLOXVNUBU1+6kXGz2lpDoEAH6QoxaSg8k= -github.com/docker/docker v23.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-healthcheck v0.1.0 h1:6ZrRr63F5LLsPwSlbZgjgoxNu+o1VlMIhCQWgbfrgU0= github.com/docker/go-healthcheck v0.1.0/go.mod h1:3v7a0338vhH6WnYFtUd66S+9QK3M6xK4sKr7gGrht6o= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.10.1 h1:rc42Y5YTp7Am7CS630D7JmhRjq4UlEUuEKfrDac4bSQ= -github.com/emicklei/go-restful/v3 v3.10.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= +github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -196,8 +154,6 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= @@ -205,7 +161,6 @@ github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2Vvl github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -213,7 +168,6 @@ github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/getsentry/sentry-go v0.20.0 h1:bwXW98iMRIWxn+4FgPW7vMrjmbym6HblXALmhjHmQaQ= github.com/getsentry/sentry-go v0.20.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= @@ -230,28 +184,17 @@ github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vb github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= @@ -274,9 +217,8 @@ github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0kt github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.1 h1:jxpi2eWoU84wbX9iIEyAeeoac3FLuifZpY9tcNUD9kw= -github.com/golang/glog v1.1.1/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -291,8 +233,6 @@ github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/mock v1.7.0-rc.1 h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U= -github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -313,14 +253,12 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/certificate-transparency-go v1.1.6 h1:SW5K3sr7ptST/pIvNkSVWMiJqemRmkjJPPT0jzXdOOY= github.com/google/certificate-transparency-go v1.1.6/go.mod h1:0OJjOsOk+wj6aYQgP7FU0ioQ0AJUmnWPFMqTjQeazPQ= -github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0= -github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -340,7 +278,6 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -361,8 +298,9 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3 h1:2XF1Vzq06X+inNqgJ9tRnGuw+ZVCB3FazXODD6JE1R8= +github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -376,10 +314,7 @@ github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0 github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= -github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -388,7 +323,6 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/schema v1.2.0 h1:YufUaxZYCKGFuAq3c96BOhjgd5nmXiOY9NGzF247Tsc= github.com/gorilla/schema v1.2.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= @@ -400,26 +334,23 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= -github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/golang-lru/v2 v2.0.6 h1:3xi/Cafd1NaoEnS/yDssIiuVeDVywU0QdFGl3aQaQHM= +github.com/hashicorp/golang-lru/v2 v2.0.6/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/itchyny/gojq v0.12.7 h1:hYPTpeWfrJ1OT+2j6cvBScbhl0TkdwGM4bc66onUSOQ= github.com/itchyny/gojq v0.12.7/go.mod h1:ZdvNHVlzPgUf8pgjnuDTmGfHA/21KoutQUJ3An/xNuw= -github.com/itchyny/timefmt-go v0.1.3 h1:7M3LGVDsqcd0VZH2U+x393obrzZisp7C0uEe921iRkU= +github.com/itchyny/gojq v0.12.13 h1:IxyYlHYIlspQHHTE0f3cJF0NKDMfajxViuhBLnHd/QU= github.com/itchyny/timefmt-go v0.1.3/go.mod h1:0osSSCQSASBJMsIZnhAaF1C2fCBTJZXrnj37mG8/c+A= +github.com/itchyny/timefmt-go v0.1.5 h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm6GE= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -431,8 +362,9 @@ github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfG github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= github.com/jackc/pgconn v1.12.0/go.mod h1:ZkhRC59Llhrq3oSfrikvwQ5NaxYExr6twkdkMLaKono= -github.com/jackc/pgconn v1.14.0 h1:vrbA9Ud87g6JdFWkHTJXppVce58qPIdP7N8y0Ml/A7Q= github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= +github.com/jackc/pgconn v1.14.1 h1:smbxIaZA08n6YuxEX1sDyjV/qkbtUtkH20qLkR9MUR4= +github.com/jackc/pgconn v1.14.1/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= @@ -485,8 +417,6 @@ github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9Y github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= @@ -495,7 +425,6 @@ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFF github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -510,11 +439,9 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxv github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -526,11 +453,6 @@ github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.5/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -556,10 +478,8 @@ github.com/microsoft/go-mssqldb v0.21.0 h1:p2rpHIL7TlSv1QrbXJUAcbyRKnIT0C9rRkH2E github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -571,30 +491,22 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mreiferson/go-httpclient v0.0.0-20160630210159-31f0106b4474/go.mod h1:OQA4XLvDbMgS8P0CevmM4m9Q3Jq4phKUzcocxuGJ5m8= -github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= -github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= -github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= +github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= @@ -606,12 +518,10 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/openshift-online/ocm-sdk-go v0.1.358 h1:uFVKevnqWaBf5EiDHhpajVAgtMzk3piaQL1R0VvAw4w= github.com/openshift-online/ocm-sdk-go v0.1.358/go.mod h1:KYOw8kAKAHyPrJcQoVR82CneQ4ofC02Na4cXXaTq4Nw= -github.com/openshift/api v0.0.0-20200623075207-eb651a5bb0ad/go.mod h1:l6TGeqJ92DrZBuWMNKcot1iZUHfbYSJyBWHGgg6Dn6s= -github.com/openshift/api v3.9.1-0.20191201231411-9f834e337466+incompatible h1:QuymwFhW85sgklix1dTn58zOYqBXWHVlZOFQVIVsMi0= -github.com/openshift/api v3.9.1-0.20191201231411-9f834e337466+incompatible/go.mod h1:dh9o4Fs58gpFXGSYfnVxGR9PnV53I8TW84pQaJDdGiY= -github.com/openshift/build-machinery-go v0.0.0-20200424080330-082bf86082cc/go.mod h1:1CkcsT3aVebzRBzVTSbiKSkJMsC/CASqxesfqEMfJEc= -github.com/openshift/client-go v0.0.0-20200623090625-83993cebb5ae h1:3NJm9lI7FV4ZU3BFmATM61zfTqwLk+11kuyDCyxceW4= -github.com/openshift/client-go v0.0.0-20200623090625-83993cebb5ae/go.mod h1:6GlTOU9aZVIQI8mF5W6Pgc+zVHpMc2V486sxD2cd8t4= +github.com/openshift/api v0.0.0-20230502160752-c71432710382 h1:oIlUAGCdktBKMjCMtP7AedtAc00T/GFaSosoqBa2gkU= +github.com/openshift/api v0.0.0-20230502160752-c71432710382/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4= +github.com/openshift/client-go v0.0.0-20230120202327-72f107311084 h1:66uaqNwA+qYyQDwsMWUfjjau8ezmg1dzCqub13KZOcE= +github.com/openshift/client-go v0.0.0-20230120202327-72f107311084/go.mod h1:M3h9m001PWac3eAudGG3isUud6yBjr5XpzLYLLTlHKo= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= @@ -619,10 +529,8 @@ github.com/operator-framework/api v0.17.6 h1:E6+vlvYUKafvoXYtCuHlDZrXX4vl8AT+r93 github.com/operator-framework/api v0.17.6/go.mod h1:l/cuwtPxkVUY7fzYgdust2m9tlmb8I4pOvbsUufRb24= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -660,17 +568,16 @@ github.com/redhat-developer/app-services-sdk-core/app-services-sdk-go v0.1.0/go. github.com/redhat-developer/app-services-sdk-core/app-services-sdk-go/serviceaccountmgmt v0.0.0-20230323122535-49460b57cc45 h1:zB7YuR81lby8jPK9CKIvzKQIrbpooR7R2lr5l3aL5KE= github.com/redhat-developer/app-services-sdk-core/app-services-sdk-go/serviceaccountmgmt v0.0.0-20230323122535-49460b57cc45/go.mod h1:9UjE86bWDvSfAwSAqweZPRNEAjAgI0ZvKYMIoz06qd0= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.3 h1:utMvzDsuh3suAEnhH0RdHmoPbU648o6CvXxTx4SBMOw= -github.com/rivo/uniseg v0.4.3/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= +github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/santhosh-tekuri/jsonschema/v3 v3.1.0 h1:levPcBfnazlA1CyCMC3asL/QLZkq9pa8tQZOH513zQw= github.com/santhosh-tekuri/jsonschema/v3 v3.1.0/go.mod h1:8kzK2TC0k0YjOForaAHdNEa7ik0fokNa2k30BKJ/W7Y= @@ -692,37 +599,25 @@ github.com/sirupsen/logrus v1.3.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA= +github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spyzhov/ajson v0.9.0 h1:tF46gJGOenYVj+k9K1U1XpCxVWhmiyY5PsVCAs1+OJ0= github.com/spyzhov/ajson v0.9.0/go.mod h1:a6oSw0MMb7Z5aD2tPoPO+jq11ETKgXUr2XktHdT8Wt8= -github.com/stackrox/bleve v0.0.0-20220907150529-4ecbd2543f9e h1:+gtD6n44cUn+WHL68MPZZvOz4ZObSx/cmk8IZ3a6s+w= -github.com/stackrox/bleve v0.0.0-20220907150529-4ecbd2543f9e/go.mod h1:iEpZccUqBH5f0BOF0uH78s8+dUaG/OWu4xuYMXBOdGs= github.com/stackrox/scanner v0.0.0-20230411230651-f2265de65ce4 h1:GfGtz9MCBj9L36d7KGaV6HCEoQY+PAy2fXWvozK0GLs= github.com/stackrox/scanner v0.0.0-20230411230651-f2265de65ce4/go.mod h1:4SRyOkdm9xp3Bca85Hp3636r7FvnA610Laxn3nbQBzc= -github.com/stackrox/stackrox v0.0.0-20230601164127-c2706e2b72bb h1:nT3rZEKrjeb/99ctdPDYAJlZ7nbwGyq8DAhVNQKz1hE= -github.com/stackrox/stackrox v0.0.0-20230601164127-c2706e2b72bb/go.mod h1:E3ukZlVTWDpPy7PynORKW9Y8j1zJe6xSreUqp4vcmiA= -github.com/stackrox/zap v1.15.1-0.20200720133746-810fd602fd0f h1:Ofa3PAa609eSHcHP2kCJDUWUnuEWfiqXhsuppk/QtOE= -github.com/stackrox/zap v1.15.1-0.20200720133746-810fd602fd0f/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -github.com/steveyen/gtreap v0.1.0 h1:CjhzTa274PyJLJuMZwIzCO1PfC00oRa8d1Kc78bFXJM= -github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7Z4dM9/Y= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/stackrox/stackrox v0.0.0-20230920153536-030bf99625d0 h1:OIAgLw8YUHotHrHQWvvL853FtjRxKZuyLvQ36pZcgSU= +github.com/stackrox/stackrox v0.0.0-20230920153536-030bf99625d0/go.mod h1:wnSFFD3JgXXvw8NA3unB0oWhVvZThc0ZOdyoHyttUmA= +github.com/stackrox/zap v1.15.1-0.20230918235618-2bd149903d0e h1:tufzLLs6t5cNlZbCaU5ftO8qNc4UkcSRfF1Oj1dlIzg= +github.com/stackrox/zap v1.15.1-0.20230918235618-2bd149903d0e/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -740,19 +635,13 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tkuchiki/go-timezone v0.2.2 h1:MdHR65KwgVTwWFQrota4SKzc4L5EfuH5SdZZGtk/P2Q= github.com/tkuchiki/go-timezone v0.2.2/go.mod h1:oFweWxYl35C/s7HMVZXiA19Jr9Y0qJHMaG/J2TES4LY= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/weppos/publicsuffix-go v0.12.0/go.mod h1:z3LCPQ38eedDQSwmsSRW4Y7t2L8Ln16JPQ02lHAdn5k= github.com/weppos/publicsuffix-go v0.15.1-0.20220329081811-9a40b608a236/go.mod h1:HYux0V0Zi04bHNwOHy4cXJVz/TQjYonnF6aoYhj+3QE= github.com/weppos/publicsuffix-go v0.20.1-0.20221031080346-e4081aa8a6de h1:eR9jm8DVMdrDUuVji4eOxPK4r/dANDlDBdISSUUV96s= github.com/weppos/publicsuffix-go v0.20.1-0.20221031080346-e4081aa8a6de/go.mod h1:g9GsAxnaxsUuTLZcQdYbi43vT2k9ubZGHsdCy819VLk= github.com/weppos/publicsuffix-go/publicsuffix/generator v0.0.0-20220927085643-dc0d00c92642/go.mod h1:GHfoeIdZLdZmLjMlzBftbTDntahTttUMWjxZwQJhULE= -github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -760,7 +649,6 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -777,8 +665,6 @@ github.com/zmap/zcrypto v0.0.0-20220402174210-599ec18ecbac h1:+nr36qrZEH0RIYNjcU github.com/zmap/zcrypto v0.0.0-20220402174210-599ec18ecbac/go.mod h1:egdRkzUylATvPkWMpebZbXhv0FMEMJGX/ur0D3Csk2s= github.com/zmap/zlint/v3 v3.4.0 h1:Xs/lrMJY74MpJx/jSx2oVvZBrqlyUyFaLLBRyf68cqg= github.com/zmap/zlint/v3 v3.4.0/go.mod h1:WgepL2QqxyMHnrOWJ54NqrgfMtOyuXr52wEE0tcfo9k= -go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -793,23 +679,20 @@ go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -819,8 +702,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -831,8 +714,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea h1:vLCWI/yYrdEHyN2JzIzPO3aaQJHQdp89IZBA/+azVC4= +golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -861,8 +744,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -880,8 +762,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -894,7 +774,6 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -910,7 +789,6 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -926,8 +804,8 @@ golang.org/x/net v0.0.0-20220926192436-02166a98028e/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -964,14 +842,10 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -981,14 +855,12 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1057,17 +929,16 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1079,15 +950,14 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1098,13 +968,11 @@ golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1116,7 +984,6 @@ golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200115044656-831fdb1e1868/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1149,8 +1016,8 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM= -golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1160,8 +1027,8 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= +gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1271,7 +1138,6 @@ google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= @@ -1289,12 +1155,12 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc h1:8DyZCyvI8mE1IdLy/60bS+52xfymkE72wv1asokgtao= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc h1:kVKPf/IiYSBWEWtkIn6wZXwWGCnLKcC8oWfZvXjsGnM= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc h1:XSJ8Vk1SWuNr8S18z1NZSziL0CPIXLCCMDOEFtHBOFc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= +google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 h1:nIgk/EEq3/YlnmVVXVnm14rC2oxgs1o0ong4sD/rd44= +google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 h1:wukfNtZmZUurLN/atp2hiIeTKn7QJWIQdHzqmsOnAOk= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1326,8 +1192,8 @@ google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11 google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= +google.golang.org/grpc v1.58.0 h1:32JY8YpPMSR45K+c3o6b8VL73V+rR8k+DeMIr4vRH8o= +google.golang.org/grpc v1.58.0/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/grpc/examples v0.0.0-20210902184326-c93e472777b9 h1:nuV5/Eu1pLmXFqSuM5yYgg1z+m3f7+HC1HO1xsmCz9I= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1372,9 +1238,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/mysql v1.5.1 h1:WUEH5VF9obL/lTtzjmML/5e6VfFR/788coz2uaVCAZw= @@ -1382,11 +1246,10 @@ gorm.io/driver/postgres v1.5.2 h1:ytTDxxEv+MplXOfFe3Lzm7SjG09fcdb3Z/c056DTBx0= gorm.io/driver/postgres v1.5.2/go.mod h1:fmpX0m2I1PKuR7mKZiEluwrP3hbs+ps7JIGMUBpCgl8= gorm.io/driver/sqlite v1.5.1 h1:hYyrLkAWE71bcarJDPdZNTLWtr8XrSjOWyjUYI6xdL4= gorm.io/driver/sqlserver v1.5.0 h1:zol7ePfY1XiPfjEvjjBh4VatIF3kycNcPE0EMCXznHY= -gorm.io/gorm v1.25.1 h1:nsSALe5Pr+cM3V1qwwQ7rOkw+6UeLrX5O4v3llhHa64= -gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= -helm.sh/helm/v3 v3.11.3 h1:n1X5yaQTP5DYywlBOZMl2gX398Gp6YwFp/IAVj6+5D4= -helm.sh/helm/v3 v3.11.3/go.mod h1:S+sOdQc3BLvt09a9rSlKKVs9x0N/yx+No0y3qFw+FQ8= +gorm.io/gorm v1.25.4 h1:iyNd8fNAe8W9dvtlgeRI5zSVZPsq3OpcTu37cYcpCmw= +gorm.io/gorm v1.25.4/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k= +helm.sh/helm/v3 v3.12.3 h1:5y1+Sbty12t48T/t/CGNYUIME5BJ0WKfmW/sobYqkFg= +helm.sh/helm/v3 v3.12.3/go.mod h1:KPKQiX9IP5HX7o5YnnhViMnNuKiL/lJBVQ47GHe1R0k= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1395,47 +1258,30 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.18.3/go.mod h1:UOaMwERbqJMfeeeHc8XJKawj4P9TgDRnViIqqBeH2QA= -k8s.io/api v0.18.4/go.mod h1:lOIQAKYgai1+vz9J7YcDZwC26Z0zQewYOGWdyIPUUQ4= -k8s.io/api v0.26.5 h1:Npao/+sMSng6nkEcNydgH3BNo4s5YoBg7iw35HM7Hcw= -k8s.io/api v0.26.5/go.mod h1:O7ICW7lj6+ZQQQ3cxekgCoW+fnGo5kWT0nTHkLZ5grc= -k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= -k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= -k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.18.4/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= -k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= -k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/client-go v0.18.3/go.mod h1:4a/dpQEvzAhT1BbuWW09qvIaGw6Gbu1gZYiQZIi1DMw= -k8s.io/client-go v0.26.5 h1:e8Z44pafL/c6ayF/6qYEypbJoDSakaFxhJ9lqULEJEo= -k8s.io/client-go v0.26.5/go.mod h1:/CYyNt+ZLMvWqMF8h1SvkUXz2ujFWQLwdDrdiQlZ5X0= -k8s.io/code-generator v0.18.3/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c= -k8s.io/component-base v0.26.5 h1:nHAzDvXQ4whYpOqrQGWrDIYI/GIeXkuxzqC/iVICfZo= -k8s.io/component-base v0.26.5/go.mod h1:wvfNAS05EtKdPeUxFceo8WNh8bGPcFY8QfPhv5MYjA4= -k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= +k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= +k8s.io/apiextensions-apiserver v0.28.0 h1:CszgmBL8CizEnj4sj7/PtLGey6Na3YgWyGCPONv7E9E= +k8s.io/apiextensions-apiserver v0.28.0/go.mod h1:uRdYiwIuu0SyqJKriKmqEN2jThIJPhVmOWETm8ud1VE= +k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= +k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= +k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= +k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= +k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= +k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20200410145947-61e04a5be9a6/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= -k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= -k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= -k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk= -k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/utils v0.0.0-20230505201702-9f6742963106 h1:EObNQ3TW2D+WptiYXlApGNLVy0zm/JIBVY9i+M4wpAU= +k8s.io/utils v0.0.0-20230505201702-9f6742963106/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.6 h1:oxstGVvXGNnMvY7TAESYk+lzr6S3V5VFxQ6d92KcwQA= -sigs.k8s.io/controller-runtime v0.14.6/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= +sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= -sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From 205fd1c7e69d30d5c18b543c9d0ec6f2d4dfece9 Mon Sep 17 00:00:00 2001 From: Ivan Degtiarenko <78353299+ivan-degtiarenko@users.noreply.github.com> Date: Thu, 21 Sep 2023 18:33:34 +0200 Subject: [PATCH 14/20] Call /current_account before reserving quota (#1289) --- .../dinosaur/pkg/handlers/admin_dinosaur.go | 2 +- internal/dinosaur/pkg/handlers/dinosaur.go | 2 +- internal/dinosaur/pkg/services/dinosaur.go | 10 ++-- .../pkg/services/dinosaurservice_moq.go | 14 +++-- internal/dinosaur/pkg/services/quota.go | 3 +- .../pkg/services/quota/ams_quota_service.go | 26 ++++++++- .../services/quota/ams_quota_service_test.go | 7 ++- .../quota/quota_management_list_service.go | 3 +- .../quota_management_list_service_test.go | 3 +- .../dinosaur/pkg/services/quotaservice_moq.go | 15 +++-- pkg/client/ocm/client.go | 55 ++++++++++++++++--- pkg/client/ocm/client_moq.go | 44 +++++++++++++++ 12 files changed, 153 insertions(+), 31 deletions(-) diff --git a/internal/dinosaur/pkg/handlers/admin_dinosaur.go b/internal/dinosaur/pkg/handlers/admin_dinosaur.go index 19e49a17c7..6fa5fad637 100644 --- a/internal/dinosaur/pkg/handlers/admin_dinosaur.go +++ b/internal/dinosaur/pkg/handlers/admin_dinosaur.go @@ -107,7 +107,7 @@ func (h adminCentralHandler) Create(w http.ResponseWriter, r *http.Request) { ValidateScannerSpec(ctx, ¢ralRequest, &convCentral), }, Action: func() (interface{}, *errors.ServiceError) { - svcErr := h.service.RegisterDinosaurJob(&convCentral) + svcErr := h.service.RegisterDinosaurJob(ctx, &convCentral) h.telemetry.RegisterTenant(ctx, &convCentral, true, svcErr.AsError()) if svcErr != nil { diff --git a/internal/dinosaur/pkg/handlers/dinosaur.go b/internal/dinosaur/pkg/handlers/dinosaur.go index 8ffcbccf73..37f022dd51 100644 --- a/internal/dinosaur/pkg/handlers/dinosaur.go +++ b/internal/dinosaur/pkg/handlers/dinosaur.go @@ -89,7 +89,7 @@ func (h dinosaurHandler) Create(w http.ResponseWriter, r *http.Request) { if arrays.Contains(h.centralRequestConfig.InternalUserAgents, r.UserAgent()) { convCentral.Internal = true } - svcErr := h.service.RegisterDinosaurJob(convCentral) + svcErr := h.service.RegisterDinosaurJob(ctx, convCentral) // Do not track centrals created from internal services. if !convCentral.Internal { h.telemetry.RegisterTenant(ctx, convCentral, false, svcErr.AsError()) diff --git a/internal/dinosaur/pkg/services/dinosaur.go b/internal/dinosaur/pkg/services/dinosaur.go index 066d88dfcf..fbb82a1c14 100644 --- a/internal/dinosaur/pkg/services/dinosaur.go +++ b/internal/dinosaur/pkg/services/dinosaur.go @@ -81,7 +81,7 @@ type DinosaurService interface { // The Dinosaur Request in the database will be updated with a deleted_at timestamp. Delete(centralRequest *dbapi.CentralRequest, force bool) *errors.ServiceError List(ctx context.Context, listArgs *services.ListArguments) (dbapi.CentralList, *api.PagingMeta, *errors.ServiceError) - RegisterDinosaurJob(dinosaurRequest *dbapi.CentralRequest) *errors.ServiceError + RegisterDinosaurJob(ctx context.Context, dinosaurRequest *dbapi.CentralRequest) *errors.ServiceError ListByStatus(status ...dinosaurConstants.CentralStatus) ([]*dbapi.CentralRequest, *errors.ServiceError) // UpdateStatus change the status of the Dinosaur cluster // The returned boolean is to be used to know if the update has been tried or not. An update is not tried if the @@ -214,7 +214,7 @@ func (k *dinosaurService) DetectInstanceType(dinosaurRequest *dbapi.CentralReque } // reserveQuota - reserves quota for the given dinosaur request. If a RHACS quota has been assigned, it will try to reserve RHACS quota, otherwise it will try with RHACSTrial -func (k *dinosaurService) reserveQuota(dinosaurRequest *dbapi.CentralRequest) (subscriptionID string, err *errors.ServiceError) { +func (k *dinosaurService) reserveQuota(ctx context.Context, dinosaurRequest *dbapi.CentralRequest) (subscriptionID string, err *errors.ServiceError) { if dinosaurRequest.InstanceType == types.EVAL.String() { if !k.dinosaurConfig.Quota.AllowEvaluatorInstance { return "", errors.NewWithCause(errors.ErrorForbidden, err, "central eval instances are not allowed") @@ -241,12 +241,12 @@ func (k *dinosaurService) reserveQuota(dinosaurRequest *dbapi.CentralRequest) (s if factoryErr != nil { return "", errors.NewWithCause(errors.ErrorGeneral, factoryErr, "unable to check quota") } - subscriptionID, err = quotaService.ReserveQuota(dinosaurRequest, types.DinosaurInstanceType(dinosaurRequest.InstanceType)) + subscriptionID, err = quotaService.ReserveQuota(ctx, dinosaurRequest, types.DinosaurInstanceType(dinosaurRequest.InstanceType)) return subscriptionID, err } // RegisterDinosaurJob registers a new job in the dinosaur table -func (k *dinosaurService) RegisterDinosaurJob(dinosaurRequest *dbapi.CentralRequest) *errors.ServiceError { +func (k *dinosaurService) RegisterDinosaurJob(ctx context.Context, dinosaurRequest *dbapi.CentralRequest) *errors.ServiceError { k.mu.Lock() defer k.mu.Unlock() // we need to pre-populate the ID to be able to reserve the quota @@ -271,7 +271,7 @@ func (k *dinosaurService) RegisterDinosaurJob(dinosaurRequest *dbapi.CentralRequ return errors.TooManyDinosaurInstancesReached(fmt.Sprintf("Region %s cannot accept instance type: %s at this moment", dinosaurRequest.Region, dinosaurRequest.InstanceType)) } dinosaurRequest.ClusterID = cluster.ClusterID - subscriptionID, err := k.reserveQuota(dinosaurRequest) + subscriptionID, err := k.reserveQuota(ctx, dinosaurRequest) if err != nil { return err } diff --git a/internal/dinosaur/pkg/services/dinosaurservice_moq.go b/internal/dinosaur/pkg/services/dinosaurservice_moq.go index 7f4e2a6593..008c49c227 100644 --- a/internal/dinosaur/pkg/services/dinosaurservice_moq.go +++ b/internal/dinosaur/pkg/services/dinosaurservice_moq.go @@ -79,7 +79,7 @@ var _ DinosaurService = &DinosaurServiceMock{} // RegisterDinosaurDeprovisionJobFunc: func(ctx context.Context, id string) *serviceError.ServiceError { // panic("mock out the RegisterDinosaurDeprovisionJob method") // }, -// RegisterDinosaurJobFunc: func(dinosaurRequest *dbapi.CentralRequest) *serviceError.ServiceError { +// RegisterDinosaurJobFunc: func(ctx context.Context, dinosaurRequest *dbapi.CentralRequest) *serviceError.ServiceError { // panic("mock out the RegisterDinosaurJob method") // }, // RestoreFunc: func(ctx context.Context, id string) *serviceError.ServiceError { @@ -162,7 +162,7 @@ type DinosaurServiceMock struct { RegisterDinosaurDeprovisionJobFunc func(ctx context.Context, id string) *serviceError.ServiceError // RegisterDinosaurJobFunc mocks the RegisterDinosaurJob method. - RegisterDinosaurJobFunc func(dinosaurRequest *dbapi.CentralRequest) *serviceError.ServiceError + RegisterDinosaurJobFunc func(ctx context.Context, dinosaurRequest *dbapi.CentralRequest) *serviceError.ServiceError // RestoreFunc mocks the Restore method. RestoreFunc func(ctx context.Context, id string) *serviceError.ServiceError @@ -280,6 +280,8 @@ type DinosaurServiceMock struct { } // RegisterDinosaurJob holds details about calls to the RegisterDinosaurJob method. RegisterDinosaurJob []struct { + // Ctx is the ctx argument value. + Ctx context.Context // DinosaurRequest is the dinosaurRequest argument value. DinosaurRequest *dbapi.CentralRequest } @@ -933,19 +935,21 @@ func (mock *DinosaurServiceMock) RegisterDinosaurDeprovisionJobCalls() []struct } // RegisterDinosaurJob calls RegisterDinosaurJobFunc. -func (mock *DinosaurServiceMock) RegisterDinosaurJob(dinosaurRequest *dbapi.CentralRequest) *serviceError.ServiceError { +func (mock *DinosaurServiceMock) RegisterDinosaurJob(ctx context.Context, dinosaurRequest *dbapi.CentralRequest) *serviceError.ServiceError { if mock.RegisterDinosaurJobFunc == nil { panic("DinosaurServiceMock.RegisterDinosaurJobFunc: method is nil but DinosaurService.RegisterDinosaurJob was just called") } callInfo := struct { + Ctx context.Context DinosaurRequest *dbapi.CentralRequest }{ + Ctx: ctx, DinosaurRequest: dinosaurRequest, } mock.lockRegisterDinosaurJob.Lock() mock.calls.RegisterDinosaurJob = append(mock.calls.RegisterDinosaurJob, callInfo) mock.lockRegisterDinosaurJob.Unlock() - return mock.RegisterDinosaurJobFunc(dinosaurRequest) + return mock.RegisterDinosaurJobFunc(ctx, dinosaurRequest) } // RegisterDinosaurJobCalls gets all the calls that were made to RegisterDinosaurJob. @@ -953,9 +957,11 @@ func (mock *DinosaurServiceMock) RegisterDinosaurJob(dinosaurRequest *dbapi.Cent // // len(mockedDinosaurService.RegisterDinosaurJobCalls()) func (mock *DinosaurServiceMock) RegisterDinosaurJobCalls() []struct { + Ctx context.Context DinosaurRequest *dbapi.CentralRequest } { var calls []struct { + Ctx context.Context DinosaurRequest *dbapi.CentralRequest } mock.lockRegisterDinosaurJob.RLock() diff --git a/internal/dinosaur/pkg/services/quota.go b/internal/dinosaur/pkg/services/quota.go index 6b4bdad2d5..7a803ad5fa 100644 --- a/internal/dinosaur/pkg/services/quota.go +++ b/internal/dinosaur/pkg/services/quota.go @@ -1,6 +1,7 @@ package services import ( + "context" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/api/dbapi" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/dinosaurs/types" "github.com/stackrox/acs-fleet-manager/pkg/errors" @@ -13,7 +14,7 @@ type QuotaService interface { // CheckIfQuotaIsDefinedForInstanceType checks if quota is defined for the given instance type CheckIfQuotaIsDefinedForInstanceType(dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (bool, *errors.ServiceError) // ReserveQuota reserves a quota for a user and return the reservation id or an error in case of failure - ReserveQuota(dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *errors.ServiceError) + ReserveQuota(ctx context.Context, dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *errors.ServiceError) // DeleteQuota deletes a reserved quota DeleteQuota(subscriptionID string) *errors.ServiceError } diff --git a/internal/dinosaur/pkg/services/quota/ams_quota_service.go b/internal/dinosaur/pkg/services/quota/ams_quota_service.go index ca692c6498..5c27b4e14e 100644 --- a/internal/dinosaur/pkg/services/quota/ams_quota_service.go +++ b/internal/dinosaur/pkg/services/quota/ams_quota_service.go @@ -2,7 +2,9 @@ package quota import ( + "context" "fmt" + "github.com/openshift-online/ocm-sdk-go/authentication" "github.com/golang/glog" amsv1 "github.com/openshift-online/ocm-sdk-go/accountsmgmt/v1" @@ -127,11 +129,16 @@ func (q amsQuotaService) selectBillingModelFromDinosaurInstanceType(orgID, cloud } // ReserveQuota ... -func (q amsQuotaService) ReserveQuota(dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *errors.ServiceError) { +func (q amsQuotaService) ReserveQuota(ctx context.Context, dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *errors.ServiceError) { dinosaurID := dinosaur.ID - rr := newBaseQuotaReservedResourceResourceBuilder() + // The reason to call /current_account here is how AMS functions. + // In case customer just created the account, AMS might miss information about their quota. + // Calling /current_account endpoint results in this data being populated. + // Since this is a non-requirement for successful quota reservation, errors are logged but ignored here. + q.callCurrentAccount(ctx) + org, err := q.amsClient.GetOrganisationFromExternalID(dinosaur.OrganisationID) if err != nil { return "", errors.OrganisationNotFound(dinosaur.OrganisationID, err) @@ -180,6 +187,21 @@ func (q amsQuotaService) ReserveQuota(dinosaur *dbapi.CentralRequest, instanceTy return "", errors.InsufficientQuotaError("Insufficient Quota") } +func (q amsQuotaService) callCurrentAccount(ctx context.Context) { + userToken, err := authentication.TokenFromContext(ctx) + if err != nil { + glog.Warningf("Couldn't extract user token from context: %w", err) + return + } + if userToken == nil { + return + } + _, err = q.amsClient.GetCurrentAccount(userToken.Raw) + if err != nil { + glog.Warningf("Call to current account endpoint was unsuccessful: %w", err) + } +} + func (q amsQuotaService) verifyCloudAccountInAMS(dinosaur *dbapi.CentralRequest, orgID string) *errors.ServiceError { cloudAccounts, err := q.amsClient.GetCustomerCloudAccounts(orgID, []string{RHACSMarketplaceQuotaID}) if err != nil { diff --git a/internal/dinosaur/pkg/services/quota/ams_quota_service_test.go b/internal/dinosaur/pkg/services/quota/ams_quota_service_test.go index 2232749c6e..8a20ffdd21 100644 --- a/internal/dinosaur/pkg/services/quota/ams_quota_service_test.go +++ b/internal/dinosaur/pkg/services/quota/ams_quota_service_test.go @@ -1,6 +1,7 @@ package quota import ( + "context" "fmt" "testing" @@ -20,6 +21,8 @@ import ( "github.com/pkg/errors" ) +var emptyCtx = context.Background() + func Test_AMSCheckQuota(t *testing.T) { type fields struct { ocmClient ocm.Client @@ -200,7 +203,7 @@ func Test_AMSCheckQuota(t *testing.T) { gomega.Expect(sq).To(gomega.Equal(tt.args.hasStandardQuota)) gomega.Expect(eq).To(gomega.Equal(tt.args.hasEvalQuota)) - _, err = quotaService.ReserveQuota(dinosaur, tt.args.dinosaurInstanceType) + _, err = quotaService.ReserveQuota(emptyCtx, dinosaur, tt.args.dinosaurInstanceType) gomega.Expect(err != nil).To(gomega.Equal(tt.wantErr)) }) } @@ -656,7 +659,7 @@ func Test_AMSReserveQuota(t *testing.T) { CloudAccountID: tt.args.cloudAccountID, CloudProvider: utils.IfThenElse(tt.args.cloudProviderID == "", "cloudProviderID", tt.args.cloudProviderID), } - subID, err := quotaService.ReserveQuota(dinosaur, types.STANDARD) + subID, err := quotaService.ReserveQuota(emptyCtx, dinosaur, types.STANDARD) gomega.Expect(subID).To(gomega.Equal(tt.want)) gomega.Expect(err != nil).To(gomega.Equal(tt.wantErr)) diff --git a/internal/dinosaur/pkg/services/quota/quota_management_list_service.go b/internal/dinosaur/pkg/services/quota/quota_management_list_service.go index c4a6a56d9f..e434ed0a0a 100644 --- a/internal/dinosaur/pkg/services/quota/quota_management_list_service.go +++ b/internal/dinosaur/pkg/services/quota/quota_management_list_service.go @@ -1,6 +1,7 @@ package quota import ( + "context" "fmt" "github.com/stackrox/acs-fleet-manager/pkg/quotamanagement" @@ -41,7 +42,7 @@ func (q QuotaManagementListService) CheckIfQuotaIsDefinedForInstanceType(dinosau } // ReserveQuota ... -func (q QuotaManagementListService) ReserveQuota(dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *errors.ServiceError) { +func (q QuotaManagementListService) ReserveQuota(_ context.Context, dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *errors.ServiceError) { if !q.quotaManagementList.EnableInstanceLimitControl { return "", nil } diff --git a/internal/dinosaur/pkg/services/quota/quota_management_list_service_test.go b/internal/dinosaur/pkg/services/quota/quota_management_list_service_test.go index 64439d5561..352d2e38bf 100644 --- a/internal/dinosaur/pkg/services/quota/quota_management_list_service_test.go +++ b/internal/dinosaur/pkg/services/quota/quota_management_list_service_test.go @@ -1,6 +1,7 @@ package quota import ( + "context" "net/http" "testing" @@ -370,7 +371,7 @@ func Test_QuotaManagementListReserveQuota(t *testing.T) { Owner: "username", OrganisationID: "org-id", } - _, err := quotaService.ReserveQuota(dinosaur, tt.args.instanceType) + _, err := quotaService.ReserveQuota(context.Background(), dinosaur, tt.args.instanceType) gomega.Expect(tt.wantErr).To(gomega.Equal(err)) }) } diff --git a/internal/dinosaur/pkg/services/quotaservice_moq.go b/internal/dinosaur/pkg/services/quotaservice_moq.go index 1b47ee3f06..7d2a778356 100644 --- a/internal/dinosaur/pkg/services/quotaservice_moq.go +++ b/internal/dinosaur/pkg/services/quotaservice_moq.go @@ -4,6 +4,7 @@ package services import ( + "context" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/api/dbapi" "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/dinosaurs/types" serviceError "github.com/stackrox/acs-fleet-manager/pkg/errors" @@ -26,7 +27,7 @@ var _ QuotaService = &QuotaServiceMock{} // DeleteQuotaFunc: func(subscriptionID string) *serviceError.ServiceError { // panic("mock out the DeleteQuota method") // }, -// ReserveQuotaFunc: func(dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *serviceError.ServiceError) { +// ReserveQuotaFunc: func(ctx context.Context, dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *serviceError.ServiceError) { // panic("mock out the ReserveQuota method") // }, // } @@ -43,7 +44,7 @@ type QuotaServiceMock struct { DeleteQuotaFunc func(subscriptionID string) *serviceError.ServiceError // ReserveQuotaFunc mocks the ReserveQuota method. - ReserveQuotaFunc func(dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *serviceError.ServiceError) + ReserveQuotaFunc func(ctx context.Context, dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *serviceError.ServiceError) // calls tracks calls to the methods. calls struct { @@ -61,6 +62,8 @@ type QuotaServiceMock struct { } // ReserveQuota holds details about calls to the ReserveQuota method. ReserveQuota []struct { + // Ctx is the ctx argument value. + Ctx context.Context // Dinosaur is the dinosaur argument value. Dinosaur *dbapi.CentralRequest // InstanceType is the instanceType argument value. @@ -141,21 +144,23 @@ func (mock *QuotaServiceMock) DeleteQuotaCalls() []struct { } // ReserveQuota calls ReserveQuotaFunc. -func (mock *QuotaServiceMock) ReserveQuota(dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *serviceError.ServiceError) { +func (mock *QuotaServiceMock) ReserveQuota(ctx context.Context, dinosaur *dbapi.CentralRequest, instanceType types.DinosaurInstanceType) (string, *serviceError.ServiceError) { if mock.ReserveQuotaFunc == nil { panic("QuotaServiceMock.ReserveQuotaFunc: method is nil but QuotaService.ReserveQuota was just called") } callInfo := struct { + Ctx context.Context Dinosaur *dbapi.CentralRequest InstanceType types.DinosaurInstanceType }{ + Ctx: ctx, Dinosaur: dinosaur, InstanceType: instanceType, } mock.lockReserveQuota.Lock() mock.calls.ReserveQuota = append(mock.calls.ReserveQuota, callInfo) mock.lockReserveQuota.Unlock() - return mock.ReserveQuotaFunc(dinosaur, instanceType) + return mock.ReserveQuotaFunc(ctx, dinosaur, instanceType) } // ReserveQuotaCalls gets all the calls that were made to ReserveQuota. @@ -163,10 +168,12 @@ func (mock *QuotaServiceMock) ReserveQuota(dinosaur *dbapi.CentralRequest, insta // // len(mockedQuotaService.ReserveQuotaCalls()) func (mock *QuotaServiceMock) ReserveQuotaCalls() []struct { + Ctx context.Context Dinosaur *dbapi.CentralRequest InstanceType types.DinosaurInstanceType } { var calls []struct { + Ctx context.Context Dinosaur *dbapi.CentralRequest InstanceType types.DinosaurInstanceType } diff --git a/pkg/client/ocm/client.go b/pkg/client/ocm/client.go index fa2222629d..20c5cbc10f 100644 --- a/pkg/client/ocm/client.go +++ b/pkg/client/ocm/client.go @@ -3,6 +3,7 @@ package ocm import ( "fmt" + "github.com/openshift-online/ocm-sdk-go/logging" "net/http" "github.com/pkg/errors" @@ -59,6 +60,8 @@ type Client interface { Connection() *sdkClient.Connection GetQuotaCostsForProduct(organizationID, resourceName, product string) ([]*amsv1.QuotaCost, error) GetCustomerCloudAccounts(organizationID string, quotaIDs []string) ([]*amsv1.CloudAccount, error) + // GetCurrentAccount returns the account information of the user to whom belongs the token + GetCurrentAccount(userToken string) (*amsv1.Account, error) } var _ Client = &client{} @@ -74,22 +77,17 @@ type AMSClient Client type ClusterManagementClient Client // NewOCMConnection ... -func NewOCMConnection(ocmConfig *OCMConfig, BaseURL string) (*sdkClient.Connection, func(), error) { +func NewOCMConnection(ocmConfig *OCMConfig, baseURL string) (*sdkClient.Connection, func(), error) { if ocmConfig.EnableMock && ocmConfig.MockMode != MockModeEmulateServer { return nil, func() {}, nil } - builder := sdkClient.NewConnectionBuilder(). - URL(BaseURL). - MetricsSubsystem("api_outbound") - + builder := getBaseConnectionBuilder(baseURL) if !ocmConfig.EnableMock { // Create a logger that has the debug level enabled: - logger, err := sdkClient.NewGoLoggerBuilder(). - Debug(ocmConfig.Debug). - Build() + logger, err := getLogger(ocmConfig.Debug) if err != nil { - return nil, nil, fmt.Errorf("creating logger for OCM client connection: %w", err) + return nil, nil, err } builder = builder.Logger(logger) } @@ -111,6 +109,22 @@ func NewOCMConnection(ocmConfig *OCMConfig, BaseURL string) (*sdkClient.Connecti }, nil } +func getBaseConnectionBuilder(baseURL string) *sdkClient.ConnectionBuilder { + return sdkClient.NewConnectionBuilder(). + URL(baseURL). + MetricsSubsystem("api_outbound") +} + +func getLogger(isDebugEnabled bool) (*logging.GoLogger, error) { + logger, err := sdkClient.NewGoLoggerBuilder(). + Debug(isDebugEnabled). + Build() + if err != nil { + return nil, fmt.Errorf("creating logger for OCM client connection: %w", err) + } + return logger, nil +} + // NewClient ... func NewClient(connection *sdkClient.Connection) Client { return &client{connection: connection} @@ -742,3 +756,26 @@ func (c *client) GetCustomerCloudAccounts(organizationID string, quotaIDs []stri return res, nil } + +// GetCurrentAccount returns the account information of the user to whom belongs the token +func (c *client) GetCurrentAccount(userToken string) (*amsv1.Account, error) { + logger, err := getLogger(c.connection.Logger().DebugEnabled()) + if err != nil { + return nil, fmt.Errorf("couldn't create logger for modified OCM connection: %w", err) + } + modifiedConnection, err := getBaseConnectionBuilder(c.connection.URL()). + Logger(logger). + Tokens(userToken). + Build() + if err != nil { + return nil, fmt.Errorf("couldn't build modified OCM connection: %w", err) + } + defer modifiedConnection.Close() + response, err := modifiedConnection.AccountsMgmt().V1().CurrentAccount().Get().Send() + if err != nil { + return nil, fmt.Errorf("unsuccessful call to current account endpoint: %w", err) + } + + currentAccount := response.Body() + return currentAccount, nil +} diff --git a/pkg/client/ocm/client_moq.go b/pkg/client/ocm/client_moq.go index b0e630331b..1a064c4524 100644 --- a/pkg/client/ocm/client_moq.go +++ b/pkg/client/ocm/client_moq.go @@ -71,6 +71,9 @@ var _ Client = &ClientMock{} // GetClusterStatusFunc: func(id string) (*clustersmgmtv1.ClusterStatus, error) { // panic("mock out the GetClusterStatus method") // }, +// GetCurrentAccountFunc: func(userToken string) (*amsv1.Account, error) { +// panic("mock out the GetCurrentAccount method") +// }, // GetCustomerCloudAccountsFunc: func(organizationID string, quotaIDs []string) ([]*amsv1.CloudAccount, error) { // panic("mock out the GetCustomerCloudAccounts method") // }, @@ -168,6 +171,9 @@ type ClientMock struct { // GetClusterStatusFunc mocks the GetClusterStatus method. GetClusterStatusFunc func(id string) (*clustersmgmtv1.ClusterStatus, error) + // GetCurrentAccountFunc mocks the GetCurrentAccount method. + GetCurrentAccountFunc func(userToken string) (*amsv1.Account, error) + // GetCustomerCloudAccountsFunc mocks the GetCustomerCloudAccounts method. GetCustomerCloudAccountsFunc func(organizationID string, quotaIDs []string) ([]*amsv1.CloudAccount, error) @@ -304,6 +310,11 @@ type ClientMock struct { // ID is the id argument value. ID string } + // GetCurrentAccount holds details about calls to the GetCurrentAccount method. + GetCurrentAccount []struct { + // UserToken is the userToken argument value. + UserToken string + } // GetCustomerCloudAccounts holds details about calls to the GetCustomerCloudAccounts method. GetCustomerCloudAccounts []struct { // OrganizationID is the organizationID argument value. @@ -409,6 +420,7 @@ type ClientMock struct { lockGetClusterDNS sync.RWMutex lockGetClusterIngresses sync.RWMutex lockGetClusterStatus sync.RWMutex + lockGetCurrentAccount sync.RWMutex lockGetCustomerCloudAccounts sync.RWMutex lockGetExistingClusterMetrics sync.RWMutex lockGetIdentityProviderList sync.RWMutex @@ -986,6 +998,38 @@ func (mock *ClientMock) GetClusterStatusCalls() []struct { return calls } +// GetCurrentAccount calls GetCurrentAccountFunc. +func (mock *ClientMock) GetCurrentAccount(userToken string) (*amsv1.Account, error) { + if mock.GetCurrentAccountFunc == nil { + panic("ClientMock.GetCurrentAccountFunc: method is nil but Client.GetCurrentAccount was just called") + } + callInfo := struct { + UserToken string + }{ + UserToken: userToken, + } + mock.lockGetCurrentAccount.Lock() + mock.calls.GetCurrentAccount = append(mock.calls.GetCurrentAccount, callInfo) + mock.lockGetCurrentAccount.Unlock() + return mock.GetCurrentAccountFunc(userToken) +} + +// GetCurrentAccountCalls gets all the calls that were made to GetCurrentAccount. +// Check the length with: +// +// len(mockedClient.GetCurrentAccountCalls()) +func (mock *ClientMock) GetCurrentAccountCalls() []struct { + UserToken string +} { + var calls []struct { + UserToken string + } + mock.lockGetCurrentAccount.RLock() + calls = mock.calls.GetCurrentAccount + mock.lockGetCurrentAccount.RUnlock() + return calls +} + // GetCustomerCloudAccounts calls GetCustomerCloudAccountsFunc. func (mock *ClientMock) GetCustomerCloudAccounts(organizationID string, quotaIDs []string) ([]*amsv1.CloudAccount, error) { if mock.GetCustomerCloudAccountsFunc == nil { From e10a3d7c1a2d402c6a9b13b3bb000dd6ce10e83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20B=C3=A4umer?= Date: Fri, 22 Sep 2023 11:14:43 +0200 Subject: [PATCH 15/20] Remove multi target build (#1259) --- Dockerfile | 20 +----- Dockerfile.hybrid => Dockerfile.local | 14 +++++ Makefile | 91 +++++++++------------------ dev/env/defaults/00-defaults.env | 1 - dev/env/scripts/docker.sh | 15 +---- dev/env/scripts/lib.sh | 6 -- dev/env/scripts/up.sh | 1 - probe/Dockerfile | 13 +--- 8 files changed, 46 insertions(+), 115 deletions(-) rename Dockerfile.hybrid => Dockerfile.local (53%) diff --git a/Dockerfile b/Dockerfile index 3b397da0f4..5f14eeda5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,14 @@ FROM registry.ci.openshift.org/openshift/release:golang-1.20 AS build -ENV GOFLAGS="-mod=mod" - RUN mkdir /rds_ca ADD https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem /rds_ca/aws-rds-ca-global-bundle.pem RUN mkdir /src WORKDIR /src -RUN CGO_ENABLED=0 go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv@latest -COPY go.* ./ -RUN go mod download COPY . ./ -FROM build as build-debug -RUN GOARGS="-gcflags 'all=-N -l'" make binary - -FROM build as build-standard RUN make binary -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8 as debug -COPY --from=build-debug /go/bin/dlv /src/fleet-manager /src/fleetshard-sync /usr/local/bin/ -COPY --from=build-debug /src /src -COPY --from=build /rds_ca /usr/local/share/ca-certificates -EXPOSE 8000 -WORKDIR / -ENTRYPOINT [ "/usr/local/bin/dlv" , "--listen=:40000", "--headless=true", "--api-version=2", "--accept-multiclient", "exec", "/usr/local/bin/fleet-manager", "serve"] - FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8 as standard RUN microdnf install shadow-utils @@ -34,8 +17,9 @@ RUN useradd -u 1001 unprivilegeduser # Switch to non-root user USER unprivilegeduser -COPY --chown=unprivilegeduser --from=build-standard /src/fleet-manager /src/fleetshard-sync /usr/local/bin/ +COPY --chown=unprivilegeduser --from=build /src/fleet-manager /src/fleetshard-sync /usr/local/bin/ COPY --chown=unprivilegeduser --from=build /rds_ca /usr/local/share/ca-certificates + EXPOSE 8000 WORKDIR / ENTRYPOINT ["/usr/local/bin/fleet-manager", "serve"] diff --git a/Dockerfile.hybrid b/Dockerfile.local similarity index 53% rename from Dockerfile.hybrid rename to Dockerfile.local index 9965afded1..f6d6bc54b3 100644 --- a/Dockerfile.hybrid +++ b/Dockerfile.local @@ -1,5 +1,12 @@ +# This dockerfile is used for local builds to support architectures like arm64. FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8 +RUN microdnf install shadow-utils + +RUN useradd -u 1001 unprivilegeduser +# Switch to non-root user + +RUN mkdir /rds_ca ADD https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem /usr/local/share/ca-certificates/aws-rds-ca-global-bundle.pem COPY \ @@ -7,6 +14,13 @@ COPY \ fleetshard-sync \ /usr/local/bin/ +RUN chown unprivilegeduser /usr/local/bin/fleet-manager +RUN chown unprivilegeduser /usr/local/bin/fleetshard-sync +RUN chown unprivilegeduser /rds_ca +RUN chown unprivilegeduser /usr/local/share/ca-certificates + +USER unprivilegeduser + EXPOSE 8000 ENTRYPOINT ["/usr/local/bin/fleet-manager", "serve"] diff --git a/Makefile b/Makefile index 95df341118..6be8ffb25f 100644 --- a/Makefile +++ b/Makefile @@ -31,15 +31,9 @@ GINKGO_FLAGS ?= -v # cluster will not pull the new image from the internal registry: version:=$(shell date +%s) -ifeq ($(DEBUG_IMAGE),true) -IMAGE_NAME = fleet-manager-dbg -PROBE_IMAGE_NAME = probe-dbg -IMAGE_TARGET = debug -else IMAGE_NAME = fleet-manager PROBE_IMAGE_NAME = probe IMAGE_TARGET = standard -endif SHORT_IMAGE_REF = "$(IMAGE_NAME):$(image_tag)" PROBE_SHORT_IMAGE_REF = "$(PROBE_IMAGE_NAME):$(image_tag)" @@ -210,8 +204,8 @@ help: @echo "make generate generate go and openapi modules" @echo "make openapi/generate generate openapi modules" @echo "make openapi/validate validate openapi schema" - @echo "make image/build build image (hybrid fast build, respecting IGNORE_REPOSITORY_DIRTINESS)" - @echo "make image/build/multi-target build image (containerized, respecting DEBUG_IMAGE and IGNORE_REPOSITORY_DIRTINESS) for local deployment" + @echo "make image/build build fleet-manager and fleetshard-sync container image" + @echo "make image/build/local build fleet-manager and fleetshard-sync binaries locally, this image supports arm64" @echo "make image/push push image" @echo "make setup/git/hooks setup git hooks" @echo "make secrets/touch touch all required secret files" @@ -511,37 +505,30 @@ docker/login/internal: $(DOCKER) login -u kubeadmin --password-stdin <<< $(shell oc whoami -t) $(shell oc get route default-route -n openshift-image-registry -o jsonpath="{.spec.host}") .PHONY: docker/login/internal -# Build the image in a hybrid fashion, i.e. building binaries directly on the host leveraging -# Go's cross-compilation capabilities and then copying these binaries into a new Docker image. -image/build: GOOS=linux -image/build: IMAGE_REF ?= "$(external_image_registry)/$(image_repository):$(image_tag)" -image/build: fleet-manager fleetshard-sync - DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build -t $(IMAGE_REF) -f Dockerfile.hybrid . - $(DOCKER) tag $(IMAGE_REF) $(SHORT_IMAGE_REF) -ifeq ("$(CLUSTER_TYPE)","kind") - kind load docker-image $(SHORT_IMAGE_REF) -endif -.PHONY: image/build - # Build the image using by specifying a specific image target within the Dockerfile. -image/build/multi-target: image/build/multi-target/fleet-manager image/build/multi-target/probe -.PHONY: image/build/multi-target - -image/build/multi-target/fleet-manager: GOOS=linux -image/build/multi-target/fleet-manager: IMAGE_REF="$(external_image_registry)/$(image_repository):$(image_tag)" -image/build/multi-target/fleet-manager: - DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build --target $(IMAGE_TARGET) -t $(IMAGE_REF) . +image/build: GOOS=linux +image/build: DOCKERFILE="Dockerfile" +image/build: IMAGE_REF="$(external_image_registry)/$(image_repository):$(image_tag)" +image/build: + DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build -t $(IMAGE_REF) -f $(DOCKERFILE) . DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) tag $(IMAGE_REF) $(SHORT_IMAGE_REF) @echo "New image tag: $(SHORT_IMAGE_REF). You might want to" @echo "export FLEET_MANAGER_IMAGE=$(SHORT_IMAGE_REF)" -.PHONY: image/build/multi-target/fleet-manager +.PHONY: image/build -image/build/multi-target/probe: GOOS=linux -image/build/multi-target/probe: IMAGE_REF="$(external_image_registry)/$(probe_image_repository):$(image_tag)" -image/build/multi-target/probe: - DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build --target $(IMAGE_TARGET) -t $(IMAGE_REF) -f probe/Dockerfile . +# Builds the binaries locally and copies them into the image. This build is compatible with arm64. +image/build/local: GOOS=linux +image/build/local: DOCKERFILE="Dockerfile.local" +image/build/local: + GOARCH=$(GOARCH) GOOS=$(GOOS) $(MAKE) binary + $(MAKE) image/build DOCKERFILE=$(DOCKERFILE) + +image/build/probe: GOOS=linux +image/build/probe: IMAGE_REF="$(external_image_registry)/$(probe_image_repository):$(image_tag)" +image/build/probe: + DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build -t $(IMAGE_REF) -f probe/Dockerfile . DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) tag $(IMAGE_REF) $(PROBE_SHORT_IMAGE_REF) -.PHONY: image/build/multi-target/probe +.PHONY: image/build/probe image/build/fleet-manager-tools: GOOS=linux image/build/fleet-manager-tools: IMAGE_REF="$(external_image_registry)/rhacs-eng/fleet-manager-tools:$(image_tag)" @@ -557,21 +544,12 @@ image/push/fleet-manager-tools: image/build/fleet-manager-tools @echo "Image fleet-manager tools was pushed as $(IMAGE_REF)." .PHONY: image/push/fleet-manager-tools -# build binary and image and tag image for local deployment -image/build/local: GOOS=linux -image/build/local: IMAGE_REF="$(external_image_registry)/$(image_repository):$(image_tag)" -image/build/local: image/build - DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) tag $(IMAGE_REF) $(SHORT_IMAGE_REF) - @echo "New image tag: $(SHORT_IMAGE_REF). You might want to" - @echo "export FLEET_MANAGER_IMAGE=$(SHORT_IMAGE_REF)" -.PHONY: image/build/local - # Build and push the image image/push: image/push/fleet-manager image/push/probe .PHONY: image/push image/push/fleet-manager: IMAGE_REF="$(external_image_registry)/$(image_repository):$(image_tag)" -image/push/fleet-manager: image/build/multi-target/fleet-manager +image/push/fleet-manager: image/build DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) push $(IMAGE_REF) @echo @echo "Image was pushed as $(IMAGE_REF). You might want to" @@ -579,7 +557,7 @@ image/push/fleet-manager: image/build/multi-target/fleet-manager .PHONY: image/push/fleet-manager image/push/probe: IMAGE_REF="$(external_image_registry)/$(probe_image_repository):$(image_tag)" -image/push/probe: image/build/multi-target/probe +image/push/probe: image/build/probe DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) push $(IMAGE_REF) @echo @echo "Image was pushed as $(IMAGE_REF)." @@ -592,23 +570,8 @@ image/push/internal: docker/login/internal $(DOCKER) push "$(shell oc get route default-route -n openshift-image-registry -o jsonpath="{.spec.host}")/$(probe_image_repository):$(IMAGE_TAG)" .PHONY: image/push/internal -# build and push the image to an OpenShift cluster's internal registry -# namespace used in the image repository must exist on the cluster before running this command. Run `make deploy/project` to create the namespace if not available. -image/build/push/internal: image/push/internal -.PHONY: image/build/push/internal - -# Build the binary and test image -image/build/test: binary - $(DOCKER) build -t "$(test_image)" -f Dockerfile.integration.test . -.PHONY: image/build/test - -# Run the test container -test/run: image/build/test - $(DOCKER) run -u $(shell id -u) --net=host -p 9876:9876 -i "$(test_image)" -.PHONY: test/run - # Run the probe based e2e test in container -test/e2e/probe/run: image/build/multi-target/probe +test/e2e/probe/run: image/build/probe test/e2e/probe/run: IMAGE_REF="$(external_image_registry)/$(probe_image_repository):$(image_tag)" test/e2e/probe/run: $(DOCKER) run \ @@ -899,13 +862,15 @@ deploy/bootstrap: .PHONY: deploy/bootstrap # Deploy local images fast for development -deploy/dev-fast: image/build deploy/dev-fast/fleet-manager deploy/dev-fast/fleetshard-sync +deploy/dev-fast: image/build/local deploy/dev-fast/fleet-manager deploy/dev-fast/fleetshard-sync -deploy/dev-fast/fleet-manager: image/build +deploy/dev-fast/fleet-manager: GOOS=linux +deploy/dev-fast/fleet-manager: image/build/local kubectl -n $(ACSMS_NAMESPACE) set image deploy/fleet-manager fleet-manager=$(SHORT_IMAGE_REF) db-migrate=$(SHORT_IMAGE_REF) kubectl -n $(ACSMS_NAMESPACE) delete pod -l application=fleet-manager -deploy/dev-fast/fleetshard-sync: image/build +deploy/dev-fast/fleetshard-sync: GOOS=linux +deploy/dev-fast/fleetshard-sync: image/build/local kubectl -n $(ACSMS_NAMESPACE) set image deploy/fleetshard-sync fleetshard-sync=$(SHORT_IMAGE_REF) kubectl -n $(ACSMS_NAMESPACE) delete pod -l application=fleetshard-sync diff --git a/dev/env/defaults/00-defaults.env b/dev/env/defaults/00-defaults.env index 04ec228141..29d3237f3d 100644 --- a/dev/env/defaults/00-defaults.env +++ b/dev/env/defaults/00-defaults.env @@ -22,7 +22,6 @@ export ENABLE_FM_PORT_FORWARDING_DEFAULT="false" export OPENSHIFT_MARKETPLACE_DEFAULT="false" export INSTALL_OPERATOR_DEFAULT="true" export INSTALL_OPENSHIFT_ROUTER_DEFAULT="true" -export DEBUG_PODS_DEFAULT="false" export DATABASE_HOST_DEFAULT="db" export DATABASE_PORT_DEFAULT="5432" diff --git a/dev/env/scripts/docker.sh b/dev/env/scripts/docker.sh index ab8696e779..5b947d7ba1 100644 --- a/dev/env/scripts/docker.sh +++ b/dev/env/scripts/docker.sh @@ -56,21 +56,8 @@ ensure_fleet_manager_image_exists() { if [[ "$image_available" != "true" || "$FLEET_MANAGER_IMAGE" =~ dirty$ ]]; then # Attempt to build this image. if [[ "$FLEET_MANAGER_IMAGE" == "$(make -s -C "${GITROOT}" full-image-tag)" ]]; then - # Looks like we can build this tag from the current state of the repository. - if [[ "$DEBUG_PODS" == "true" ]]; then - log "Building image with debugging support..." - make -C "${GITROOT}" image/build/multi-target - else - # We *could* also use image/build/multi-target, because that - # target also supports building of standard (i.e. non-debug) images. - # But until there is a reliable and portable caching mechanism for dockerized - # Go projects, this would be regression in terms of build performance. - # Hence we don't use the image/build/multi-target target here, but the - # older `image/build/local` target, which uses a hybrid building - # approach and is much faster. - log "Building standard image..." + log "Building local image..." make -C "${GITROOT}" image/build/local - fi else die "Cannot find image '${FLEET_MANAGER_IMAGE}' and don't know how to build it" fi diff --git a/dev/env/scripts/lib.sh b/dev/env/scripts/lib.sh index c8236e45aa..b9d9c4b344 100644 --- a/dev/env/scripts/lib.sh +++ b/dev/env/scripts/lib.sh @@ -137,7 +137,6 @@ init() { export CENTRAL_DOMAIN_NAME=${CENTRAL_DOMAIN_NAME:-$CENTRAL_DOMAIN_NAME_DEFAULT} export FLEET_MANAGER_IMAGE=${FLEET_MANAGER_IMAGE:-$FLEET_MANAGER_IMAGE_DEFAULT} export IGNORE_REPOSITORY_DIRTINESS=${IGNORE_REPOSITORY_DIRTINESS:-$IGNORE_REPOSITORY_DIRTINESS_DEFAULT} - export DEBUG_PODS=${DEBUG_PODS:-$DEBUG_PODS_DEFAULT} export RHACS_TARGETED_OPERATOR_UPGRADES=${RHACS_TARGETED_OPERATOR_UPGRADES:-$RHACS_TARGETED_OPERATOR_UPGRADES_DEFAULT} export RHACS_STANDALONE_MODE=${RHACS_STANDALONE_MODE:-$RHACS_STANDALONE_MODE_DEFAULT} export RHACS_GITOPS_ENABLED=${RHACS_GITOPS_ENABLED:-$RHACS_GITOPS_ENABLED_DEFAULT} @@ -145,11 +144,6 @@ init() { local fleet_manager_command="/usr/local/bin/fleet-manager serve --force-leader --api-server-bindaddress=0.0.0.0:8000 --health-check-server-bindaddress=0.0.0.0:8083 --kubeconfig=/secrets/kubeconfig --enable-central-external-certificate=$ENABLE_CENTRAL_EXTERNAL_CERTIFICATE --central-domain-name='$CENTRAL_DOMAIN_NAME' --gitops-config-path='/gitops-config/config.yaml'" FLEET_MANAGER_CONTAINER_COMMAND_DEFAULT="${fleet_manager_command} || { sleep 120; false; }" FLEETSHARD_SYNC_CONTAINER_COMMAND_DEFAULT="/usr/local/bin/fleetshard-sync" - if [[ "$DEBUG_PODS" == "true" ]]; then - FLEET_MANAGER_CONTAINER_COMMAND_DEFAULT="/usr/local/bin/dlv --listen=:40000 --headless=true --api-version=2 --continue --accept-multiclient exec -- ${fleet_manager_command}" - FLEETSHARD_SYNC_CONTAINER_COMMAND_DEFAULT="/usr/local/bin/dlv --listen=:40000 --headless=true --api-version=2 --continue --accept-multiclient exec /usr/local/bin/fleetshard-sync" - export DEBUG_IMAGE="true" # Propagate to the Makefile - fi export FLEET_MANAGER_CONTAINER_COMMAND=${FLEET_MANAGER_CONTAINER_COMMAND:-$FLEET_MANAGER_CONTAINER_COMMAND_DEFAULT} export FLEETSHARD_SYNC_CONTAINER_COMMAND=${FLEETSHARD_SYNC_CONTAINER_COMMAND:-$FLEETSHARD_SYNC_CONTAINER_COMMAND_DEFAULT} diff --git a/dev/env/scripts/up.sh b/dev/env/scripts/up.sh index 6324bdf1a4..79aca2c0e8 100755 --- a/dev/env/scripts/up.sh +++ b/dev/env/scripts/up.sh @@ -41,7 +41,6 @@ Inheriting ImagePullSecrets for Quay.io: ${INHERIT_IMAGEPULLSECRETS} Installing RHACS Operator: ${INSTALL_OPERATOR} Enable External Config: ${ENABLE_EXTERNAL_CONFIG} AWS Auth Helper: ${AWS_AUTH_HELPER:-none} -Debugging Mode: ${DEBUG_PODS} EOF diff --git a/probe/Dockerfile b/probe/Dockerfile index f78e48be43..4cb99ff080 100644 --- a/probe/Dockerfile +++ b/probe/Dockerfile @@ -9,19 +9,8 @@ COPY go.* ./ RUN go mod download COPY . ./ -FROM build as build-debug -RUN GOARGS="-gcflags 'all=-N -l'" make probe - -FROM build as build-standard RUN make probe -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8 as debug -COPY --from=build-debug /go/bin/dlv /src/probe/bin /stackrox/ -COPY --from=build-debug /src /src -EXPOSE 7070 -ENTRYPOINT [ "/stackrox/dlv" , "--listen=:40000", "--headless=true", "--api-version=2", "--accept-multiclient", "exec", "/stackrox/probe"] -CMD ["start"] - FROM registry.access.redhat.com/ubi8/ubi-minimal:8.8 as standard RUN microdnf install shadow-utils @@ -30,7 +19,7 @@ RUN useradd -u 1001 unprivilegeduser # Switch to non-root user USER unprivilegeduser -COPY --from=build-standard /src/probe/bin /stackrox/ +COPY --from=build /src/probe/bin /stackrox/ EXPOSE 7070 ENTRYPOINT ["/stackrox/probe"] CMD ["start"] From 4a7932e7642537914144d99a5ade2a5b7e4574d9 Mon Sep 17 00:00:00 2001 From: Johannes Malsam <60240743+johannes94@users.noreply.github.com> Date: Fri, 22 Sep 2023 16:42:45 +0200 Subject: [PATCH 16/20] fixed restore endpoint (#1298) --- fleetshard/pkg/central/reconciler/reconciler.go | 2 +- internal/dinosaur/pkg/services/dinosaur.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fleetshard/pkg/central/reconciler/reconciler.go b/fleetshard/pkg/central/reconciler/reconciler.go index 9c13c27dd0..5e56b704ad 100644 --- a/fleetshard/pkg/central/reconciler/reconciler.go +++ b/fleetshard/pkg/central/reconciler/reconciler.go @@ -246,7 +246,7 @@ func (r *CentralReconciler) Reconcile(ctx context.Context, remoteCentral private return nil, errors.Wrapf(err, "setting central reconcilation cache") } - logStatus := status + logStatus := *status logStatus.Secrets = obscureSecrets(status.Secrets) glog.Infof("Returning central status %+v", logStatus) diff --git a/internal/dinosaur/pkg/services/dinosaur.go b/internal/dinosaur/pkg/services/dinosaur.go index fbb82a1c14..f1dd3ab4ce 100644 --- a/internal/dinosaur/pkg/services/dinosaur.go +++ b/internal/dinosaur/pkg/services/dinosaur.go @@ -824,6 +824,7 @@ func (k *dinosaurService) Restore(ctx context.Context, id string) *errors.Servic // use a new central request, so that unset field for columnsToReset will automatically be set to the zero value // this Update only changes columns listed in columnsToReset resetRequest := &dbapi.CentralRequest{} + resetRequest.ID = centralRequest.ID resetRequest.Status = dinosaurConstants.CentralRequestStatusPreparing.String() resetRequest.CreatedAt = time.Now() From edc992c1894e39a069b1bd61c6e867ce99149f46 Mon Sep 17 00:00:00 2001 From: Yury Kovalev <8366110+kovayur@users.noreply.github.com> Date: Fri, 22 Sep 2023 20:05:54 +0200 Subject: [PATCH 17/20] ROX-19281: Fix nil pointer dereference in E2E tests when Central is not ready (#1216) --- e2e/dns/records_loader.go | 9 +++++---- e2e/e2e_test.go | 10 ++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/e2e/dns/records_loader.go b/e2e/dns/records_loader.go index 522065dcd8..d0fa7a2173 100644 --- a/e2e/dns/records_loader.go +++ b/e2e/dns/records_loader.go @@ -22,7 +22,7 @@ type RecordsLoader struct { } // NewRecordsLoader creates a new instance of RecordsLoader -func NewRecordsLoader(route53Client *route53.Route53, central *public.CentralRequest) *RecordsLoader { +func NewRecordsLoader(route53Client *route53.Route53, central public.CentralRequest) *RecordsLoader { rhacsZone, err := getHostedZone(route53Client, central) Expect(err).ToNot(HaveOccurred()) @@ -67,7 +67,7 @@ loading: return result } -func getHostedZone(route53Client *route53.Route53, central *public.CentralRequest) (*route53.HostedZone, error) { +func getHostedZone(route53Client *route53.Route53, central public.CentralRequest) (*route53.HostedZone, error) { hostedZones, err := route53Client.ListHostedZones(&route53.ListHostedZonesInput{}) if err != nil { return nil, fmt.Errorf("failed to list hosted zones: %w", err) @@ -84,7 +84,8 @@ func getHostedZone(route53Client *route53.Route53, central *public.CentralReques } if rhacsZone == nil { - return nil, fmt.Errorf("failed to find Route53 hosted zone for Central UI URL %v", central.CentralUIURL) + return nil, fmt.Errorf("failed to find Route53 hosted zone for Central [id: %v, status: %v, UI URL: %v]", + central.Id, central.Status, central.CentralUIURL) } return rhacsZone, nil @@ -94,7 +95,7 @@ func removeLastChar(s string) string { return s[:len(s)-1] } -func getCentralDomainNamesSorted(central *public.CentralRequest) []string { +func getCentralDomainNamesSorted(central public.CentralRequest) []string { uiURL, err := url.Parse(central.CentralUIURL) Expect(err).ToNot(HaveOccurred()) dataHost, _, err := net.SplitHostPort(central.CentralDataURL) diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index dc0c0668ee..390c76d903 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -415,7 +415,7 @@ var _ = Describe("Central", func() { Describe("should be deployed and can be force-deleted", func() { var err error var createdCentral *public.CentralRequest - var central *public.CentralRequest + var central public.CentralRequest var namespaceName string It("created a central", func() { @@ -494,7 +494,6 @@ var _ = Describe("Central", func() { if !dnsEnabled { Skip(skipDNSMsg) } - dnsRecordsLoader := dns.NewRecordsLoader(route53Client, central) Eventually(dnsRecordsLoader.LoadDNSRecords). @@ -505,12 +504,11 @@ var _ = Describe("Central", func() { }) }) -func getCentral(id string, client *fleetmanager.Client) *public.CentralRequest { +func getCentral(id string, client *fleetmanager.Client) public.CentralRequest { Expect(id).NotTo(BeEmpty()) central, _, err := client.PublicAPI().GetCentralById(context.TODO(), id) - Expect(err).To(BeNil()) - Expect(central).ToNot(BeNil()) - return ¢ral + Expect(err).NotTo(HaveOccurred()) + return central } func centralStatus(id string, client *fleetmanager.Client) string { From 154418fc8bd3b5a46a1c81ec1260d6c813eefe5e Mon Sep 17 00:00:00 2001 From: Ivan Degtiarenko <78353299+ivan-degtiarenko@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:31:20 +0200 Subject: [PATCH 18/20] Rename ACSMS -> ACSCS in dev scripts (#1252) --- .openshift-ci/image-push/entrypoint.sh | 2 +- .openshift-ci/tests/e2e-test.sh | 2 +- .openshift-ci/tests/e2e.sh | 12 +++++----- Makefile | 10 ++++----- ...taplane-cluster-configuration-staging.yaml | 2 +- ...ne-cluster-configuration-infractl-osd.yaml | 4 ++-- dev/env/defaults/00-defaults.env | 4 ++-- dev/env/manifests/db/00-db-secrets.yaml | 2 +- dev/env/manifests/db/01-db-deployment.yaml | 2 +- dev/env/manifests/db/02-db-service.yaml | 2 +- .../01-fleet-manager-secrets.yaml | 2 +- .../02-fleet-manager-deployment.yaml | 2 +- .../03-fleet-manager-service.yaml | 2 +- .../fleet-manager/04-gitops-config.yaml | 2 +- .../01-fleetshard-sync-secrets.yaml | 2 +- .../02-fleetshard-sync-deployment.yaml | 2 +- .../rhacs-operator/03-operators-config.yaml | 2 +- dev/env/manifests/shared/00-namespace.yaml | 2 +- dev/env/manifests/shared/01-clusterrole.yaml | 2 +- .../shared/02-clusterrolebinding.yaml | 6 ++--- .../manifests/shared/03-configmap-config.yaml | 2 +- dev/env/scripts/bootstrap.sh | 8 +++---- dev/env/scripts/create-imagepullsecrets | 4 ++-- dev/env/scripts/lib.sh | 2 +- dev/env/scripts/port-forwarding | 2 +- dev/env/scripts/reset | 2 +- dev/env/scripts/up.sh | 22 +++++++++---------- docs/architecture/README.md | 2 +- docs/development/setup-test-environment.md | 6 ++--- e2e/e2e_canary_upgrade_test.go | 2 +- fleetshard/pkg/central/operator/upgrade.go | 2 +- 31 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.openshift-ci/image-push/entrypoint.sh b/.openshift-ci/image-push/entrypoint.sh index 4455201f4d..15bf6c77f2 100755 --- a/.openshift-ci/image-push/entrypoint.sh +++ b/.openshift-ci/image-push/entrypoint.sh @@ -41,7 +41,7 @@ if [[ -z "$QUAY_RHACS_ENG_RW_PASSWORD" ]]; then fi log -log "** Entrypoint for ACS MS Image Push **" +log "** Entrypoint for ACSCS Image Push **" log registry_host=$(echo "$IMAGE_PUSH_REGISTRY" | cut -d / -f 1) diff --git a/.openshift-ci/tests/e2e-test.sh b/.openshift-ci/tests/e2e-test.sh index 6ca9cae40a..c66ca054ab 100755 --- a/.openshift-ci/tests/e2e-test.sh +++ b/.openshift-ci/tests/e2e-test.sh @@ -18,7 +18,7 @@ up.sh log "Environment up and running" log "Waiting for fleet-manager to complete leader election..." # Don't have a better way yet to wait until fleet-manager has completed the leader election. -$KUBECTL -n "$ACSMS_NAMESPACE" logs -l application=fleet-manager -c fleet-manager -f --tail=-1 | +$KUBECTL -n "$ACSCS_NAMESPACE" logs -l application=fleet-manager -c fleet-manager -f --tail=-1 | grep -q --line-buffered --max-count=1 'Running as the leader and starting' || true sleep 1 diff --git a/.openshift-ci/tests/e2e.sh b/.openshift-ci/tests/e2e.sh index 725d343533..e4bad70c1e 100755 --- a/.openshift-ci/tests/e2e.sh +++ b/.openshift-ci/tests/e2e.sh @@ -43,7 +43,7 @@ export RUN_AUTH_E2E=${RUN_AUTH_E2E:-$RUN_AUTH_E2E_DEFAULT} export RUN_CENTRAL_E2E=${RUN_CENTRAL_E2E:-$RUN_CENTRAL_E2E_DEFAULT} log -log "** Entrypoint for ACS MS E2E Tests **" +log "** Entrypoint for ACSCS E2E Tests **" log log "Cluster type: ${CLUSTER_TYPE}" @@ -97,7 +97,7 @@ if [[ "$SPAWN_LOGGER" == "true" ]]; then apply "${MANIFESTS_DIR}/rhacs-operator/00-namespace.yaml" sleep 2 log "Spawning logger, log directory is ${LOG_DIR}" - stern -n "$ACSMS_NAMESPACE" '.*' --color=never --template '[{{.ContainerName}}] {{.Message}}{{"\n"}}' >"${LOG_DIR}/namespace-${ACSMS_NAMESPACE}.txt" 2>&1 & + stern -n "$ACSCS_NAMESPACE" '.*' --color=never --template '[{{.ContainerName}}] {{.Message}}{{"\n"}}' >"${LOG_DIR}/namespace-${ACSCS_NAMESPACE}.txt" 2>&1 & stern -n "$STACKROX_OPERATOR_NAMESPACE" '.*' --color=never --template '[{{.ContainerName}}] {{.Message}}{{"\n"}}' >"${LOG_DIR}/namespace-${STACKROX_OPERATOR_NAMESPACE}.txt" 2>&1 & fi @@ -137,10 +137,10 @@ if [[ "$DUMP_LOGS" == "true" ]]; then log fi - log "** BEGIN ACSMS PODS **" - $KUBECTL -n "$ACSMS_NAMESPACE" get pods || true - $KUBECTL -n "$ACSMS_NAMESPACE" describe pods || true - log "** END ACSMS PODS **" + log "** BEGIN ACSCS PODS **" + $KUBECTL -n "$ACSCS_NAMESPACE" get pods || true + $KUBECTL -n "$ACSCS_NAMESPACE" describe pods || true + log "** END ACSCS PODS **" log log "** BEGIN OPERATOR STATE **" diff --git a/Makefile b/Makefile index 6be8ffb25f..c2a73f1d2c 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ DOCKER ?= docker DOCKER_CONFIG ?= "${HOME}/.docker" # Default Variables -ACSMS_NAMESPACE ?= acsms +ACSCS_NAMESPACE ?= acscs ENABLE_OCM_MOCK ?= false OCM_MOCK_MODE ?= emulate-server JWKS_URL ?= "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/certs" @@ -866,13 +866,13 @@ deploy/dev-fast: image/build/local deploy/dev-fast/fleet-manager deploy/dev-fast deploy/dev-fast/fleet-manager: GOOS=linux deploy/dev-fast/fleet-manager: image/build/local - kubectl -n $(ACSMS_NAMESPACE) set image deploy/fleet-manager fleet-manager=$(SHORT_IMAGE_REF) db-migrate=$(SHORT_IMAGE_REF) - kubectl -n $(ACSMS_NAMESPACE) delete pod -l application=fleet-manager + kubectl -n $(ACSCS_NAMESPACE) set image deploy/fleet-manager fleet-manager=$(SHORT_IMAGE_REF) db-migrate=$(SHORT_IMAGE_REF) + kubectl -n $(ACSCS_NAMESPACE) delete pod -l application=fleet-manager deploy/dev-fast/fleetshard-sync: GOOS=linux deploy/dev-fast/fleetshard-sync: image/build/local - kubectl -n $(ACSMS_NAMESPACE) set image deploy/fleetshard-sync fleetshard-sync=$(SHORT_IMAGE_REF) - kubectl -n $(ACSMS_NAMESPACE) delete pod -l application=fleetshard-sync + kubectl -n $(ACSCS_NAMESPACE) set image deploy/fleetshard-sync fleetshard-sync=$(SHORT_IMAGE_REF) + kubectl -n $(ACSCS_NAMESPACE) delete pod -l application=fleetshard-sync # When making changes to the gitops configuration for development purposes # situated here dev/env/manifests/fleet-manager/04-gitops-config.yaml, this diff --git a/config/dataplane-cluster-configuration-staging.yaml b/config/dataplane-cluster-configuration-staging.yaml index 2f63f39463..200358a4f0 100644 --- a/config/dataplane-cluster-configuration-staging.yaml +++ b/config/dataplane-cluster-configuration-staging.yaml @@ -5,7 +5,7 @@ # 'deprovisioning' and will later be deleted. #- This list is ordered, any new cluster should be appended at the end. clusters: - - name: default/api-acs-dp-01-ce55-p1-openshiftapps-com:6443/acsms-admin + - name: default/api-acs-dp-01-ce55-p1-openshiftapps-com:6443/acscs-admin # With OCM logged, given the cluster name get cluster id: `ocm get /api/clusters_mgmt/v1/clusters --parameter search="name = 'acs-dp-01'" | jq -r .items[].id` cluster_id: 1smhq7nc0ncfv2jbjgf48q7e6qb943ou cloud_provider: aws diff --git a/dev/config/dataplane-cluster-configuration-infractl-osd.yaml b/dev/config/dataplane-cluster-configuration-infractl-osd.yaml index fde9a1a191..e0362ab944 100644 --- a/dev/config/dataplane-cluster-configuration-infractl-osd.yaml +++ b/dev/config/dataplane-cluster-configuration-infractl-osd.yaml @@ -5,7 +5,7 @@ # 'deprovisioning' and will later be deleted. #- This list is ordered, any new cluster should be appended at the end. clusters: - - name: default/api-evan-acsms-fm-d-0a51-s2-devshift-org:6443/admin + - name: default/api-evan-acscs-fm-d-0a51-s2-devshift-org:6443/admin cluster_id: 1sdu4lati28ifrnk73d3o4qa720rb5ek cloud_provider: gcp region: us-east1 @@ -14,4 +14,4 @@ clusters: central_instance_limit: 10 provider_type: standalone supported_instance_type: "eval,standard" - cluster_dns: evan-acsms-fm-d.0a51.s2.devshift.org + cluster_dns: evan-acscs-fm-d.0a51.s2.devshift.org diff --git a/dev/env/defaults/00-defaults.env b/dev/env/defaults/00-defaults.env index 29d3237f3d..e28be688a9 100644 --- a/dev/env/defaults/00-defaults.env +++ b/dev/env/defaults/00-defaults.env @@ -1,6 +1,6 @@ # shellcheck shell=bash -export ACSMS_NAMESPACE_DEFAULT="acsms" +export ACSCS_NAMESPACE_DEFAULT="acscs" export MANIFESTS_DIR="$GITROOT/dev/env/manifests" export KUBECTL_DEFAULT="kubectl" export DOCKER_DEFAULT="docker" @@ -25,7 +25,7 @@ export INSTALL_OPENSHIFT_ROUTER_DEFAULT="true" export DATABASE_HOST_DEFAULT="db" export DATABASE_PORT_DEFAULT="5432" -export DATABASE_NAME_DEFAULT="rhacsms" +export DATABASE_NAME_DEFAULT="rhacscs" export DATABASE_USER_DEFAULT="fleet_manager" export DATABASE_PASSWORD_DEFAULT="letmein" # pragma: allowlist secret export DATABASE_TLS_CERT_DEFAULT="" diff --git a/dev/env/manifests/db/00-db-secrets.yaml b/dev/env/manifests/db/00-db-secrets.yaml index d2e2772029..33fb659771 100644 --- a/dev/env/manifests/db/00-db-secrets.yaml +++ b/dev/env/manifests/db/00-db-secrets.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: name: acs-fleet-manager-rds - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" stringData: db.host: "${DATABASE_HOST}" db.port: "${DATABASE_PORT}" diff --git a/dev/env/manifests/db/01-db-deployment.yaml b/dev/env/manifests/db/01-db-deployment.yaml index d62f2af7b7..bc2b1aa5af 100644 --- a/dev/env/manifests/db/01-db-deployment.yaml +++ b/dev/env/manifests/db/01-db-deployment.yaml @@ -4,7 +4,7 @@ metadata: labels: application: db name: "$DATABASE_HOST" - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" spec: replicas: 1 selector: diff --git a/dev/env/manifests/db/02-db-service.yaml b/dev/env/manifests/db/02-db-service.yaml index c6766f0c86..3f63e0eff3 100644 --- a/dev/env/manifests/db/02-db-service.yaml +++ b/dev/env/manifests/db/02-db-service.yaml @@ -4,7 +4,7 @@ metadata: labels: application: db name: db - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" spec: ports: - name: "5432" diff --git a/dev/env/manifests/fleet-manager/01-fleet-manager-secrets.yaml b/dev/env/manifests/fleet-manager/01-fleet-manager-secrets.yaml index 10e7e9e5d5..46adfe159b 100644 --- a/dev/env/manifests/fleet-manager/01-fleet-manager-secrets.yaml +++ b/dev/env/manifests/fleet-manager/01-fleet-manager-secrets.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: name: fleet-manager - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" stringData: central.idp-client-secret: "${CENTRAL_IDP_CLIENT_SECRET}" db.host: "${DATABASE_HOST}" diff --git a/dev/env/manifests/fleet-manager/02-fleet-manager-deployment.yaml b/dev/env/manifests/fleet-manager/02-fleet-manager-deployment.yaml index dddf47d49a..8cd98523c8 100644 --- a/dev/env/manifests/fleet-manager/02-fleet-manager-deployment.yaml +++ b/dev/env/manifests/fleet-manager/02-fleet-manager-deployment.yaml @@ -4,7 +4,7 @@ metadata: labels: application: fleet-manager name: fleet-manager - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" spec: replicas: 1 selector: diff --git a/dev/env/manifests/fleet-manager/03-fleet-manager-service.yaml b/dev/env/manifests/fleet-manager/03-fleet-manager-service.yaml index 321e67ce7a..8975d216f2 100644 --- a/dev/env/manifests/fleet-manager/03-fleet-manager-service.yaml +++ b/dev/env/manifests/fleet-manager/03-fleet-manager-service.yaml @@ -4,7 +4,7 @@ metadata: labels: application: fleet-manager name: fleet-manager - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" spec: ports: - name: "8000" diff --git a/dev/env/manifests/fleet-manager/04-gitops-config.yaml b/dev/env/manifests/fleet-manager/04-gitops-config.yaml index e5cbda9f80..beb87e0aa8 100644 --- a/dev/env/manifests/fleet-manager/04-gitops-config.yaml +++ b/dev/env/manifests/fleet-manager/04-gitops-config.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: fleet-manager-gitops-config - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" data: config.yaml: | rhacsOperators: diff --git a/dev/env/manifests/fleetshard-sync/01-fleetshard-sync-secrets.yaml b/dev/env/manifests/fleetshard-sync/01-fleetshard-sync-secrets.yaml index 0a1effa724..543c9c962d 100644 --- a/dev/env/manifests/fleetshard-sync/01-fleetshard-sync-secrets.yaml +++ b/dev/env/manifests/fleetshard-sync/01-fleetshard-sync-secrets.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Secret metadata: name: fleetshard-sync - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" stringData: kubeconfig: | ${KUBE_CONFIG} diff --git a/dev/env/manifests/fleetshard-sync/02-fleetshard-sync-deployment.yaml b/dev/env/manifests/fleetshard-sync/02-fleetshard-sync-deployment.yaml index a8f7336e2d..cefa9d7eff 100644 --- a/dev/env/manifests/fleetshard-sync/02-fleetshard-sync-deployment.yaml +++ b/dev/env/manifests/fleetshard-sync/02-fleetshard-sync-deployment.yaml @@ -4,7 +4,7 @@ metadata: labels: application: fleetshard-sync name: fleetshard-sync - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" spec: replicas: 1 selector: diff --git a/dev/env/manifests/rhacs-operator/03-operators-config.yaml b/dev/env/manifests/rhacs-operator/03-operators-config.yaml index 0f8dba960e..679bb067ec 100644 --- a/dev/env/manifests/rhacs-operator/03-operators-config.yaml +++ b/dev/env/manifests/rhacs-operator/03-operators-config.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: operator-config - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" data: operator-config.yaml: |- - gitref: 4.1.1 diff --git a/dev/env/manifests/shared/00-namespace.yaml b/dev/env/manifests/shared/00-namespace.yaml index dca6ff1880..5340bc00e4 100644 --- a/dev/env/manifests/shared/00-namespace.yaml +++ b/dev/env/manifests/shared/00-namespace.yaml @@ -1,4 +1,4 @@ kind: Namespace apiVersion: v1 metadata: - name: "$ACSMS_NAMESPACE" + name: "$ACSCS_NAMESPACE" diff --git a/dev/env/manifests/shared/01-clusterrole.yaml b/dev/env/manifests/shared/01-clusterrole.yaml index 71625c5729..ab44846f92 100644 --- a/dev/env/manifests/shared/01-clusterrole.yaml +++ b/dev/env/manifests/shared/01-clusterrole.yaml @@ -1,7 +1,7 @@ kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: - name: acsms + name: acscs rules: - apiGroups: - "*" diff --git a/dev/env/manifests/shared/02-clusterrolebinding.yaml b/dev/env/manifests/shared/02-clusterrolebinding.yaml index 6590ac9114..0fcdabd06e 100644 --- a/dev/env/manifests/shared/02-clusterrolebinding.yaml +++ b/dev/env/manifests/shared/02-clusterrolebinding.yaml @@ -1,12 +1,12 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: - name: acsms-cluster + name: acscs-cluster subjects: - kind: ServiceAccount name: default - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" roleRef: kind: ClusterRole - name: acsms + name: acscs apiGroup: rbac.authorization.k8s.io diff --git a/dev/env/manifests/shared/03-configmap-config.yaml b/dev/env/manifests/shared/03-configmap-config.yaml index 63fe2b7e80..a0aa1b4f29 100644 --- a/dev/env/manifests/shared/03-configmap-config.yaml +++ b/dev/env/manifests/shared/03-configmap-config.yaml @@ -244,4 +244,4 @@ data: kind: ConfigMap metadata: name: config - namespace: "$ACSMS_NAMESPACE" + namespace: "$ACSCS_NAMESPACE" diff --git a/dev/env/scripts/bootstrap.sh b/dev/env/scripts/bootstrap.sh index 7599ced56d..1cb09219bf 100755 --- a/dev/env/scripts/bootstrap.sh +++ b/dev/env/scripts/bootstrap.sh @@ -10,10 +10,10 @@ source "${GITROOT}/dev/env/scripts/docker.sh" init cat </dev/null & + $KUBECTL -n "$ACSCS_NAMESPACE" port-forward svc/"${service_name}" "${local_port}:${service_port}" >/dev/null & echo $! >"${pid_file}" ;; diff --git a/dev/env/scripts/reset b/dev/env/scripts/reset index 1c19e4a4ea..cf52ace588 100755 --- a/dev/env/scripts/reset +++ b/dev/env/scripts/reset @@ -10,7 +10,7 @@ log "Resetting state of control-plane and data-plane..." port-forwarding start fleet-manager 8000 8000 port-forwarding start db 5432 5432 -$KUBECTL -n acsms exec -it deploy/db -- psql -h localhost -U "$DATABASE_USER" -p "$DATABASE_PORT" -d "$DATABASE_NAME" -c "DELETE FROM central_requests;" +$KUBECTL -n "$ACSCS_NAMESPACE" exec -it deploy/db -- psql -h localhost -U "$DATABASE_USER" -p "$DATABASE_PORT" -d "$DATABASE_NAME" -c "DELETE FROM central_requests;" sleep 1 delete_tenant_namespaces diff --git a/dev/env/scripts/up.sh b/dev/env/scripts/up.sh index 79aca2c0e8..286fbcc528 100755 --- a/dev/env/scripts/up.sh +++ b/dev/env/scripts/up.sh @@ -30,12 +30,12 @@ fi cat <"${LOG_DIR}/pod-logs_fleet-manager.txt" 2>&1 & + $KUBECTL -n "$ACSCS_NAMESPACE" logs -l application=fleet-manager --all-containers --pod-running-timeout=1m --since=1m --tail=100 -f >"${LOG_DIR}/pod-logs_fleet-manager.txt" 2>&1 & fi if [[ "$RHACS_STANDALONE_MODE" == "true" ]]; then @@ -77,17 +77,17 @@ fi log "Deploying fleetshard-sync" exec_fleetshard_sync.sh apply "${MANIFESTS_DIR}/fleetshard-sync" -inject_exported_env_vars "$ACSMS_NAMESPACE" "fleetshard-sync" +inject_exported_env_vars "$ACSCS_NAMESPACE" "fleetshard-sync" -wait_for_container_to_appear "$ACSMS_NAMESPACE" "application=fleetshard-sync" "fleetshard-sync" +wait_for_container_to_appear "$ACSCS_NAMESPACE" "application=fleetshard-sync" "fleetshard-sync" if [[ "$SPAWN_LOGGER" == "true" && -n "${LOG_DIR:-}" ]]; then - $KUBECTL -n "$ACSMS_NAMESPACE" logs -l application=fleetshard-sync --all-containers --pod-running-timeout=1m --since=1m --tail=100 -f >"${LOG_DIR}/pod-logs_fleetshard-sync_fleetshard-sync.txt" 2>&1 & + $KUBECTL -n "$ACSCS_NAMESPACE" logs -l application=fleetshard-sync --all-containers --pod-running-timeout=1m --since=1m --tail=100 -f >"${LOG_DIR}/pod-logs_fleetshard-sync_fleetshard-sync.txt" 2>&1 & fi # Sanity check. -wait_for_container_to_become_ready "$ACSMS_NAMESPACE" "application=fleetshard-sync" "fleetshard-sync" 500 +wait_for_container_to_become_ready "$ACSCS_NAMESPACE" "application=fleetshard-sync" "fleetshard-sync" 500 # Prerequisite for port-forwarding are pods in ready state. -wait_for_container_to_become_ready "$ACSMS_NAMESPACE" "application=fleet-manager" "fleet-manager" +wait_for_container_to_become_ready "$ACSCS_NAMESPACE" "application=fleet-manager" "fleet-manager" if [[ "$ENABLE_FM_PORT_FORWARDING" == "true" ]]; then port-forwarding start fleet-manager 8000 8000 diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 612b267a38..78f537c421 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -79,7 +79,7 @@ API definition lists: ### Service Diagram -See [miro ACSMS dashboard](https://miro.com/app/board/uXjVOh7XtrE=/) +See [miro ACSCS dashboard](https://miro.com/app/board/uXjVOh7XtrE=/) ### Application Success Criteria diff --git a/docs/development/setup-test-environment.md b/docs/development/setup-test-environment.md index e420dcd18b..b3c6477893 100644 --- a/docs/development/setup-test-environment.md +++ b/docs/development/setup-test-environment.md @@ -1,7 +1,7 @@ -# ACS MS Test Environment +# ACSCS Test Environment ## Overview -The `dev/env` directory contains scripts for bringing up a complete ACS MS test environment on different +The `dev/env` directory contains scripts for bringing up a complete ACSCS test environment on different types of cluster. The following components are set up: * A Postgres database @@ -27,7 +27,7 @@ The following scripts exist currently in `dev/env/scripts`: * `apply` & `delete`: Convenience scripts for applying and deleting Kubernetes resources supporting environment interpolation. * `port-forwarding`: Convenient abstraction layer for kubectl port-forwarding. * `bootstrap.sh`: Sets up the basic environment: creates namespaces, injects image-pull-secrets if necessary, installs OLM (if required), installs RHACS operator (if desired), pulls required images, etc. -* `up.sh`: Brings up the ACS MS environment consisting of the database, `fleet-manager` and `fleetshard-sync`. +* `up.sh`: Brings up the ACSCS environment consisting of the database, `fleet-manager` and `fleetshard-sync`. * `down.sh`: Deletes the resources created by `up.sh`. The scripts can be configured using environment variables, the most important options being: diff --git a/e2e/e2e_canary_upgrade_test.go b/e2e/e2e_canary_upgrade_test.go index b5337feee2..9c81d5a87e 100644 --- a/e2e/e2e_canary_upgrade_test.go +++ b/e2e/e2e_canary_upgrade_test.go @@ -22,7 +22,7 @@ import ( ) const ( - namespace = "acsms" + namespace = "acscs" ) var _ = Describe("Fleetshard-sync Targeted Upgrade", func() { diff --git a/fleetshard/pkg/central/operator/upgrade.go b/fleetshard/pkg/central/operator/upgrade.go index 4a75d59ae7..fdc1c60003 100644 --- a/fleetshard/pkg/central/operator/upgrade.go +++ b/fleetshard/pkg/central/operator/upgrade.go @@ -191,7 +191,7 @@ func (u *ACSOperatorManager) RemoveUnusedOperators(ctx context.Context, desiredI func (u *ACSOperatorManager) ReadOperatorConfigFromConfigMap(ctx context.Context) ([]OperatorConfig, error) { configMap := &v1.ConfigMap{} - err := u.client.Get(ctx, ctrlClient.ObjectKey{Name: ACSOperatorConfigMap, Namespace: "acsms"}, configMap) + err := u.client.Get(ctx, ctrlClient.ObjectKey{Name: ACSOperatorConfigMap, Namespace: "acscs"}, configMap) if err != nil { return nil, fmt.Errorf("retrieving operators configMap: %v", err) } From bf77c61db6f4afd2f62cc2dba317a8271b750d58 Mon Sep 17 00:00:00 2001 From: Ivan Degtiarenko <78353299+ivan-degtiarenko@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:17:01 +0200 Subject: [PATCH 19/20] Log result of current_account call execution (#1297) --- .../dinosaur/pkg/services/quota/ams_quota_service.go | 7 +++++-- pkg/client/ocm/client.go | 12 ++++++------ pkg/client/ocm/client_moq.go | 6 +++--- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/internal/dinosaur/pkg/services/quota/ams_quota_service.go b/internal/dinosaur/pkg/services/quota/ams_quota_service.go index 5c27b4e14e..ac036b0029 100644 --- a/internal/dinosaur/pkg/services/quota/ams_quota_service.go +++ b/internal/dinosaur/pkg/services/quota/ams_quota_service.go @@ -5,6 +5,7 @@ import ( "context" "fmt" "github.com/openshift-online/ocm-sdk-go/authentication" + "time" "github.com/golang/glog" amsv1 "github.com/openshift-online/ocm-sdk-go/accountsmgmt/v1" @@ -196,9 +197,11 @@ func (q amsQuotaService) callCurrentAccount(ctx context.Context) { if userToken == nil { return } - _, err = q.amsClient.GetCurrentAccount(userToken.Raw) + status, acc, err := q.amsClient.GetCurrentAccount(userToken.Raw) if err != nil { - glog.Warningf("Call to current account endpoint was unsuccessful: %w", err) + glog.Warningf("Failed to query current account (%v): %w", status, err) + } else { + glog.Infof("Succeeded to query current account (%v): <%s> created at %v, belongs to %q created at %v", status, acc.Email(), acc.CreatedAt().Format(time.RFC3339), acc.Organization().Name(), acc.Organization().CreatedAt().Format(time.RFC3339)) } } diff --git a/pkg/client/ocm/client.go b/pkg/client/ocm/client.go index 20c5cbc10f..5eb7dd9881 100644 --- a/pkg/client/ocm/client.go +++ b/pkg/client/ocm/client.go @@ -61,7 +61,7 @@ type Client interface { GetQuotaCostsForProduct(organizationID, resourceName, product string) ([]*amsv1.QuotaCost, error) GetCustomerCloudAccounts(organizationID string, quotaIDs []string) ([]*amsv1.CloudAccount, error) // GetCurrentAccount returns the account information of the user to whom belongs the token - GetCurrentAccount(userToken string) (*amsv1.Account, error) + GetCurrentAccount(userToken string) (int, *amsv1.Account, error) } var _ Client = &client{} @@ -758,24 +758,24 @@ func (c *client) GetCustomerCloudAccounts(organizationID string, quotaIDs []stri } // GetCurrentAccount returns the account information of the user to whom belongs the token -func (c *client) GetCurrentAccount(userToken string) (*amsv1.Account, error) { +func (c *client) GetCurrentAccount(userToken string) (int, *amsv1.Account, error) { logger, err := getLogger(c.connection.Logger().DebugEnabled()) if err != nil { - return nil, fmt.Errorf("couldn't create logger for modified OCM connection: %w", err) + return 0, nil, fmt.Errorf("couldn't create logger for modified OCM connection: %w", err) } modifiedConnection, err := getBaseConnectionBuilder(c.connection.URL()). Logger(logger). Tokens(userToken). Build() if err != nil { - return nil, fmt.Errorf("couldn't build modified OCM connection: %w", err) + return 0, nil, fmt.Errorf("couldn't build modified OCM connection: %w", err) } defer modifiedConnection.Close() response, err := modifiedConnection.AccountsMgmt().V1().CurrentAccount().Get().Send() if err != nil { - return nil, fmt.Errorf("unsuccessful call to current account endpoint: %w", err) + return response.Status(), nil, fmt.Errorf("unsuccessful call to current account endpoint: %w", err) } currentAccount := response.Body() - return currentAccount, nil + return response.Status(), currentAccount, nil } diff --git a/pkg/client/ocm/client_moq.go b/pkg/client/ocm/client_moq.go index 1a064c4524..f0de10faa1 100644 --- a/pkg/client/ocm/client_moq.go +++ b/pkg/client/ocm/client_moq.go @@ -71,7 +71,7 @@ var _ Client = &ClientMock{} // GetClusterStatusFunc: func(id string) (*clustersmgmtv1.ClusterStatus, error) { // panic("mock out the GetClusterStatus method") // }, -// GetCurrentAccountFunc: func(userToken string) (*amsv1.Account, error) { +// GetCurrentAccountFunc: func(userToken string) (int, *amsv1.Account, error) { // panic("mock out the GetCurrentAccount method") // }, // GetCustomerCloudAccountsFunc: func(organizationID string, quotaIDs []string) ([]*amsv1.CloudAccount, error) { @@ -172,7 +172,7 @@ type ClientMock struct { GetClusterStatusFunc func(id string) (*clustersmgmtv1.ClusterStatus, error) // GetCurrentAccountFunc mocks the GetCurrentAccount method. - GetCurrentAccountFunc func(userToken string) (*amsv1.Account, error) + GetCurrentAccountFunc func(userToken string) (int, *amsv1.Account, error) // GetCustomerCloudAccountsFunc mocks the GetCustomerCloudAccounts method. GetCustomerCloudAccountsFunc func(organizationID string, quotaIDs []string) ([]*amsv1.CloudAccount, error) @@ -999,7 +999,7 @@ func (mock *ClientMock) GetClusterStatusCalls() []struct { } // GetCurrentAccount calls GetCurrentAccountFunc. -func (mock *ClientMock) GetCurrentAccount(userToken string) (*amsv1.Account, error) { +func (mock *ClientMock) GetCurrentAccount(userToken string) (int, *amsv1.Account, error) { if mock.GetCurrentAccountFunc == nil { panic("ClientMock.GetCurrentAccountFunc: method is nil but Client.GetCurrentAccount was just called") } From c83d4dfc941869127597a1667a8c56b5f85a50ee Mon Sep 17 00:00:00 2001 From: Ivan Degtiarenko <78353299+ivan-degtiarenko@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:18:33 +0200 Subject: [PATCH 20/20] Cleanup errors.go (#1299) --- .../dinosaur/pkg/handlers/validation_test.go | 2 +- pkg/errors/errors.go | 82 +++---------------- 2 files changed, 12 insertions(+), 72 deletions(-) diff --git a/internal/dinosaur/pkg/handlers/validation_test.go b/internal/dinosaur/pkg/handlers/validation_test.go index 9453a19e50..8a37a6c8cf 100644 --- a/internal/dinosaur/pkg/handlers/validation_test.go +++ b/internal/dinosaur/pkg/handlers/validation_test.go @@ -55,7 +55,7 @@ func Test_Validation_validateDinosaurClusterNameIsUnique(t *testing.T) { }, want: &errors.ServiceError{ HTTPCode: http.StatusConflict, - Reason: "Central cluster name is already used", + Reason: "Central instance name is already used", Code: 36, }, }, diff --git a/pkg/errors/errors.go b/pkg/errors/errors.go index d1881a4370..d39b4e878f 100644 --- a/pkg/errors/errors.go +++ b/pkg/errors/errors.go @@ -92,22 +92,6 @@ const ( ErrorSyncActionNotSupported ServiceErrorCode = 103 ErrorSyncActionNotSupportedReason string = "Synchronous action is not supported, use async=true parameter" - // Failed to create sso client - an internal error incurred when calling iam server - ErrorFailedToCreateSSOClient ServiceErrorCode = 106 - ErrorFailedToCreateSSOClientReason string = "Failed to create central client in the mas sso" - - // Failed to get sso client secret - an internal error incurred when calling iam server - ErrorFailedToGetSSOClientSecret ServiceErrorCode = 107 - ErrorFailedToGetSSOClientSecretReason string = "Failed to get central client secret from the mas sso" - - // Failed to get sso client - an internal error incurred when calling iam server - ErrorFailedToGetSSOClient ServiceErrorCode = 108 - ErrorFailedToGetSSOClientReason string = "Failed to get central client from the mas sso" - - // Failed to delete sso client - an internal error incurred when calling iam server - ErrorFailedToDeleteSSOClient ServiceErrorCode = 109 - ErrorFailedToDeleteSSOClientReason string = "Failed to delete central client from the mas sso" - // Failed to create service account, after validating user's request, but failed at the server end // it is an internal server error ErrorFailedToCreateServiceAccount ServiceErrorCode = 110 @@ -153,9 +137,9 @@ const ( ErrorRegionNotSupported ServiceErrorCode = 31 ErrorRegionNotSupportedReason string = "Region not supported" - // Invalid dinosaur cluster name - ErrorMalformedDinosaurClusterName ServiceErrorCode = 32 - ErrorMalformedDinosaurClusterNameReason string = "Central cluster name is invalid" + // Invalid central instance name + ErrorMalformedCentralInstanceName ServiceErrorCode = 32 + ErrorMalformedCentralInstanceNameReason string = "Central instance name is invalid" // Minimum field length validation ErrorMinimumFieldLength ServiceErrorCode = 33 @@ -163,15 +147,15 @@ const ( // Maximum field length validation ErrorMaximumFieldLength ServiceErrorCode = 34 - ErrorMaximumFieldLengthReason string = "Maximum field length has been depassed" + ErrorMaximumFieldLengthReason string = "Maximum field length has been surpassed" // Only MultiAZ is supported ErrorOnlyMultiAZSupported ServiceErrorCode = 35 ErrorOnlyMultiAZSupportedReason string = "Only multiAZ Centrals are supported, use multi_az=true" - // Dinosaur cluster name must be unique - ErrorDuplicateDinosaurClusterName ServiceErrorCode = 36 - ErrorDuplicateDinosaurClusterNameReason string = "Central cluster name is already used" + // Central instance name must be unique + ErrorDuplicateCentralInstanceName ServiceErrorCode = 36 + ErrorDuplicateCentralInstanceNameReason string = "Central instance name is already used" // A generic field validation error when validating API requests input ErrorFieldValidationError ServiceErrorCode = 37 @@ -256,10 +240,6 @@ func Errors() ServiceErrors { ServiceError{ErrorBadRequest, ErrorBadRequestReason, http.StatusBadRequest, nil}, ServiceError{ErrorFailedToParseSearch, ErrorFailedToParseSearchReason, http.StatusBadRequest, nil}, ServiceError{ErrorSyncActionNotSupported, ErrorSyncActionNotSupportedReason, http.StatusBadRequest, nil}, - ServiceError{ErrorFailedToCreateSSOClient, ErrorFailedToCreateSSOClientReason, http.StatusInternalServerError, nil}, - ServiceError{ErrorFailedToGetSSOClientSecret, ErrorFailedToGetSSOClientSecretReason, http.StatusInternalServerError, nil}, - ServiceError{ErrorFailedToGetSSOClient, ErrorFailedToGetSSOClientReason, http.StatusInternalServerError, nil}, - ServiceError{ErrorFailedToDeleteSSOClient, ErrorFailedToDeleteSSOClientReason, http.StatusInternalServerError, nil}, ServiceError{ErrorFailedToCreateServiceAccount, ErrorFailedToCreateServiceAccountReason, http.StatusInternalServerError, nil}, ServiceError{ErrorFailedToGetServiceAccount, ErrorFailedToGetServiceAccountReason, http.StatusInternalServerError, nil}, ServiceError{ErrorServiceAccountNotFound, ErrorServiceAccountNotFoundReason, http.StatusNotFound, nil}, @@ -267,11 +247,11 @@ func Errors() ServiceErrors { ServiceError{ErrorProviderNotSupported, ErrorProviderNotSupportedReason, http.StatusBadRequest, nil}, ServiceError{ErrorRegionNotSupported, ErrorRegionNotSupportedReason, http.StatusBadRequest, nil}, ServiceError{ErrorInstanceTypeNotSupported, ErrorInstanceTypeNotSupportedReason, http.StatusBadRequest, nil}, - ServiceError{ErrorMalformedDinosaurClusterName, ErrorMalformedDinosaurClusterNameReason, http.StatusBadRequest, nil}, + ServiceError{ErrorMalformedCentralInstanceName, ErrorMalformedCentralInstanceNameReason, http.StatusBadRequest, nil}, ServiceError{ErrorMinimumFieldLength, ErrorMinimumFieldLengthReason, http.StatusBadRequest, nil}, ServiceError{ErrorMaximumFieldLength, ErrorMaximumFieldLengthReason, http.StatusBadRequest, nil}, ServiceError{ErrorOnlyMultiAZSupported, ErrorOnlyMultiAZSupportedReason, http.StatusBadRequest, nil}, - ServiceError{ErrorDuplicateDinosaurClusterName, ErrorDuplicateDinosaurClusterNameReason, http.StatusConflict, nil}, + ServiceError{ErrorDuplicateCentralInstanceName, ErrorDuplicateCentralInstanceNameReason, http.StatusConflict, nil}, ServiceError{ErrorUnableToSendErrorResponse, ErrorUnableToSendErrorResponseReason, http.StatusInternalServerError, nil}, ServiceError{ErrorFieldValidationError, ErrorFieldValidationErrorReason, http.StatusBadRequest, nil}, ServiceError{ErrorInsufficientQuota, ErrorInsufficientQuotaReason, http.StatusForbidden, nil}, @@ -428,11 +408,6 @@ func (e *ServiceError) IsForbidden() bool { return e.Code == Forbidden("").Code } -// IsFailedToCreateSSOClient ... -func (e *ServiceError) IsFailedToCreateSSOClient() bool { - return e.Code == FailedToCreateSSOClient("").Code -} - // IsClientErrorClass ... func (e *ServiceError) IsClientErrorClass() bool { return e.HTTPCode >= http.StatusBadRequest && e.HTTPCode < http.StatusInternalServerError @@ -443,21 +418,6 @@ func (e *ServiceError) IsServerErrorClass() bool { return e.HTTPCode >= http.StatusInternalServerError } -// IsFailedToGetSSOClientSecret ... -func (e *ServiceError) IsFailedToGetSSOClientSecret() bool { - return e.Code == FailedToGetSSOClientSecret("").Code -} - -// IsFailedToGetSSOClient ... -func (e *ServiceError) IsFailedToGetSSOClient() bool { - return e.Code == FailedToGetSSOClient("").Code -} - -// IsFailedToDeleteSSOClient ... -func (e *ServiceError) IsFailedToDeleteSSOClient() bool { - return e.Code == FailedToDeleteSSOClient("").Code -} - // IsFailedToCreateServiceAccount ... func (e *ServiceError) IsFailedToCreateServiceAccount() bool { return e.Code == FailedToCreateServiceAccount("").Code @@ -615,26 +575,6 @@ func NotMultiAzActionNotSupported() *ServiceError { return New(ErrorOnlyMultiAZSupported, ErrorOnlyMultiAZSupportedReason) } -// FailedToCreateSSOClient ... -func FailedToCreateSSOClient(reason string, values ...interface{}) *ServiceError { - return New(ErrorFailedToCreateSSOClient, reason, values...) -} - -// FailedToGetSSOClientSecret ... -func FailedToGetSSOClientSecret(reason string, values ...interface{}) *ServiceError { - return New(ErrorFailedToGetSSOClientSecret, reason, values...) -} - -// FailedToGetSSOClient ... -func FailedToGetSSOClient(reason string, values ...interface{}) *ServiceError { - return New(ErrorFailedToGetSSOClient, reason, values...) -} - -// FailedToDeleteSSOClient ... -func FailedToDeleteSSOClient(reason string, values ...interface{}) *ServiceError { - return New(ErrorFailedToDeleteSSOClient, reason, values...) -} - // FailedToCreateServiceAccount ... func FailedToCreateServiceAccount(reason string, values ...interface{}) *ServiceError { return New(ErrorFailedToCreateServiceAccount, reason, values...) @@ -677,7 +617,7 @@ func ProviderNotSupported(reason string, values ...interface{}) *ServiceError { // MalformedDinosaurClusterName ... func MalformedDinosaurClusterName(reason string, values ...interface{}) *ServiceError { - return New(ErrorMalformedDinosaurClusterName, reason, values...) + return New(ErrorMalformedCentralInstanceName, reason, values...) } // InstancePlanNotSupported ... @@ -702,7 +642,7 @@ func MalformedServiceAccountID(reason string, values ...interface{}) *ServiceErr // DuplicateDinosaurClusterName ... func DuplicateDinosaurClusterName() *ServiceError { - return New(ErrorDuplicateDinosaurClusterName, ErrorDuplicateDinosaurClusterNameReason) + return New(ErrorDuplicateCentralInstanceName, ErrorDuplicateCentralInstanceNameReason) } // MinimumFieldLengthNotReached ...