Files
capsule/pkg/api/additional_metadata.go
Deofex 8e9b8adac9 feat: Add additionalMetadataList Support for Conditional Metadata Assignment (#1339)
* feat: Add support for additionalMetadataList

Signed-off-by: Deofex <28751252+Deofex@users.noreply.github.com>

* docs: change description

Signed-off-by: Deofex <28751252+Deofex@users.noreply.github.com>

* fix: missing bracket

Signed-off-by: Deofex <28751252+Deofex@users.noreply.github.com>

* fix: removed duplicated if statement

Signed-off-by: Deofex <28751252+Deofex@users.noreply.github.com>

* chore: adjustments after review

Signed-off-by: Deofex <28751252+Deofex@users.noreply.github.com>

* chore: Sync `syncNamespaceMetadata` method

Signed-off-by: Deofex <28751252+Deofex@users.noreply.github.com>

---------

Signed-off-by: Deofex <28751252+Deofex@users.noreply.github.com>
Signed-off-by: Deofex 28751252+Deofex@users.noreply.github.com
2025-05-08 08:45:05 +02:00

22 lines
654 B
Go

// Copyright 2020-2023 Project Capsule Authors.
// SPDX-License-Identifier: Apache-2.0
package api
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +kubebuilder:object:generate=true
type AdditionalMetadataSpec struct {
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}
// +kubebuilder:object:generate=true
type AdditionalMetadataSelectorSpec struct {
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
}