mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 10:18:39 +00:00
[controller,api] Refactor tenant resource label
This patch refactors the secret selectors to use the `internal.cozystack.io/tenantresource` label for managing secret visibility and removes any selectors based on it or the previous `apps.cozystack.io/tenantresource` label, the idea being that this label will only ever be set by the controller. ``` [controller,api] Refactor labels for the secret selector. ``` Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
This commit is contained in:
4
pkg/apis/core/v1alpha1/tenantresource_types.go
Normal file
4
pkg/apis/core/v1alpha1/tenantresource_types.go
Normal file
@@ -0,0 +1,4 @@
|
||||
package v1alpha1
|
||||
|
||||
const TenantResourceLabelKey = "internal.cozystack.io/tenantresource"
|
||||
const TenantResourceLabelValue = "true"
|
||||
@@ -55,7 +55,7 @@ var (
|
||||
|
||||
// Define constants for label filtering
|
||||
const (
|
||||
TenantModuleLabelKey = "apps.cozystack.io/tenantmodule"
|
||||
TenantModuleLabelKey = "internal.cozystack.io/tenantmodule"
|
||||
TenantModuleLabelValue = "true"
|
||||
singularName = "tenantmodule"
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// TenantSecret registry – namespaced view over Secrets labelled
|
||||
// "internal.cozystack.io/tenantsecret=true". Internal tenant secret labels are hidden.
|
||||
// "internal.cozystack.io/tenantresource=true". Internal tenant secret labels are hidden.
|
||||
|
||||
package tenantsecret
|
||||
|
||||
@@ -35,8 +35,8 @@ import (
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
const (
|
||||
tsLabelKey = "apps.cozystack.io/tenantresource"
|
||||
tsLabelValue = "true"
|
||||
tsLabelKey = corev1alpha1.TenantResourceLabelKey
|
||||
tsLabelValue = corev1alpha1.TenantResourceLabelValue
|
||||
singularName = "tenantsecret"
|
||||
kindTenantSecret = "TenantSecret"
|
||||
kindTenantSecretList = "TenantSecretList"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// TenantSecretsTable registry – namespaced, read-only flattened view over
|
||||
// Secrets labelled "internal.cozystack.io/tenantsecret=true". Each data key is a separate object.
|
||||
// Secrets labelled "internal.cozystack.io/tenantresource=true". Each data key is a separate object.
|
||||
|
||||
package tenantsecretstable
|
||||
|
||||
@@ -29,8 +29,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
tsLabelKey = "apps.cozystack.io/tenantresource"
|
||||
tsLabelValue = "true"
|
||||
tsLabelKey = corev1alpha1.TenantResourceLabelKey
|
||||
tsLabelValue = corev1alpha1.TenantResourceLabelValue
|
||||
kindObj = "TenantSecretsTable"
|
||||
kindObjList = "TenantSecretsTableList"
|
||||
singularName = "tenantsecretstable"
|
||||
|
||||
Reference in New Issue
Block a user