diff --git a/docs/developer-guides/annotations.md b/docs/developer-guides/annotations.md index c8aec519..51fabb58 100644 --- a/docs/developer-guides/annotations.md +++ b/docs/developer-guides/annotations.md @@ -6,19 +6,19 @@ Annotation keys and values can only be strings. |Name | type | |---------------------------|------| -|[clusters.registry.ethos.adobe.com/excluded-tags](#excluded-tags)|string| -|[clusters.registry.ethos.adobe.com/skip-ca-cert](#skip-ca-cert)|"true" or "false"| +|[registry.ethos.adobe.com/excluded-tags](#excluded-tags)|string| +|[registry.ethos.adobe.com/skip-ca-cert](#skip-ca-cert)|"true" or "false"| ## Excluded tags -The annotation `clusters.registry.ethos.adobe.com/excluded-tags` defines the behavior of the cluster-registry-client regarding to dynamic tags. If Alertmanager sends a signal for a specific tag, it will be ignored by Cluster Registry Client. +The annotation `registry.ethos.adobe.com/excluded-tags` defines the behavior of the cluster-registry-client regarding to dynamic tags. If Alertmanager sends a signal for a specific tag, it will be ignored by Cluster Registry Client. Example: - `clusters.registry.ethos.adobe.com/excluded-tags: "onboarding,scaling"` + `registry.ethos.adobe.com/excluded-tags: "onboarding,scaling"` ## Skip CA Cert -The annotation `clusters.registry.ethos.adobe.com/skip-ca-cert` defines the behavior of the cluster-registry-client for setting the K8s API CA Certificate. If it's set to `true`, the `CertificateAuthorityData` will not be set. +The annotation `registry.ethos.adobe.com/skip-ca-cert` defines the behavior of the cluster-registry-client for setting the K8s API CA Certificate. If it's set to `true`, the `CertificateAuthorityData` will not be set. Example: - `clusters.registry.ethos.adobe.com/skip-ca-cert: "true"` + `registry.ethos.adobe.com/skip-ca-cert: "true"` diff --git a/pkg/client/controllers/cluster_controller.go b/pkg/client/controllers/cluster_controller.go index d033c50a..48a33caa 100644 --- a/pkg/client/controllers/cluster_controller.go +++ b/pkg/client/controllers/cluster_controller.go @@ -60,7 +60,7 @@ func (r *ClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct return ctrl.Result{}, client.IgnoreNotFound(err) } - skipCACert := instance.Annotations["clusters.registry.ethos.adobe.com/skip-ca-cert"] + skipCACert := instance.Annotations["registry.ethos.adobe.com/skip-ca-cert"] // skipCACert is an exception rather than a rule if skipCACert == "true" { diff --git a/pkg/client/controllers/cluster_controller_test.go b/pkg/client/controllers/cluster_controller_test.go index 66af153c..4be9b2a0 100644 --- a/pkg/client/controllers/cluster_controller_test.go +++ b/pkg/client/controllers/cluster_controller_test.go @@ -122,7 +122,7 @@ var _ = Describe("Client Controller", func() { err := k8sClient.Get(ctx, clusterLookupKey, cluster) return err == nil }, timeout, interval).Should(BeTrue()) - cluster.Annotations = map[string]string{"clusters.registry.ethos.adobe.com/skip-ca-cert": "true"} + cluster.Annotations = map[string]string{"registry.ethos.adobe.com/skip-ca-cert": "true"} Expect(k8sClient.Update(ctx, cluster)).Should(Succeed()) // give controller-runtime time to propagagte data into etcd diff --git a/pkg/client/webhook/webhook.go b/pkg/client/webhook/webhook.go index 6ca86d56..df96734d 100644 --- a/pkg/client/webhook/webhook.go +++ b/pkg/client/webhook/webhook.go @@ -125,7 +125,7 @@ func (s *Server) process(alert Alert) error { cluster.Spec.Tags = make(map[string]string) } - excludedTagsAnnotation = cluster.Annotations["clusters.registry.ethos.adobe.com/excluded-tags"] + excludedTagsAnnotation = cluster.Annotations["registry.ethos.adobe.com/excluded-tags"] if excludedTagsAnnotation != "" { excludedTags = strings.Split(excludedTagsAnnotation, ",") diff --git a/pkg/client/webhook/webhook_test.go b/pkg/client/webhook/webhook_test.go index 96773503..02aed8f5 100644 --- a/pkg/client/webhook/webhook_test.go +++ b/pkg/client/webhook/webhook_test.go @@ -264,7 +264,7 @@ var _ = Describe("Webhook Server", func() { err := k8sClient.Get(ctx, clusterLookupKey, cluster) return err == nil }, timeout, interval).Should(BeTrue()) - cluster.Annotations = map[string]string{"clusters.registry.ethos.adobe.com/excluded-tags": "other-tag,my-tag"} + cluster.Annotations = map[string]string{"registry.ethos.adobe.com/excluded-tags": "other-tag,my-tag"} Expect(k8sClient.Update(ctx, cluster)).Should(Succeed()) // give controller-runtime time to propagagte data into etcd