From b3b8f8f217e4cda2ea2c42d528166ebc6f4c422d Mon Sep 17 00:00:00 2001 From: Christopher Li Date: Fri, 16 Aug 2024 16:30:32 -0700 Subject: [PATCH] Revert "Fix k8s permissions (#133)" This reverts commit e545b838a002f0a38e8fc58346d8fd4a19a485d4. --- examples/manifests/role.yaml | 1 - jsonnet/lib/thanos-receive-controller.libsonnet | 2 +- main.go | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/manifests/role.yaml b/examples/manifests/role.yaml index 660fd1f4..2d8a5599 100644 --- a/examples/manifests/role.yaml +++ b/examples/manifests/role.yaml @@ -25,7 +25,6 @@ rules: resources: - pods verbs: - - list - get - update - apiGroups: diff --git a/jsonnet/lib/thanos-receive-controller.libsonnet b/jsonnet/lib/thanos-receive-controller.libsonnet index 1bdbbdc4..8f78b5b0 100644 --- a/jsonnet/lib/thanos-receive-controller.libsonnet +++ b/jsonnet/lib/thanos-receive-controller.libsonnet @@ -77,7 +77,7 @@ function(params) { { apiGroups: [''], resources: ['pods'], - verbs: ['list', 'get', 'update'], + verbs: ['get', 'update'], }, { apiGroups: ['apps'], diff --git a/main.go b/main.go index b960f29d..b9fa7574 100644 --- a/main.go +++ b/main.go @@ -101,6 +101,7 @@ func parseFlags() CmdConfig { flag.StringVar(&config.podAzAnnotationKey, "pod-az-annotation-key", "", "pod annotation key for AZ Info, If not specified or key not found, will use sts name as AZ key") flag.StringVar(&config.migrationState, "migration-state", "no-state", "[Databricks Internal] internal pantheon migration state info") flag.Parse() + return config } @@ -458,7 +459,7 @@ func (c *controller) registerMetrics(reg *prometheus.Registry) { c.configmapChangeErrors.WithLabelValues(create).Add(0) c.configmapChangeErrors.WithLabelValues(update).Add(0) c.configmapChangeErrors.WithLabelValues(other).Add(0) - c.pantheonMigrationState.WithLabelValues(c.options.migrationState).Add(0) + c.pantheonMigrationState.WithLabelValues(c.options.migrationState).Add(1) reg.MustRegister( c.reconcileAttempts, c.reconcileErrors,