mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
chore: bump k8s to 1.31 (#19654)
* chore(deps): bump k8s libs from 0.29.6 to 0.30.2 Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * latest commit Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * update known types Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * bump controller-runtime to a version that's compatible with go-client 0.30.x Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * update go-to-protobuf flag Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * handle new requirements for proto file locations Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * bump gitops-engine version Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix openapigen Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * remove toolchain Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * bump gitops-engine version Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * chore: enable lint for deprecated symbols Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * chore: bump to k8s 1.31 Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * codegen Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * don't be generic if you don't have to be Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * don't be generic if you don't have to be Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * new commit Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * use gitops-engine commit Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
This commit is contained in:
parent
ddd9d6a9f0
commit
843329174b
12 changed files with 344 additions and 1572 deletions
|
|
@ -4,6 +4,8 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"sigs.k8s.io/controller-runtime/pkg/reconcile"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
|
|
@ -24,29 +26,29 @@ type clusterSecretEventHandler struct {
|
|||
Client client.Client
|
||||
}
|
||||
|
||||
func (h *clusterSecretEventHandler) Create(ctx context.Context, e event.CreateEvent, q workqueue.RateLimitingInterface) {
|
||||
func (h *clusterSecretEventHandler) Create(ctx context.Context, e event.CreateEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
|
||||
h.queueRelatedAppGenerators(ctx, q, e.Object)
|
||||
}
|
||||
|
||||
func (h *clusterSecretEventHandler) Update(ctx context.Context, e event.UpdateEvent, q workqueue.RateLimitingInterface) {
|
||||
func (h *clusterSecretEventHandler) Update(ctx context.Context, e event.UpdateEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
|
||||
h.queueRelatedAppGenerators(ctx, q, e.ObjectNew)
|
||||
}
|
||||
|
||||
func (h *clusterSecretEventHandler) Delete(ctx context.Context, e event.DeleteEvent, q workqueue.RateLimitingInterface) {
|
||||
func (h *clusterSecretEventHandler) Delete(ctx context.Context, e event.DeleteEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
|
||||
h.queueRelatedAppGenerators(ctx, q, e.Object)
|
||||
}
|
||||
|
||||
func (h *clusterSecretEventHandler) Generic(ctx context.Context, e event.GenericEvent, q workqueue.RateLimitingInterface) {
|
||||
func (h *clusterSecretEventHandler) Generic(ctx context.Context, e event.GenericEvent, q workqueue.TypedRateLimitingInterface[reconcile.Request]) {
|
||||
h.queueRelatedAppGenerators(ctx, q, e.Object)
|
||||
}
|
||||
|
||||
// addRateLimitingInterface defines the Add method of workqueue.RateLimitingInterface, allow us to easily mock
|
||||
// it for testing purposes.
|
||||
type addRateLimitingInterface interface {
|
||||
Add(item interface{})
|
||||
type addRateLimitingInterface[T comparable] interface {
|
||||
Add(item T)
|
||||
}
|
||||
|
||||
func (h *clusterSecretEventHandler) queueRelatedAppGenerators(ctx context.Context, q addRateLimitingInterface, object client.Object) {
|
||||
func (h *clusterSecretEventHandler) queueRelatedAppGenerators(ctx context.Context, q addRateLimitingInterface[reconcile.Request], object client.Object) {
|
||||
// Check for label, lookup all ApplicationSets that might match the cluster, queue them all
|
||||
if object.GetLabels()[generators.ArgoCDSecretTypeLabel] != generators.ArgoCDSecretTypeCluster {
|
||||
return
|
||||
|
|
|
|||
|
|
@ -551,24 +551,18 @@ func TestClusterEventHandler(t *testing.T) {
|
|||
|
||||
handler.queueRelatedAppGenerators(context.Background(), &mockAddRateLimitingInterface, &test.secret)
|
||||
|
||||
assert.False(t, mockAddRateLimitingInterface.errorOccurred)
|
||||
assert.ElementsMatch(t, mockAddRateLimitingInterface.addedItems, test.expectedRequests)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Add checks the type, and adds it to the internal list of received additions
|
||||
func (obj *mockAddRateLimitingInterface) Add(item interface{}) {
|
||||
if req, ok := item.(ctrl.Request); ok {
|
||||
obj.addedItems = append(obj.addedItems, req)
|
||||
} else {
|
||||
obj.errorOccurred = true
|
||||
}
|
||||
func (obj *mockAddRateLimitingInterface) Add(item reconcile.Request) {
|
||||
obj.addedItems = append(obj.addedItems, item)
|
||||
}
|
||||
|
||||
type mockAddRateLimitingInterface struct {
|
||||
errorOccurred bool
|
||||
addedItems []ctrl.Request
|
||||
addedItems []reconcile.Request
|
||||
}
|
||||
|
||||
func TestNestedGeneratorHasClusterGenerator_NestedClusterGenerator(t *testing.T) {
|
||||
|
|
|
|||
80
assets/swagger.json
generated
80
assets/swagger.json
generated
|
|
@ -4514,6 +4514,43 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"applicationv1alpha1ResourceStatus": {
|
||||
"type": "object",
|
||||
"title": "ResourceStatus holds the current sync and health status of a resource\nTODO: describe members of this type",
|
||||
"properties": {
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"health": {
|
||||
"$ref": "#/definitions/v1alpha1HealthStatus"
|
||||
},
|
||||
"hook": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string"
|
||||
},
|
||||
"requiresPruning": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"syncWave": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"clusterClusterID": {
|
||||
"type": "object",
|
||||
"title": "ClusterID holds a cluster server URL or cluster name",
|
||||
|
|
@ -5616,7 +5653,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"kubeProxyVersion": {
|
||||
"description": "KubeProxy Version reported by the node.",
|
||||
"description": "Deprecated: KubeProxy Version reported by the node.",
|
||||
"type": "string"
|
||||
},
|
||||
"kubeletVersion": {
|
||||
|
|
@ -6334,7 +6371,7 @@
|
|||
"description": "Resources is a list of Applications resources managed by this application set.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1ResourceStatus"
|
||||
"$ref": "#/definitions/applicationv1alpha1ResourceStatus"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6801,7 +6838,7 @@
|
|||
"type": "array",
|
||||
"title": "Resources is a list of Kubernetes resources managed by this application",
|
||||
"items": {
|
||||
"$ref": "#/definitions/v1alpha1ResourceStatus"
|
||||
"$ref": "#/definitions/applicationv1alpha1ResourceStatus"
|
||||
}
|
||||
},
|
||||
"sourceType": {
|
||||
|
|
@ -8690,43 +8727,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"v1alpha1ResourceStatus": {
|
||||
"type": "object",
|
||||
"title": "ResourceStatus holds the current sync and health status of a resource\nTODO: describe members of this type",
|
||||
"properties": {
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"health": {
|
||||
"$ref": "#/definitions/v1alpha1HealthStatus"
|
||||
},
|
||||
"hook": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"namespace": {
|
||||
"type": "string"
|
||||
},
|
||||
"requiresPruning": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"syncWave": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"v1alpha1RetryStrategy": {
|
||||
"type": "object",
|
||||
"title": "RetryStrategy contains information about the strategy to apply when a sync failed",
|
||||
|
|
|
|||
|
|
@ -116,11 +116,11 @@ type ApplicationController struct {
|
|||
applicationClientset appclientset.Interface
|
||||
auditLogger *argo.AuditLogger
|
||||
// queue contains app namespace/name
|
||||
appRefreshQueue workqueue.RateLimitingInterface
|
||||
appRefreshQueue workqueue.TypedRateLimitingInterface[string]
|
||||
// queue contains app namespace/name/comparisonType and used to request app refresh with the predefined comparison type
|
||||
appComparisonTypeRefreshQueue workqueue.RateLimitingInterface
|
||||
appOperationQueue workqueue.RateLimitingInterface
|
||||
projectRefreshQueue workqueue.RateLimitingInterface
|
||||
appComparisonTypeRefreshQueue workqueue.TypedRateLimitingInterface[string]
|
||||
appOperationQueue workqueue.TypedRateLimitingInterface[string]
|
||||
projectRefreshQueue workqueue.TypedRateLimitingInterface[string]
|
||||
appInformer cache.SharedIndexInformer
|
||||
appLister applisters.ApplicationLister
|
||||
projInformer cache.SharedIndexInformer
|
||||
|
|
@ -186,10 +186,10 @@ func NewApplicationController(
|
|||
kubectl: kubectl,
|
||||
applicationClientset: applicationClientset,
|
||||
repoClientset: repoClientset,
|
||||
appRefreshQueue: workqueue.NewRateLimitingQueueWithConfig(ratelimiter.NewCustomAppControllerRateLimiter(rateLimiterConfig), workqueue.RateLimitingQueueConfig{Name: "app_reconciliation_queue"}),
|
||||
appOperationQueue: workqueue.NewRateLimitingQueueWithConfig(ratelimiter.NewCustomAppControllerRateLimiter(rateLimiterConfig), workqueue.RateLimitingQueueConfig{Name: "app_operation_processing_queue"}),
|
||||
projectRefreshQueue: workqueue.NewRateLimitingQueueWithConfig(ratelimiter.NewCustomAppControllerRateLimiter(rateLimiterConfig), workqueue.RateLimitingQueueConfig{Name: "project_reconciliation_queue"}),
|
||||
appComparisonTypeRefreshQueue: workqueue.NewRateLimitingQueue(ratelimiter.NewCustomAppControllerRateLimiter(rateLimiterConfig)),
|
||||
appRefreshQueue: workqueue.NewTypedRateLimitingQueueWithConfig(ratelimiter.NewCustomAppControllerRateLimiter(rateLimiterConfig), workqueue.TypedRateLimitingQueueConfig[string]{Name: "app_reconciliation_queue"}),
|
||||
appOperationQueue: workqueue.NewTypedRateLimitingQueueWithConfig(ratelimiter.NewCustomAppControllerRateLimiter(rateLimiterConfig), workqueue.TypedRateLimitingQueueConfig[string]{Name: "app_operation_processing_queue"}),
|
||||
projectRefreshQueue: workqueue.NewTypedRateLimitingQueueWithConfig(ratelimiter.NewCustomAppControllerRateLimiter(rateLimiterConfig), workqueue.TypedRateLimitingQueueConfig[string]{Name: "project_reconciliation_queue"}),
|
||||
appComparisonTypeRefreshQueue: workqueue.NewTypedRateLimitingQueue(ratelimiter.NewCustomAppControllerRateLimiter(rateLimiterConfig)),
|
||||
db: db,
|
||||
statusRefreshTimeout: appResyncPeriod,
|
||||
statusHardRefreshTimeout: appHardResyncPeriod,
|
||||
|
|
@ -940,7 +940,7 @@ func (ctrl *ApplicationController) processAppOperationQueueItem() (processNext b
|
|||
ctrl.appOperationQueue.Done(appKey)
|
||||
}()
|
||||
|
||||
obj, exists, err := ctrl.appInformer.GetIndexer().GetByKey(appKey.(string))
|
||||
obj, exists, err := ctrl.appInformer.GetIndexer().GetByKey(appKey)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to get application '%s' from informer index: %+v", appKey, err)
|
||||
return
|
||||
|
|
@ -1012,8 +1012,8 @@ func (ctrl *ApplicationController) processAppComparisonTypeQueueItem() (processN
|
|||
return
|
||||
}
|
||||
|
||||
if parts := strings.Split(key.(string), "/"); len(parts) != 3 {
|
||||
log.Warnf("Unexpected key format in appComparisonTypeRefreshTypeQueue. Key should consists of namespace/name/comparisonType but got: %s", key.(string))
|
||||
if parts := strings.Split(key, "/"); len(parts) != 3 {
|
||||
log.Warnf("Unexpected key format in appComparisonTypeRefreshTypeQueue. Key should consists of namespace/name/comparisonType but got: %s", key)
|
||||
} else {
|
||||
if compareWith, err := strconv.Atoi(parts[2]); err != nil {
|
||||
log.Warnf("Unable to parse comparison type: %v", err)
|
||||
|
|
@ -1039,7 +1039,7 @@ func (ctrl *ApplicationController) processProjectQueueItem() (processNext bool)
|
|||
processNext = false
|
||||
return
|
||||
}
|
||||
obj, exists, err := ctrl.projInformer.GetIndexer().GetByKey(key.(string))
|
||||
obj, exists, err := ctrl.projInformer.GetIndexer().GetByKey(key)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to get project '%s' from informer index: %+v", key, err)
|
||||
return
|
||||
|
|
@ -1551,7 +1551,7 @@ func (ctrl *ApplicationController) processAppRefreshQueueItem() (processNext boo
|
|||
ctrl.appOperationQueue.AddRateLimited(appKey)
|
||||
ctrl.appRefreshQueue.Done(appKey)
|
||||
}()
|
||||
obj, exists, err := ctrl.appInformer.GetIndexer().GetByKey(appKey.(string))
|
||||
obj, exists, err := ctrl.appInformer.GetIndexer().GetByKey(appKey)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to get application '%s' from informer index: %+v", appKey, err)
|
||||
return
|
||||
|
|
|
|||
|
|
@ -462,18 +462,18 @@ func TestWorkqueueMetrics(t *testing.T) {
|
|||
|
||||
expectedMetrics := `
|
||||
# TYPE workqueue_adds_total counter
|
||||
workqueue_adds_total{name="test"}
|
||||
workqueue_adds_total{controller="test",name="test"}
|
||||
|
||||
# TYPE workqueue_depth gauge
|
||||
workqueue_depth{name="test"}
|
||||
workqueue_depth{controller="test",name="test"}
|
||||
|
||||
# TYPE workqueue_longest_running_processor_seconds gauge
|
||||
workqueue_longest_running_processor_seconds{name="test"}
|
||||
workqueue_longest_running_processor_seconds{controller="test",name="test"}
|
||||
|
||||
# TYPE workqueue_queue_duration_seconds histogram
|
||||
|
||||
# TYPE workqueue_unfinished_work_seconds gauge
|
||||
workqueue_unfinished_work_seconds{name="test"}
|
||||
workqueue_unfinished_work_seconds{controller="test",name="test"}
|
||||
|
||||
# TYPE workqueue_work_duration_seconds histogram
|
||||
`
|
||||
|
|
|
|||
125
go.mod
125
go.mod
|
|
@ -9,7 +9,7 @@ require (
|
|||
github.com/Masterminds/sprig/v3 v3.2.3
|
||||
github.com/TomOnTime/utfutil v0.0.0-20180511104225-09c41003ee1d
|
||||
github.com/alicebob/miniredis/v2 v2.33.0
|
||||
github.com/argoproj/gitops-engine v0.7.1-0.20240823155720-099cba69bdfc
|
||||
github.com/argoproj/gitops-engine v0.7.1-0.20240823213048-95e00254f82a
|
||||
github.com/argoproj/notifications-engine v0.4.1-0.20240606074338-0802cd427621
|
||||
github.com/argoproj/pkg v0.13.7-0.20230626144333-d56162821bd1
|
||||
github.com/aws/aws-sdk-go v1.55.5
|
||||
|
|
@ -78,10 +78,10 @@ require (
|
|||
github.com/valyala/fasttemplate v1.2.2
|
||||
github.com/xanzy/go-gitlab v0.107.0
|
||||
github.com/yuin/gopher-lua v1.1.1
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1
|
||||
go.opentelemetry.io/otel v1.24.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0
|
||||
go.opentelemetry.io/otel/sdk v1.24.0
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0
|
||||
go.opentelemetry.io/otel v1.28.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0
|
||||
go.opentelemetry.io/otel/sdk v1.28.0
|
||||
golang.org/x/crypto v0.26.0
|
||||
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1
|
||||
golang.org/x/net v0.28.0
|
||||
|
|
@ -94,19 +94,19 @@ require (
|
|||
google.golang.org/protobuf v1.34.2
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
k8s.io/api v0.30.4
|
||||
k8s.io/api v0.31.0
|
||||
k8s.io/apiextensions-apiserver v0.31.2
|
||||
k8s.io/apimachinery v0.30.4
|
||||
k8s.io/apiserver v0.30.4
|
||||
k8s.io/client-go v0.30.4
|
||||
k8s.io/code-generator v0.30.4
|
||||
k8s.io/klog/v2 v2.120.1
|
||||
k8s.io/apimachinery v0.31.0
|
||||
k8s.io/apiserver v0.31.0
|
||||
k8s.io/client-go v0.31.0
|
||||
k8s.io/code-generator v0.31.0
|
||||
k8s.io/klog/v2 v2.130.1
|
||||
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340
|
||||
k8s.io/kubectl v0.31.2
|
||||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b
|
||||
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
|
||||
layeh.com/gopher-json v0.0.0-20190114024228-97fed8db8427
|
||||
oras.land/oras-go/v2 v2.5.0
|
||||
sigs.k8s.io/controller-runtime v0.18.4
|
||||
sigs.k8s.io/controller-runtime v0.19.0
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
|
||||
sigs.k8s.io/yaml v1.4.0
|
||||
)
|
||||
|
|
@ -134,6 +134,7 @@ require (
|
|||
github.com/aws/smithy-go v1.19.0 // indirect
|
||||
github.com/davidmz/go-pageant v1.0.2 // indirect
|
||||
github.com/distribution/reference v0.5.0 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
|
||||
github.com/go-fed/httpsig v1.1.0 // indirect
|
||||
github.com/go-jose/go-jose/v4 v4.0.2 // indirect
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
|
||||
|
|
@ -145,6 +146,7 @@ require (
|
|||
github.com/kylelemons/godebug v1.1.0 // indirect
|
||||
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
|
||||
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
|
||||
golang.org/x/mod v0.17.0 // indirect
|
||||
|
|
@ -153,7 +155,8 @@ require (
|
|||
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
|
||||
google.golang.org/api v0.132.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
|
||||
gopkg.in/retry.v1 v1.0.3 // indirect
|
||||
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect
|
||||
k8s.io/klog v1.0.0 // indirect
|
||||
|
|
@ -179,11 +182,11 @@ require (
|
|||
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/blang/semver/v4 v4.0.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
|
||||
github.com/chai2010/gettext-go v1.0.2 // indirect
|
||||
github.com/cloudflare/circl v1.3.7 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/dlclark/regexp2 v1.11.4
|
||||
|
|
@ -192,7 +195,6 @@ require (
|
|||
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
|
||||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
|
||||
github.com/fatih/camelcase v1.0.0 // indirect
|
||||
github.com/fvbommel/sortorder v1.1.0 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-errors/errors v1.4.2 // indirect
|
||||
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
|
||||
|
|
@ -215,7 +217,7 @@ require (
|
|||
github.com/gosimple/unidecode v1.0.1 // indirect
|
||||
github.com/gregdel/pushover v1.2.1 // indirect
|
||||
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/huandu/xstrings v1.3.3 // indirect
|
||||
|
|
@ -236,8 +238,8 @@ require (
|
|||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/mitchellh/reflectwalk v1.0.0 // indirect
|
||||
github.com/moby/spdystream v0.2.0 // indirect
|
||||
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
|
||||
github.com/moby/spdystream v0.4.0 // indirect
|
||||
github.com/moby/term v0.5.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
|
||||
|
|
@ -249,7 +251,7 @@ require (
|
|||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||
github.com/pjbgf/sha1cd v0.3.0 // indirect
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_model v0.6.1
|
||||
github.com/prometheus/common v0.55.0 // indirect
|
||||
github.com/prometheus/procfs v0.15.1 // indirect
|
||||
|
|
@ -269,10 +271,10 @@ require (
|
|||
github.com/xanzy/ssh-agent v0.3.3 // indirect
|
||||
github.com/xlab/treeprint v1.2.0 // indirect
|
||||
go.mongodb.org/mongo-driver v1.14.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.24.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.24.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.28.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.28.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
|
||||
go.uber.org/automaxprocs v1.5.3
|
||||
gomodules.xyz/envconfig v1.3.1-0.20190308184047-426f31af0d45 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
|
||||
|
|
@ -282,14 +284,14 @@ require (
|
|||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
k8s.io/cli-runtime v0.30.4 // indirect
|
||||
k8s.io/component-base v0.30.4 // indirect
|
||||
k8s.io/component-helpers v0.30.4 // indirect
|
||||
k8s.io/cli-runtime v0.31.0 // indirect
|
||||
k8s.io/component-base v0.31.0 // indirect
|
||||
k8s.io/component-helpers v0.31.0 // indirect
|
||||
k8s.io/kube-aggregator v0.31.2 // indirect
|
||||
k8s.io/kubernetes v1.30.4 // indirect
|
||||
k8s.io/kubernetes v1.31.0 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
|
||||
sigs.k8s.io/kustomize/api v0.17.2 // indirect
|
||||
sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect
|
||||
)
|
||||
|
||||
replace (
|
||||
|
|
@ -307,34 +309,35 @@ replace (
|
|||
// Avoid CVE-2022-28948
|
||||
gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1
|
||||
|
||||
k8s.io/api => k8s.io/api v0.30.4
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.4
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.30.4
|
||||
k8s.io/apiserver => k8s.io/apiserver v0.30.4
|
||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.4
|
||||
k8s.io/client-go => k8s.io/client-go v0.30.4
|
||||
k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.4
|
||||
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.4
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.30.4
|
||||
k8s.io/component-base => k8s.io/component-base v0.30.4
|
||||
k8s.io/component-helpers => k8s.io/component-helpers v0.30.4
|
||||
k8s.io/controller-manager => k8s.io/controller-manager v0.30.4
|
||||
k8s.io/cri-api => k8s.io/cri-api v0.30.4
|
||||
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.4
|
||||
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.4
|
||||
k8s.io/endpointslice => k8s.io/endpointslice v0.30.4
|
||||
k8s.io/kms => k8s.io/kms v0.30.4
|
||||
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.4
|
||||
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.4
|
||||
k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.4
|
||||
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.4
|
||||
k8s.io/kubectl => k8s.io/kubectl v0.30.4
|
||||
k8s.io/kubelet => k8s.io/kubelet v0.30.4
|
||||
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.4
|
||||
k8s.io/metrics => k8s.io/metrics v0.30.4
|
||||
k8s.io/mount-utils => k8s.io/mount-utils v0.30.4
|
||||
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.4
|
||||
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.4
|
||||
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.30.4
|
||||
k8s.io/sample-controller => k8s.io/sample-controller v0.30.4
|
||||
k8s.io/api => k8s.io/api v0.31.0
|
||||
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.31.0
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.31.0
|
||||
k8s.io/apiserver => k8s.io/apiserver v0.31.0
|
||||
k8s.io/cli-runtime => k8s.io/cli-runtime v0.31.0
|
||||
k8s.io/client-go => k8s.io/client-go v0.31.0
|
||||
k8s.io/cloud-provider => k8s.io/cloud-provider v0.31.0
|
||||
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.31.0
|
||||
k8s.io/code-generator => k8s.io/code-generator v0.31.0
|
||||
k8s.io/component-base => k8s.io/component-base v0.31.0
|
||||
k8s.io/component-helpers => k8s.io/component-helpers v0.31.0
|
||||
k8s.io/controller-manager => k8s.io/controller-manager v0.31.0
|
||||
k8s.io/cri-api => k8s.io/cri-api v0.31.0
|
||||
k8s.io/cri-client => k8s.io/cri-client v0.31.0
|
||||
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.31.0
|
||||
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.31.0
|
||||
k8s.io/endpointslice => k8s.io/endpointslice v0.31.0
|
||||
k8s.io/kms => k8s.io/kms v0.31.0
|
||||
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.31.0
|
||||
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.31.0
|
||||
k8s.io/kube-proxy => k8s.io/kube-proxy v0.31.0
|
||||
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.31.0
|
||||
k8s.io/kubectl => k8s.io/kubectl v0.31.0
|
||||
k8s.io/kubelet => k8s.io/kubelet v0.31.0
|
||||
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.31.0
|
||||
k8s.io/metrics => k8s.io/metrics v0.31.0
|
||||
k8s.io/mount-utils => k8s.io/mount-utils v0.31.0
|
||||
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.31.0
|
||||
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.31.0
|
||||
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.31.0
|
||||
k8s.io/sample-controller => k8s.io/sample-controller v0.31.0
|
||||
)
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ message AWSAuthConfig {
|
|||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:resource:path=appprojects,shortName=appproj;appprojs
|
||||
message AppProject {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
optional AppProjectSpec spec = 2;
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ message AppProject {
|
|||
// AppProjectList is list of AppProject resources
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
message AppProjectList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
repeated AppProject items = 2;
|
||||
}
|
||||
|
|
@ -68,10 +68,10 @@ message AppProjectSpec {
|
|||
repeated ProjectRole roles = 4;
|
||||
|
||||
// ClusterResourceWhitelist contains list of whitelisted cluster level resources
|
||||
repeated k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind clusterResourceWhitelist = 5;
|
||||
repeated .k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind clusterResourceWhitelist = 5;
|
||||
|
||||
// NamespaceResourceBlacklist contains list of blacklisted namespace level resources
|
||||
repeated k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind namespaceResourceBlacklist = 6;
|
||||
repeated .k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind namespaceResourceBlacklist = 6;
|
||||
|
||||
// OrphanedResources specifies if controller should monitor orphaned resources of apps in this project
|
||||
optional OrphanedResourcesMonitorSettings orphanedResources = 7;
|
||||
|
|
@ -80,13 +80,13 @@ message AppProjectSpec {
|
|||
repeated SyncWindow syncWindows = 8;
|
||||
|
||||
// NamespaceResourceWhitelist contains list of whitelisted namespace level resources
|
||||
repeated k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind namespaceResourceWhitelist = 9;
|
||||
repeated .k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind namespaceResourceWhitelist = 9;
|
||||
|
||||
// SignatureKeys contains a list of PGP key IDs that commits in Git must be signed with in order to be allowed for sync
|
||||
repeated SignatureKey signatureKeys = 10;
|
||||
|
||||
// ClusterResourceBlacklist contains list of blacklisted cluster level resources
|
||||
repeated k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind clusterResourceBlacklist = 11;
|
||||
repeated .k8s.io.apimachinery.pkg.apis.meta.v1.GroupKind clusterResourceBlacklist = 11;
|
||||
|
||||
// SourceNamespaces defines the namespaces application resources are allowed to be created in
|
||||
repeated string sourceNamespaces = 12;
|
||||
|
|
@ -111,7 +111,7 @@ message AppProjectStatus {
|
|||
// +kubebuilder:printcolumn:name="Revision",type=string,JSONPath=`.status.sync.revision`,priority=10
|
||||
// +kubebuilder:printcolumn:name="Project",type=string,JSONPath=`.spec.project`,priority=10
|
||||
message Application {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
optional ApplicationSpec spec = 2;
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ message ApplicationCondition {
|
|||
optional string message = 2;
|
||||
|
||||
// LastTransitionTime is the time the condition was last observed
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
|
||||
}
|
||||
|
||||
// ApplicationDestination holds information about the application's destination
|
||||
|
|
@ -148,7 +148,7 @@ message ApplicationDestination {
|
|||
// ApplicationList is list of Application resources
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
message ApplicationList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
repeated Application items = 2;
|
||||
}
|
||||
|
|
@ -174,7 +174,7 @@ message ApplicationPreservedFields {
|
|||
// +kubebuilder:resource:path=applicationsets,shortName=appset;appsets
|
||||
// +kubebuilder:subresource:status
|
||||
message ApplicationSet {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
|
||||
|
||||
optional ApplicationSetSpec spec = 2;
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ message ApplicationSetApplicationStatus {
|
|||
optional string application = 1;
|
||||
|
||||
// LastTransitionTime is the time the status was last updated
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 2;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 2;
|
||||
|
||||
// Message contains human-readable message indicating details about the status
|
||||
optional string message = 3;
|
||||
|
|
@ -211,7 +211,7 @@ message ApplicationSetCondition {
|
|||
optional string message = 2;
|
||||
|
||||
// LastTransitionTime is the time the condition was last observed
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;
|
||||
|
||||
// True/False/Unknown
|
||||
optional string status = 4;
|
||||
|
|
@ -239,7 +239,7 @@ message ApplicationSetGenerator {
|
|||
optional MergeGenerator merge = 8;
|
||||
|
||||
// Selector allows to post-filter all generator.
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 9;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 9;
|
||||
|
||||
optional PluginGenerator plugin = 10;
|
||||
}
|
||||
|
|
@ -248,7 +248,7 @@ message ApplicationSetGenerator {
|
|||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
// +kubebuilder:object:root=true
|
||||
message ApplicationSetList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
repeated ApplicationSet items = 2;
|
||||
}
|
||||
|
|
@ -269,13 +269,13 @@ message ApplicationSetNestedGenerator {
|
|||
optional PullRequestGenerator pullRequest = 6;
|
||||
|
||||
// Matrix should have the form of NestedMatrixGenerator
|
||||
optional k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON matrix = 7;
|
||||
optional .k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON matrix = 7;
|
||||
|
||||
// Merge should have the form of NestedMergeGenerator
|
||||
optional k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON merge = 8;
|
||||
optional .k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON merge = 8;
|
||||
|
||||
// Selector allows to post-filter all generator.
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 9;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 9;
|
||||
|
||||
optional PluginGenerator plugin = 10;
|
||||
}
|
||||
|
|
@ -296,7 +296,7 @@ message ApplicationSetResourceIgnoreDifferences {
|
|||
message ApplicationSetRolloutStep {
|
||||
repeated ApplicationMatchExpression matchExpressions = 1;
|
||||
|
||||
optional k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUpdate = 2;
|
||||
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUpdate = 2;
|
||||
}
|
||||
|
||||
message ApplicationSetRolloutStrategy {
|
||||
|
|
@ -399,7 +399,7 @@ message ApplicationSetTerminalGenerator {
|
|||
optional PluginGenerator plugin = 7;
|
||||
|
||||
// Selector allows to post-filter all generator.
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 8;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 8;
|
||||
}
|
||||
|
||||
// ApplicationSetTree holds nodes which belongs to the application
|
||||
|
|
@ -488,7 +488,7 @@ message ApplicationSourceHelm {
|
|||
|
||||
// ValuesObject specifies Helm values to be passed to helm template, defined as a map. This takes precedence over Values.
|
||||
// +kubebuilder:pruning:PreserveUnknownFields
|
||||
optional k8s.io.apimachinery.pkg.runtime.RawExtension valuesObject = 10;
|
||||
optional .k8s.io.apimachinery.pkg.runtime.RawExtension valuesObject = 10;
|
||||
|
||||
// Namespace is an optional namespace to template with. If left empty, defaults to the app's destination namespace.
|
||||
optional string namespace = 11;
|
||||
|
|
@ -640,14 +640,14 @@ message ApplicationStatus {
|
|||
repeated ApplicationCondition conditions = 5;
|
||||
|
||||
// ReconciledAt indicates when the application state was reconciled using the latest git version
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time reconciledAt = 6;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time reconciledAt = 6;
|
||||
|
||||
// OperationState contains information about any ongoing operations, such as a sync
|
||||
optional OperationState operationState = 7;
|
||||
|
||||
// ObservedAt indicates when the application state was updated without querying latest git state
|
||||
// Deprecated: controller no longer updates ObservedAt field
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time observedAt = 8;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time observedAt = 8;
|
||||
|
||||
// SourceType specifies the type of this application
|
||||
optional string sourceType = 9;
|
||||
|
|
@ -766,7 +766,7 @@ message Cluster {
|
|||
repeated string namespaces = 6;
|
||||
|
||||
// RefreshRequestedAt holds time when cluster cache refresh has been requested
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time refreshRequestedAt = 7;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time refreshRequestedAt = 7;
|
||||
|
||||
// Info holds information about cluster cache and state
|
||||
optional ClusterInfo info = 8;
|
||||
|
|
@ -796,7 +796,7 @@ message ClusterCacheInfo {
|
|||
optional int64 apisCount = 2;
|
||||
|
||||
// LastCacheSyncTime holds time of most recent cache synchronization
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastCacheSyncTime = 3;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastCacheSyncTime = 3;
|
||||
}
|
||||
|
||||
// ClusterConfig is the configuration attributes. This structure is subset of the go-client
|
||||
|
|
@ -827,7 +827,7 @@ message ClusterGenerator {
|
|||
// Selector defines a label selector to match against all clusters registered with ArgoCD.
|
||||
// Clusters today are stored as Kubernetes Secrets, thus the Secret labels will be used
|
||||
// for matching the selector.
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector selector = 1;
|
||||
|
||||
optional ApplicationSetTemplate template = 2;
|
||||
|
||||
|
|
@ -855,7 +855,7 @@ message ClusterInfo {
|
|||
|
||||
// ClusterList is a collection of Clusters.
|
||||
message ClusterList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
repeated Cluster items = 2;
|
||||
}
|
||||
|
|
@ -918,7 +918,7 @@ message ConnectionState {
|
|||
optional string message = 2;
|
||||
|
||||
// ModifiedAt contains the timestamp when this connection status has been determined
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time attemptedAt = 3;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time attemptedAt = 3;
|
||||
}
|
||||
|
||||
// DuckType defines a generator to match against clusters registered with ArgoCD.
|
||||
|
|
@ -933,7 +933,7 @@ message DuckTypeGenerator {
|
|||
|
||||
optional int64 requeueAfterSeconds = 3;
|
||||
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 4;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labelSelector = 4;
|
||||
|
||||
optional ApplicationSetTemplate template = 5;
|
||||
|
||||
|
|
@ -1024,7 +1024,7 @@ message GnuPGPublicKey {
|
|||
|
||||
// GnuPGPublicKeyList is a collection of GnuPGPublicKey objects
|
||||
message GnuPGPublicKeyList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
repeated GnuPGPublicKey items = 2;
|
||||
}
|
||||
|
|
@ -1072,7 +1072,7 @@ message HostInfo {
|
|||
|
||||
repeated HostResourceInfo resourcesInfo = 2;
|
||||
|
||||
optional k8s.io.api.core.v1.NodeSystemInfo systemInfo = 3;
|
||||
optional .k8s.io.api.core.v1.NodeSystemInfo systemInfo = 3;
|
||||
}
|
||||
|
||||
// TODO: describe this type
|
||||
|
|
@ -1165,7 +1165,7 @@ message KustomizeReplica {
|
|||
optional string name = 1;
|
||||
|
||||
// Number of replicas
|
||||
optional k8s.io.apimachinery.pkg.util.intstr.IntOrString count = 2;
|
||||
optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString count = 2;
|
||||
}
|
||||
|
||||
message KustomizeResId {
|
||||
|
|
@ -1187,7 +1187,7 @@ message KustomizeSelector {
|
|||
// ListGenerator include items info
|
||||
message ListGenerator {
|
||||
// +kubebuilder:validation:Optional
|
||||
repeated k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON elements = 1;
|
||||
repeated .k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON elements = 1;
|
||||
|
||||
optional ApplicationSetTemplate template = 2;
|
||||
|
||||
|
|
@ -1289,10 +1289,10 @@ message OperationState {
|
|||
optional SyncOperationResult syncResult = 4;
|
||||
|
||||
// StartedAt contains time of operation start
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 6;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 6;
|
||||
|
||||
// FinishedAt contains time of operation completion
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 7;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time finishedAt = 7;
|
||||
|
||||
// RetryCount contains time of operation retries
|
||||
optional int64 retryCount = 8;
|
||||
|
|
@ -1366,7 +1366,7 @@ message PluginGenerator {
|
|||
message PluginInput {
|
||||
// Parameters contains the information to pass to the plugin. It is a map. The keys must be strings, and the
|
||||
// values can be any type.
|
||||
map<string, k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON> parameters = 1;
|
||||
map<string, .k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1.JSON> parameters = 1;
|
||||
}
|
||||
|
||||
// ProjectRole represents a role that has access to a project
|
||||
|
|
@ -1608,7 +1608,7 @@ message RepoCreds {
|
|||
|
||||
// RepositoryList is a collection of Repositories.
|
||||
message RepoCredsList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
repeated RepoCreds items = 2;
|
||||
}
|
||||
|
|
@ -1706,7 +1706,7 @@ message RepositoryCertificate {
|
|||
|
||||
// RepositoryCertificateList is a collection of RepositoryCertificates
|
||||
message RepositoryCertificateList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
// List of certificates to be processed
|
||||
repeated RepositoryCertificate items = 2;
|
||||
|
|
@ -1714,7 +1714,7 @@ message RepositoryCertificateList {
|
|||
|
||||
// RepositoryList is a collection of Repositories.
|
||||
message RepositoryList {
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
|
||||
|
||||
repeated Repository items = 2;
|
||||
}
|
||||
|
|
@ -1823,7 +1823,7 @@ message ResourceNetworkingInfo {
|
|||
|
||||
map<string, string> labels = 3;
|
||||
|
||||
repeated k8s.io.api.core.v1.LoadBalancerIngress ingress = 4;
|
||||
repeated .k8s.io.api.core.v1.LoadBalancerIngress ingress = 4;
|
||||
|
||||
// ExternalURLs holds list of URLs which should be available externally. List is populated for ingress resources using rules hostnames.
|
||||
repeated string externalURLs = 5;
|
||||
|
|
@ -1846,7 +1846,7 @@ message ResourceNode {
|
|||
|
||||
optional HealthStatus health = 7;
|
||||
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time createdAt = 8;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time createdAt = 8;
|
||||
}
|
||||
|
||||
// ResourceOverride holds configuration to customize resource diffing and health assessment
|
||||
|
|
@ -1953,7 +1953,7 @@ message RevisionHistory {
|
|||
optional string revision = 2;
|
||||
|
||||
// DeployedAt holds the time the sync operation completed
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deployedAt = 4;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time deployedAt = 4;
|
||||
|
||||
// ID is an auto incrementing identifier of the RevisionHistory
|
||||
optional int64 id = 5;
|
||||
|
|
@ -1962,7 +1962,7 @@ message RevisionHistory {
|
|||
optional ApplicationSource source = 6;
|
||||
|
||||
// DeployStartedAt holds the time the sync operation started
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time deployStartedAt = 7;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time deployStartedAt = 7;
|
||||
|
||||
// Sources is a reference to the application sources used for the sync operation
|
||||
repeated ApplicationSource sources = 8;
|
||||
|
|
@ -1982,7 +1982,7 @@ message RevisionMetadata {
|
|||
optional string author = 1;
|
||||
|
||||
// Date specifies when the revision was authored
|
||||
optional k8s.io.apimachinery.pkg.apis.meta.v1.Time date = 2;
|
||||
optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time date = 2;
|
||||
|
||||
// Tags specifies any tags currently attached to the revision
|
||||
// Floating tags can move from one revision to another
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ func GetDefaultAppRateLimiterConfig() *AppControllerRateLimiterConfig {
|
|||
|
||||
// NewCustomAppControllerRateLimiter is a constructor for the rate limiter for a workqueue used by app controller. It has
|
||||
// both overall and per-item rate limiting. The overall is a token bucket and the per-item is exponential(with auto resets)
|
||||
func NewCustomAppControllerRateLimiter(cfg *AppControllerRateLimiterConfig) workqueue.RateLimiter {
|
||||
return workqueue.NewMaxOfRateLimiter(
|
||||
func NewCustomAppControllerRateLimiter(cfg *AppControllerRateLimiterConfig) workqueue.TypedRateLimiter[string] {
|
||||
return workqueue.NewTypedMaxOfRateLimiter[string](
|
||||
NewItemExponentialRateLimiterWithAutoReset(cfg.BaseDelay, cfg.MaxDelay, cfg.FailureCoolDown, cfg.BackoffFactor),
|
||||
&workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(cfg.BucketQPS), int(cfg.BucketSize))},
|
||||
&workqueue.TypedBucketRateLimiter[string]{Limiter: rate.NewLimiter(rate.Limit(cfg.BucketQPS), int(cfg.BucketSize))},
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -59,9 +59,9 @@ type ItemExponentialRateLimiterWithAutoReset struct {
|
|||
backoffFactor float64
|
||||
}
|
||||
|
||||
var _ workqueue.RateLimiter = &ItemExponentialRateLimiterWithAutoReset{}
|
||||
var _ workqueue.TypedRateLimiter[string] = &ItemExponentialRateLimiterWithAutoReset{}
|
||||
|
||||
func NewItemExponentialRateLimiterWithAutoReset(baseDelay, maxDelay, failureCoolDown time.Duration, backoffFactor float64) workqueue.RateLimiter {
|
||||
func NewItemExponentialRateLimiterWithAutoReset(baseDelay, maxDelay, failureCoolDown time.Duration, backoffFactor float64) workqueue.TypedRateLimiter[string] {
|
||||
return &ItemExponentialRateLimiterWithAutoReset{
|
||||
failures: map[interface{}]failureData{},
|
||||
baseDelay: baseDelay,
|
||||
|
|
@ -71,7 +71,7 @@ func NewItemExponentialRateLimiterWithAutoReset(baseDelay, maxDelay, failureCool
|
|||
}
|
||||
}
|
||||
|
||||
func (r *ItemExponentialRateLimiterWithAutoReset) When(item interface{}) time.Duration {
|
||||
func (r *ItemExponentialRateLimiterWithAutoReset) When(item string) time.Duration {
|
||||
r.failuresLock.Lock()
|
||||
defer r.failuresLock.Unlock()
|
||||
|
||||
|
|
@ -109,14 +109,14 @@ func (r *ItemExponentialRateLimiterWithAutoReset) When(item interface{}) time.Du
|
|||
return calculated
|
||||
}
|
||||
|
||||
func (r *ItemExponentialRateLimiterWithAutoReset) NumRequeues(item interface{}) int {
|
||||
func (r *ItemExponentialRateLimiterWithAutoReset) NumRequeues(item string) int {
|
||||
r.failuresLock.Lock()
|
||||
defer r.failuresLock.Unlock()
|
||||
|
||||
return r.failures[item].failures
|
||||
}
|
||||
|
||||
func (r *ItemExponentialRateLimiterWithAutoReset) Forget(item interface{}) {
|
||||
func (r *ItemExponentialRateLimiterWithAutoReset) Forget(item string) {
|
||||
r.failuresLock.Lock()
|
||||
defer r.failuresLock.Unlock()
|
||||
|
||||
|
|
|
|||
|
|
@ -52,9 +52,6 @@ func init() {
|
|||
knownTypes["core/v1/CinderVolumeSource"] = func() interface{} {
|
||||
return &corev1.CinderVolumeSource{}
|
||||
}
|
||||
knownTypes["core/v1/ClaimSource"] = func() interface{} {
|
||||
return &corev1.ClaimSource{}
|
||||
}
|
||||
knownTypes["core/v1/ClientIPConfig"] = func() interface{} {
|
||||
return &corev1.ClientIPConfig{}
|
||||
}
|
||||
|
|
@ -118,6 +115,9 @@ func init() {
|
|||
knownTypes["core/v1/ContainerStatus"] = func() interface{} {
|
||||
return &corev1.ContainerStatus{}
|
||||
}
|
||||
knownTypes["core/v1/ContainerUser"] = func() interface{} {
|
||||
return &corev1.ContainerUser{}
|
||||
}
|
||||
knownTypes["core/v1/DaemonEndpoint"] = func() interface{} {
|
||||
return &corev1.DaemonEndpoint{}
|
||||
}
|
||||
|
|
@ -229,6 +229,9 @@ func init() {
|
|||
knownTypes["core/v1/ISCSIVolumeSource"] = func() interface{} {
|
||||
return &corev1.ISCSIVolumeSource{}
|
||||
}
|
||||
knownTypes["core/v1/ImageVolumeSource"] = func() interface{} {
|
||||
return &corev1.ImageVolumeSource{}
|
||||
}
|
||||
knownTypes["core/v1/KeyToPath"] = func() interface{} {
|
||||
return &corev1.KeyToPath{}
|
||||
}
|
||||
|
|
@ -250,6 +253,9 @@ func init() {
|
|||
knownTypes["core/v1/LimitRangeSpec"] = func() interface{} {
|
||||
return &corev1.LimitRangeSpec{}
|
||||
}
|
||||
knownTypes["core/v1/LinuxContainerUser"] = func() interface{} {
|
||||
return &corev1.LinuxContainerUser{}
|
||||
}
|
||||
knownTypes["core/v1/List"] = func() interface{} {
|
||||
return &corev1.List{}
|
||||
}
|
||||
|
|
@ -307,6 +313,9 @@ func init() {
|
|||
knownTypes["core/v1/NodeDaemonEndpoints"] = func() interface{} {
|
||||
return &corev1.NodeDaemonEndpoints{}
|
||||
}
|
||||
knownTypes["core/v1/NodeFeatures"] = func() interface{} {
|
||||
return &corev1.NodeFeatures{}
|
||||
}
|
||||
knownTypes["core/v1/NodeList"] = func() interface{} {
|
||||
return &corev1.NodeList{}
|
||||
}
|
||||
|
|
@ -520,6 +529,9 @@ func init() {
|
|||
knownTypes["core/v1/ResourceFieldSelector"] = func() interface{} {
|
||||
return &corev1.ResourceFieldSelector{}
|
||||
}
|
||||
knownTypes["core/v1/ResourceHealth"] = func() interface{} {
|
||||
return &corev1.ResourceHealth{}
|
||||
}
|
||||
knownTypes["core/v1/ResourceList"] = func() interface{} {
|
||||
return &corev1.ResourceList{}
|
||||
}
|
||||
|
|
@ -538,6 +550,9 @@ func init() {
|
|||
knownTypes["core/v1/ResourceRequirements"] = func() interface{} {
|
||||
return &corev1.ResourceRequirements{}
|
||||
}
|
||||
knownTypes["core/v1/ResourceStatus"] = func() interface{} {
|
||||
return &corev1.ResourceStatus{}
|
||||
}
|
||||
knownTypes["core/v1/SELinuxOptions"] = func() interface{} {
|
||||
return &corev1.SELinuxOptions{}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ core/v1/CephFSPersistentVolumeSource
|
|||
core/v1/CephFSVolumeSource
|
||||
core/v1/CinderPersistentVolumeSource
|
||||
core/v1/CinderVolumeSource
|
||||
core/v1/ClaimSource
|
||||
core/v1/ClientIPConfig
|
||||
core/v1/ClusterTrustBundleProjection
|
||||
core/v1/ComponentCondition
|
||||
|
|
@ -36,6 +35,7 @@ core/v1/ContainerStateRunning
|
|||
core/v1/ContainerStateTerminated
|
||||
core/v1/ContainerStateWaiting
|
||||
core/v1/ContainerStatus
|
||||
core/v1/ContainerUser
|
||||
core/v1/DaemonEndpoint
|
||||
core/v1/DownwardAPIProjection
|
||||
core/v1/DownwardAPIVolumeFile
|
||||
|
|
@ -73,6 +73,7 @@ core/v1/HostIP
|
|||
core/v1/HostPathVolumeSource
|
||||
core/v1/ISCSIPersistentVolumeSource
|
||||
core/v1/ISCSIVolumeSource
|
||||
core/v1/ImageVolumeSource
|
||||
core/v1/KeyToPath
|
||||
core/v1/Lifecycle
|
||||
core/v1/LifecycleHandler
|
||||
|
|
@ -80,6 +81,7 @@ core/v1/LimitRange
|
|||
core/v1/LimitRangeItem
|
||||
core/v1/LimitRangeList
|
||||
core/v1/LimitRangeSpec
|
||||
core/v1/LinuxContainerUser
|
||||
core/v1/List
|
||||
core/v1/LoadBalancerIngress
|
||||
core/v1/LoadBalancerStatus
|
||||
|
|
@ -99,6 +101,7 @@ core/v1/NodeCondition
|
|||
core/v1/NodeConfigSource
|
||||
core/v1/NodeConfigStatus
|
||||
core/v1/NodeDaemonEndpoints
|
||||
core/v1/NodeFeatures
|
||||
core/v1/NodeList
|
||||
core/v1/NodeProxyOptions
|
||||
core/v1/NodeRuntimeHandler
|
||||
|
|
@ -170,12 +173,14 @@ core/v1/ReplicationControllerSpec
|
|||
core/v1/ReplicationControllerStatus
|
||||
core/v1/ResourceClaim
|
||||
core/v1/ResourceFieldSelector
|
||||
core/v1/ResourceHealth
|
||||
core/v1/ResourceList
|
||||
core/v1/ResourceQuota
|
||||
core/v1/ResourceQuotaList
|
||||
core/v1/ResourceQuotaSpec
|
||||
core/v1/ResourceQuotaStatus
|
||||
core/v1/ResourceRequirements
|
||||
core/v1/ResourceStatus
|
||||
core/v1/SELinuxOptions
|
||||
core/v1/ScaleIOPersistentVolumeSource
|
||||
core/v1/ScaleIOVolumeSource
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ func TestCreateServiceAccount(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run("New SA", func(t *testing.T) {
|
||||
cs := fake.NewSimpleClientset(ns)
|
||||
cs := fake.NewClientset(ns)
|
||||
err := CreateServiceAccount(cs, "argocd-manager", "kube-system")
|
||||
require.NoError(t, err)
|
||||
rsa, err := cs.CoreV1().ServiceAccounts("kube-system").Get(context.Background(), "argocd-manager", metav1.GetOptions{})
|
||||
|
|
@ -86,7 +86,7 @@ func TestCreateServiceAccount(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("SA exists already", func(t *testing.T) {
|
||||
cs := fake.NewSimpleClientset(ns, sa)
|
||||
cs := fake.NewClientset(ns, sa)
|
||||
err := CreateServiceAccount(cs, "argocd-manager", "kube-system")
|
||||
require.NoError(t, err)
|
||||
rsa, err := cs.CoreV1().ServiceAccounts("kube-system").Get(context.Background(), "argocd-manager", metav1.GetOptions{})
|
||||
|
|
@ -94,17 +94,8 @@ func TestCreateServiceAccount(t *testing.T) {
|
|||
assert.NotNil(t, rsa)
|
||||
})
|
||||
|
||||
t.Run("Invalid name", func(t *testing.T) {
|
||||
cs := fake.NewSimpleClientset(ns)
|
||||
err := CreateServiceAccount(cs, "", "kube-system")
|
||||
require.NoError(t, err)
|
||||
rsa, err := cs.CoreV1().ServiceAccounts("kube-system").Get(context.Background(), "argocd-manager", metav1.GetOptions{})
|
||||
require.Error(t, err)
|
||||
assert.Nil(t, rsa)
|
||||
})
|
||||
|
||||
t.Run("Invalid namespace", func(t *testing.T) {
|
||||
cs := fake.NewSimpleClientset()
|
||||
cs := fake.NewClientset()
|
||||
err := CreateServiceAccount(cs, "argocd-manager", "invalid")
|
||||
require.NoError(t, err)
|
||||
rsa, err := cs.CoreV1().ServiceAccounts("invalid").Get(context.Background(), "argocd-manager", metav1.GetOptions{})
|
||||
|
|
@ -147,7 +138,7 @@ func TestInstallClusterManagerRBAC(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run("Cluster Scope - Success", func(t *testing.T) {
|
||||
cs := fake.NewSimpleClientset(ns, secret, sa)
|
||||
cs := fake.NewClientset(ns, secret, sa)
|
||||
token, err := InstallClusterManagerRBAC(cs, "test", nil, testBearerTokenTimeout)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "foobar", token)
|
||||
|
|
@ -156,14 +147,14 @@ func TestInstallClusterManagerRBAC(t *testing.T) {
|
|||
t.Run("Cluster Scope - Missing data in secret", func(t *testing.T) {
|
||||
nsecret := secret.DeepCopy()
|
||||
nsecret.Data = make(map[string][]byte)
|
||||
cs := fake.NewSimpleClientset(ns, nsecret, sa)
|
||||
cs := fake.NewClientset(ns, nsecret, sa)
|
||||
token, err := InstallClusterManagerRBAC(cs, "test", nil, testBearerTokenTimeout)
|
||||
require.Error(t, err)
|
||||
assert.Empty(t, token)
|
||||
})
|
||||
|
||||
t.Run("Namespace Scope - Success", func(t *testing.T) {
|
||||
cs := fake.NewSimpleClientset(ns, secret, sa)
|
||||
cs := fake.NewClientset(ns, secret, sa)
|
||||
token, err := InstallClusterManagerRBAC(cs, "test", []string{"nsa"}, testBearerTokenTimeout)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "foobar", token)
|
||||
|
|
@ -172,7 +163,7 @@ func TestInstallClusterManagerRBAC(t *testing.T) {
|
|||
t.Run("Namespace Scope - Missing data in secret", func(t *testing.T) {
|
||||
nsecret := secret.DeepCopy()
|
||||
nsecret.Data = make(map[string][]byte)
|
||||
cs := fake.NewSimpleClientset(ns, nsecret, sa)
|
||||
cs := fake.NewClientset(ns, nsecret, sa)
|
||||
token, err := InstallClusterManagerRBAC(cs, "test", []string{"nsa"}, testBearerTokenTimeout)
|
||||
require.Error(t, err)
|
||||
assert.Empty(t, token)
|
||||
|
|
@ -181,14 +172,14 @@ func TestInstallClusterManagerRBAC(t *testing.T) {
|
|||
|
||||
func TestUninstallClusterManagerRBAC(t *testing.T) {
|
||||
t.Run("Success", func(t *testing.T) {
|
||||
cs := fake.NewSimpleClientset(newServiceAccountSecret())
|
||||
cs := fake.NewClientset(newServiceAccountSecret())
|
||||
err := UninstallClusterManagerRBAC(cs)
|
||||
require.NoError(t, err)
|
||||
})
|
||||
}
|
||||
|
||||
func TestGenerateNewClusterManagerSecret(t *testing.T) {
|
||||
kubeclientset := fake.NewSimpleClientset(newServiceAccountSecret())
|
||||
kubeclientset := fake.NewClientset(newServiceAccountSecret())
|
||||
kubeclientset.ReactionChain = nil
|
||||
|
||||
generatedSecret := newServiceAccountSecret()
|
||||
|
|
@ -214,7 +205,7 @@ func TestRotateServiceAccountSecrets(t *testing.T) {
|
|||
"token": []byte("fake-token"),
|
||||
}
|
||||
|
||||
kubeclientset := fake.NewSimpleClientset(newServiceAccount(), newServiceAccountSecret(), generatedSecret)
|
||||
kubeclientset := fake.NewClientset(newServiceAccount(), newServiceAccountSecret(), generatedSecret)
|
||||
|
||||
err := RotateServiceAccountSecrets(kubeclientset, &testClaims, generatedSecret)
|
||||
require.NoError(t, err)
|
||||
|
|
@ -254,7 +245,7 @@ func TestGetServiceAccountBearerToken(t *testing.T) {
|
|||
Namespace: tokenSecret.Namespace,
|
||||
},
|
||||
}
|
||||
kubeclientset := fake.NewSimpleClientset(sa, dockercfgSecret, tokenSecret)
|
||||
kubeclientset := fake.NewClientset(sa, dockercfgSecret, tokenSecret)
|
||||
|
||||
token, err := GetServiceAccountBearerToken(kubeclientset, "kube-system", sa.Name, testBearerTokenTimeout)
|
||||
require.NoError(t, err)
|
||||
|
|
@ -273,7 +264,7 @@ func Test_getOrCreateServiceAccountTokenSecret_NoSecretForSA(t *testing.T) {
|
|||
Namespace: ns.Name,
|
||||
},
|
||||
}
|
||||
cs := fake.NewSimpleClientset(ns, saWithoutSecret)
|
||||
cs := fake.NewClientset(ns, saWithoutSecret)
|
||||
cs.PrependReactor("create", "secrets",
|
||||
func(a kubetesting.Action) (handled bool, ret runtime.Object, err error) {
|
||||
s, ok := a.(kubetesting.CreateAction).GetObject().(*corev1.Secret)
|
||||
|
|
@ -340,7 +331,7 @@ func Test_getOrCreateServiceAccountTokenSecret_SAHasSecret(t *testing.T) {
|
|||
},
|
||||
}
|
||||
|
||||
cs := fake.NewSimpleClientset(ns, saWithSecret, secret)
|
||||
cs := fake.NewClientset(ns, saWithSecret, secret)
|
||||
|
||||
got, err := getOrCreateServiceAccountTokenSecret(cs, ArgoCDManagerServiceAccount, ns.Name)
|
||||
require.NoError(t, err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue